Blame view

src/idl/dustem_old2new_ext_format.pro 660 Bytes
4abae96b   Ilyes Choubani   Updating xcat SED...
1
PRO dustem_old2new_ext_format, file=file
90bee736   Ilyes Choubani   replicated ext fo...
2
3


4abae96b   Ilyes Choubani   Updating xcat SED...
4
;NB: file should be the string of the old xcat file 
90bee736   Ilyes Choubani   replicated ext fo...
5

90bee736   Ilyes Choubani   replicated ext fo...
6

3189958e   Annie Hughes   not sure
7
dustem_init
4abae96b   Ilyes Choubani   Updating xcat SED...
8
9
10
11

dir=!dustem_wrap_soft_dir+'/Data/EXAMPLE_OBSDATA/'

file=dir+file
90bee736   Ilyes Choubani   replicated ext fo...
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

str='cp '+file+' '+file+'.old'
spawn,str

old_ext=read_xcat(file,/silent,comments=old_comments)
Next=n_elements(old_ext)

new_ext=dustem_initialize_ext(Next,comments=new_comments,help=help)
comments=['Written by dustem_old2new_ext_format.pro on '+systime(0),old_comments,new_comments]

new_ext.instru=old_ext.instru
new_ext.filter=old_ext.filter
new_ext.wave=old_ext.wave
new_ext.EXT_I=old_ext.spec
new_ext.sigextII=(old_ext.error)^2

write_xcat,new_ext,file,comments=comments

END