top of page

Tutorial on how to take proper flats with DSLR.


     In this tutorial I'll try to explain how to take proper flats with you DSLR camera. Taking better flats will rise the quality of your images and improve flat field correction. You probably already heard off a common suggestion to expose your flats to half well depth or aim to 20000-30000 ADU. These are good suggestions, but seems like they more suitable for CCD world. Well, what is DSLR camera? Basically they are the same as CCD cameras, so why won't we treat them as one?

     Simple procedure will help us to determine to what ADU we should aim our flats with our specific camera. Take your camera and make simple one long exposure, long enough to make sure you completely overexpose it. Now, let's load our frame to PixInsight or whatever other software you desire that will be able to show us Linear data.

     Before loading CR2 files to PixInsight make sure that you have right settings for DSLR_RAW format as shown on the left image. Click on Pure Raw button and it will set everything as needed. After loading overexposed frame open up Statistics, make sure it shows the data in 16-bit integer range and note the Mean value. Now we can see that my camera fully saturates at 15300 ADU, meaning I should aim my flats for about 7000 ADU.

Exposure Length

     The easiest way to take flats, is to use AV mode and let the camera to decide our exposure length. This is very handy especially if you taking SKY Flats. When sky brightness slowly changing, the camera will readjust the exposure length accordingly. This will also work perfectly well if you use Flat Panel with constant brightness. 

      Let's put our camera in AV mode and take one flat frame of evenly illuminated surface and see what happens.

     As seen in the image below, automatic metering system of the camera aims for middle of histogram and that seems good and well exposed, well, for daytime pictures it does. The problem is, that the histogram on BackyardEOS's (BYE) screen or on the back of the camera (BOC) generated and stretched from 8 bit JPG file and doesn't show us the linear data. 

     Let's load that frame to PixInsight and see what is there. Now we can see that automatic AV mode generates linear histogram at just about 3096 ADU !!! That is underexposed flat frame and It is twice lower than we need it to be. We need to aim to about 7000 ADU to be at half well depth.

     So what should we do? The solution to our problem is very simple and it's already in our cameras, it's called "Exposure Compensation". Since we need to expose twice as much we adjust our setting to compensate for 2 stops as shown in the image below. After adjusting our settings let's take another frame and check it out.

     On the image below we can see a Mean value of 6634 ADU and that is very close to the desired value of 7000. The BYE or BOC histogram now placed about 85% to the right  and looks almost overexposed, but don't worry, linearly we just about being at half well depth. Now we are going to produce much better exposed Flats which will leave less noise and better correction after division to Lights.

Choosing ISO for Flats

     There is assumption among Astrophotographers that Flats have to be taken at the same ISO as the Lights, when truth is that they don't. What we record with Flats, besides vignetting effects of optical system and dust motes, is what called PRNU (Pixel Response Non-Uniformity). Since every single pixel in array will respond differently to light, we want to record those differences  and correct them during calibration by flat division. Since different ISO settings (Gain) have nothing to do with pixels response to light, we don't have to match them with ISO setting of Lights. Contrary, it is advisable to use  lower ISO settings for Flats to create low noise, high SNR flat frames and there is a couple of reasons to do so.

     Higher ISO means shorter exposures. Your flat panel might be too bright and sky might be too bright which will cause your ISO1600 flats to be of very, very short exposure, short as fraction of a second. That will lead to a shutter shadowing effect (sensor will record shutter movement) and cause to non-uniform illumination across the chip. You should aim for at least 0.5 second exposure to eliminate this effect, better off, if you can do 1-2 seconds exposures for flat and not slower.

     Higher ISO also means lower sensor gain (i.e. small e-/ADU values), in simple words, it takes few photons to create higher number of ADU. If your exposures very short , your bright areas will reach desired ADU much faster while the vignetted area will suffer from low counts, which eventually will cause color gradients in calibrated Lights. Lower ISO means higher sensor gain, means that it takes larger number of photons to create smaller number of ADU. Using low ISO setting for flats will make sure that we are collecting enough photons and creating high SNR flat frame.

     In PixInsight there is a good script from Mike Schuster, called FlatSNREstimator. Using it I had evaluated some test flat frames at ISO200 and ISO1600. You can see on the left  image is the estimation of flat frames made with ISO1600 and produce SNR of 31.6 where at ISO200 we get SNR of 87.9, that is a big difference and that is what we want.

     Very important to remember. When you do your flats at different ISO than your Lights, you have to calibrate your Flats with matched ISO dark-flats or BIAS frames !!! Keep that always in mind.

NOTE for SGPro users:

SGP scales 14 bit DSLR data to 16 bit, so when I load my flat that made with +2Ev compensation it shows Mean value of 35319 ADU (instead of ~8000 as we would see in PixInsight). And that is about half of 16 bit range (65535).

Next time you use Flat Calibration Wizard, just put about 35000 ADU as your target Mean  and you are set.

Flat Box

     When it comes to building a Flat Box your self, it is very important to create an even illumination. Every single pixel on your sensor should get the same amount of light as if it were pointed to the sky. So spread your LEDs evenly and use at least 2-3 sheets of diffusive material. You can find many DIYs on the net on how to build one.

     When it comes to choosing LEDs, the White LEDs that are commonly found in stores are not good for us, because they create white light in a cheating way. There is diode that emitting Blue light, Blue light got absorbed by Phosphor coating which then emits Yellow light. The rest of the Blue light then mixing with the Yellow and make it appearing as White, to our eyes. You can already see where the problem is, much of the Red spectrum will be missing from this kind of light and if you also use some kind of light pollution filter, it will leave the Red channel very underexposed while Blue and Green will be good.


     So, my suggestion, if budget allows, go for already made panels like Aurora, or use EL sheets to make your box. Otherwise, If you looking for white LEDs you should pay attention to CRI (Color Rendering Index) rating of those. Numbers scale from 0 to 100% indicating how accurately the light spectrum is rendered by these lights. You should look for something above CRI 95, higher the better.

bottom of page