Saturday, July 8, 2017

A Super-Duper Primer of Astrophotography Part 6 - Stacking Tutorial

All right, so you've got your lights, darks, biases, and flats.  Now it's time to stack!
This will be a walkthrough of DeepSkyStacker, the only deep sky object stacking program I have used thus far.  It is free, and available at http://deepskystacker.free.fr/english/index.html.

Pre-Processing

Before you even open DSS, you need to go through your light frames and delete the bad ones.  "Bad" frames are ones with clouds that roll through and ones where periodic tracking error, wind, headlights, etc occurred - aka, the stars are streaked.  Here's a close-up example of a bad frame.
An example of a "bad frame" - the stars are streaked.

Note that having a plane or a satellite fly through your image doesn't necessarily mean you have to throw it away if you choose the right stacking settings in DeepSkyStacker to discriminate those out.  I regularly stack those and it works fine, and doesn't (usually) show up in the final image.

DeepSkyStacker Walkthrough

Loading Images

Once that is done, then go ahead and open DSS, and start loading in your pictures.  I have everything split up into folders - see the data management section of Part 4 of this series.
Be sure to click on the "Check All" button to check all of your light frames, since you've already gone through them to make sure they're good.

Choosing Parameters

First, hit the "Register Checked Pictures" button.  It will bring up a little window.
You can change the best % of pictures to stack - make it lower if you don't trust yourself to choose "good" subframes, if you want.  I usually set mine at 95.  It will still throw out more than 5% of the bad ones if they are all really bad.  (Believe me on that one).  

Click the "Advanced" tab next.  It shows you a slider bar for "Star Detection Threshold."  I usually find that 2-3% is ideal.  You can check by clicking "Compute the number of detected stars" - it will look at the first subframe you have, and detect how many stars it sees at the detection threshold you set, and then tell you how many it sees.  Look at the picture yourself and see if that makes sense.  If the number is ridiculously high, lower the threshold to a lower percentage.  If it's too low, raise it.  
Click OK.

Next, you will see a window summarizing the image data you've given DSS.
This is a good opportunity to check that your flats, darks, and biases are all the same ISO, and that your darks are the same exposure time.  DSS will flag these items if they're different.

Next, click "Recommended Settings."
You'll see a window with some buttons you can click on.  Some of the options will apply to you, some won't.  For instance, if it suggests to use bilinear debayering because your exposures are short/low SNR, click on that.  But don't click on "use super-pixel mode" unless you are processing narrowband images, like it says.  
Once you're done looking over the recommendations, click OK.

Now, the Stacking Parameters button will bring up all of DSS's stacking settings.  There is a lot here.  Changing settings will change the outcome, but you can rest assured that the default settings will do you well.  I'll list my settings here, but know that I haven't fully tested all of the options either.  These just tend to work well for me so far.
  • Result Tab: Standard Mode - uses the reference frame to set the view of the final stacked image.  If you have field rotation from using an alt-az mount, you may want to use Intersection mode, or else crop it out yourself later.
  • Result Tab: Align RGB channels - this doesn't always actually do it (especially when I use a light pollution filter), but why not.
  • Result Tab: Uncheck 2x & 3x drizzle for DSLR images.  Drizzling basically up-samples your images to get higher resolution, but DSS is limited in how much memory it can use since it's a 32-bit program, so high-resolution DSLR images will cause DSS to break if one of these is selected.
  • Light, Dark, Flat, and Bias/Offset tabs: I use Median Kappa-Sigma Clipping, with kappa = 2.00 and number of iterations = 5.  This will usually eliminate airplanes and satellites from your images, as well as hot pixels, cosmic rays, and other anomalies. Feel free to experiment with all of the other stacking modes, though!
  • Alignment: I just let DSS choose, using the Automatic button.
  • Intermediate Files/Cosmetic/Output tabs: I leave all the stuff in the Intermediate Files and Cosmetic tabs unchecked, and have it save out TIFF files.  Set whatever settings you want here.
When you're all done, click "OK."  Again, you can get started with just the default settings, it won't break anything.

Now you're off!  Depending on the size of your images and how many images you're stacking and using as calibration, as well as the amount of RAM and processor capability your computer has, this can take several minutes to an hour or more to complete.

Post-Processing in DSS

When your image is finally done stacking, DSS shows you the untouched result, and chances are it's going to look dark and gray!  Don't fret, this is perfectly normal.

Now comes the fun part.  First, go to the Saturation tab, and turn it up to somewhere between 18-25%.  

Next, go to the RGB/K levels tab, and move the middle sliders for the RGB peaks so that they are all mostly on top of one another.  If one is a little fatter than the others, or you can't quite get them all on top of each other, have the red peak sticking out the furthest on the right.  I find that putting them near about 1/3 of the way from left to right of the histogram works the best.  Now click "Apply."  You should start to see some color and more detail on your DSO.

It's still pretty dim, so let's mess with the Luminance curve (the dashed, curved line) by clicking on the Luminance tab.  You will develop your own preferred settings, but I'll show you mine to get started.  Definitely tweak these until you get what you want!  I find that dropping the level of the leftmost part of the L curve (using the second bar in the Darkness section) to about 94 or so, raising the height of the center of the curve (the second slider in the Midtones section) until it's about 1/3-1/2 of the way up the RGB peaks, and increasing the steepness of the center of the curve (first slider in the Midtones section, moving it left) to about 3-5 degrees (which basically increases contrast) works best for me, but again, play with these.  Hit Apply to see the results.

Once you are reasonably happy, click the "Save Picture to File" button on the left.  Make sure to select the "Apply adjustments to the saved image" button, or else your edits won't save!  I usually try a few different configurations of these settings and save them out.

The next step after this is post-processing in a more robust image processing program, like GIMP or Photoshop.  I will cover that in a later tutorial.

No comments:

Post a Comment