pro get_sfrs,times,index=index,data=data ;+ ; NAME ; get_sfrs ; PURPOSE ; Given a list of times in any format return Level-0 index and data ; from the weekdirs directory for those times. ; CALLING SEQUENCE ; get_sfrs,times,index=index,data=data ; INPUT ; times, desired image times in any format. ; KEYWORD OUTPUT ; index, XDA index structure ; data, SFR image cube for input times. ; RESTRICTION ; Does not work across FEM week boundary. ; HISTORY ; 13-Oct-2008 LWA Kluged from get_movy_parts.pro. ;- sfrdir='/disk/pd1/weekdirs/' tt=anytim(times) tts=sort(tt) ttg=tt(uniq(tt(tts))) wkid=anytim2weekinfo(anytim(ttg(0),/ints)) filelist=file_search(sfrdir+wkid+'/sfr*') rd_roadmap,filelist,road ttr=tim2dset(road,anytim(ttg,/ints),offset=offs) oo=where(abs(offs) gt 1.,noo) if noo gt 0 then begin print,'**** Time mismatch between times and roadmap. Stopping. ****' pmm,offs print,fmt_tim(road(oo)) stop endif rd_xda,filelist,ttr,index,data end