function norh_tcx2idx,header ;+ ; NAME: ; NORH_TCX2IDX ; ; PURPOSE: ; This procedure converts the NORH 'TCX' header ; to index structure. ; ; CALLING SEQUENCE: ; index=norh_tcx2idx(header) ; ; INPUTS: ; header: FITS header read from the TCX file ; ; OUTPUTS: ; index: index structure ; ; HISTORY: ; Writtern 1998-05-29 JS and TY ; Revised 1998-08-12 TY ; Revised 1999-01-02 TY from norh_cor2idx ; Modified 1999-12-27 TY bug fix timejst & dayjst ; ;- ; define the structure norh_mkst_index,index_el ; header to structure norh_hdst_tcx,hdst norh_fits_interp,header,hd_st,instruc=hdst mx=hd_st.naxis1 index=replicate(index_el,mx) freq=hd_st.obs_freq index.norh.obs_freq=replicate(freq,mx) polariz='r+l' index.norh.polariz=replicate(polariz,mx) if (hd_st.pversion eq '6.00') then begin daytimest=hd_st.date_obs+' '+hd_st.crval1 daytimestut=anytim(daytimest,/ints) endif else begin timest=hd_st.crval1 datest=hd_st.date_obs dd=fix(strmid(datest,0,2)) mt=fix(strmid(datest,3,2)) yy=fix(strmid(datest,6,2)) hh=fix(strmid(timest,0,2)) mm=fix(strmid(timest,3,2)) ss=fix(strmid(timest,6,2)) ms=fix(strmid(timest,9,3)) daytimestut=anytim2ints([hh,mm,ss,ms,dd,mt,yy]) endelse daytimest=norh_ut2jst(daytimestut,/ints) dt=hd_st.cdelt1 daytime=replicate(daytimest,mx) daytime.time=daytimest.time+findgen(mx)*dt*1000L daytimeut=anytim2ints(daytime,offset=-9.*60.*60) index.gen.time=daytimeut.time index.gen.day=daytimeut.day index.gen.dayjst=daytime.day index.gen.timejst=daytime.time return,index end