Banner

 

CCD Image Calibration Page

What is a "CCD"? A CCD or "charge coupled device" is a digital imaging device [consisting of the imaging "sensor" and associated readout electronics] which has largely replaced the use of 35 mm film in astrophotography. CCD devices are also commonly used for the creation of digital images in all manner of consumer electronic devices and for medical and scientific applications.

All of the images on these pages were taken with high performance CCD cameras manufactured by Santa Barbara Instrument Group for astrophotography and scientific applications. The following is a tutorial discussing the basic methods of calibrating CCD images.

I. The Basics of Image Calibration - Monochrome Images

A. Why Do We Calibrate CCD Images?

CCD images are calibrated to correct for non-data elements that are found in each raw data frame such as bias offset, bias structure, dark current, uneven chip illumination, and "dust donuts". The following set of two ST-7 CCD images shows a basic uncombined data frame before and after application of dark frames, bias frames and flat field frames.

An un-calibrated CCD image is shown below:
uncalibrated CCD image
The image immediately below is a calibrated CCD image
calibrated CCD image

A calibration routine, if properly applied, can effectively remove most of the unwanted effects of dark current and uneven field illumination. Calibration does not correct for cosmic ray hits to the detector. There are at least four cosmic ray hits in the images above. They are the white streaks.

| Back to Top |

B. The Elements of a Basic CCD Image Calibration Routine:

Dark Frames, also called "thermal frames", correct for dark current collected on the detector.

Bias Frames remove the effects of the electrical charge applied to the detector prior to the exposure. Application of a separate bias frame is only required if we are using a dark frame scaling method.

Flat Field Frames correct for uneven field illumination.

All of the calibration frames must be applied before you attempt to align your data frames for stacking. If you attempt to align your data frames before calibration then the images are shifted from their original orientation, then the darks, the bias frames and the flat field frames will not have the desired effect.

C. What Are Dark Frames?

Dark frames correct for the gradual accumulation of electrons [the dark current] in the pixels of the detector. The accumulation of dark current is related to the temperature of the detector, is repeatable and is essentially linear.

The dark frame must be taken at the same temperature as the data frame. There are two methods for application of dark frames to data frames;

1) The first is the subtraction of a dark frame of the same time and temperature from the data frame. A variation on this method is the creation of a high signal-to-noise master dark frame by averaging or median combining multiple dark frames of the same time and temperature as the data frame.

2) The second method is the application of a high signal-to-noise ratio scaled dark frame to the data frame.

1. Dark frames of the same duration and temperature as the data frames -

The basic procedure is to take a dark frame of the same time and temperature as the data frame, usually during the same imaging session. For a high signal-to-noise ratio dark, multiple dark frames can be median combined to create a single master dark frame which is then applied to each data frame.

Bias frames do not need to be collected and incorporated into the calibration procedure using this method because each dark frame or master dark also contains the bias component which is also subtracted from the data frames when the dark current component is subtracted. If your exposure times for the individual data frames are not longer than 5-10 minutes, then it is a fairly simple matter to collect dark frames to use for the creation of a master dark frame after your imaging session.

I generally try and collect at lest 16 individual dark frames of the time and temperature of my data frames which I then combine into a master dark frame. The individual dark frames for a master dark frame can taken during several nights. I have found that the hot pixel population on my SBIG cameras is relatively stable from night to night over a multiple night imaging session. Thus, I can accumulate enough dark frames for a high S/N master dark over a weekend.

2. Scalable dark frames -

If you have the time to do it, and you anticipate that you will be using different exposure times for your data, i.e. you will be using different exposure times for your color filters, then using scaled dark frames is the preferred method. The use of scalable dark frames allows you to take a set of master dark frames at a set of specified temperatures before your data collection session. Since the accumulation of dark current is linear, a series of long exposure, preferably greater than 5-6 times the exposure length used, dark frames are collected and median combined for a high signal to noise ratio master dark. This method gives more flexibility to vary image data exposure times during an imaging session and is especially helpful if you are using a filter set which requires different exposure times for each color channel.

Once the bias frames are applied to the image data, the master dark is applied allowing the software to scale the master dark frame to the time of the data frames.

The master scalable dark frame is created by subtracting a bias frame from each dark frame and then the dark frames are then median combined to create the master frame.

A scalable master dark frame is only useable for data frames of the same temperature as the data frames. Thus, you can create a set of scalable dark frames at -20 C, -22 C, and -25 C for use during your observing session.

Note that the use of scaled dark frames in an image calibration procedure require the creation and application of bias frames to both the data frames and in the creation of the scalable master dark frames.

| Back to Top |

D. Bias Frames

Although I am not an electronics expert, it is my understanding that "bias" is the electric pre-charge applied to the CCD chip by the camera electronics to activate its photon collecting ability. There are two components of the bias, 1) the bias offset [the pre-charge], and 2) the bias structure. The bias structure is due to the camera readout electronics.

Proper image calibration removes both components. As discussed above, using a dark frame of the same duration and temperature as the data frames also accounts for the bias element. Scalable dark frames require the creation and application of a master bias frame to the data as well as to the the darks.

