How long are you supposed to expose to take a decent flat field? Most folks are quick to tell you that you need to expose long enough to get the signal about halfway across the histrogram, but this isn't the whole story. Does the same theory work for DSLRs?

Irrelevant of how you make your flat fields, be it a light box or simply a tshirt and a torch, you have to decide what length of exposure to make. The usual advice is to expose long enough to get the signal about half way across the histrogram however there are a couple of factors at play which are worth drawing attention to. Flat exposures are typically short, maybe a few tenths to a couple of seconds, so it is no pain to make them as long as you wish, but what do we have to consider when setting this exposure?

There is a trade-off. The balance must be struck between noise and linearity. All exposures on a CCD camera have a signal to noise ratio. If we take a very short flat exposure, then the image appears quite noisy. However, we often take many flats and stack them to make a master stack. Common sense says we make the flat exposure as long as possible without saturating any of the pixels.

There is another aspect: Camera linearity. A perfect ccd camera has a linear relationship between the length of the exposure and the magnitude of signal produced in the readout. Most astronomical light frames have a very low signal at most a few thousand ADUs. However, common advice says we expose the flats to have maybe 20,000 ADU to get low noise flats. However, if the camera is not linear, a high ADU flat will not properly correct a light frame taken with low ADU. This was particularly evident on webcams see Robin Leadbeater

Therefore one arguement says that any number of low exposure flats is worse than a few high exposure (low noise) flats. The low noise flats will add less noise to the finished image fact. See the proof from Richard Crisp. The opposite argument says that if the light frames are of very low ADU (e.g. through a narrowband filter) then the flats should be of similar ADU magnitude to the light frames otherwise camera non-linearity might spoil the corrective effect of the flat.

This is clearly the case with webcams, but should not be the case with a proper cooled astronomical CCD Camera. But all cameras are not perfect... It is sensible therefore to learn your camera. When taking flats, take a set at high (low noise) ADU as Richard advises, but also take a set where the ADU values are closer to those of the light frame. Try calibrating the light frames with both sets of flats and see what gives the best correction. If the longer flat exposures work as well as the shorter ones, then use the long exposures and reduce the noise introduced by the flat, however, if there is a difference, then possibly you have just learn something to improve you images.

I have a theory that DSLRs commonly used for astrophotography such as the Canon 350D, 400D etc are not as linear as cooled CCD cameras - users of DSLRs for astrophotography would be well advised to test different lengths of flat exposure to get the optimum correction during light frame calibration.