CCD data reduction: Bias, Dark and Flat

BIAS

A CCD camera is nothing else than a particle detector, with its own read-out electronics, amplifiers etc. When you take an image of an astrophysical object, then you do nothing else than a physical experiment, i.e. you measure the flux coming from this object. Your detector system, however, doesn't work perfectly, nor does your telescope. The CCD has a varying sensitivity from pixel to pixel, the telescope doesn't illuminate the CCD homogeneously, the electronics can do funny things, too, and many other things. These effects are called the instrumental signature which has to be removed.

Debiasing

A BIAS exposure is an image with the shutter closed and the shortest possible exposure time. The BIAS shows the electronic noise of the camera and possible systematics. It can look like the one in Fig. 1. This pattern is also in your actual imaging data, which I will call SCIENCE image. Several BIASes are combined into a master BIAS, using outlier rejection, and subtracted from your SCIENCE exposures. The more BIAS exposures are used for the calculation of the master BIAS, the less noise will be introduced into the corrected images. If the camera has significant dark current, then a master DARK instead of the BIAS has to be subtracted from the SCIENCE image.


Fig. 1: A master BIAS, calculated from 10 single images.

Overscan correction

The overscan correction is done before the debiasing, but it is more easily understood when the BIAS concept was introduced. The overscan is a number of rows and columns created by doing a few empty readout cycles before the detector is read. They appear as blank regions attached to the image and serve as an individual BIAS that comes along with every image. It represents the actual state of the camera at the time the exposure was taken. In amateur CCD cameras the overscan is absent. Professionals usually smooth the overscan and subtract it, including the calibration exposures.

DARK

The CCD in a camera has a non-zero temperature, which is a measure for the kinetic energy of a larger number of particels. Some electrons have a high enough energy to end up in pixels without the need of an 'activating' photon. This is called dark current, which is different from pixel to pixel and also noisy. The dark current in CCDs is usually very stable and can be corrected by a series of DARK exposures, which were combined into a master DARK. You thus remove the expected dark current from the pixels. What you can not remove is the dark current noise that already is in your image. On the contrary, by subtracting the master DARK you will introduce even more noise. The more DARK exposures you combine for the master DARK, the less this calibration noise gets.


Fig. 2: A master DARK

The DARK current and thus its noise can be reduced by lowering the temperature. A drop by 6 degrees Celsius roughly halves the dark current, and reduces the dark current noise by a factor of sqrt(2). Professional CCD cameras are cooled with liquid nitrogen and are hence free of any dark current. Master DARKS can serve as very good bad pixel masks, also for professional instruments.

One does not need to subtract a BIAS and a DARK from the SCIENCE exposure, since the BIAS is already contained in the DARK.

Flat fielding

Telescopes usually do not illuminate the detector homogeneously. Dust on optical surfaces leads to further shadowing of detector areas. The quanum efficiency of the CCD itself is also not necessarily the same for all pixels. All these effects are corrected by division of a FLAT, which is an exposure of a homogeneously illuminated area. This can be a flat box or an evenly illuminated screen on the wall (domeflats), or just the sky in zenith some minutes after sunset (skyflat, or twilight flat). If you use skyflats, pick out an area free of gradients. This is easy because you can see a huge area of the sky at once, whereas it is much more difficult to judge whether a flat box is really "flat", since it is so small in size). Skyflats preserve the natural path of light and thus do not suffer easily from systematic effects such as domeflats.


Fig. 3: A flat field.

To achieve a high S/N one should expose so long that the CCD is 50% saturated. When taking skyflats, the exposure time has to be adjusted after a few images have been taken. The drive of the telescope should also be switched off, so that stars do not fall into the same detector areas and thus can be removed during the combination of the stack.

Some more guidelines for taking and processing flats:

  • Do not use the shortest possible exposure time in order to avoid shutter effects
  • Take many flats to keep the calibration noise low
  • Subtract a BIAS from the FLAT (a DARK is not necessary due to the short exposure time)
  • Before skyflats can be combined, they must be normalised before combination, otherwise the outlier rejection will not work.

Flats usually work well, but are not perfect. The night sky is not of even brightness, not even at the darkest location. Differential airglow can lead to significant gradients in the image, in particular for wide fields of view or targets far from zenith. Light pollution makes it a lot worse. These effects can be corrected for by sky background modelling.