PRO eae_fill_refs, eae ; Fills in the two columns reference_value and reference_id in the ; eae array. ; Read the eae_ref_meas.rdb file: ;#filename: ref_meas.rdb ;# ;ref_id comment ids_using_this ; Read in the references refs = rdb_read(!DDIDL+'/xrcf/eae_ref_meas.rdb') ; Go through the reference lines... for ir = 0, n_elements(refs)-1 do begin ; we want to put ref_id into all the ids_using_this pieces = STR_SEP(refs(ir).ids_using_this, ',') for ip=0,n_elements(pieces)-1 do begin where_it_is = where( eae.trw_id EQ pieces(ip), nwhere) if nwhere GE 1 then begin eae(where_it_is).reference_id = refs(ir).ref_id end else begin ; didn't find it end end end RETURN END