Calibration of CCD Images

Calibration is a procedure for reducing the effects of CCD Bias and Dark Current (see CCD Basics) and certain defects in the optical system.

1. Light Frames 4. Calibration Procedure
2. Dark Frame Subtraction 5. Scaling Dark Frames
3. Flat Fielding 6. Is it worth it?

Light Frames

 'Light Frames' are images (or a video) of a celestial object captured by the CCD. Each pixel in the images will have a numeric value that includes the influences of:

  • Light from the celestial objects in the field of view.
  • The various types of noise generated by the CCD.
  • Defects in the optical system.

With calibration we will try to remove as much as possible of the Bias and Dark Current from each Light Frame. Also, we will try to remove the effects of certain types of optical defect.

Dark Frame Subtraction

The objective here is to remove the CCD Bias and Dark Current noise from each Light Frame image. First we build a Master Dark Frame that contains only the Bias and Dark Current elements of an exposure. Then we subtract the Master Dark Frame from each of our Light Frames (or each frame of our video).

Dark Frames are images taken with no light falling on the CCD, so that the only values present in the pixels are due to Bias and Dark Current (+ or - some noise). Typically, Dark Frames are acquired by placing a light-proof dust cap over the telescope objective and making a series of exposures with the same settings (exposure, gain etc) as for the Light Frames to be calibrated.

  • For still images, several Dark Frames should be captured (say 10) and averaged into a single Master Dark Frame. This will minimise the amount of quantum noise in the Master Dark Frame.
  • When using a webcam, take a 'dark' video sequence with exactly the same settings as for your Light Frame video. Stack (average) all the video frames to produce a single Master Dark Frame.

It is best to have your CCD operating at the same temperature during Dark Frame capture as for Light Frame capture. A good procedure is to obtain your dark images immediately before or after (or both) capturing the Light Frames.

The Master Dark Frame, containing only Bias and Dark Current, should be subtracted from each of the Light Frames effectively removing most of the effects of Bias and Dark Current from the Light Frames.

Flat Fielding

The objective here is to minimise the effects of various imperfections such as:

  • CCD inhomogeneities (pixels more or less sensitive to light)
  • Optical vignetting (image is darker away from the centre)
  • Dust on the CCD window (seen as 'donut' shaped spots on the image)
  • Internal reflections

First we build a Master Flat Field that shows the imperfections, then we divide each Light Frame by the Master Flat Field. (Yes DIVIDE!).

A Flat Field  is an image of a perfectly plain flat white surface. Any deviation from absolute homogeneity across the image is due to CCD or optical imperfections.

Flat Field images should be obtained using an exposure that gives about 50-75% saturation of the CCD. Everything about the optical set-up (type of projection, focus etc) should be as used for the Light Frames to be calibrated. This is to ensure that the imperfections in the Flat Field images are as near as possible identical to those in the Light Frames.

To minimise quantum noise, build a Master Flat Frame by averaging several flat frame exposures (say 10), or stacking a flat frame video.

In theory Flat Field exposures themselves include Bias and Dark Current so you should build a Master Dark Frame and subtract it from each of your Flat Field images before averaging them. However unless you are trying to resolve really bad flat frame problems this step can be bypassed.

Each of the Light Frames (after Dark Frame subtraction) should be divided by the Master Flat Field  to produce calibrated images in which dark-frame and flat-frame defects have been minimised.

Note if you are using a one-shot colour camera like the Starlight Express MX5-C, the Flat Frame must be subjected to a median filter (radius 2, power 0.3) before using it on a Light Frame otherwise it will remove all colour from the image!).

Obtaining good Flat Field images can be quite tricky. My favourite method is to capture images of the evening twilight sky near the zenith (with or without a white sheet over the telescope objective). This is done with the telescope set up (camera, projection method, focus) as near as possible to how it will be used later for the Light Frames.

CCD Image Calibration Procedure

To summarise the general process...

Before Observation

  1. Capture 10 or so flat field images (or a 30sec flat field video) of a clear twilight sky near the zenith. Have the 'scope set up with camera, projection method and focus as it will be for the Light Frames.

During Observation

  1. Capture your Light Frames.
  2. Capture 10 or so dark images (or a 30sec dark video) immediately after your light frames using  the same exposure (and other settings for video) as for the light frames.

Calibration

  1. Build a Master Dark Frame by averaging (stacking) the dark images captured above.
  2. Build a Master Flat Frame by averaging (stacking) the flat field images captured above.
  3. Select each light frame image and:
    • Subtract the Master Dark Frame from it
    • Divide it by the Master Flat Frame
    • Store it with a new name indicating that it has been calibrated.

Most astronomy-related image processing software will assist to some degree in steps 4 to 6 above. You select the file names of your light, dark and flat images and most of the rest will happen automatically. For example:

  • Registax will take flat and dark video sequences and produce Flat and Dark frames from them. The flat and dark frames are then automatically applied to each frame of the video being aligned and stacked. 
  • Maxim DL has a 'calibration wizard' that will ask you for the file names of your Dark and Flat images, produce Dark and Flat frames and apply them to your Light Frames.
  • AutoStar Envisage (for the Meade DSI) will manage dark frame subtraction automatically for you but not flat frames.

Scaling Dark Frames

(This gets a bit tricky and you may not need it - skip over it if you like)

The procedure for Dark Frames above requires that the Dark Frame exposures are the same length as the Light Frame exposures. This is not always convenient, so it may be necessary to 'scale' the Dark Frames  for other exposure times.

Remember that a Dark Frame includes Bias and Dark Current and that Dark Current is (roughly) proportional to exposure. If we subtract Bias from the Dark Frame we can scale the resulting image (sometimes called a Thermal Frame) to a different exposure, then add the Bias back to obtain a Dark Frame for the different exposure duration.

A Bias frame is a Dark Frame of zero exposure (or the minimum exposure your camera is capable of). As for all calibration frames, to minimise noise, use an average of several Bias Frames.

  • build a Dark Frame of exposure e1
  • build a Bias Frame of exposure zero (as short as possible for your camera)
  • subtract the Bias Frame from the Dark Frame
  • multiply the result by e2/e1 (where e2 is the exposure of the light frames you want to calibrate)
  • add the Bias Frame to the result and you have a Dark Frame of exposure e2.

Some astronomy-related imaging software will assist in scaling Dark Frames. For example you can ask Maxim-DL to scale your Dark Frames, it will ask you to supply a set of Bias Frames and do the rest.

Is it Worth the Effort?

Doing full calibration can seem like a lot of work. From my experience.....

MX5-C: This camera has very low bias and dark current. Often I do not bother with calibration, but if I am trying to dig a faint image out of the light pollution then dark frame calibration does help. Flat Frames do not seem to improve anything much, so I generally don't bother.

Webcam:  For the Sun (with filter!) and Moon I generally do not bother with darks or flats. When using high magnification (therefore low light density) on the planets then subtracting a dark frame can help improve signal-to-noise ratio which also helps RegiStax to achieve good frame alignment.

I have used video flats to help remove dust 'do-nuts' in the image, but otherwise do not find I need them.

Meade DSI: As I find this camera very noisy I ALWAYS use dark frames even at quite short exposures. The software "Envisage" will manage the taking and using of dark frames fairly painlessly. I should probably also use flat frames but have not done so far.

Back Home Up Next

 

 

 

 


Tony Evans 2004-2011

DHTML Menu By Milonic JavaScript