WARNING - you should examine the output from BCLEAN carefully to ensure that the parameters that you have chosen are appropriate. FIX=NO and TEXTFILE are useful here.
B C L E A N
This is the non-interactive CCD image cleaning program,
which removes bad rows and cosmic rays from images. Note
that it expects the data to be orientated so that bad
transfer lines in the chip are horizontal - i.e. are rows,
rather than columns. The program will detect and blank out
the bad data, and optionally fix it up. Running without the
fixup allows the user to see what parts of the image will be
affected and provides a chance to modify the cleaning parameters
accordingly. For details of the cleaning algorithms used, see
the comments in the listings of FIG_ABROWS, FIG_ZAPRAYS,
FIG_VERTICAL, FIG_FIXAREA. There are four parameters connected
with cosmic ray detection, two which affect bad line detection,
and one that controls the interpolation used to fix the data.
WARNING: you are strongly advised to examine the effects of this
program on your images.
Command line parameters -
IMAGE (Character) The name of the image to be cleaned.
CRSIG (Numeric) Cosmic Ray SIGma value. The cosmic ray
searcher tests the value of each pixel against the
average value of the surrounding pixels. It must
exceed the average value by more than CRSIG*(square
root of average value).
CRFACT (Numeric) Cosmic Ray FACTor. A cosmic ray must also
exceed the average value by CRFCT*(the average value).
CRMINV (Numeric) Cosmic Ray MINimum Value. A cosmic ray
must also exceed the average value by CRMINV.
CRSHARPNESS (Numeric) Cosmic Ray SHARPNESS. If the SHARPNESS
keyword has been set, then a cosmic ray must also
satisfy the sharpness criterion: the height of the cosmic
ray above the immediately surrounding sky must exceed the
difference between the immediately surrounding sky and the
sky a bit further away, by more than a ratio of CRSHARPNESS.
Stars tend to have lower values of this ratio than cosmic
rays. The default value is 10.
BRFACT (Numeric) The bad row searcher looks through an array
formed by collapsing the image along the rows, looking
for rows that are lower than their neighbours by a
value that is greater than BRFACT*(median difference
between neighbours in the neighbourhood).
BRPASS (Numeric) Bad Row PASS value. The bad row searcher
makes BRPASS passes through the data, each time taking
a different set of columns evenly distributed through
the image. A bad row must show up in all passes.
DEGFIX (Numeric) The degree of polynomials to be used in
interpolating over bad data.
OUTPUT (Character) The name of the output image to be
generated. If this is the same as IMAGE, the
correction will be performed in situ.
NBROWS (Numeric) The number of bad rows to be fixed.
BROWS (Numeric vector) The numbers of the bad rows to
be fixed. If NBROWS and BROWS are specified
explicitly, then they will be used. Otherwise
an automatic bad line search will be preformed,
unless overidden by the setting of the AUTOROW
keyword.
DIRECTION (Numeric) Indicates along which direction on the CCD
the cosmic rays will be interpolated across. 1 means
columns, -1 means rows, and 0 means let the computer
decide which gives smaller residuals.
Command keywords -
AUTOROW If set, an automatic bad row search will be performed.
If NBROWS or BROWS are specified explicitly,
AUTOROW=NO will be assumed.
FIX If set, the bad data found will be fixed.
Otherwise, the output image will simply have the bad
pixels flagged by a specific flag value.
SHARPNESS If set, the "sharpness" test for cosmic rays will
be performed in addition to the other tests.
TEXTFILE If set, a text file (BCLEAN.LIS) will be
produced giving a summary of the cosmic ray test
results. This file is useful when deciding on the
cosmic ray selection parameters.
KS / CIT 29th June 1984
FIGARO A general data reduction system