Astrophotography in the City – Part 2

Continuing with my series on how to do astrophotography in the city…

In Part 1 I described how to set up the camera and take pictures for astrophotography. So if you’ve followed up to here you should have the following 40 images stored on your camera in RAW format.

– 20 LIGHT frames
– 10 DARK frames
– 10 OFFSET frames

The next step is relatively simple, entirely performed on a computer, you simply have to set it up with the right parameters, the right files and off it goes. The purpose is to register (align) the LIGHT frames and stack them to improve the Signal/Noise Ratio (SNR) such that we can adjust the dynamic range and “tune-out” the unwanted bright sky while keeping the stars.

Register and Stack

There are lots of software out there that can perform the task of registering (aligning) and stacking images.  They all look for pin-point stars in an image and use those as references to align your LIGHT frames such that when they are added, the pin-point stars all stack up correctly.

I’ve used three different software, all of which are free:
IRIS – Very powerful, but not exactly user-friendly. If your camera is 2015 and newer, it may not decode correctly the RAW files. However if you know how to use IRIS, the results can be quite amazing. I will still use IRIS, but that will be in Part 3.
Registax – Works best with planetary and lunar images, especially video is used instead of individual images. However cannot open RAW files.
DeepSkyStacker – (aka DSS) Simple to use, but the resulting image has to be post-processed in an image editor. This is what I use for the Canon 80D and what is described below.

With the Canon 80D, I have to use DeepSkyStacker as IRIS does not correctly decode the  Canon 80D RAW files. With my previous camera (Canon EOS Rebel XTi) I would have gone straight to IRIS for all the processing.

The first step is to open each of the LIGHT, DARK and OFFSET frames with DSS using the upper left menu.


Click on Open picture files and select your LIGHT frames. Then select dark files for your DARK frames and offset/bias files for your OFFSET frames. Once that is done, be sure to select Check all on the left-hand side such that all your files are selected and will be used for processing.

You should see in the lower portion of DSS all your images, tagged respectively Bias/Offset, Dark or Light. More importantly, they should all be checked-marked.


The next step is selecting the Register checked pictures from menu on the left which will bring up this pop-up.


Normally the default settings are good. Essentially DSS will remove the DARK and OFFSET frames from your LIGHT frames, look for stars in each and computer the translation/rotation required to align the stars frame to frame. There needs to be 10 or more stars in each LIGHT frame to be able to align and stack.  If that is not the case, it’s possible to play with the threshold in the Advanced settings in order to detect sufficient number of stars in your LIGHT frames.

After that has completed running, DSS will have evaluated all your images, selected the best one as your reference and unchecked any image that could not be aligned. Next is the stacking.  The following was established through trial and error with my Canon 80D.  You may experiment with different settings to see what each parameter does.

Upon selecting Stack checked pictures, and then selecting Stacking Parameters, the following is presented.

Standard Mode will align and stack the images without cropping.  By default this is selected, and cropping can be done at a later time in photo editing.

For wide-angle DSLR images, don’t bother with the Drizzle options. It’s only good when you want to focus on a small galaxy or nebula within your image. If you use this, you better to select an area of interest to keep the file-size and processing time small.

As a DSLR or consumer camera takes one-shot color images, no use to select Align RGB Channels. This would make sense with a monochrome camera, where individual color filters need to be used

The next tab, Light, is where you can have a good say on the final resulting image. Each setting controls how individual pixels are added between each LIGHT frame.


Average is the fastest, and most basic. However random events that show up in 1 or 2 frames like a satellite, meteor or a plane will still be visible in the final image.  This is a good setting for a quick preview of the final result.

Maximum is perfect when you want to do things like star trails, or see if among your many LIGHT frames you caught something a moving object such as a comet, asteroid, satellite or meteor. It essentially keeps the brightest pixel from each LIGHT frame.

I tend to use Median Kappa-Sigma clipping. For every pixel, it does a distribution of the intensity, and if in a frame that pixel falls out of the standard distribution, the pixel gets replaced by the median value.  It essentially avoids extreme values to mess things up, so  a plane passing in 1 or 2 images, or a satellite streaking by will be eliminated in the processing.  It also makes for more pin-point stars.  In the end, it removes random events from your picture.

From experience, a very important parameter to select is Per Channel Background Calibration.  Light pollution in the city tends to have a pink hue, and this can cause the final image to be skewed into the wrong color with the result being either too red, too green or simply grey.  By selecting Per Channel Background Calibration, each RAW image is decomposed in its RGB components and calibrated to have a BLACK background sky (because the night sky should be black, and not pink from high-pressure sodium lights).

