function norh_f2evf,dayfr,freq=freq ;+ ; NAME: ; NORH_F2EVF ; ; PURPOSE: ; This function interprets the event-mode-data frame number ; into the event file name. ; ; CALLING SEQUENCE: ; evf = norh_f2evf(dayfr) ; ; INPUT: ; dayfr: An n-element vector of long-type arrays. ; [[day,frame] ,[ ... ], ] ; The value for 'day' is the same as .day structure. ; OUTPUT: ; evf: event file name ; ; OPTIONAL INPUT KEYWORDS: ; freq: Observing frequency of the data. ; '17' or '34'. Default is '17'. ; ; HISTORY: ; Writtern 1999-02-04 TY ; Modified 1999-11-15 TY become faster ; ;- if keyword_set(freq) eq 0 then freq=17 freqst=strtrim(freq,1) nx=n_elements(dayfr) evf=strarr(nx) msche=dayfr.schedule whr=where((msche eq -1),count) if (count ge 1) then msche(whr)=0 dayuniq=dayfr(uniq(dayfr.dayjst)).dayjst ndx=n_elements(dayuniq) for nd=0,ndx-1 do begin dayjst=dayuniq(nd) days=anytim([0,dayjst],/ints) norh_pr_info,days,/nodisp,list=list,/jst,/event sz=size(list) if (sz(0) eq 0) then message,'no events in this duration' if sz(0) ge 2 then mx=sz(2) else mx=1 sttime=reform(list(0,*)) ex=anytim(sttime,/ex) yy=reform(ex(6,*)) & mn=reform(ex(5,*)) & dd=reform(ex(4,*)) hh=reform(ex(0,*)) & mm=reform(ex(1,*)) & ss=reform(ex(2,*)) for m=0,mx-1 do begin if (yy(m) lt 2000) then yy(m)=yy(m)-1900 if (yy(m) ge 2000) then yy(m)=yy(m)-2000 endfor yymmdd=$ string(transpose([[yy],[mn],[dd],[hh],[mm],[ss]]), $ format="(i2.2,i2.2,i2.2,i2.2,i2.2,i2.2)") files='se'+freqst+yymmdd whr=where(dayfr.dayjst eq dayjst) evf(whr)=files(msche(whr)) endfor return,evf end