.help zerocombine Sep93 arcon.quad
.ih
NAME
zerocombine -- Combine and process zero level images
.ih
USAGE
zerocombine input
.ih
PARAMETERS
.ls input
List of zero level images to combine.  The \fIccdtype\fR parameter
may be used to select the zero level images from a list containing all
types of data.
.le
.ls output = "Zero"
Output zero level root image name.
.le
.ls combine = "average" (average|median)
Type of combining operation performed on the final set of pixels (after
rejection).  The choices are
"average" or "median".  The median uses the average of the two central
values when the number of pixels is even.
.le
.ls reject = "minmax" (none|minmax|ccdclip|crreject|sigclip|avsigclip|pclip)
Type of rejection operation.  See \fBcombine\fR for details.
.le
.ls ccdtype = "zero"
CCD image type to combine.  If no image type is given then all input images
are combined.
.le
.ls process = no
Process the input images before combining?
.le
.ls delete = no
Delete input images after combining?  Only those images combined are deleted.
.le
.ls clobber = no
Clobber existing output images?
.le
.ls scale = "none" (none|mode|median|mean|exposure)
Multiplicative image scaling to be applied.  The choices are none, scale
by the mode, median, or mean of the specified statistics section, or scale
by the exposure time given in the image header.
.le
.ls statsec = ""
Section of images to use in computing image statistics for scaling.
If no section is given then the entire region of the image is
sampled (for efficiency the images are sampled if they are big enough).
.le

.ce
Algorithm Parameters
.ls nlow = 0,  nhigh = 1 (minmax)
The number of low and high pixels to be rejected by the "minmax" algorithm.
.le
.ls nkeep = 1
The minimum number of pixels to retain or the maximum number to reject
when using the clipping algorithms (ccdclip, crreject, sigclip,
avsigclip, or pclip).  When given as a positive value this is the minimum
number to keep.  When given as a negative value the absolute value is
the maximum number to reject.  This is actually converted to a number
to keep by adding it to the number of images.
.le
.ls mclip = yes (ccdclip, crreject, sigclip, avsigcliip)
Use the median as the estimate for the true intensity rather than the
average with high and low values excluded in the "ccdclip", "crreject",
"sigclip", and "avsigclip" algorithms?  The median is a better estimator
in the presence of data which one wants to reject than the average.
However, computing the median is slower than the average.
.le
.ls lsigma = 3., hsigma = 3. (ccdclip, crreject, sigclip, avsigclip, pclip)
Low and high sigma clipping factors for the "ccdclip", "crreject", "sigclip",
"avsigclip", and "pclip" algorithms.  They multiply a "sigma" factor
produced by the algorithm to select a point below and above the average or
median value for rejecting pixels.  The lower sigma is ignored for the
"crreject" algorithm.
.le
.ls rdnoise = "0.", gain = "1.", snoise = "0." (ccdclip, crreject)
CCD readout noise in electrons, gain in electrons/DN, and sensitivity noise
as a fraction.  These parameters are used with the "ccdclip" and "crreject"
algorithms.  The values may be either numeric or an image header keyword
which contains the value.
.le
.ls pclip = -0.5 (pclip)
Percentile clipping algorithm parameter.  If greater than
one in absolute value then it specifies a number of pixels above or
below the median to use for computing the clipping sigma.  If less
than one in absolute value then it specifies the fraction of the pixels
above or below the median to use.  A positive value selects a point
above the median and a negative value selects a point below the median.
The default of -0.5 selects approximately the quartile point.
See \fBcombine\fR for further details.
.le
.ls blank = 0.
Output value to be used when there are no pixels.
.le
.ih
DESCRIPTION
The zero level images in the input image list are combined.
The input images may be processed first if desired.
The original images may be deleted automatically if desired.

This task is a script which applies \fBquadproc\fR and \fBcombine\fR.  The
parameters and combining algorithms are described in detail in the help for
\fBcombine\fR.  This script has default parameters specifically set for
zero level images and simplifies the combining parameters.  There are other
combining options not included in this task.  For these additional
features, such as thresholding, offseting, masking, and projecting, use
\fBcombine\fR.

The version of \fBzerocombine\fR in the \fBquad\fR package differs from that
in \fBccdred\fR in that \fBquadproc\fR rather than \fBccdproc\fR is used to
process the images if this is requested. The \fBquad\fR version MUST be
used if process=yes and the input list contains any multi-readout images which
have not been overscan corrected and trimmed.

.ih
EXAMPLES
1. The image data contains four zero level images.
To automatically select them and combine them as a background job
using the default combining algorithm:

    cl> zerocombine ccd*.imh&
.ih
SEE ALSO
quadproc, combine
.endhelp
