Sflats

Sflats constructs a spectroscopic flat field image for use with biasflat. Sflat does the following:


USAGE
Sflat -m mapfile -f flatfile[s] [-b biasfile] [-o outputfile]
INPUT
mapfile is the name of the mapfile which describes the data
flatile[s] is the name[s] of a spectroscopic flatfield set
outputfile is  the name of the output file if more than one input file
OUTPUT
flatfile_flat_cn.fits  or outputfile_cn.fits are the processed flats
PARAMETERS
minlambda
minimum wavelength
maxlambda
maximum wavelength
telscale
telescope scale arcsec/mm
bias_file
bias frame to use (or blank or "none")
clean
remove cosmic rays? (yes or no)
siglimit
sigma clipping limit for CR removal
noise
CCD read noise
gain
CCD gain
fit_mode
continuum fitting method (median or poly)
order
order of fit if polynomial fitting
med_box
width of sliding box if median fitting




Details:

Sflats first removes the bias level from each input file, using a bias frame if provided, or otherwise using the overscan areas. Mulitple frames are summed, and (optionally cosmic rays are removed by a sigma-clipping method) 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.

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.

Note: at present, CR rejection has not been implemented, but this is usually not a problem with very short exposure domeflats.

Back to programs