Calibration Frames – Our Guide To Using Lights, Darks, Flats, Dark_Flats, and Bias Frames

Lights?! Darks?! Bias?! Flats?! Dark Flats?! What does all this mean?!

If you have ever asked someone about how to improve your astrophotography quality, those words were probably peppered in the answer you got.

If you are unsure about what that answer means, this guide will shed some light on it.

While this is a fairly technical subject to discuss, I decided to write a rather light and easy to read beginner’s guide, at the cost of risk being less rigorous at times

different types of calibration frames
The different types of images you will encounter in astrophotography.

What Are Calibration Frames?

Calibration frames are photos you take in particular ways and under particular conditions, for the precise purpose to improve the quality of your light frames.

To keep it easy, the job of the calibration frames is to calibrate the light frames, i.e., the actual images of your target, by removing from them:

  • Different kinds of noise
  • Vignetting
  • Specks of dust or other imperfection in your optical setup

This allows you to “clean up” the light frames before you stack them, to produce the final image.

Different types of calibration frames

There are four types of calibration frames: bias, darks, flats, and dark flats. Each type has a specific job to do.

Here is what the different calibration files are used for.

Bias Frames

bias frame
A typical bias frame. Note that I have overexposed it by 5EV to let you see the readout noise.

Bias frames are used to take care of the readout noise of your sensor, i.e., the electronic noise the sensor produces when reading the value of the pixels.

In high-end cameras, this type of noise can be extremely low but is never zero, and collecting bias frames is an easy way to remove the readout noise.

Dark Frames

dark frame
A typical dark frame. Note that I have overexposed it by 5EV to let you see the thermal noise and the stuck pixels.

Darks frames are used to record the electronic noise your camera produces during the capture of a particular exposure.

This noise depends on the length of the exposure and the amplification of the signal, i.e., the ISO value you used. Since the longer the exposure, the hotter the sensor becomes, this kind of noise is also called thermal noise.

Darks will also take care of stuck pixels in your sensor, i.e., pixels whose sensitivity is too high (hot pixels) or too low (cold or dead pixels). 

Hot pixels are much brighter than they should be and are permanently one. They can be red, green or blue. 

Hot pixels in a dark frame
Hot pixels in a dark frame.

Cold pixels have lower than normal sensitivity, while dead pixels have zero sensitivity. They appear gray or black.

Finally, dark frames also include the readout noise, the one that bias frames are intended to deal with. 

Flat Frames

flat frame with signs of vignette
A flat frame. Note how the vignette at the corners of the frame is readily visible.

Flat frames are used to cure issues in your setup that can alter the uniformity in the brightness of your scene.

These can be vignetting from using a filter or a photographic lens wide open, or dirt and dust specks in your optical train.

Flat frames do not eliminate light gradients from light pollution.

Dark Flat Frames

dark flat frame
A typical dark flat frame. Note that I have overexposed it by 5EV to let you see the noise. Also note that because it is a shorter exposure than the dark frame I show you above, the noise is much less.

Even for the relatively short flat frames, thermal noise is affecting them, particularly so if the flats are unusually long (few seconds). 

Dark Flats are used to suppress this noise, thus cleaning up your flats.

How To Take Calibration Frames

Each type of calibration frame is taken in a different way so that it only contains the “defect” it needs to suppress when applied to your images.

How To Take Bias Frames

Bias frames are the quickest and easiest of all calibration frames.

With the lens cap on, take a series of images using the same ISO value used for the lights you want to calibrate and the fastest shutter speed, typically 1/4000s or 1/8000s.

This allows us to isolate the readout noise from thermal noise and to keep pixel values to their minimum. 

Because we are recording the readout noise, the temperature at which you took your light frames is not important, and you can build your own bias library and collect the bias frames once a year, for the ISO values you usually use.

If you use an astronomical camera instead of a mirrorless or a DSLR, the only difference is that there are no ISO values. Instead, you use what is called the gain.

In this case, put the cap on your telescope and take the bias frames with the same gain you used to collect the light frames, setting the camera to its fastest shutter speed.

How To Take Dark Frames

Dark frames are the longest and trickier of all calibration frames.

They are the longest calibration frames to take because they have to match the exposure time used to record your light frames: if you shoot your target with 3-minutes long exposures, each dark frame must be 3-minutes long.

As for the bias frames, you need to put the lens/telescope cap on and use the same ISO/gain value.

They are the trickier calibration frames to take because they are temperature-dependent, as they need to record the thermal noise of your sensor.

Because you need to take the dark frames at the very same temperature of the light frames (or within 1-2 ºC from it), ideally, you want to have a cooled camera for astrophotography.

With a cooled camera, you can efficiently control the sensor temperature and even cool it down some 20-30 ºC below ambient temperature.

There are several advantages in using cooled cameras over a classic DSLR, Mirrorless or non-cooled astro camera:

  1. the lower the sensor temperature, the lower the thermal noise, the better the image quality.
  2. you can exactly match the temperature for the dark frames to that of your light frames.
  3. you can build your own library for dark frames.
  4. you can take dark frames whenever you have time, saving precious time you can now invest in taking more images of your target.

With non-cooled cameras, the whole procedure is quite sketchy.

For a start, there is not a simple way to relate the ambient temperature to the sensor temperature. 

Then, the sensor temperature increases as the imaging session goes on because the sensor warms up by taking one exposure after the other.

Lastly, some cameras record a temperature in the exifs attached to the images, but that is luckily not the real temperature of the sensor.

The best way to take darks with non-cooled cameras is to get them directly in the field, at the end of the imaging session. I usually take my darks while packing up.

