Apply Dark Frame


The Apply Dark Frame method is used by the Calibrate Images command to apply a dark frame to images. This is used to correct thermal dark signature, especially important for CCD images. This command subtracts the master dark frame directly as would the Subtract method of the Image Arithmetic command. To create the master dark frame from raw dark frames, use the Create Dark Frame method.

Dark Frame Source

The dark frame may be loaded from a number of sources. The source determines whether one dark is used or whether the appropriate dark frame is selected from a list of dark frames:

Using Dark Frames of Nearest Exposure

With some cameras, the best posible thermal correction is realized by using a dark frame having an exposure time near to the exposure of the image. In such cases, a set of images having differing exposure times is best corrected by using a set of master dark frames each near to the exposure time of the images themselves. The Use Nearest Exposure option allows Mira to select an appropriate dark frame from a set of dark frames by having the exposure time nearest that of the target image. If you check this option, Mira will first examine all dark frames it locates based on the radio button (bullet) selection in the upper section of the parameter page. The dark frame will be matched by comparing the value of the Exposure Keyword value in the header of each candidate dark frame and the target image. Note that the Create Dark Frame method can group the dark frames by dark exposure time to produce a library of master darks for each time value.

Dark Frame Methods

Methods described below control how the selected dark frame is applied to the target image. These methods are available in the Method listbox on the preference page. These methods are applied to whichever dark frame has been selected for use, which is governed by the option used to select the dark frame and whether the dark frame of nearest exposure time is used.

Subtract Dark Frame

This method subtracts a dark frame directly, with no adjustment or scaling. However, the particular dark frame may have been matched from among a selection having different exposure times. See Using Dark Frame of Nearest Exposure, above.

Scale by Exposure Time

Dark frame scaling adjusts the dark integration time to that of the target image. The dark frame is adjusted by the ratio of exposure times between the dark frame and target image based on the specified Exposure Keyword. The camera control software may provide a specific dark integration time value in a keyword like DARKTIME; otherwise, you can often use the shutter-based exposure time like EXPTIME if the shutter timing is accurate and there is no significant "dead time" before or after the actual image is exposed.

To use this method correctly, a bias correction must also be applied to the target image and the master dark frames must have been created by applying a bias correction. Only if the bias corrections have been applied does the time scaling do a correct adjustment of the dark current to match the dark frame to the target image.

The time quantity used for scaling is obtained from the image headers using the specified Darktime Keyword. For best results, this keyword should measure the time over which the detector was allowed to accrue dark current. In general, this is not strictly the same thing as the exposure time. Some CCD cameras keep track of this time and save it to the image as a separate keyword with a name like DARKTIME or DWELL. If such information is not available for the images, you can use EXPTIME or another keyword that measures the exposure time. The named keyword must be present in both the master dark frame and the data frame.

Optimize Statistics

In this method, the dark frame subtraction is adjusted for each image to optimize the result in terms of residual dark noise. The dark frame is scaled as in the Exposure time scaling except that the scaling is determined to be that value that gives the smallest residual noise in the pixels of the dark-subtracted target image.

Related Topics

Create Dark Frame, Calibrate Images, Methods Page