# Astrophotography How-To Guide, Part IV



## astrostu

*Advanced Techniques for Better Images*​
The key word in this subject is "images" since it is not what a purist would call a "photograph."  The purpose of this section is to talk about a few things you can do to make a better final product.

What you need for this is software that can do image arithmetic.  This means that you need a program that is capable of adding, subtracting, multiplying, and dividing one image or group of images by another.  PhotoShop CS2 and later will do this through the Image > Calculate option (earlier versions might, too), and there's other software out there, as well.  PhotoShop CS3 added a Stack feature which takes means and medians of any number of images, which greatly helps, as well.  As I have assumed throughout the guide, though, it is up to you to figure out how to use whatever software you're using -- I'm just describing the general workflow.

*Subtracting Noise*

The more advanced DSLR cameras these days will actually do this for you.  But for those of us who don't have one, you can remove the thermal noise and hot/cold pixel noise by taking what is known as a "dark" image.  To do this, you take a photograph with the lens cap on for the same length of time as the object you imaged (called the "object" from now on).  Technically, you should do this 3 or more times and take the median of the dark images, or if you can't do that, take the average (mean).  Practically speaking for this level of photography, you can more realistically take a single dark image.

Once you have your dark, you simply subtract it from the object image.  And that's it, since the detector noise adds linearly to the object.

Alternatively, you could simply use the "Dust and Scratches" filter in PhotoShop to take care of the hot pixels, though this will also remove the fainter stars.

*Dealing with Vignetting*

At this level, there is no easy way to get rid of vignetting effects.  In astrophotography, the "real" way to take care of vignetting and other optical imperfections is to take what's called a "flat" image.  This is done usually by taking a picture of a white, evenly illuminated circle that hangs in the dome that the telescope is.  You take several of them and average them together.  An alternative method for taking a flat is to photograph the twilight sky because it is assumed to be relatively evenly illuminated, as well.  And the best way to take a flat is to take several images around your intended object in the night sky (because the sky has an overall gradient, especially near a city, you can't just pick random locations throughout the sky).  Then, take the median of all of them (mean doesn't work for this).  This is known as the "super sky flat."

Based upon this, there are a few things that you can do to try to fake a flat.  One is to go with option #2 and take several photographs of the twilight sky and average or median combine them.  Another is to use option #3 and median combine them.  The key is that you must use the same lens and not change its focal length from the flat to the object images.  If you're using a prime, this isn't an issue.

A fourth option relies upon sophisticated software that can fit a 2-D polynomial to the image, which should take care of most of the vignetting effect.  This fit would be the flat.

Once you have your flat image, you need to subtract the dark from it, as well, unless you went with option #4.  Then, take your dark-subtracted flat, and you need to normalize it by the mode (you could use mean or median, but you should use mode).  This means that you take the value that is most common among all the pixels and divide the entire image by it.  This will result in the mode being 1 in the flat, which is what we want.  This is so that the average value of the final object image remains the same.

Once you have the normalized dark-subtracted flat, you divide it into the dark-subtracted object image.  To put it all into an equation:





where the brackets <> indicate the normalization.

*Averaging Multiple Images*

The next stage in standard astronomical image reduction that you can more easily do - in fact, if you only do one of the three things in this section, this is the one to do - is to take the average of many photographs of the same object.

To do this, use whatever image arithmetic software you have, add up the images, and divide by the number of images.  In PhotoShop (at least the CS2 version), you can use the Image > Calculations option to average two images together.  Note that you can only do two at a time with this method, so you will have to take 2N images where N is an integer.  For example, you could take 22 = 4 images.  Then you can average image 1 with 2, and average image 3 with 4.  Then you can average the 1-2 average with the 3-4 average to get the average of all four images.  Admittedly, this gets rather tedious, but the results of averaged images are usually much sharper than a single image.

A new feature in Photoshop CS3 is the "image stacking" feature, which in my experiments I have found incredibly useful.  To use it, go to the File > Scripts > Load Files Into Stack  option.  Select the files you want to average and check the "Create Smart Object after Loading Layers" box.  You can also have it try to automatically align the original images, but - at least in prior versions - I have found this feature to be pretty bad and so I still opt to align the images myself before-hand.  After they're loaded up as a smart layer, you then go to the Layer > Smart Objects > Stack Mode sub-menu and select either "Mean" or "Median."  Each one has its own benefit, and I suggest doing one then the other and seeing which result you like better.

*Focusing Advice*​
Let's face it:  It'd be nice if the "infinity" focus location on the camera lens really did focus at infinity.  But - in my experience - more often than not the infinity focus position is "past" infinity, and you need to back-track slightly in order to get the camera lens properly in focus.  But how can you tell on that tiny little view-finder if your star is in or out of focus?

One way that I've used is to focus on the Moon.  It's big enough that you can usually tell when you're in or out of focus without taking a picture.

The second method I use - for when the Moon's not out - is to take a picture of the brightest object in the sky (Venus, Jupiter, Sirius, or another bright object), and then zoom in all the way on the LCD screen on the photo.  If it looks like the bright object is too big, I adjust the focus slightly and try again.  I continue this until I've gotten it as good as I think is reasonable.

The third method - and I only do this if focus is extremely important and I'm imaging for a long time on deep-sky objects - is to do the above method, but have the image pop up live on the computer screen (requires proper software and cables).  I can then zoom in with the camera's software or PhotoShop and actually measure how many pixels across the object is.  I can then adjust the focus slightly and repeat the process and see if it got better.

If you use method 2 or 3, I would suggest starting at the farthest "infinity" setting your camera lens has.  Then work your way downwards from there.  Also keep in mind that on many zoom lenses (in my experience) the exact "infinity" focus location will change slightly depending upon what focal length you have your lens.

In addition, temperature will affect where the true "infinity" location is, so if you start photographing and it's 70° out and drops to 50°, you will need to adjust your focus slightly.

*Pitfalls to Avoid*​
*Work up to a long exposure.*  The worst thing is to go out one night and take a 90-minute exposure of star trails only to look at the image and it be completely saturated with sky noise.  Start with shorter exposures - learn the limits of your equipment and your surroundings before you take the longer exposures so that you're not disappointed.  It's all about taking baby steps.

*Don't over-sharpen.*  Some really good astrophotos are completely ruined by over-zealous use of the "Unsharp Mask" filter.  It's okay if your image seems a little blurry - most people will realize that you can't help it due to equipment or atmospheric limitations.  But if you try to sharpen it too much, sharpening artifacts begin to appear, such as enhanced borders that look like a giant rind on cheese around the moon.

*Don't push the contrast/levels/curves too much.*  Astronomical objects have a huge range of dark-to-light colors that are not always recordable on film nor the current generation of 8-, 14-, or 16-bit detectors (like lunar eclipses).  Don't be tempted to push the contrast so much that you're left with black lunar maria and pure white highlands -- the moon doesn't look like that to the eye, so try to keep these adjustments subtle.  You will probably be more pleased with subtle results than an over-processed image that just looks fake.

*Think about framing.*  For deep-sky astrophotography, you just want the object in the field of view.  Even for other astrophotography, this is usually the goal.  But, if you're just taking a photo of the moon, for example, and you want to go beyond the "astrophoto" to more of an artistic photo, consider NOT putting it in the center of the frame, but off to the side.  Consider adding in a foreground object (especially with star trails).  Or use clouds for your composition instead of going inside because the clouds are out (unless of course it's overcast).

_If you have any suggestions or problems with this guide, or if you find any gross errors, please let me know by e-mailing me_


----------