The remaining parameters in the other tabs should be kept as per default, and you are now ready to let DSS do all the data crunching.

Once completed it will load the resulting image, and by default saved it as a .TIF file. This is a 32-bit image, it will be large (over 234MB with the Canon 80D RAW files), and not many programs will open it. Luckily the Win10 default photo viewer can preview it. But what is important is that the registering and stacking process has kept as much of the useful data (light photos entering the camera) while removing the random and sensor electronic noise. As we are not done processing the image, no point is throwing out data just yet by using compression or lower dynamic range.


DSS offers capability to adjust the Levels, Luminance and Saturation, but it is best to keeps as is and do this fine adjustment in another program like Photoshop or GIMP.

The next steps will be to continue the processing in other programs:
– IRIS to remove the sky gradient
– GIMP (or Photoshop) to adjust levels, curves and saturation

Continue to Part 3



Astrophotography in the City – Part 1

Most people don’t try astrophotography, shooting the stars and constellations, because they think it requires specialized equipment and dark skies.  While nothing beats getting away from the city and light pollution, anyone with a camera with a MANUAL setting and capability to save RAW files can create nice photos of starry skies even if you live in the city. Below is a quick run-down of a fool-proof recipe: Part 1 – taking pictures.

Astrophotography is heavily dependent on post-processing the images as we are trying to get a desired signal from noise. That noise can be electronics (the camera and sensor) and it can be the light pollution. Like the old saying: garbage in = garbage out. If you can find the right camera settings to reduce noise on your photos, you’ll get fantastic results with much less processing and effort.



Setting up the Camera

DSLR are the best camera to use, but any camera that can set to manual will work. First thing is to set the file to be saved in RAW. Astrophotography is a heavy user of post-processing, so you want to work with as much unaltered data as possible. We want the image as the sensor captured it, and leave the processing to powerful algorithms on a computer.raw-format

Next is to set the camera to full MANUAL mode such that you can control lens aperture, exposure and ISO setting. If you are going to use a remote device to take the pictures, you may need to set it to B or BULB, but for my Canon 80D connected via WiFi to the smart phone, below 30 second exposure time M will work.


Next you want to set the lens opening as big as possible.  For most variable focal zoom lens, that is F4.0, but you may have opted for a fixed lens which can open up to F1.2.  Note however that large openings with consumer photo lens tends to cause either chromatic aberration (colors will “leak” around bright stars) or distorted stars the further towards the edge of the frame.  If you notice this, simply stomp-down to a slower opening by 2 or 3 settings.  Yes that means you get less light, but it’s a trade-off. You can also simply crop the final image at the very end.

Next set the ISO to about 6400.  Can’t go that high? No problem, as long as you can reach ISO 400, you are good. I know, high ISO is very noisy, but the next step is simply to get the right focus, so we don’t care about the noise and with the camera live view, the exposure is not very long and we want to see the stars.

Mount your camera on a tripod as the exposure length will be between 2 and 10 seconds. Hand-holding is OK for the Moon, but not to get nice round stars at those long exposures.  If you don’t have a tripod, setting the camera on a bag of beans or rice, even a bunched-up towel will work. Find a spot where you don’t have glaring lights entering the lens, and aim you camera at the desired spot in the sky.  This is also the time when you set you focus to manual and crank it to infinity.  If there is no marking on the lens for focus at infinity and you don’t know which way to turn, simply pick a distant object like a far away house or light post and manual focus on it. The Moon will also do the trick.

If you have live view mode on the camera, enable it and manually adjust your focus to get nice sharp stars. Some cameras will even allow you to zoom on the preview screen, if so zoom as much as possible and fine-tune the focus. If you don’t see stars: 1) increase the ISO setting, 2) increase the exposure duration, 3) verify that you are at F5 or lower.

If you don’t have live view, simply take a picture and then review it (don’t forget to zoom in on a star). Make a small focus adjustment one way and take another picture.  If the stars are smaller and brighter, you are adjusting the focus in the right direction and keep going until you passed the best setting.  Then simply back-it a small amount.

Getting the Right Exposure

Once the focus is right, the next step is to balance the ISO and exposure length.  The longer the exposure the more the stars will become trails instead of pin-points.  However longer exposures gather more light to capture more stars and faint objects. If you are shooting with a 15mm focal length, you can probably go as high as 20 seconds before it becomes too much of a blur. However at higher focal length the stars will “move” faster, so choose wisely.  Aim for about 5 to 10 seconds of exposure.

