Sflats constructs a spectroscopic flat field image for use with biasflat. Sflats does the following:
USAGE |
|
||||||||||||||||||
INPUT |
|
||||||||||||||||||
OUTPUT |
|
||||||||||||||||||
PARAMETERS |
|
Sflats first removes the bias level from each input file, using a bias frame if provided, or otherwise using the overscan areas. Multiple frames are summed. The spectral response of the flat field continuum lamp is fit in each spectrum, either by polynomial fitting or by a running median, and the fit is used to normalize each spectrum to unity. If a bad pixel file is specified, it is used to mask out regions before the spectral response is fit. Otherwise, the standard, dewar-specific bad pixel file is used.
The choice of continuum fitting method to use depends on the data. For long camera grating spectra, the polynomial fitting method works well. However, for short camera grism spectra, where the spectra are often contaminated by the zero order images, the median fit is much more reliable, if a bad pixel mask for the zero order image is not specified.
If minlambda
and maxlambda
are both set to 0, Sflats
uses the values from the map file.
The output is a file or files called filename_flat
.
If there is only one input flat file, its name is used for filename
. If there are two input file, filename
is constructed from the two
input file names. If there are more than two input files, filename
must be specified.
If the observations were taken in nod&shuffle mode and the spectral flats were not themselves shuffled during the exposure, a shuffled flat frame can be produced by setting shuffled to the shuffle distance, in pixels. If however, the spectral flats are already shuffled, the shuffled parameter must be set to zero.