Site logo,

Exposure settings for astrophotography


The following image is a cropped extract at 100% scale (1 pixel on the screen = 1 pixel in the camera) from a photo of Alpha Delphini (Sualocin*) made by combining 33 10-second exposures at ISO 3200 using the astro process on GRIP's batch menu. Notice the background sky brightness, colour and texture (smooth).

* A piece of trivia: Sualocin is Nicolaus backwards. Another star in Delphinus (Beta) is called Rotanev. These names originated in a star catalogue compiled in Palermo in 1814 by Niccolo Cacciatore. Much later it was realised that his name in Latin would be Nicolaus Venator (Nicholas Hunter in English) and the star names were a joke. They have stuck.

 Cropped image of the region around Alpha Delphini

Canon EOS5DMk2 254mm Newtonian @ 1200mm 33 x 10s f/4.8 ISO3200
2009:11:15 18:06:49-18:15:09 GMT

The straight line option on GRIP's measurement menu has been selected to position the two red crosses with the blue line between them. I have carefully chosen a line that crosses near the centres of three stars of quite different brightnesses. On releasing the mouse from the second cross, GRIP sampled the line and drew this profile:

Profile sampled along line in Alpha Del photo

On this graph the vertical axis is grey level in each of the colour channels (red, green, blue). Each has a 16-bit range, from 0 to 65,535. (My camera has a 14-bit range for each channel but the images have been accumulated; more on that later.) The coloured traces are sampled along the line for each of the colour channels, shown in the appropriate colours. The black trace is the root mean square of the channel values. The black trace is drawn first, behind the others, to give the others more chance to be seen.

We can see that the profile of the brightest star here, Alpha Del (magnitude 3.77), reaches the top of the range and is clipped. In other words, the detector is saturated in all 3 channels at the centre of this star. The star therefore appears white in the image. We cannot tell where the peak of the star's profile should really be, so it is impossible to measure its magnitude from this image.

Observe also the high level of the sky background and the fact that it has much more red than green which is in turn more than blue. Hence the brown background colour in the original photo, typical of light pollution from street lamps. GRIP can automatically adjust the colour; again, more later.

So should I have used a shorter exposure, with a lower ISO sensitivity setting? This page aims to investigate.

I have taken a series of photos of the same subject, just varying the exposure times and ISO settings. All photos were taken at the prime focus of a 254mm aperture f/4.8 Newtonian (f = 1200mm) using a Canon EOS 5D MkII camera (14 bits per channel). Unlike using a normal camera lens, the third variable, aperture (or f-ratio), is fixed. I was photographing from a light-polluted site on the edge of suburban Tyneside, so the background sky brightness is quite evident. Also it was not a very clear night - there was high thin cloud reflecting street lights. I could barely see Delphinus with the naked eye. It can sometimes be better.

(By the way, it should not need stating that I always shoot in RAW mode, to capture the maximum detail. The images have been saved without altering the raw data, which is vital if any sensible measurements are to be made.)

 Varying ISO sensitivity at fixed exposure time

tISOImage extractProfileComments
Even at this low sensitivity the mag 3.77 star is just saturating after only 10s.
The telescope moved slightly during the exposure, so the star image is not circular and the profile is ragged.
The fainter stars are beginning to be detected but so also is the sky background.
The red trace for the sky background is higher than the green and blue, typical of pollution from street lights.
This would seem to be the best sensitivity for studying objects fainter than about magnitude 9 (see next comment) with 10 second exposures. Notice the noisy (mottled) background.
The second brightest star on the line is now about to saturate. This is happening 7 photographic stops later than Alpha Del so its magnitude must be about 9. (27 = 128 = just over 5 magnitudes.)
Now even the sky is about to saturate, so such high sensitivity is no use. When this experiment was done there was a general high haze, so the background was brighter than it can be.

 Varying exposure time at fixed ISO sensitivity

I made a similar sequence keeping ISO sensitivity fixed but varying the exposure time. The results are much as you would expect, so I have put the table on a sub-page.

The first conclusion from all that is the highest sensitivity (ISO) setting is clearly not necessarily the best in light-polluted conditions. The CMOS detector chip is fundamentally an analogue device in that photons cause charge to accumulate on each pixel which is then converted to an analogue voltage. (And the same is true of CCD detectors too.) The ISO setting of the camera adjusts the gain of an amplifier to increase the analogue signal before it is digitised into 12 or (in more recent cameras) 14 bits. So it is important to set that gain suitably. In my examples I want the fainter stars to appear above the background as far as possible. So for a given exposure time there is a trade-off between setting a high ISO but leaving a good range of levels to analyse between the background and the saturation level. From the examples above I think that for 10 seconds exposure an ISO of 3200 is good.


 Reducing the effects of electronic noise

