C O S R E J
Name:
COSREJ
Function:
Remove cosmic rays from a set of similar spectra.
Description:
Given an image whose cross-sections are a set of spectra of the
same object all with exactly the same wavelength to pixel mapping
(in other words a set of spectra that should be identical, other
than for signal to noise effects and possible differences in
their total counts due to differing exposure times etc), this
routine attempts to remove any cosmic rays or other obvious
features that might be contaminating some (but not the majority)
of the spectra. First, the mean value for each spectrum over a
specified range is calculated and this is used to reduce each
spectrum to the same mean value. Each pixel in each spectrum is
compared with the equivalent pixels in the other spectra, and any
that differ from the mean of the other pixels by more than a
given factor (the CRSIG parameter) times the standard deviation
of the other pixels are rejected. This is repeated until either
only two pixels are left, or until no pixels are rejected in a
pass through the remaining pixels. The rejected pixels are set
to the mean value of the remaining unrejected pixels. Finally,
the spectra are rescaled to their original mean values. If
requested, the program can create a `spectrum' with one element
for each spectrum in the original image, where each element is
the mean value used for that spectrum. This might possibly be
used to scale the resulting image using, for example, ISYDIV.
Command parameters:
IMAGE The name of the image in which the spectra are held.
XSTART The first x-value of the range to be used to calculate
the mean value for each spectrum.
XEND The last x-value of the range to be used to calculate
the mean value for each spectrum.
CRSIG The cutoff sigma value to be used.
MSPECT The name of the mean spectrum produced, if WMEAN is yes.
OUTPUT The name of the resulting image with the cosmic rays removed.
Command keywords:
WMEAN Yes if a spectrum of mean values is to be produced.
Error array handling: Ignored.
Data quality / flagged value handling:
Not explicitly performed. Relies on standard DSA processing.
Files used:
BADPIX.DAT Contains a list of the cosmic rays removed from the data.
8th Sept 1987. Original version DJA / AAO
FIGARO A general data reduction system