function norh_tsx2idx,data,header ;+ ; NAME: ; NORH_TSX2IDX ; ; PURPOSE: ; This procedure converts the NORH 'TSX' header ; to index structure. ; ; CALLING SEQUENCE: ; index=norh_tsx2idx(tsx_data,header) ; ; INPUTS: ; tsx_data: 'TSX' data ; header: FITS header read from the TSX file ; OUTPUTS: ; index: index structure ; ; HISTORY: ; Writtern 1998-05-29 JS and TY ;- ; define the structure norh_mkst_index,index_el norh_hdst_tsx,hdst sz=size(data) if (sz(0) ge 2) then mx=sz(2) else mx=1 index=replicate(index_el,mx) timecor=reform(data(0,*)) hh=timecor/10000000 mm=(timecor-hh*10000000)/100000 ss=(timecor-hh*10000000-mm*100000)/1000 ms=timecor-hh*10000000-mm*100000-ss*1000 ; header to structure norh_fits_interp,header,hd_st,instruc=hdst if (hd_st.hdrident eq 'HeliogFITS 2.0') then begin dayj=fix(norh_splitstr(hd_st.jstdate,'-')) yy=replicate(dayj(0),mx) mt=replicate(dayj(1),mx) dd=replicate(dayj(2),mx) endif else begin dayj=fix(norh_splitstr(hd_st.jstdate,'/')) yy=replicate(dayj(2),mx) mt=replicate(dayj(1),mx) dd=replicate(dayj(0),mx) endelse el=transpose([[hh],[mm],[ss],[ms],[dd],[mt],[yy]]) daytimejst=anytim2ints(el) index.gen.dayjst=daytimejst.day index.gen.timejst=daytimejst.time ; ; JST time to UT structure daytimeut=anytim2ints(el,offset=-9.*60.*60) index.gen.day=daytimeut.day index.gen.time=daytimeut.time index.norh.obs_freq=hd_st.obs_freq return,index end