Name
lwscoadd -- Convert raw 6-dimensional LWS image to 2-D frame
Purpose
Read an FITS file generated by the W. M. Keck Observatory's Long
Wavelength Spectrometer (LWS) into IDL data and header
variables.
Calling Sequence
result = lwscoadd( filename,[ header, /silent] )
Inputs
- filename
- Scalar string containing the name of the FITS file
(including extension) to be read. If the filename has a
*.gz extension, it will be treated as a gzip
compressed file. If it has a .Z extension, it will
be treated as a Unix compressed file.
Outputs
- result
- Co-added (2-D) FITS data array constructed from designated record.
If the specified file was not found, then Result
= -1.
Optional Output
- header
- String array containing the header from the FITS file.
Optional Input Keywords
- /silent
- Normally, lwscoadd will display the size the array at the
terminal. The SILENT keyword will suppress this.
Example
- Read an LWS FITS file test.fits into an IDL
image array, IM and FITS header array, H.
IDL> im = lwscoadd( 'test.fits', h)
- To read in a file that has been compressed:
IDL> im = lwscoadd( 'test.fits.gz',h )
Error Handling
If an error is encountered reading the FITS file, then
- the system variable !ERROR is set (via the
MESSAGE facility)
- the error message is displayed (unless /SILENT
is set), and the message is also stored in !ERR_STRING
- lwscoadd returns with a value of -1
Procedures Used
- Functions: READFITS(), SXPAR(), WHERENAN()
- Procedures: IEEE_TO_HOST, SXADDPAR, SXDELPAR
Requirements
Needs routines listed above from the
IDL
Astronomy Library.
Note
Under Unix,
lwscoadd can also read
gzip or Unix compressed FITS files. See
this
description for other ways of reading FITS files with IDL.
Author
Gregory D. Wirth, W. M. Keck Observatory
Support
Send questions to the
Modification History
- 19-Jan-2000 [GDW]
- Original version
See Also
The source code for lwscoadd.pro
The IRAF version of lwscoadd
Go to:
LWS Home Page -
Instruments Home Page -
Keck Home Page
Last modified: Wed Jan 30 11:20:24 HST 2002