;+ ; Contains the add_sls_to_ephem procedure ; ; :Author: ; Laurent Lamy ; ; :History: ; 2012/03/08: Created ; ; 2012/07/27: Last Edit ;- ; ;+ ; add_sls_to_ephem is a procedure that <behavior desc here> ; ; :Uses: ; sls3 ; ; :Params: ; nom: in, required, type=sometype ; A parameter named nom ;- pro ADD_SLS_TO_EPHEM, nom openr,u,'../tmp/'+nom+'.txt',/get_lun n=1000000L aj=dblarr(n) & sls=dblarr(n) & xlat=fltarr(n) & xtl=xlat & xr=xlat buf='' for i=1,4 do readf,u,buf on_ioerror, suite i=0L encore: readf,u,a,j,h,m,s,xsls,sls2,sls3,lat,l,tl,r aj(i)=a*1000.d0+j+h/24.d0+m/1440.d0+s/86400.d0 sls(i)=xsls xlat(i)=lat xtl(i)=tl xr(i)=r i=i+1L goto,encore suite: n=i aj=aj(0:n-1) & sls=sls(0:n-1) & xlat=xlat(0:n-1) & xtl=xtl(0:n-1) & xr=xr(0:n-1) close,u & free_lun,u t97=aj_t97(aj) xsls=sls for i=1L,n-2L do if xsls(i) lt xsls(i-1) then xsls(i:*)=xsls(i:*)+360.d0 restore,'../tmp/'+nom+'.sav',/verb sls=interpol(xsls,t97,t) save,t,lat,tl,rs,sls,file='../tmp/'+nom+'b.sav' return end