donspec.cl

Name

donspec -- rectify, extract, and calibrate NIRSPEC low-d spectra

Usage

donspec input root

Parameters

input
List of input images to process. These should be cleaned, 2-D NIRSPEC images taken in low-dispersion spectroscopy mode for a single target and instrument setting.
root
Rootname for output spectra.
xref
Name of flat image to use for xdistcor. This image will be used to generate the trace image for use in removing x distortions.
yref
Name of line image to use for ydistcor. If blank, the first input image will be used.
coordlist
Name of file listing emission lines to be identified in sky spectrum.
x1
First illuminated column to extract, as measured in the middle line of the input images.
x2
Last illuminated column to extract, as measured in the middle line of the input images.
dy=0
Change in row (y) value for features as they move from column x1 to column x2. Note that if the features move toward lower row numbers (as generally done with NIRSPEC images), the value for dy should be negative.
gain=5
(Inverse) detector gain [electrons/DN]. This is used to set noise parameters for extraction and image combining
rdnoise=30
Detector read noise [electrons/px]. This is used to set noise parameters for extraction and image combining.
thresh=-1
Threshold value which defines the flux level in the sky image which defines "bad" pixels to be removed via interpolation. The default value of -1 allows this to be defined interactively by the user on a plot of the sky image.
logfile="logfile"
File into which to write results of the S/N measurements and image summing operation.
verbose=yes
Give feedback on operations while running?

Description

This script coordinates the reduction of NIRSPEC low-dispersion spectral data. The following tasks are accomplished: The script will not do the following: The script will create the following files:
*y.fits
Fully rectified spectra
*y.ms.fits
Extracted spectra
root_trace
Trace image used for xdistcor
root_sky
Sky band extracted from first image
root_avsigclip
Average of extracted spectra with sigma clipping and median weighting enabled
root_dispcor
Wavelength-corrected spectrum
root_skyinterp
Spectrum with regions near strong background emission features removed

Example

The current directory contains cleaned images named *c.fits and a flat called flat.fits. The target name for the observations is foo. Inspection of a science image shows that in the middle line, the illuminated columns run from 500 to 700 and night sky lines change position by -25 rows from one end to the other. Determination of a flux threshold for bright night sky lines is to be done interactively. To rectify and extract spectra, type:
  donspec *c.fits foo xref=flat x1=500 x2=700 dy=-25 thresh=-1

Notes

This script requires the following:

Bugs

See Also

mktracer xdistcor ydistcor skyinterp skyplot spec_s2n
The cl script donspec.cl
The package wmkonspec