The nominal output of a CCD--element to a quantum of light can be given as
where the additive contribution is caused by the dark current, by pre-flashing, by charge that may have skimmed from columns having a deferred charge (skim) and by bias added to the output electronically to avoid problems with digitizing values near zero. Quantum and transfer efficiency of the optical system enter into the multiplicative term M. The term I consist of various components: object, sky and the photons emitted from the telescope structure. It is known that the response of a CCD can show non-linear effects that can be as large as 5-10%. These effects are represented by the term .
In the following we ignore the pre-flash and skim term, and hence only take the bias and dark frames into account. The objective in reducing CCD frames is to determine the relative intensity of a science data frame. In order to do this, at least two more frames are required in addition to the science frame, namely:
The dark current dark is measured in absence of any external input signal. By considering a number of dark exposures a medium <dark> can be determined:
The method to correct the frame for multiplicative spatial systematics is know as flat fielding. Flat fields are made by illuminating the CCD with a uniformly emitting source. The flat field then describes the sensitivity over the CCD which is not uniform. A mean flat field frame with a higher S/N ratio can be obtained buy combining a number of flat exposures. The mean flat field and the science frame can be described by:
where represents the intensity distribition on the sky, and ../icons a brightness distribution from a uniform source. If set to the average signal of the dark corrected flat frame or a subimage thereof:
then the reduced intensity frame intens will have similar data values as the original science frame science.
Combining Eqs.(), () and () we isolate:
Here ../icons can be any number, and term now denotes a dark frame obtained by e.g. applying a local median over a stack of single dark frames. The subscript in denotes that this dark exposures may necessarily be the same frame used to subtract the additive spatial systematics from the raw science frame.
The mean absolute error of yields with ../icons = 1 (only the first letter is used for abbreviations):
Computing the partial derivatives we get
A small error is obtained if , and are kept small. This is achieved by averaging Dark, Flat and Science frames. is further reduced if S=F, then Equation () simplifies to
This equation holds only at levels near the sky--background and is relevant for detection of low--brightness emission. In practice however it is difficult to get a similar exposure level for the flatfrm and science since the flats are usually measured inside the dome. From this point of view it is desirable to measure the empty sky (adjacent to the object) just before or after the object observations. In the case of infrared observations this is certainly advisable because of variations of the sky on short time scales.