Here is where we adjust the ISO.  High ISO setting will generate a noisy image.  In astrophotography we “stack” multiple images to improve the Signal to Noise Ratio (SNR). Hence a noisy high ISO image isn’t so bad, but you still need to keep the noise to a minimum. When we focused with the live view, the ISO was cranked quite high, but this will result in an image with the background sky way too bright. In the image below, the “hump” in the histogram is entirely past the half-way mark in the over-exposure region, this is not good for astronomy post-processing, where we want to have as much dynamic range as possible. As a general rule in astrophotography, you are better off under exposing.

overexposedIn the photo above, I was at ISO 6400 with a 5 second exposure. You can barely make out the constellation Orion in the sky. After reducing both the ISO and the exposure to ISO 3200 and 2 seconds the sky darkens, and pin-point stars start to appear.


Once you’ve got the right settings, take a series of pictures.  If you can trigger the shutter from your smart phone, tablet, remote or laptop then it’s best as you avoid nudging the camera and smearing the stars. If not, well… go gently. Take about 20 images. These will be your “LIGHT” frames as they are the images you captured light photons.

Once this is done, you need to two other sets of images that will be used in post-processing.

Dark and Offset Frames

With all cameras, the longer the exposure, the more noise and “hot pixels” appear. This noise needs to be removed from the image. Some camera have settings to automatically do this for night shots, but it will do so with every image, doubling the time it takes every image, and the result is not optimal.  Software on your computer is much more powerful than the camera to process and remove the hot pixels, so you are best to take a series of DARK frames yourself.

Hot pixels are essentially pixels “firing off” during a long exposure causing it to create a bright pixel in your image.  Two factors increases the number of hot pixels in an image: 1) exposure length; 2) temperature. Most of your photos with your camera are daytime, short exposures, hence hot-pixels are either non-existent, or not visible. However with a dark sky and exposure in the 5 to 10 seconds range, they will be present.  Temperature will also play a factor, it’s why specialized astro-cameras are Peltier cooled to 40deg C below ambient. Yes, you will get more hot pixels in a summer night shot, then in winter.

Furthermore, all digital cameras uses an electronic circuit with an amplifier to read the sensor.  This amplifier generates heat, which often shows up on the sensor by making one corner brighter than the rest of the image. The longer the exposure, the greater the effect.

DARK frames are REALLY easy to take.  After you are done taking your LIGHT frames, simply put on the lens cap and take another 10 photos with the lens cap on. You are essentially capturing the noise of the sensor when no photons enter the camera. The reason to take a high number like 10 is to generate a MASTER DARK, which will be an average of those 10 dark images, this gets rid of any random elements to the noise.

Last you will also need to take OFFSET frames. These are like the DARK frames explained above, but this time with a short exposure setting like 1/250s.  Here we want to capture the electronic read noise of the sensor.  With such a short exposure, there are no hot pixels or amplifier glow. Yes, still with the lens cap on, so it’s a nearly black image, but there is a bit of signal, a bit of noise registered within it, and this is what we want to isolate. So like the DARK, take another 10 images.

IMPORTANT: Every-time you will do astrophotography, you will need to take DARK frames to match the camera settings and temperature.  However for OFFSET frames, you only need one set per ISO setting. So OFFSETs can be kept for use another day if you took photos with the same ISO setting.

To conclude if you followed the above steps you now have:
– 20 light frames of the night sky
– 10 dark frames
– 10 offset frames

I’ve purposely kept FLAT frames out of this process as they are a pain to take, and if done incorrectly cause more trouble than good, FLAT frames are images of a uniformly lit white surface with no texture or details. The purpose is to capture the shadows on the sensor caused by dust as well as to correct to brightness uniformity and optical imperfections. Lets just keep that out for the time being…

Now head back indoors, it’s time to process these images

My photo in this week’s SkyNews

Today I got an e-mail from Gary that a photo of the Big Dipper that I had submitted a few months ago got selected for this week’s column on SkyNews. Couldn’t be happier. I wish all my weeks could start this way.

My photo featured on SkyNews

Astrophotography is a combination of equipment, experience, location/timing and luck. With this photo I just happen to hit everything right and was lucky.

Using the best equipment helps, but for this photo it was the simplest of setup: my very worn Canon Rebel XTi DSLR with a zoom lens set to 17mm F4 mounted on an old steel camera tripod my father used in the 60s. So nothing special, and within everyone’s reach.

OK, for the next part I had experience on my side. It allowed me to pick the right camera settings, but was also lucky as my photo viewing was limited to that small LCD screen on the camera. I had no laptop to fully explore and review the photos and make the necessary adjustments.  Even the focus was reviewed through the small camera LCD.  That night I only took 4 images with 20 second exposure crossing my fingers that I would have something worthwhile once back home.

