subsky

subsky uses the Kelson (PASP 115,688) procedure to do an optimally sampled sky subtraction. The program relies on a good CCD-science coordinate system mapping to construct a cosmic ray-cleaned median sky spectrum for each slit, which is then subtracted from the slit image. Output is a new set of CCD images with sky subtracted, and with errors attached.

USAGE
subsky  -f framename -m mapfile  [-d]
INPUT
framename  is a set of image files on which sky subtraction is done
mapfil
e
.map  is the map file which applies
-d set the diagnostic flag
OUTPUT
framename_s_cn.fits
PARAMETERS
minlambda
minimum wavelength for sky substraction
maxlambda
maximum wavelength for sky subtraction
siglimit
CR rejection threshold, in units of sigma(sky)
noise
typical ccd read noise
gain
typical ccd gain, in e-/adu
medbox
size of running median box for CR rejection (in pixels)
deltaknot
knot spacing, in pixels
splineorder
order of spline fit
exclude
half-width of excluded strip near object spectrum


Details:

subsky uses B-Splines to fit the sky spectrum of flux vs wavelength. Depending on the characteristics of the data, the spline parameters may need some tuning to optimally fit sky. An non-optimal knot spacing or fit order can produce ringing in the fit, or a poor fit to strong night sky lines. Values near knotspacing = 1 pixel, and splineorder = 3 usually work best (spline order must be 3 or 5). If the diagnostic flag is set, no output files are written, but subsky plots the region around the 5577A night sky line, showing data points and spline fit, to allow tuning of the parameters. When the object spectra are strong, sky fits can be improved by excluding a strip around the object spectrum in the analysis.

The output data is a 3-d fits file. The first plane of the file is the sky subtracted image, the second plane contains the 1-sigma pixel-by-pixel error estimates.

Back to programs