;+ ; NAME: ; oclc_epq03_valset ; PURPOSE: (one line) ; set a value for an array structure ; DESCRIPTION: ; set a value for an array structure ; CATEGORY: ; Occultation lightcurve (oclc) ; CALLING SEQUENCE: ; oclc_epq03_valset,arr,i,val ; INPUTS: ; arr = either an integer or half-integer indexed array structure ; i = cell index, integer or half-integer (same as for arr) ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; arr_i ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; Only change arr if i is in range, and if i indexed ; the same way as arr is (eg if arr is tabulated on ; bin centers, with arr.istart integer, then i must be ; an integer. If arr is tabulated on bin boundaries, ; with arr.istart a half-integer, then i much be a ; hald-integer (like 10.5).) Otherwise exit quietly. ; PROCEDURE: ; Elliot, Person and Qu 2003, Fig 2 ; ; MODIFICATION HISTORY: ; Written 2006 Aug 23, Leslie Young, SwRI ;- pro oclc_epq03_valset, arr, i, val if is_array(i) then begin for ii = 0, n_elements(i) - 1 do begin oclc_epq03_valset,arr,i[ii], val[ii] end return end indx = (i - arr.istart) n = n_elements(arr.val) if indx ge 0 and indx lt n and (round(indx * 2) mod 2 eq 0) then $ arr.val[round(indx)] = val end