Blame view

src/idl/dustem_old2new_sed_format.pro 709 Bytes
eef37ef9   Annie Hughes   do not remember, ...
1
PRO dustem_old2new_sed_format, dir=dir,file=file
85637eef   Jean-Philippe Bernard   first commit
2

4abae96b   Ilyes Choubani   Updating xcat SED...
3
;NB file should be the xcat file string
85637eef   Jean-Philippe Bernard   first commit
4

4abae96b   Ilyes Choubani   Updating xcat SED...
5
dustem_init
607060e5   Ilyes Choubani   test version
6

eef37ef9   Annie Hughes   do not remember, ...
7
8
use_dir=!dustem_wrap_soft_dir+'/Data/EXAMPLE_OBSDATA/'
if keyword_set(dir) then use_dir=dir
607060e5   Ilyes Choubani   test version
9

eef37ef9   Annie Hughes   do not remember, ...
10
file=use_dir+file
85637eef   Jean-Philippe Bernard   first commit
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

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

eef37ef9   Annie Hughes   do not remember, ...
30
the_end:
85637eef   Jean-Philippe Bernard   first commit
31
END