The raw images returned by a CCD contain a number of instrumental effects which must be removed
before the image can be used for scientific purposes. This section summarises some of
these effects. It is largely based on the document Reducing CCD Images (file reduce.ccd
)
included on the CD-ROM Astronomical Images by Jaffe[14]. The instrumental effects are
usually corrected by taking various sorts of calibration frames in addition to the images of
the astronomical objects observed. In this cookbook the objects observed will be called
target objects and the observations of them correspondingly called target images or target
frames.
Some of the pixels making up the light sensitive grid may be faulty and return signals which are grossly inaccurate. Such pixels are often referred to as being ‘hot’, ‘cold’ or ‘bad’. Because of the way that CCDs are read-out, in some circumstances a bad pixel will contaminate all the pixels in its row or column in the grid, leading to entire bad rows or columns. Fabrication techniques have improved markedly in recent years, though bad pixels are still regularly encountered.
The software to process CCD images must contain facilities to handle individual bad pixels, bad rows and bad columns. Typically it will either contain options to recognise and ignore them or to replace them with artificial but reasonable values, usually computed from neighbouring pixels.
Usually the amplifier which boosts the signal prior to its digitisation by the ADC will also generate an offset, false signal or bias, which is imposed in addition to the real signal generated by the illuminating light (there are sound reasons for doing this). This bias varies slightly with position on the chip, can vary slowly with time (though this is minimised if the chip is kept at a constant temperature) and inevitably has noise associated with it. There are two techniques for estimating and correcting the bias.
Which method is preferable depends on the quality and stability of the chip. If the chip and amplifier are stable during the observing session them observing separate bias frames is straightforward and gives satisfactory results. Conversely, using bias strips can be more convenient because you do not have to acquire, store and process separate bias frames. Of course, if the CCD controller software does not generate bias strips then you must use separate bias frames.
However you make the bias correction, you need to apply it to all the other frames acquired: target objects, flat fields (see below) etc. Often making the bias correction is the first stage of CCD data reduction.
As mentioned above, CCD chips have a wide dynamic range within which their response is essentially linear. However, if the illuminating light is sufficiently bright the response will become non-linear and will ultimately saturate (that is, an increase in the intensity of the illumination produces no change in the recorded signal). In principle the response in the non-linear region can be calibrated. However, in practice, the onset of saturation is sufficiently rapid that it is more sensible to limit exposures to the linear region. In order to prevent saturation it is usual to a take a series of short exposures rather than a single long exposure of equivalent duration. The individual short exposures can then simply be added during the data reduction. This technique offers other advantages, for example in the detection and removal of cosmic-ray events (see below). Usually the documentation for the instrumentation that you are using will include the range of intensities over which the response is linear.
Another effect which is sometimes present is an offset from zero that is generated thermally within the CCD, even when no light is present. This offset is termed the dark current because it is present whether the shutter is open or closed. It varies somewhat from pixel to pixel and slowly with time (as long as the chip is kept at a constant temperature). It is usually minimised by cooling the CCD to the temperature of liquid nitrogen.
If necessary, the dark current can be measured by taking long exposures with the shutter closed, removing the bias, correcting for cosmic-ray events (see below) and dividing by the exposure time. The dark current response is then scaled to the exposure time of each target image and subtracted from the target image. However, the dark current is usually insignificant (and ignored) for visible light CCDs, but is important for infrared arrays.
Due to imperfections in the manufacturing process the sensitivity of the pixels will vary slightly (usually by a few percent) across the grid. This effect is essentially random, and is not a function of, for example, position on the grid. The relative sensitivities of the pixels can be calibrated by imaging an evenly illuminated source, such as the twilight sky, and examining the variation in values recorded. Once this calibration is known, astronomical images of the sky can be corrected to the values they would have had if all the pixels had been uniformly sensitive. This correction is known as flat fielding and images of evenly illuminated sources, such as the twilight sky, are known as flat fields. The pixel-to-pixel sensitivity variations change with wavelength, so the flat fields should always be acquired using the same filter as the observations of the target objects. The flat fielding procedure also corrects for several other effects:
Two types of flat fields are usually used: dome flats and sky flats. Brief details are as follows.
An alternative to taking flat fields during twilight is to take then during the night. This approach is particularly common for infrared observations because at these wavelengths the sky is relatively bright.
It is possible to combine different sorts of flat fields to obtain the advantages of each. For example, you could use dome flats to correct pixel-to-pixel sensitivity variations and twilight flats to correct large-scale effects such as vignetting.
In outline, you use the flat fields to correct the target exposures as follows. Choose several correctly exposed flat fields, de-bias them and combine them into a single ‘master’ flat field. The de-biassed images of the target objects are simply divided by this master flat field. You should always calibrate target images using flat fields obtained through the same filter (that is, in the same colour) and on the same night. Flat fields acquired with a 16-bit camera should ideally have a mean pixel count which averages around 20,000 in order to allow high accuracy to be obtained.
In the case of observations made through a narrow filter, or where the incident light contains a strong component at a single wavelength, multiple reflections within the CCD chip, or the filters in front of it, can cause wave-like patterns across the image. These patterns are called fringes. The precise pattern depends strongly on the exact wavelength of the illuminating light. Consequently, correcting for fringing requires a flat field whose wavelength corresponds closely to that of the image.
The emission from the night sky usually includes narrow emission lines originating in the terrestrial atmosphere. These lines will often fall within the bandwidths of broad band filters. However, they are not present in the featureless spectra of dome flats. Consequently dome flats may not be appropriate when fringing due to night-sky lines is present.
The fringe pattern is an additive effect and must be subtracted. To remove fringes it is necessary to obtain several exposures of either a region of night sky containing no objects or, alternatively, remove all the contaminating objects from data frames which otherwise contain large areas of night sky. These frames should then be combined to give complete spatial coverage and to reduce the noise contribution. The resulting fringe-frame should be scaled to the fringes present in the data frame (after normalisation) and subtracted.
Astronomers usually refer to spurious signals in CCD frames caused by ionising radiation as cosmic-ray hits or cosmic-ray events. However, these terms are slightly misleading as the ionising events are as likely to be due to background terrestrial radiation as cosmic-rays. When a cosmic-ray particle hits a CCD pixel it causes an increase in charge which is indistinguishable from the arrival of photons. These spurious signals are usually (though not always) confined to a single pixel. Cosmic-ray hits appear as a set of pixels with intense values sparsely scattered over the CCD frame. Typically an exposure of a few minutes might have about a hundred cosmic-ray hits. The location of the hits within the chip is random. If several frames of the same target object or flat field have been acquired (for example to avoid saturation, see above) then the cosmic-ray hits will occur at different positions in each frame and it is possible to detect and remove them by comparing corresponding pixels in the different images and rejecting those with aberrantly large values.
The final, irreducible, source of noise is the photon noise due to the poissonian nature of counting photons. The error in the signal is proportional to the square root of the signal.