OPTIONAL PARAMETERS |
edge2 | excluded region at other end of slit
| objshift | number of pixels to shift object position
|
Details:
subsky uses 1-d or 2-d B-Splines to fit the sky spectrum of flux vs wavelength.
If 2-d spline fits are selected, the fit along the slit is first order, with a
knot at each end of the fitted region. When the object spectra are strong, sky
fits can be improved by excluding a strip around the object spectrum in the
analysis. Excluding a small region near the ends of the slit, via the parameter
edge , can also improve the fit. If a bad pixel file is specified, it is used to
determine regions to be masked before the spline fit is calculated. If none is
specified, the standard dewar-specific file is used.
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 deltaknot = 1.0 pixel, and splineorder = 3 often 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 between wavelengths diag_0 and diag_1 , showing data
points and spline fit, to allow tuning of the parameters. Some more details on
adjusting parameters can be found in the COSMOS Cookbook.
If minlambda and maxlambda are both set to 0, subsky uses the values from the
map file.
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. Bad pixels have errors set to a negative number.
Nod&shuffle; data: In the case of nod&shuffle; data, no sky subtraction is done.
However, subsky must still be used as part of the normal reduction pipeline in
order to obtain error values for the data, which are used in the cosmic ray
rejection step in sumspec.
A few optional parameters were added in COSMOS 2.20 to allow
the user to further customize the sky-subtraction process.
- The edge2 parameter is useful for cases where you want to
exclude more rows on one side of the slit than on the other side in
the sky-fitting process. To determine which side of the slit corresponds
to edge and edge2, you have to display the full IMACS
8-chip mosaic or the stitched LDSS3 frame.
- For data in Normal orientation (i.e. dispersion runs in
the vertical direction), edge corresponds to rows excluded
on the left-hand side of the slit and edge2 corresponds to
rows excluded on the right-hand side.
- For data in N&S; orientation (i.e. dispersion runs in
the horizontal direction), edge corresponds to rows excluded
on the bottom of the slit and edge2 corresponds to
rows excluded on the top.
- By setting the objshift parameter,
you can shift the defined object position from the map file
if the object is not exactly in the center of the slit, or wherever
you expected it to be as defined in the SMF file. If the object position
is off from its expected position by the number of pixels you set
the exclude parameter to,
the object will likely be included in the sky-fitting, so having this
option can be useful in such cases.
- For data in Normal orientation, a negative value will
shift the object position to the left, and a positive value will
shift it to the right.
- For data in N&S; orientation, a negative value will
shift the object position downwards, and a positive value will
shift it upwards.
NOTE: Since both edge2 and objshift are optional parameters,
older parameter files will still work fine, as edge2 defaults to
whatever edge is set to and objshift defaults to zero.
There are also new optional flags introduced in COSMOS 2.20, which
enable the user to use different parameters for different slits. Here are
a few examples that illustrate how these can be used:
- Say you want to preserve your original subsky.par file, but want to
try a different set of parameters for a particular exposure. You can
copy subsky.par to subsky_exp1.par, for example, then
change the parameters in the latter and use that file:
subsky -m ccd0434 -f ccd0431_f -p subsky_exp1
- Say you want to rerun subsky on one of your slits, but with slightly
different parameters. If the slit is called "obj001" in the SMF file,
for example, you can copy subsky.par to subsky-obj001.par and
change the parameters in the latter. Then in the command, you can tell it
to reload the previous subsky output with the
-r flag,
and have it run again only on this one slit with the -o flag:
subsky -m ccd0434 -f ccd0431_f -p subsky-obj001 -r -o obj001
Back to Programs
|