Creation of a master bias frame is accomplished by taking a series of "zero time" exposures. Most popular software packages have a bias frame exposure setting. Multiple subframes, ideally 16-20, or more, are median combined to create a high signal-to-noise ratio master bias frame.

| Back to Top |

E. Flat Field Frames

Flat fields are an important part of the image calibration procedure. Well prepared flat fields correct for varying sensitivity of the CCD chip and uneven illumination of the CCD chip due to the optics and dust and other objects on the optical elements.

The current wisdom in collecting flat field frames is to expose them long enough to collect sufficient light to expose the chip to 35% to 50% of its full saturation level. The saturation level is determined by dividing the gain of the camera into the chip's full well capacity. For example, my ST-10XME has a full well capacity of 77,000 electrons. To find the saturation level, I divide the gain, 1.3 electrons/ADU, into the full well capacity. The result is 59,213. Thus, pixel saturation point of the ST-10 is 59,213 counts. The best range for the flat field counts using this camera is 20,000 to 29,000 counts.

I always calibrate my individual flat field frames with a master dark frame of the same exposure time as the flat field frames. Although the dark current contribution in a flat field image of a few seconds is negligible, the pre-charge applied to activate the CCD can be significant [about 1,000 counts in the case of my ST-2000XM with a KAI-2020 chip]. Thus, I make it a practice to also subtract dark frames [which also takes care of the bias] from my flat fields.

Flats are a good application for a scalable dark frame. My exposure times to reach optimal chip saturation varies with the filter. Thus, I can take one set of longer exposure time scalable darks and a set of bias frames which can then be later used to create a master scalable dark frame for application to the flat frames.

A single flat field will have random noise. Thus, a median combination of at least 16-20 flat fields will create a high signal-to-noise flat field which will not add noise to your image when applied.

The image below is an example of a master flat field frame through the Takahashi Epsilon 160. the flat below contains examples of vignetting, dust on the optical element and uneven illumination of the chip.

flat field example

| Back to Top |

F. The Steps for Calibration of Monochrome CCD Images are as Follows:

  1. Acquire data frames,
  2. Acquire dark frames,
  3. Acquire bias frames if using scalable darks,
  4. Acquire flat field frames,
  5. Acquire dark frames for flat field frames of same exposure time as flat field frames,
  6. Create master dark frames,
    1. For master dark frames of the same exposure time as the data frames, make a median combined master dark frame.
    2. If using scalable darks,
      1. First create a master bias frame by median combining the individual bias frames,
      2. Subtract the master bias from each dark frame,
      3. Median combine all dark frames to create a scalable dark frame.
  7. Create master flat field frames,
    1. Median combine the matching dark frames to create a master flat field dark frame,
    2. Subtract the master flat field dark frame from each of the individual flat field frames,
    3. Median combine all calibrated flat field frames to create a master flat field frame.
  8. Apply the master bias frames created in step 6bi above to each data frame if using scalable dark frames,
  9. Apply master dark frames to each data frame,
  10. Apply master flat field to each data frame,
  11. Align all data frames,
  12. Stack data frames by adding, averaging, median combining, etc.
  13. Perform final image processing.

| Back to Top |

II. Calibration of RGB Data:

The steps for calibrating raw RGB or LRGB data frames are essentially the same as outlined above for monochrome images. The dark and bias master frames can be used for each color set if you are using scalable dark frames [a reason to create scalable dark frames] or if each of your sub exposure time through the respective color filter is identical. If not, and you are not using scalable darks, then you will need a set of darks for each of the sub-frame sets for each color filter and each separate exposure time.

A separate set of master flat field frames needs to be created for each color and for the luminance frame if you are using LRGB.

The basic steps are:

  1. Acquire data frames,
  2. Acquire dark frames,
    • If using different exposure times for filtered images or if you are binning color frames, then take matching dark frame each exposure time and/or binned set.
  3. Acquire bias frames if using scalable darks,
    • If using binned RGB frames, take a separate set of unbinned and binned bias frames.
  4. Acquire flat field frames,
    • If using binned RGB frames for an LRGB set, take a separate set of binned flat frames for the filtered data and an unbinned flat for the luminance channel if you are doing LRGB
  5. Acquire dark frames for flat field frames
    • If using different flat field exposure times or binning for different filters, then take matching dark frames for each filter.
  6. Create master dark frames,
    • For master dark frames of the same exposure time as the data frames, make a median combined master dark frame.
    • If using scalable darks,
      • First create a master bias frame,
      • Subtract the master bias from each dark frame,
      • Median combine all dark frames to create a scalable dark frame.
  7. Create master flat field frames,
  8. Apply master bias frames to data frames if using scalable dark frames,
  9. Apply master dark frames to matching data frames,
  10. Apply master flat field frames to matching data frames,
  11. Align data frames,
  12. Combine each filtered set to create a median combined or summed red, green and blue frame.
  13. If using a luminance frame, then sum or median combine the calibrated data frames to create the final luminance frame,
  14. Combine the final filtered images to create an RGB image.
  15. Perform final image processing.

| Back to Top |