
COSMICS SUPPRESSION

Spectra are searched for cosmic impacts; an algorithm does its best
to discriminate them against emission lines using morphological
criteria, both spatial and spectral :
- A spatial radius is chosen, which defines the region over
which spectral similarity is supposed to be true. Over this region,
usually twice the size of the spatial sampling, the integrals of
the spectrum to be checked (and cleaned) and of the neighbours are
computed. For instance, if the radius is given as 1, this means
that one ring of neighbours will be used; then,
seven integrals are computed : one for the
central lens, six for the ring made of the six nearest lenses.
They are used to normalise the peripheral spectra to the central
spectrum integral value.
- The median of the spectra from the above normalised disk region
is computed. This normalisation is used to be able to correct
cosmic impacts even within high spatial gradient regions.
- The differential spectrum [Central spectrum]-[Median spectrum]
is computed. This difference is then median-filtered, with a
radius given by the user.
- The second-order difference between this filtered difference
and the un-filtered difference is computed. This final spectrum
is now holding only high spectral frequencies, and cosmic ray
pixels may now be detected quite safely.
- A sigma-clipping is performed on this spectrum, and pixels
above N times sigma are flagged.
- All the flagged pixels are replaced, in the original central
spectrum, by the median value (the one obtained in the second step
above). In fact, not only the flagged pixels, but their immediate
neighbours too, up to a correction radius specified by the user,
are replaced.
- Click on [Cosmics] in the main menu, then on
[Remove cosmics].The [Remove cosmics] window pops up.
- Enter the name of the [Input datacube], which is the object
datacube you have wavelength-calibrated and flat-fielded
in previous steps.
You can type it in directly, or use the browse
icon at the end of the field, or drag and drop it from the
Reduction
folder.
- Enter the name of the [Output datacube], that is the new
datacube to be created after cosmics removal. Same input
possibilities as above.
- Click on [Accept]. The result window opens, and trace the
various steps of the elimination process. As a rule of thumb,
expect to find something like 3000 cosmics over a one-hour
exposure.
- Spatial filtering radius : the radius of the
neighbourhood over which similarities are to be searched for
discriminating between lines and cosmics in spectra; to be given
in lens ring units. Usually, it is wise to use a radius of 1,
and the neighbouring disc will span over seven lenses, the one
which is to be checked for cosmics, and the ring of six around it.
- Spectral filtering radius : the radius (in pixels) used
for the median filtering of the first order difference between
the central spectrum and the disc median.
- Sigma clipping factor : this is the factor to be
multiplied by sigma to find and flag the bad pixels in the
second-order difference.
- Maximum number of iterations : for the sigma-clipping
operation.
- Spectral correction radius (pixels) : the radius around
flagged bad pixels within which all pixels of the spectrum are to
be replaced by median values.
- Debug : this switches the program to verbose mode, and
more informations are recorded into the history file
(see button [Start] in the left menu). In addition, the
following options become then available :
- Median datacube : the name of the datacube which will
hold the normalised disc medians for each of the original
datacube.
- Residual datacube : the name of the datacube which will
hold the second-order difference spectra for all the original
spectra.
- Save values :
All the input values (files names, etc...) are saved,
and become the new default values for this user. They can
be recalled at will, and are used each time the Remove
cosmics window is opened.
- Recall values :
The values saved by the user
are loaded into the various input fields.
- Default values :
The input fields are set to the general defaults values;
for instance, the file names are set to blank.

Back to top of chapter.
|
Back to OASIS home page.
|

Last update: 11/01/1999. Send comments to
martin@cfht.hawaii.edu