Here again is the average of 33 exposures, for comparison with the above. It is important that GRIP uses a 32-bit-per-channel accumulator so that levels from multiple images (each having 14-bits per channel, 0..16,383) are added and go above the maximum 16-bit level (65,535) without being clipped.

tISOImage extractProfileComments
33 x 10sISO
The background noise has been smoothed - compare with single images above taken at 10s, ISO 3200.

There was a section on an earlier page about the benefits of stacking multiple images. In case you missed it: click here.

The beneficial effects of combining multiple exposures can be measured. GRIP can measure the signal-to-noise ratio (S/N) for any star. The following table measures 3 stars near alpha Del in the set of 33 x 10s images at ISO 3200, showing S/N for each star in the first image, the combination of the first 2 images, 4 images, and so on up to all 33 images. As expected, S/N gradually rises as more images are combined.

StarB magV magChannel1 image2 images4 images8 images16 images33 images
Tycho 1633 502 112.9811.60R2.75.66.910.912.718.3
Tycho 1633 502 112.9811.60G5.810.014.521.628.049.1
Tycho 1633 502 112.9811.60B4.78.513.118.322.939.9
Tycho 1633 1360 113.7311.90R3.
Tycho 1633 1360 113.7311.90G8.48.912.917.921.940.7
Tycho 1633 1360 113.7311.90B8.79.114.416.426.240.1
Tycho 1634 152 112.9311.56R5.
Tycho 1634 152 112.9311.56G6.99.512.611.115.512.4
Tycho 1634 152 112.9311.56B6.07.610.

NB: I will be including details of how S/N is measured. It can not necessarily be compared with values from other systems.

After combining the 33 images GRIP reported (Image menu, option "Show image information")that the range of levels in the accumulator went from 4,368 (the darkest pixel in any channel - probably from the blue component of the sky background) up to 2,162,655. The latter figure is very plausible because it exactly equals 33 x 65,535 (the highest level in a 16-bit channel).

GRIP displays the image as 8 bits per channel by using a linear brightness scaling so that the highest level (2,162,655) becomes 255 (maximum 8-bit value). That displays as much detail as the human eye can distinguish but in fact there is a lot more information in the original image. Do not discard the accumulator because it can be processed to make low contrast details more visible.

GRIP saves the accumulator as a disc file in FITS format (the common format used in astronomy) with full 32 bits per channel and can reload that again without losing any data.

GRIP can make a 16-bit image by linearly scaling the brightness range, using a look-up table based on this straight line for every channel:

Linear graph for transforming accumulator into 16-bit image

The end result is very similar to each individual original photo (10s at ISO 3200) except that the background is lower (the darkest pixel has become zero) and we have effectively averaged the electronic noise to make a smoother background. Apart from the smoothing we appear, at first sight, not to have gained very much.

The 16-bit version can be saved as a TIFF file for input to PhotoShop if desired but it is important to keep 32 bits per channel (96 bits total) for enhancing the image.

 Post-processing, enhancement

 The image histogram

One of the keys to successfully processing an image to get the most out of it is to really understand the histogram. Let's again consider the profile of the accumulated result:

tISOImage extractProfileComments
33 x 10sISO
The background noise has been smoothed - compare with single images above taken at 10s, ISO 3200.

In the profile graph the horizontal axis measures pixels along the sampling line (blue in the photo). The vertical axis is brightness in each of the colour channels. Most of the pixels lie at the low background level. Very few pixels, the ones for the stars, are brighter.

So now see the histogram of just the image fragment from which that profile was drawn:

The cropped image fragment that we have histogrammed is in fact 466 x 220 = 102,520 pixels in area.

This is a typical histogram for a deep sky astrophoto (provided that a flat has been used - more on that below).

The horizontal axis now is brightness for each colour channel (which was the vertical axis for the profile). It is labelled so you can see the range we expected, up to 2,162,655 except that that has been abbreviated to 2162k.

(Unlike other image software, GRIP does not stretch images to fill the full range for the number of bits available. Instead it only does that to make an 8-bit-per-channel copy for display.)

The vertical axis is the frequency of occurence of each brightness level, or, if you like, the number of pixels at each brightness level. Notice that this axis is logarithmic: each division is 10 times the previous one as you go up the scale. That makes it possible to see if even a single pixel is at a given brightness. We can see in this example that for the brighter levels (to the right) there are only about 10 pixels at each level. There is an upward sweep at the extreme right, which is due to the saturated stars: there are more than 100 saturated pixels.

Many more pixels are at the lower levels, corresponding to the background. In this example there are a few tens of thousands of pixels at each of the 3 peak levels.

