Apply Flat Frame


The Apply Flat Frame method is used by the Calibrate Images command to apply a flat field correction to images. This process is used to correct pixel to pixel sensitivity variations and/or illumination variations across the field of view. To create the master flat field frame from raw flat field frames, use the Create Flat Frame method or the Combine Images command.

Master Flat Frame Source

The Master Flat Frame may be loaded from a number of sources:

Requirements of the Master Flat Frame

The flat field correction is applied using an image known as a "Master Flat Frame". In actuality, a master flat frame is not an image showing a picture in the traditional sense, but is a map of pixel response as a function of position. To perform its function, the master flat frame must be correctly prepared from the raw flat field frames, and this requires attention to a number of critical details. If you allow the Image Calibration pipeline to create master flat(s) using the Create Flat Field method, and the current method uses the Result of [Create Flat Field] option, then the flat field correction will be correctly implemented. Alternatively, if you load a pre-existing master flat, then you are responsible for it being properly prepared. Here are the requirements of a properly prepared master flat frame:

Bias Correction

This correction must be applied unless it is automatically applied by the dark correction. Normally, the same correction procedure is used for creating master flats and calibrating data frames.

Dark Correction

This correction must be applied unless the dark current is effectively 0. Normally, the same correction procedure is used for creating master flats and calibrating data frames.

Normalization to 1.0

The master flat must be scaled to a reference value of 1.0. Usually the reference region is the central 10 to 20% of the image. Normalization is necessary to create a map of pixel response to be applied to the data frames. To contain values normalized to 1.0 also means that a master flat must be saved with a real data type, such as 32 bit real or 64 bit real, so that the scaled values are correctly represented.

Segregation by Filter

A master flat frame must be created for the same filters as used to acquire the data frames. To apply the correction, Mira must be able to determine the filter used for the flats and the target data frames. Usually the FILTER keyword is used for this purpose in FITS format images.

Matching Flat Frames by Filter Keyword

When a flat field frame is used to correct variations in pixel to pixel sensitivity, the flat frame must match the color of light to which the image was exposed. This means that a flat frame must be available for an image that was exposed through the same filter. If you specify a single image name or file name, then there will be only 1 file that matches that name, which means that only one filter can be processed for a group of image on one run of this command.

Image Calibration can be made more efficient if more than one filter can be processed per run of this command. In addition, it is often useful to have filtered flat flat frames that have the same basic file name but differ by which filter they use. To meet both needs, Mira AP provides the file name Template option. If this item is selected, the flat frames are identified using the template and then the flat having the matching filter is applied to each image. To use this method, you need to set 3 preferences:

  1. Click Template and specify a fie name pattern that will enable the flat frames to be located.

  2. Click Use Filter Keyword.

  3. Enter the name of the filter keyword.

Related Topics

Create Flat Frame, Calibrate Images, Methods Page