Module 6: Astrophotography · Lesson 6.3 · about 25 min
Calibration frames: darks, flats and bias
Raw astronomical images carry the camera's own faults: hot pixels, glow, vignetting and dust shadows. Dark, flat and bias frames record those faults so you can subtract and divide them out.
Module 6 · about 25 minutes · read first: 6.2 Exposure, noise and signal-to-noise · maths: arithmetic on images. You’ll be able to name each calibration frame, take it correctly, and apply the calibration formula.
1. Why this matters
Calibration is what separates a measurement from a pretty picture. Professional pipelines (Astronomy 5.4) calibrate every frame before anything else, and photometry (Astronomy 5.1) is only as good as its flats. For imagers, calibration removes the faults that no amount of processing can hide.
2. The frames
- Light frames: your images of the target.
- Bias frames: the shortest possible exposures with no light: the camera’s fixed electronic offset and pattern.
- Dark frames: the same exposure length and sensor temperature as the lights, with the telescope capped: bias plus heat-generated signal (dark current), including hot pixels and amp glow.
- Flat frames: images of an evenly lit surface (twilight sky, a light panel) through the same optical train: they record vignetting (darker corners) and dust shadows (rings, called “dust donuts” from out-of-focus dust).
- Flat darks (or bias): to remove the camera’s offset from the flats.
Each kind is combined from many frames (often 20 to 50) into a low-noise master.
Things to notice:
- Subtracting the dark removes hot pixels and the glow on the right; it doesn’t touch the corners or dust rings.
- Dividing by the flat brightens the corners and erases the dust rings. Do both for a clean frame.
Calibrate one image:
Maths and principle
Principle: the raw value in a pixel is (sky signal × fraction of light reaching that pixel) + dark signal + bias. Undo it in reverse order.
Calibration formula:
The flat is divided by its own mean so it averages 1, and the calibrated image keeps the original scale.
Why many frames per master: combining frames cuts their random noise by . A noisy master dark would add its noise to every light.
3. Worked example
One pixel in a dusty corner. The true sky signal is 200 e⁻. The corner gets only 50% of the light because of vignetting and dust, and the dark signal for that exposure is 30 e⁻.
- Raw light: .
- Flat (after its own dark): this pixel reads 500 e⁻ where the flat’s average is 1,000, so its normalised value is 0.5.
- Calibrated: e⁻. The true signal is back.
Without the flat, the corner would read 100: half the true brightness, and any photometry there would be off by 0.75 magnitudes.
- Dark
- Cap-on frame: thermal signal and hot pixels.
- Flat
- Evenly lit frame: how much light reaches each pixel.
- Calibrated = (light − dark) / normalised flat
- Undo the camera's faults in reverse order.
- Physical meaning
- A camera is a slightly dirty window with a heater. The dark frame measures what the heater adds on its own; the flat measures how much each part of the window dims the light. Subtract the first, divide by the second, and you see through a clean window.
“Calibration frames are optional extras for perfectionists.” Without flats, dust and vignetting show strongly once you stretch an image; without darks, hot pixels become coloured streaks after stacking. Calibration is what makes faint signal reliable.
4. Practical tips
- Take flats without moving focus or the camera, ideally the same night.
- Expose flats to about a third to a half of the sensor’s full range.
- Build a library of darks for each exposure and temperature if your camera is cooled.
- Many modern cameras have tiny dark current; bias and flats then matter more than darks.
5. Practice
More practice (answers below):
- Raw light 900, dark 100, normalised flat 0.8. What is the calibrated value?
- You refocused halfway through the night. What should you do about flats?
- Why can’t a dark frame remove dust shadows?
Answers
- .
- Take flats for each focus position (the dust shadows changed).
- Dust removes a fraction of the incoming light (it multiplies the signal); a dark frame records only the camera’s own signal, which is added.
- Darks remove thermal signal and hot pixels (subtract).
- Flats correct vignetting and dust (divide, after normalising).
- Bias or flat darks remove the offset from flats.
- Use master frames averaged from many exposures.
Try it with your own files: build masters and calibrate frames in your browser with the calibration frames tool, then look at the results with the FITS viewer.
New words: light frame, bias frame, dark frame, flat frame, master frame, hot pixel, amp glow, vignetting.
Check yourself
Sources
- Howell, S. B. (2006), Handbook of CCD Astronomy, 2nd ed., Cambridge University Press (the CCD equation, calibration frames)
- Berry, R. and Burnell, J. (2005), The Handbook of Astronomical Image Processing, 2nd ed., Willmann-Bell
Your ticks stay in this browser. Save them as a file on the course home.
Updated 2026-11-22. Numbers in the examples are made up to show the idea unless a source is given. Simulations run in your browser on made-up data; nothing you type is sent anywhere. Astronomy only: nothing here is astrology.