The three colour channels have been plotted in their appropriate colours and the overlaps between the 3 graphs are drawn in additive colours (R + G = yellow, G + B = cyan, B + R = magenta, R + G + B = white).

The statistical term for the peak value of a histogram is the "modal frequency", or simply "mode". So in our case there are 3 modes, for each of the colour channels and they correspond to the most popular background level in each colour channel.

In deep sky photos we are usually interested in detecting faint objects which lie just above the background, so to enhance those we want to stretch the contrast for those levels which lie immediately to the right of the peaks in the histogram.

Before moving on to show the enhancement we should point out a complication. The image we have just used for the histogram was a small fragment cropped from the whole accumulated photo. The background does not have a level profile across the whole photo (in any direction). So if we wanted to enhance a larger fraction of the image we would need to correct it, perhaps by using a flat frame. The histogram of the whole image for our example was really more like this:

Notice how the peaks are now much broader, because the background is really at different levels in different parts of the image.

 The curves dialogue in GRIP

We can set a curve that enhances the contrast in the region just above the sky background but squashes everything else. In other words we can make visible fine details that were very faint but just above the sky background in the original photos. Doing this on the 32-bit accumulated image is very much better than doing it on the 16-bit version. In 16 bits the stretching would leave gaps and we would see a contoured (and again noisy) image rather than a smooth one. The following illustrates how it is done in GRIP.

The option to use is on the Levels menu: "Curves". Because this is a very frequently used option there is a keyboard short-cut: Ctrl-M (in Windows; other platforms may use some other key along with M). Consistency with Adobe PhotoShop was the reason for choosing M.

The Curves dialogue looks like this:

On the left is a histogram of the whole image. In the middle is an interactive graph on which you can click and drag the mouse to set and adjust points on a "curve" (straight line segments for precision work). On the right is a 1:1 scale view of a portion of the image which will show a preview of the effects of modifying the curve. The preview window can be dragged with the mouse to show any portion of the original image.

The histogram is of the 32-bits-per-channel image in which my 33 images of Alpha Delhave been accumulated, as described above. Remember that most of the pixels in the image show the background sky, not stars, so the biggest peaks in the histogram relate to that. Sure enough there are 3 big peaks at the dark (left) end of the histogram and they are in the order we would expect after looking at the profiles in the tables above: blue is darkest, then green, then red.

Further explanation of the curves graph

(Those who understand the graph can safely skip this section.)

Both axes of the interactive curves graph are the same as the horizontal axis of the histogram: measuring brightness levels in the image, from 0 (black) at the origin to the brightest level in the image at the other ends of the axes. The horizontal axis relates to brightness in the image at the start (exactly as in the histogram) but the vertical axis is the brightness we wish to produce as a result of the curve. Initially there is a diagonal (45°) straight line, so nothing happens: for any brightness on the horizontal axis go up to the line and then left to the vertical axis to arrive at the same value.

Now consider the left end of a modified curve, of a kind which we will be using below. I have added some annotations in red.

The flat section from the origin (O) to point A means that all pixels that currently lie in that brightness range will become 0 (black) in the resulting image. It is sensible to do this for all pixels that are definitely darker than the background because we will never be able to extract anything meaningful from them.

The steeply rising section from A to B will greatly stretch the contrast for pixels in that region. To see how that works consider point Bin. Read vertically upwards to reach point B and then horizontally to the left to see where we get to on the vertical axis: Bout will be the resulting brightness for such pixels. Brightness difference O-Bout is very much greater than brightness difference A-Bin, so the contrast will be stretched. We usually want to do that for brightnesses just above the background level if we want to enhance faint details.


 Neutralising the background

GRIP can automatically stretch channels so that the channels with brighter background levels (red and green in my examples) expand down to the lowest level (blue). The modal values of the 3 colour components of the histogram are used to caculate the stretch and it will only work for this kind of image, where the modes are for the darker background. The process changes the colour of the fainter stars but not the brightest ones - so again do not do this if wanting to measure magnitudes. The background then becomes dark grey rather than any colour predominating, so I call it neutralising the background. It can be done as part of the astro-process combining the raw images or afterwards. Here is the comparison:

t (s)ISOImage extractProfileComments
33 x 103200As shown before, reddish background.
33 x 103200The background has been neutralised, a simple option on the levels menu of GRIP.

Here is the curves dialogue again after neutralisation has been done and a standard curve "Linear from mode" has been selected:

 Curves dialogue buttons

The option buttons at the bottom of the dialogue are as follows.

Counting the x-axis grid lines in the histogram we can see that anything to the left of about the 0.9 position is useless background. So we should start the look-up curve at about that position. The option "Linear from mode" does just that. To enhance the contrast for objects just brighter than background we should make it rise steeply, to make a curve like this:

