Friday, July 7, 2017

A Super-Duper Primer of Astrophotography Part 2 - What Is Stacking?

Stacking - From Chaos Comes Order

If you want to be an astrophotographer with any kind of digital camera, you are going to need to learn how to stack.  The things we see in astronomy are very far away, and that light-energy drops as a function of the distance squared, is attenuated by interstellar dust and Earth's atmosphere, and gets convolved with light pollution and camera chip noise to boot.  But, my friends, rejoice, for we have the power of statistics on our side!

I've met a lot of people at star parties and in my astronomy club who have briefly forayed into astrophotography, only to give up when they couldn't see what they were looking at.  I mean, what would you say if you saw this image after exposing for 5 whole minutes?
I mean, great, you see several stars, but also a ton of light pollution, and only a hint of the nebula I was imaging.  So what?  What on earth can I do with that??

This is where stacking comes in.

In a tiny nutshell, what stacking does is increase the signal-to-noise ratio, or SNR.  This is a simple ratio of the amount of signal in your dataset - the "real" photons emitted from the object you're imaging - to the noise, which comes from light pollution, airglow, scattering, ambient heat, and your camera's chip.  Let's look at a non-imaging example.  Let's say you have a bag filled with three colors of balls - let's say red, yellow, and blue.  You don't know ahead of time how many of each there are in the bag, although you do know that each color has differing numbers, and there are 40 balls total.  You take one sample - pull one ball out of the bag - and it's red.  You take another sample - it's blue.  Another - it's red again.  Now, with three draws, you've drawn two reds and one blue, so you might conclude that there are more red balls in the bag than blue.  But you haven't drawn many balls yet, so your data is not yet statistically significant.  So you keep drawing.  Eventually, you've drawn 20 - 5 red, 5 blue, and 10 yellow.  With half of the balls in hand, you now have a much better idea of the distribution of balls in the bag, and you can conclude that there are probably more yellow ones than red and blue.  Stacking is similar - if a pixel is changing color in every single frame, and changing intensity, it's probably noise.  But if it's consistently red, and of similar intensity, it's probably red.  The more subframes you've taken, the more sure you are that that pixel is actually red (to a point - there are eventually diminishing returns - but more on that later).  

But as they say, a picture is worth a thousand words, so a GIF must be worth ten thousand.  Here is an excellent GIF demo by redditor "N_las" showing the Power of Stacking.  He or she took over a thousand images (in general, you don't need nearly that many, but they were making a point) of a difficult-to-image galaxy (M101) from a very light-polluted area with short exposure (25 seconds) and a very high, noise-inducing ISO (12,800).
The frames go 1-4-16-64-256-1024 (quadrupling each GIF frame).
Taken using a Canon EOS 550D on a Celestron C6 with a f/6.3 focal reducer on a NexStar Evolution mount.

As you can see in the first frame, the noise is crazy - both from the very high ISO, and the light pollution.  But as more frames are added to the stack, M101 resolves from a noisy core to an image with well-defined spirals.  When I give my talk about astrophotography at star parties and club meetings, I always announce in a dramatic voice, "And from chaos...order arises!"  That's truly all that order is - statistical patterns against a background of random noise.

Stacking Programs

As far as programs go, if there was an essential starter kit for new astrophotographers, it would include DeepSkyStacker.  DeepSkyStacker is freeware (!) that does all of the hard work for you - it registers & aligns the images, decides which ones are good, and does all of the math that brings out the signal from the noise.  Then it's just up to you to move a few slider bars around to get good color balance, luminance, and saturation, and learning those settings just requires some tweaking and playing.  DSS, as it's abbreviated, has lots of settings you can tweak, but you can get started with the defaults.

Other software I've heard of or encountered include PixInsight (very popular, and also $$) and Nebulosity (also $$).  I haven't even started with either of these yet, however - DSS is doing well for me at the moment.  But it's only a matter of time before I dive headfirst into PixInsight.

My next posts in the series will address how exactly one stacks something in DeepSkyStacker, as well as how to take your images and what kinds of calibration images you need for DSS to succeed.  

Oh, before I go - here's how that top picture of the Rosette Nebula turned out.
(And oh, by the way, this image has already won an award - more on that here!)

No comments:

Post a Comment