STScI Logo

findthresh noao.nproto


NAME · USAGE · PARAMETERS · DESCRIPTION · ALGORITHM · EXAMPLES
SEE_ALSO

NAME

findthresh -- Estimate the background noise level of a CCD

USAGE

findthresh data

PARAMETERS

data
The level of the sky (or any other data level, for that matter) in A/D units, for which the random error is to be estimated. If this is not given on the command line and a list of images is specified then the data level will be measured from the images.
images = ""
If not NULL ("") and if data is not specified, this is a list of images whose random background error per pixel is to be estimated.
section = "[*,*]"
The selected image section for the statistics. This should be chosen to exclude bad columns or rows, cosmic rays, and other blemishes.
gain
The CCD gain in electrons/ADU. This may be estimated using the FINDGAIN task.
readnoise
The CCD read noise in electrons. This may be estimated using the FINDGAIN task.
nframes = 1
The number of raw data frames that were coadded or averaged to produce the images . If this is not set to 1, the coaddtype parameter must also be set to the proper value.
coaddtype = "average"
For coadded frames (nframes > 1) the type of combination that was done, either "average" or "sum".
center = "mean"
The statistical measure of central tendency that is used to estimate the data level of each image. This can have the values: mean , midpt , or mode . These are calculated using the same algorithm as the IMSTATISTICS task.
binwidth = 0.1
The bin width of the histogram (in sigma) that is used to estimate the midpt or mode of the data section in each image. The default case of center=mean does not use this parameter.
verbose = yes
Label the computed and measured background noise on output, rather than print them two per line?

DESCRIPTION

FINDTHRESH can be used to estimate the expected random error per pixel (in ADU) of the sky background of a CCD image, given the gain (in electrons per ADU) and readnoise (in electrons) of the CCD. The sky background (or any other data level of interest) can be specified directly with the data parameter, or the representative values can be measured from a specified list of images as also governed by the section , center , and binwidth parameters. FINDTHRESH can be used with processed frames that are the coaddition or average of several raw images by choosing the correct values for the nframes and coaddtype parameters. In this case (nframes > 1), the effective gain and effective readnoise of the coadded frames will also be printed out.

The section over which the statistics of the images are computed should be chosen carefully. The frames may be displayed and perhaps blinked, and IMSTATISTICS, IMHISTOGRAM, IMPLOT, and other tasks may be used to compare the statistics of various sections of the images directly.

ALGORITHM

The formula used by the task is:

    random error in 1 pixel = sqrt (data*p(N) + r(N)**2) / p(N)

Where the effective gain, p(N), is given in electrons per ADU and the effective readnoise, r(N), is given in electrons. The effective gain and readnoise are calculated from the intrinsic gain and readnoise , specified as parameters to the task, by the relations:

    p(N) =      N  * \fBgain\fR        (only if the frames were \fBaveraged\fR)
    r(N) = sqrt(N) * \fBreadnoise\fR   (whether averaged \fBor\fR summed frames)

In our implementation, the level of the sky can be calculated using any of the mean , midpt (an estimate of the median), or mode as determined by the center parameter. For the midpt or mode choices only, the value of the binwidth parameter determines the bin width (in sigma) of the histogram that is used in the calculation. FINDTHRESH uses the IMSTATISTICS task to measure the statistics.

EXAMPLES

To estimate the CCD background noise at a specified data level, gain and readnoise (note that you will be prompted for the gain and the readnoise if you don't set them either explicitly on the command line, or previously using, for example, eparam):

    lo> findthresh 100 gain=2.3 readnoise=13.

To estimate the CCD background noise within a 100x100 section of a list of images, data*.imh:

    lo> findthresh data*.imh section="[271:370,361:460]"

To estimate the CCD background noise using the mode to estimate the sky level for each image section:

    lo> findthresh.section="[271:370,361:460]"
    lo> findthresh data*.imh center=mode

SEE ALSO

findgain, imstatistics, imhistogram


Source Code · Search Form · STSDAS