For these reasons, some say darks are a waste of time if you do not have a non-cooled camera and that sometimes dark frames even degrade the image quality.

Software such as Pixinsight, Astro Pixel Processor, and even Deep Sky Stacker offers a function to scale (or optimize) the Master dark. With this option, mathematical models are used to scale the master dark to match at best the temperature, ISO, and exposure time of your lights.

You should experiment with that as it sounds like a great way to calibrate light frames from uncooled DSLR.

This way, one could create once a year a master dark from integrating a couple of hours of darks and scale it when calibrating the images, thus saving time in the field.

Comparison of light frames with different calibration
Comparison of a stack of 40 x 150s light frames with different calibration. Images have been overstretched and inverted on purpose, so to better show the residual noise.

I advise you to do some tests with your camera and decide what works best for you.

How To Take Flat Frames

Flat frames are not used to suppress digital noise in your images, thus they are not temperature-dependent. But should be taken at the same ISO of the light frames.

Good flats are those with a proper exposure, where the histogram for all R, G, and B channels peak at about halfway, ⅓ to ½ from the left edge.

There is no fixed exposure length for flats. Instead, look at the histogram and tune it by changing the brightness of your light source (or add an extra T-shirt if this is the method you are going to use). 

histogram for checking calibration frames
In a good flat, the histogram for R, G, and B channels peak about ⅓ – ½ from the left edge.

Also, the color you get is not important: what counts is the variation in brightness across the image.

But what is the light source for taking the flats? And are there any restrictions or things to be aware of?

Because the goal of the flats is to give your images an evenly illuminated frame (a flat frame), you want to use a uniform source of light.

Some use to point the camera at the clear sky at dusk, others use LED panels or even the screen of a computer or tablet.

Getting flats by putting white shirt on lens
Getting flats by pointing the camera at a uniform sky with a stretched white T-shirt in front of the lens.

Here is what I do, but mind I am using photographic lenses. If you have a large telescope, a dedicated led panel is probably the best solution.

I download a white wallpaper for my computer, and I place on the screen 2 white A4 paper for copy machines and printers.

Then, I go very close to the screen with my camera plus lens, and I begin taking images while constantly moving the camera in tight circles. 

This circular movement is rather fast, and it helps to make the source of light more uniform. Some prefer to stretch a white t-shirt over the lens.

With a uniform source of light, the lens vignetting, the filter, or specks of dust and dirt in your optical train are the only reasons for an unevenly illuminated frame.

To be sure these sources are exactly those affecting your light frames, nothing should change in your optical setup: nor the camera orientation, nor the filters, nor the lens hood or dew shield, nor the focus.

With photographic lenses and a small refractor, it is easy to pack away the whole setup without changing anything, so that you can take the flat frame in the comfort of your home.

Unfortunately, if you use large telescopes, you need to find a way to get your flats in the fields, either by using an LCD panel or the screen of a suitable tablet.

How To Take Dark Flat Frames

Dark flat frames are essentially dark frames. Only you will now need to match the exposure time, the ISO/gain value, and the temperature of your flat frames.

How Many Should I Take Of Each?

Ideally, the more calibration frames you take, the better. 

A more realistic rule of thumbs, particularly for taking darks in the field is:

  • Bias Frames: 100 or more
  • Dark Frames: 20-40
  • Flat Frames: 50-100
  • Dark Flat Frames: 20-40

In time, you will find the numbers that work best for your camera.

How Do You Use Calibration Frames?

Calibration frames are used in software for image stacking to calibrate the light frames prior to stacking them into a single image.

calibration process from DSS
Deep Sky Stacker (DSS) is a great, free software for deep sky images calibration and stacking. On this page, you can find how the different calibration files are used (and should be used) by the program.

You basically load the calibration files as a particular type of file and let the software do their magic. 

All calibration frames of the same types are combined into a master file, which is then used to calibrate the light frames. In particular, master dark, master bias, master flat, and master dark flat frames are created.

Sometimes, you can reuse master frames such as the master bias, thus saving time.

When it comes to using dark and bias frames, you must be careful and make sure you, or the software, pre-calibrates the darks using the master-bias.

This is because dark frames do contain the readout noise bias frames are made for, and if you use both, you will remove twice the readout noise from your lights.

Because it is impossible to take very good darks with a non-cooled camera, I still advise you to take bias frames and use them if the light calibration with darks is problematic. 

Bad Pixel Maps Vs Dark Frames

Some software, such as Astro Pixel Processor, can use your darks to create a Bad Pixels Map (BPM). This is a map of all the stuck pixels of the sensors, i.e., the hot, cold, and dead pixels.

While less efficient than using dark frames, because the thermal noise is not there, you can reuse the BPM and build it once a year.

If you forgot or had no time to get proper darks, you can use this BPM to calibrate your images.

If you can scale darks, maybe it is better to have a good master dark to scale, rather than using a BPM. 

Again, experiment with your camera and see what works best for you.

A Video To Recap

Here is a nice video about taking calibration frames.

Conclusion

Light frame calibration is crucial in achieving high-quality astrophotography images, and you should make it a fundamental step in your editing workflow.

As often the case with astrophotography, there is not a single way to proceed, and how you take your calibration frames mostly depends on your gear.

In any case, you now know what calibration files are and how to take and use them, so don’t forget them next time you are photographing many wonders of the universe.

About Andrea Minoia

Andrea Minoia works as a researcher in a Belgian university by day and is a keen amateur astrophotographer by night.

He is most interested in deep sky photography with low budget equipment and in helping beginners along their journey under the stars.