1
! @(#)ghrs.prg 19.1 (ES0-DMD) 02/25/03 13:24:55
2
! @(#)ghrs.prg 19.1 02/25/03 13:24:55
3
!****************************************************************************
10
!This procedure should run in a separate subdirectory where
11
!only the *c0*, *c1* and *cq* GHRS files are included.
14
! The procedure re-groups the *c0*, *c1* and *cq* GHRS files into a single
15
! MIDAS table. The new table is renamed with the root-name of the
17
!The table contains wavelengths: column #1 or :WAV
18
! fluxes: column #2 or :FLUX
19
! quality flags: column #3 or :QUAL
21
! Column 1 and 2 should be used by the user to create an 1-D spectrum.
22
!****************************************************************************
23
!MIDAS/GHRS files - images and associated tables- are renamed with the
24
!ROOTNAME appearing in the FITS header:
26
DEFINE/PAR P1 ? C "Give the inicial of your GHRS files, e.g., z: "
28
creat/icat ghrs {p1}*.bdf
30
DEFINE/LOCAL CATAL/I/1/1 0
31
DEFINE/LOCAL I/I/1/1 0
32
WRITE/KEY NAME/C/1/20 " "
36
STORE/FRAME IN_B ghrs.cat 1 FINITO
38
copy/it 'IN_B' temp{I}
40
IF {{IN_B},NAXIS} .NE. 0 THEN
41
VAR = {{IN_B},NPIX(2)}
44
COPY/DK 'IN_B' ROOTNAME NAME
46
! Each 2-D GHRS/MIDAS image is converted to a MIDAS table
48
CREA/TABLE TEMP 3 1000 NULL
49
COPY/TT temp0001 #{VAR} TEMP :WAV
50
COPY/TT temp0002 #{VAR} TEMP :FLUX
51
COPY/TT temp0003 #{VAR} TEMP :QUAL
52
RENAME/table TEMP 'NAME'
56
! Delete temporary and catalog files