Darks, Flats and Bias Frames: What They Actually Fix

A plain explanation of calibration frames — what each one removes, how many you need, and when shooting them is a waste of a clear night.

Every astrophotography tutorial tells you to shoot darks, flats and bias frames. Almost none of them tell you what each one removes, which means most people either shoot all three out of superstition or skip all three out of confusion. Both are mistakes, and they are not equally bad — one of these three matters far more than the other two, and it is not the one beginners usually start with.

Here is what each frame actually does.

Your sensor lies in three different ways

A camera sensor does not report the light that fell on it. It reports the light that fell on it, plus a set of errors, and each calibration frame targets one specific error.

It adds heat. Every pixel accumulates charge from thermal energy even in total darkness, and it does so at a rate that roughly doubles for every 6–7 °C. Over a 300-second exposure that adds up to a real signal that has nothing to do with the sky. Worse, the rate varies from pixel to pixel — some pixels are much hotter than their neighbours, which is where those coloured speckles come from.

It vignettes and collects dust. Your optics deliver more light to the centre of the frame than the corners, usually by 20–40%. Dust on the sensor window or filter casts soft grey doughnuts. Neither is in the sky, but both are in every frame.

It has an offset. The camera adds a fixed pedestal to every reading so that noise never clips at zero. That pedestal is not perfectly uniform either — it has faint patterns in it.

Darks fix the first. Flats fix the second. Bias fixes the third.

Flats are the ones that matter

If you only ever shoot one kind of calibration frame, shoot flats. This is the opposite of what most people do, and it is the single biggest quality gain available to a beginner.

The reason is that vignetting and dust shadows are multiplicative and large. A 30% falloff in the corners does not just darken the corners — it survives stretching, and stretching amplifies it. When you pull faint nebulosity out of the background, you also pull out the vignette, and you end up with a bright blob in the middle of your frame that no amount of gradient removal fully fixes. Dust doughnuts do the same thing: they appear as soft dark rings right where you are trying to see faint signal.

Darks, by contrast, address something that stacking already partly handles. Average enough frames and random thermal noise falls as the square root of the count. Hot pixels do not average away — but they can be dealt with statistically, which I will come back to.

Flats are also the easiest to shoot and the least demanding of your clear-sky time. You do not need darkness. Point the telescope at a uniformly lit surface — twilight sky, a white t-shirt over the aperture with a lamp behind it, a tablet showing a white screen — and expose so the histogram sits around a third to half of full scale. Twenty to thirty frames is plenty.

The critical rule: flats must be shot at the same focus, same rotation and same optical configuration as your lights. If you refocus or rotate the camera, the dust moves relative to the frame and your flats are worse than useless — they will stamp doughnuts in the wrong places. Shoot them at the end of the session before you touch anything.

Darks: useful, but overrated for short exposures

A dark frame is an exposure with the shutter closed, at the same duration, temperature and gain as your lights. Subtract it, and you remove both the average thermal signal and the fixed pattern of which pixels are hotter than others.

Two conditions make darks genuinely valuable:

  • Long exposures. At 300 seconds the thermal contribution is substantial. At 10 seconds — which is what a Seestar or a Dwarf shoots — it is often below the read noise, and subtracting it buys you very little.
  • A cooled camera. Darks only work if the temperature matches. A dedicated astro camera at −10 °C produces repeatable darks you can reuse for months. A DSLR that started the night at 18 °C and finished at 4 °C does not — the dark you shot at the end does not describe the frame you shot at the start.

That last point is the one that trips people up. An uncooled DSLR’s dark current changes through the night as the camera cools. Subtracting a mismatched dark can add noise rather than remove it, because you are subtracting one noisy frame from another and the thermal signal does not even cancel properly.

If you shoot with an uncooled camera in short subs, it is entirely reasonable to skip darks. You are not being lazy; you are declining a correction that does not apply cleanly to your data.

Bias: the one you can usually ignore

A bias frame is the shortest exposure your camera can take, with the shutter closed. It captures the electronic offset and nothing else.

Bias frames matter when you are scaling darks — using a library dark shot at a different exposure length and mathematically adjusting it. That requires separating the fixed offset from the time-dependent thermal signal, which is what bias gives you.

If you shoot matched darks at the same length as your lights, the bias is already inside the dark, and subtracting the dark subtracts the bias with it. Shooting bias separately then adds nothing.

Bias frames are cheap — a hundred of them takes under a minute — so there is no strong argument against having them. But if you are standing in the cold wondering whether to bother, this is the one to skip.

What about hot pixels?

Here is where the standard advice quietly fails. Darks remove the hot pixels your sensor produces predictably. They do not remove cosmic ray hits, which land in one frame at random, and they do nothing at all for the very large number of people who never shoot darks.

Hot pixels are worth taking seriously because stacking does not remove them. Average ninety frames that all have a hot pixel at (1204, 883) and you get a stack with a hot pixel at (1204, 883). Then registration rotates the field between frames and smears that stationary defect into a short coloured streak — which is exactly the artefact that makes an otherwise good image look amateurish.

They can be found statistically instead. The trick is telling a defect from a star, since both are small and bright. The discriminator is that a star is not one pixel: optics spread a point source across several, so a real star has bright neighbours. A hot pixel stands alone. Compare each pixel against the median of its eight neighbours, and scale the threshold by how much those neighbours disagree with each other — around a hot pixel on flat sky they agree closely, around a star’s core they are the star’s own shoulders and vary a lot. That distinction is what lets you remove one and keep the other.

Akastroid does this automatically on every frame, before registration, whether or not you shot darks. It is deliberately conservative — eight sigma out — because the costs are asymmetric. A missed hot pixel is a speck. A removed star core is data nothing can recover.

A practical answer

If you have limited time and cold hands:

  1. Always shoot flats. Twenty to thirty, at the end of the session, before you touch focus. This is the biggest single win.
  2. Shoot darks if your camera is cooled or your subs are long. Match the temperature, gain and duration. Twenty is a reasonable number.
  3. Shoot bias if you are building a dark library. Otherwise it is optional.
  4. Do not lose a clear night to calibration. Lights are the irreplaceable part. Flats can be shot at dawn, darks with the lens cap on indoors.

And if you have no calibration frames at all, process anyway. A stack of uncalibrated lights with a gradient removed and its hot pixels cleaned is a real photograph. Perfect calibration on data you never collected is not.

Try it on your own data

Akastroid does everything in this guide automatically, and tells you what it did.

Download Akastroid — free