As you adjust the left-most point on the curve you will very easily see, from the preview image, where the background level is and leave it so it is only just visible in the image. Then add a few points to make the bend in the curve less sharp.

Yes, the bright star is now grossly saturated, but we are interested in enhancing faint detail. Here is the cropped portion of the result and its profile, corresponding to the tables above:

t (s)ISOImage extractProfileComments
33 x 103200The levels just above background have been extracted to best effect from the accumulator.

So we can now see fainter stars around Alpha Del. The same technique produces more spectacular results for nebulae of course (read on for an example).


  1. You must not adjust brightness curves like that if you want to make any photometric measurements from the image.
  2. It is a good idea to save the accumulator at the end of the astro-process in GRIP so it can be loaded back from disc and several different curves tried.

 Why take multiple exposures?

I hope you can see that with suitable software (eg, GRIP) taking multiple short exposures and combining them is much better than taking one long exposure. The benefits include:


Here is another example. The photo on the left below is the result of stacking 34 images of the star cluster NGC2244 and then reading the accumulator out with a straight line graph as shown earlier. It shows pretty much the same view as can be seen in my 10" telescope. There is no hint of a gaseous nebula.

Comparison photos of NGC2244 and the Rosette Nebula

Canon EOS5DMkII 254mm Newtonian @ 1200mm 34 x 30s f/4.8 ISO12800 2011-03-07 21:48:13-22:08:26 UT
From Rookhope 54.8N 2.1W 330m asl. Rural, almost no light pollution (3 Bortles)

Surprisingly the photo on the right is from exactly the same data. The difference is in the way the data have been read out of the accumulator. First the background was neutralised in the accumulator. Then a steeply rising curve starting at the modal (ie, background) value in the histogram was used to convert levels to make a 16-bits-per-channel image. Finally in Photoshop the widest possible (250 pixels) unsharp mask was applied.

Unsharp masking

Unsharp masking is something that was done even in pre-digital days, and in fact that is where the name of the process arose. An out-of-focus (blurred) film positive was made from the original negative and the two were then printed together. That has the effect of enhancing fine details. You can do the digital equivalent in Photoshop, up to a point: use the largest possible radius setting (250 pixels). However, Photoshop is designed for graphic arts rather than science and so I have found that it brightens the image when it shouldn't (I think because they use only an approximate method, for speed). The core of a galaxy becomes oversaturated, for instance, unless you deliberately darken the image first.

I have currently (early 2012) removed unsharp masking from GRIP because it was too cumbersome and slow. It is on my list of tasks to improve it and reinstate it. Until then use Photoshop or something similar for that step.


 Exposing to avoid saturation

1 magnitude unit is a factor of 2.512 (the 5th root of 100) in the amount of light (number of photons).

1 photographic stop is a factor of 2 in the amount of light.

Therefore 1 photographic stop is equal to 0.80 magnitudes.

The following graph shows red diagonal lines of constant Ev (exposure value) for varying exposure times and ISO sensitivities.

Graph of ISO against exposure time, with safe magnitudes

The red figures at the ends of each diagonal are the brightest star magnitude that will photograph without saturating on that line, for my 254mm aperture f/4.8 Newtonian with a Canon EOS 5D MkII camera at prime focus and no filters, based on the experiments described above. The gap between the red lines is 2 photographic stops, or 1.6 magnitudes. To estimate how this will be different for other apertures remember that light gathering capability is proportional to the area of the aperture, not the normally quoted diameter. When using filters (and other glass such as Cassegrain corrector plates) it is necessary to do comparison shots, rather like my tables of photos above, to determine how the filter affects brightness and exposure.

When taking photos with the aim of measuring magnitudes (eg, of variable stars) it is important to expose so that the star to be measured and all comparison stars to be used are not saturated.

There is more about photographic exposure on my camera techniques page.

Footnote: The images in the tables above had to be carefully aligned so that I could use exactly the same sampling line on each image, as one of the options on GRIP's measurement menu permits. I thresholded each image and detected blobs so that I could measure the exact centre of Alpha Del on every image. I then used the Translate option on GRIP's geometry menu to shift every image by a different small amount to make the centre of the star the same. Even though I had used a motorised HEQ5 mount, there is inevitably some variation in position due to periodic small errors in the worm gear in the RA drive. It is possible to see such variations on the chart shown at the end of pass one of the astro-process in GRIP. Here is an extract from such a chart.

Zig zag matches due to drive errors

As of version 9.11.25 of GRIP another window opens at the end of the batch astro-process to summarise the displacements between all the images that have been processed. An example can be seen here.

Next page