1
! @(#)fos.prg 19.1 (ES0-DMD) 02/25/03 13:24:55
2
! @(#)fos.prg 19.1 02/25/03 13:24:55
3
!****************************************************************************
10
!This procedure should run in a separate sub-directory where
11
!only the *c0*, *c1* and *cq* FOS files are included.
13
!The procedure re-groups the *c0*, *c1* and *cq* FOS files into a single
14
! MIDAS table. The new table is renamed with the root-name of the FOS dataset.
15
!The table contains wavelengths: column #1 or :WAV
16
! fluxes: column #2 or :FLUX
17
! quality flags: column #3 or :QUAL
19
! Column 1 and 2 should be used by the user to create an 1-D spectrum.
20
!****************************************************************************
21
!MIDAS/FOS files - images and associated tables- are renamed with the
22
!ROOTNAME appearing in the FITS header:
25
DEFINE/LOCAL CATAL/I/1/1 0
26
DEFINE/LOCAL I/I/1/1 0
27
WRITE/KEY NAME/C/1/20 " "
31
STORE/FRAME IN_B fos.cat 1 FINITO
33
copy/it 'IN_B' temp{I}
35
IF {{IN_B},NAXIS} .NE. 0 THEN
36
VAR = {{IN_B},NPIX(2)}
39
COPY/DK 'IN_B' ROOTNAME NAME
41
! Each 2-D FOS/MIDAS image is converted to a MIDAS table
43
CREA/TABLE TEMP 3 2064 NULL
44
COPY/TT temp0001 #{VAR} TEMP :WAV
45
COPY/TT temp0002 #{VAR} TEMP :FLUX
46
COPY/TT temp0003 #{VAR} TEMP :QUAL
47
RENAME/table TEMP 'NAME'
51
! Delete temporary and catalog files