dustem_old2new_sed_format.pro
647 Bytes
PRO dustem_old2new_sed_format, file=file
;NB file should be the xcat file string
dustem_init
dir=!dustem_wrap_soft_dir+'/Data/EXAMPLE_OBSDATA/'
file=dir+file
str='cp '+file+' '+file+'.old'
spawn,str
old_sed=read_xcat(file,/silent,comments=old_comments)
Nsed=n_elements(old_sed)
new_sed=dustem_initialize_sed(Nsed,comments=new_comments,help=help)
comments=['Written by dustem_old2new_sed_format.pro on '+systime(0),old_comments,new_comments]
new_sed.instru=old_sed.instru
new_sed.filter=old_sed.filter
new_sed.wave=old_sed.wave
new_sed.StokesI=old_sed.spec
new_sed.sigmaII=(old_sed.error)^2
write_xcat,new_sed,file,comments=comments
END