In the Basics of CCD Imaging section, a simple
dark frame was used to calibrate the images. Subtracting dark frames is
the most important calibration process, but flat fields can also be critical. Bias frames are
only used in certain situations, but they are discussed below. And there are ways to improve upon the basic dark frames.
The noise in a CCD image is dependent primarily on the temperature of the
camera. A dark frame taken at the same
temperature as an image, therefore, will have approximately the same noise,
making it possible to subtract this noise from the image. However, there
are still slight variations in the amount of noise from dark frame to dark
A common technique is to take multiple dark frames at the same temperature
and then combine these to get a better model for the noise in an image.
This will also tend to cancel out any slight variations in temperature between
the images. Using a median combine method (or similar) also allows noise sources such
as hot pixels from cosmic rays to be removed, further improving the noise
reduction vs. a single dark frame.
There are a couple methods for the use of multiple dark frames. One is
to simply take a set of images, save them individually, and then combine them
later as you would individual light images. Some software packages allow
you to select multiple files for dark calibration and the combining is done
Remember, dark frames must be equivalent to the regular
light frames in every respect. The exposure length, temperature, and
binning must all be equal. The noise characteristics of a camera are
dependent on exposure length, temperature (colder = less noise), and pixel
binning. Changing these parameters between lights and darks will cause
a mismatch between images and the noise removal will not be ideal.
How Many Dark Frames?
How many darks you take depends on how little you want the noise contribution
from dark current to be. Even just taking 3 darks can lead to a noticeable
improvement over a single dark frame. The noise contribution is a function
of the exposure time, camera characteristics, and operating temperature, as well
combining method used, but there are some general guidelines. Based on
calculations by John Smith on his
website (an excellent
resource for CCD imagers), for a typical camera/exposure combination, 3-4
darks gives approximately a 10% contribution from dark noise. 6-8 darks
reduces this amount to 5%, and to obtain a 1% contribution, 20-30 darks must be
used. Most of the images used in the Guide to CCD Imaging website examples
were dark subtracted with a single dark frame, or a combination of 3 darks.
For more critical applications, 10 or more darks are recommended.
Tip: Dark frames can be taken after the light images. In fact,
they can be done while you start packing up other equipment, or when clouds roll
in, etc. This way you don't waste precious imaging time taking calibration
Flats are used to remove image artifacts due to the optical system.
Vignetting and shadows from out-of-focus dust specks are the most common
aberrations which flats eliminate. A flat is simply a blank, evenly
illuminated image which will show the variations in brightness due to the
optical system. By subtracting this image from the uncalibrated celestial
image, these aberration are removed.
There are a number of ways to take flat frames. Sky flats are taken by
aiming the telescope at the post-sunset or pre-sunrise sky. The twilight
sky provides a blank, evenly lit source for flat fields. However, stars
appear in the image well before you can see them visually, so there is a narrow
time frame available for capturing the images. Also, you must either be
set up to image before dark, or stay up until just before sunrise. Another
method involves shooting an image of an evenly illuminated surface set up near
the telescope (or in your observatory). The image is ideally unfocused,
so something 5 or 10 feet away is fine. Some imagers even construct light
boxes which mount over the front of a telescope and have a built-in light
source. This works fine but is probably more precision than is necessary
for most imaging.
A flat field is taken with the camera in the same position it will be in for
imaging. Any rotation of the camera or auxiliary optics (such as a focal
reducer) added or removed between flats and light images will affect the
usefulness of the flats. The brightness of a flat should be within an
ideal range. The usual recommendation is to end up with average pixel
values in the image of about 1/3 to 1/2 of the saturation value of your
The saturation value of a CCD camera is a function of the
and the gain. It is therefore not necessarily the same as the maximum
pixel value. For example, an ST-237A has a max pixel value of around
65,000 e-. However, the saturation level is only 9,000 e-, or a pixel
value of about 3800 ADU.
The recommended flat value would be between 1250 and 1900. Note that for
some cameras, the calculated saturation value is greater than the maximum pixel
value (65,535 for a 16-bit camera). For such a camera the recommended flat
field value would be 1/3 to 1/2 the max pixel value, or 21,845 to 32,767. Use the chart below for some common cameras, or visit the
CCD Calculators Page
to determine the recommended flat value for your CCD camera.
Saturation Level (e-)
Recommended Flat Value (ADU)
Measuring ADU Values
Measuring the background ADU values for a flat field is easy.
Take a test flat image at a known exposure length, say 1 second. Software
packages will allow you to measure the background value. MaxIm DL, for
example, will tell the pixel value (in ADUs) by simply moving the cursor over
the image. Data is displayed in the lower right-hand corner of the screen,
and the value "i" indicates ADU count.
Above: Pixel data in MaxIm DL. The
background pixel value is 12,319.
Suppose your camera requires a flat field value of 18,000,
and a 1 second exposure yields a value of 12,000. You need to increase the
exposure by 50% to 1.5 seconds to get a value of 18,000.
Above: A typical flat field image showing slight vignetting
as well as dark halos from dust specks in the optical path. This image is
a sky flat, taken just after sunset.
Taking Sky Flats
For wide field imaging, it is critical to shoot flat fields
using an evenly illuminated section of the twilight sky. The sky
brightness displays a gradient toward and away from the position of the sun.
The best location in the sky for taking flats is an area just east of the
zenith. This null area of the sky exhibits the least brightness gradient (Chromey
and Hasselbacher, 1996). Away from this point the gradient can be 5% per
degree or more. For critical applications where ideal flats are necessary
(such as photometry), this can be problematic as variations in the background
ADU count can vary by several thousand. For pretty pictures, this is less
critical, but pointing to the zenith or slightly east will result in sufficient
Tip: When taking
twilight flat field images with a digital SLR, allow the camera to automatically
meter the proper sky exposure and you will achieve a good result.
Bias is the term used to describe a CCD camera's pixel-to-pixel variation in
zero-point. Each pixel has a slightly different base value, and this bias
is removed using a bias frame. Since dark frames contain the same bias as
a light frame, dark-subtracted images are already bias-subtracted. But
some new cameras do not require dark frames, as they have very low dark current,
so a bias frame could be used for images taken with such a camera. Also, a
bias frame can be used to scale a dark frame in the event that a dark frame is
not equal in exposure time to the light frame from which it will be subtracted.
A bias frame is, ideally, an exposure of zero length. Since a
zero-length exposure is not allowed by imaging software, simply use the shortest
possible exposure time. This is usually 0.01-0.1 second. Be sure the
camera is at the same temperature as the dark frames which will be scaled with
the bias frame (which should, in turn be equal to the temperature at which the
light images were taken).
Usually, three or more bias frames are used to reduce noise in the same way
multiple darks are combined. These are
later median combined either before being used to calibrate the image, or
automatically during the calibration if your software allows.
Above: A typical bias frame.
Return to Advanced Imaging Page