And then there is the post-processing on the computer, which is a lot of trial-error. In image processing doing steps A + B will not give you the same results as performing B + A. We all have our “recipes” for what produces good results, but every photo ends up being a unique project. With this one, I knew there was good potential.

Finally there is the location and timing.  I was up in cottage country, away from city lights, and a clear sky. However there was a full moon rising, couldn’t wait too long as the sky would start to brighten. A Big Dipper low in the sky next to the trees framed everything very well.

Thanks Gary and SkyNews for selecting my photo. For all the experimentation that I do with the camera, once in a while I get everything right. I’m just happy someone noticed and said “Hey, that’s a great photo we could use.”

Color of the Moon

The Moon is white right? OK, OK… it only looks white because of the high contrast with the dark sky, it’s more grey.  What? No? You mean it has color?

From samples returned by the Apollo missions we know that two of the main minerals making up the lunar regolith is titanium oxide (TiO2) and iron oxide (FeO) based basalts.  While TiO2 is quite white and used in many household products from white toothpaste to white kitchen tiles, FeO is rust and closer to orange-brown (think Mars). On the Moon the result is a slightly blue-ish color in the areas with high TiO2, and more of a brown-red for the higher FeO and low TiO2 zones.

A normal image of the moon taken with DSRL, the different in hues is subtle as seen below.

Moon Natural Color (November 7, 2017) - Benoit Guertin

Moon Natural Color (November 7, 2017) – Benoit Guertin

But it can be exaggerated by playing with the color saturation, and you get the image below, where various hues of blue-grey, orange and brown become apparent. The sharp boundaries between colors are caused by the different mineral make-up of the lava flows during the early formation of the Moon. Common interpretation of the age of the lunar surface is that the blue-grey areas are “younger” than the orange-brown.

Moon with exaggerated colors

Moon with exaggerated colors

Who says you can’t pull scientific information with simple backyard astronomy gear? The same technique, but with narrow-band filters is used by NASA and other space and research agencies to catalog the make-up of the lunar surface.

So if you are planning lunar prospecting for future mining rights, all you need is a telescope and a DSLR.

Open Cluster NGC 6709

Not too far my previous post’s open cluster lies a smaller and younger NGC 6709.  Both were imaged on the same evening, but I only got 15 minute of integration due to advancing clouds.  However with these open clusters, I don’t think a greater number of frames would amount to much more details.

Open Cluster NGC 6709

Open Cluster NGC 6709

Skywatcher 80ED
Canon Rebel XTi
30 x 30sec (ISO 400)

Image is cropped and scaled 50%.

Open Cluster NGC 6633

Open star clusters are the galaxy’s youngest stars. They are created from the collapse of giant molecular gas clouds, often forming large and very hot stars shinning brightly in the blue-white part of the spectrum.  As they are rapidly consuming their fuel, they are also short-lived.  By ending as a super nova, they create the heavier elements beyond carbon that exists all around us.

Below is open star cluster NGC 6633, estimated to be 660 million years old (our solar system is 4.6 billion years old). The cluster is of a decent size covering just about the size of a full Moon in the night sky.  The brighter and whitish stars stand out against older and further stars in the background.

Open Star Cluster NGC 6633

Open Star Cluster NGC 6633

Younger star clusters such as the Pleiades (Messier 45) have yet to burn away their molecular gas clouds.  However there is no hint of glowing gas (nebula) with NGC 6633.

Skywatcher 80ED
Canon Rebel XTi
51x30sec (25.5 minutes) ISO 400

Cassiopeia – the W in the sky

Some constellations are easier to spot than others.  Cassiopeia with its distinctive W is visible year round in the northern hemisphere above the 34th parallel. In the image below it easily stands out from the fainter background stars.

Cassiopeia above the three line - Benoit Guertin

Cassiopeia above the three line – Benoit Guertin

The five stars drawing a W in the sky are all naked eye magnitude 3 and brighter stars, and in the image above I used a layering technique to increase the color and brightness of those stars to really make them stand out.

  1. Duplicate your base image, and set this layer to lighten only
  2. Apply a blur to the top layer(about 8-12 pixels)
  3. Increase the color saturation and brightness.  Play with the curves to brighten the bright stars, but not the background sky.
  4. Use a mask as required to filter out the bright foreground elements, such as light reflecting off a building roof-line in my image above.

Canon Rebel XTi
17mm f/4
4 x 20sec ISO800