-
Notifications
You must be signed in to change notification settings - Fork 0
/
asciiconvert.pro
43 lines (36 loc) · 1.19 KB
/
asciiconvert.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
PRO stisasciiconv
;+
; ----------------------------------------------------------------------
; STISASCIICONV
;
; *Program Description:
;
; This program will convert the IDL save files created by the
; STISEXTRACT procedures into ascii files containing columns of
; wavelength, gross and net fluxes, errors, and the derived
; background (in that order). The output files have the naming
; convention rootname.###.dat, where rootname is the STScI
; archival rootname of the observation and ### is the order
; number.
;
; *Calling sequence:
; STISASCIICONV
;
; *External Routines:
; WRITESTIS
;
; *HISTORY:
; 12/99 -- Howk -- Created and documented.
; ----------------------------------------------------------------------
;-
names = findfile('*.*.save')
FOR i=0, n_elements(names)-1 DO BEGIN
restore, names[i]
ordernum = fix(strtrim(strmid(names[i], 10, 3), 2))
orderstring = strtrim(string(ordernum), 1)
rootname = strmid(names[i], 0, 9)
writestis, rootname, orderstring, wave, gross, $
flux, err, bg
close, /all
ENDFOR
END