EIT Software Listings

 

anal
obsolete
response
util

 

Previous Routine
Next Routine

 

Listing of $SSW/soho/eit/idl/util/ef2time.pro

 


function ef2time, filenames, format = format
;+
; NAME:
;   ef2time
;
; PURPOSE: convert input EIT QKL or LZ filename into corresponding time.
;
; CALLING SEQUENCE:
;    times = ef2time(filenames,format='ccsds')
;
; INPUTS:
;    filenames         = QKL or LZ file names, e.g. 'efz200001.123456'
;                        may be an array
;
; OPTIONAL INPUTS:
;    None
;
; KEYWORDS
;    format     =  choice of output format, default = UTC
;                  allowed values : 'ecs','ccsds','vms','external','stime'
;
; CAVEATS:  The file names do not always correspond to the 
;           "CORRECTED OBS_TIME" in the header. The times may be up to
;           5 minutes off. Do not use this if higher tie precision is needed.
;          
; MODIFICATION HISTORY
;   17-Jan-2001 - J.S.Newmark 
;
;-

start = intarr(n_elements(filenames))
ql = where(strpos(strlowcase(filenames),'efr') ne -1,qcnt)
lz = where(strpos(strlowcase(filenames),'efz') ne -1,lcnt)
if qcnt ne 0 then start(ql) = strpos(strlowcase(filenames(ql)),'efr')
if lcnt ne 0 then start(lz) = strpos(strlowcase(filenames(lz)),'efz')
zfiles = strmids(filenames,start+3,15)

year = strmids(zfiles,0,4)
month = strmids(zfiles,4,2)
day = strmids(zfiles,6,2)
hour = strmids(zfiles,9,2)
min = strmids(zfiles,11,2)
sec = strmids(zfiles,13,2)

zfiles = year + '/' + month + '/' + day + ' ' + hour + ':' + min + $
         ':' + sec

if n_elements(format) eq 0 then format = 'utc'
case strlowcase(format) of
   'ecs':      ecs = 1
   'ccsds':    ccsds = 1
   'vms':      vms = 1
   'stime':    stime = 1
   'external': ext = 1
   else:
endcase
 
return,anytim2utc(zfiles,ecs=ecs,vms=vms,ccsds=ccsds,stime=stime,ext=ext)
end


Web curator: Frédéric Auchère
Responsible NASA official: Joseph B. Gurman, Facility Scientist, Solar Data Analysis Center
joseph.b.gurman@gsfc.nasa.gov
+1 301 286-4767
NASA Goddard Space Flight Center
Solar Physics Branch / Code 682

Last revised: - Wed May 9 21:45:13 2007- F. Auchère