September 1, 2019

On using in-camera dark frame subtraction

Dark locations are hard to come by these days. I used to be very happy about my home in suburban Athens, GR because it was sufficiently dark to be able to image the Rosette, M31, M78, Barnard’s loop and even some dark nebulas with a lot of effort. Then the degraded hillbilly across the block installed fucking football-field grade LEDs on his front door to discourage burglars and you can maybe see the Full Moon on a good day. But that’s a story for another day.

Thing is, even before that, I was very much aware that my place was a humble Bortle 5-6 and the first time I took some test pictures from a Bortle 2 I was impressed at how much detail was showing. Roughly speaking a single Bortle 2 30 second image was almost as good as twenty subs from my light-polluted home, after integration and basic background extraction.

So this summer I chose a Bortle 2 location as my destination. And it was there that I discovered that with summer temperatures in Greece, and a sky background that is pitch black, and the lengthy 2 hour continuous sessions that one will go for to get enough subs for his money in such ideal conditions, well, thermal noise becomes a problem and you absolutely need dark frame subtraction.

The question is of course “how much”. Generally, it depends. If you have a bright subject on a relatively shiny area of the sky, such as the Lagoon, you can even avoid it altogether. But if your background (or subject) are dark, you need it.

The problem is of course that dark frame subtraction, while correcting for thermal noise, introduces random noise, which is contained in the black frame itself. So you want that noise to be as minimal as possible.

The traditional solution is to get at least 20 dark frames and produce an average which will have approximately sqrt(20) = 4.5 times less noise than each individual frame.

The other alternative is to use in-camera dark frame subtraction, a feature marketed as “long exposure NR” by Nikon and probably something similar by Canon. When enabled, this feature causes the camera after every shot to take a second shot with the mirror down and then subtract the second shot from the first one prior to writing the final raw image in the SD card.

The downside is each shot takes twice as long and the image that gets written in the SD card, although practically free of thermal noise has extra random noise. However this approach is in my opinion preferable to taking separate dark frames for two reasons:

Reason number one is the dark frame taken immediately after a pic is about as colose to the same thermal conditions as you can get. So thermal noise correction is much more accurate.

Reason number two is the dark frames the camera took are still averaged in your final integration:

integration = average of N pics = (pic1 + pic2 + pic3 +…+ picN)/N

= (light1-dark1 + light2 - dark2 + light3 - dark3 +…+ lightN - darkN)/N = (light1+light2+light3+…+lightN) - (dark1+dark2+dark3+…+darkN)/N = average(light) - average(dark)

If you are integrating 100 pics taken with in-camera dark frame subtraction, it is like using 100 dark subs which gives you a very good random noise profile and near perfect thermal noise correction as every single one of the 100 dark subs was taken at exactly the same conditions as the light it corrected.

I guess the best of both worlds is to take a limited number of dark subs, say one for every 4 lights and then assign to each light the dark frame that is chronologically closer to it (Rawtherapee will do this for you automatically).

Again, if you have for example 60 lights and 15 darks, the 15 darks get averaged in the final integration.