Site logo, www.grelf.net
 
 

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).


 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 the 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 chart 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. Ie, the detector is saturated in all 3 channels (making the star white).

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. GRIP can automatically adjust that; 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 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 not so easily changed. I was photographing from my usual 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

t (s)ISOImage extractProfileComments
1050Even at this low sensitivity the mag 3.77 star is just saturating after only 10s.
10100The telescope moved slightly during the exposure, so the star image is not circular and the profile is ragged.
10200The fainter stars are beginning to be detected but so also is the sky background.
10400The red trace for the sky background is higher than the green and blue, typical of pollution from street lights.
10800 
101600 
103200This 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.
106400The 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.)
1012800 
1025600Now 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

t (s)ISOImage extractProfileComments
0.33200With such a short exposure I should have used mirror lock-up (or shoot from live view) to avoid vibration effects being visible.
0.63200 
1.33200 
2.53200 
53200 
103200 
203200 
403200 
703200Jogged the telescope, but I kept this in to show the brightness still rising, to useless levels.

The first conclusion from all that is the highest sensitivity (ISO) setting is clearly not necessarily the best. In Canon cameras, and probably in all other compact and SLR cameras, the initial read-out from the CMOS detector chip is an analogue signal. 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.

 Dynamic range - magnitudes

One basic fact is that we have only so many bits of valid data in each colour channel. In my camera there are 14 bits. 214 = 16,384 so that is the number of brightness levels in each channel. By using ISO 3200 in my 10s exposures the corresponding profile above suggests I am reducing that to about 13 bits per channel of useful data.

Astronomical magnitude is a logarithmic scale such that a 100-fold change in brightness equals 5 magnitudes.

M1 - M2 = 1001/5 log10 (F1 / F2) = 2.512 log10 (F1 / F2)
where M are magnitudes and F are measured fluxes of light.

Detectors are linear in F, so we can make the following correspondences between number of bits and magnitude ranges.

BitsNumber rangeMagnitude rangeComments
71285.3JPEG image with 1-bit loss for ISO (see above)
82566.0The maximum possible in a JPEG image
112,0488.3Many cameras with 1-bit loss (see above)
124,0969.1Many cameras in RAW mode
138,1929.8Newer cameras with 1-bit loss
1416,38410.6Newer cameras in RAW mode
1532,76811.316-bit image file with 1-bit loss
1665,53612.1Maximum possible in a 16-bit image file (eg, TIFF)
19524,28814.464 x 13-bit images or 16 x 15-bit ones

So I should be able to photograph a range of about 10 magnitudes between my polluted sky background and the saturation level. If I want magnitude 3 stars to be recorded without saturating I will only be able to go down to magnitude 13. That is in a single frame. The accumulator in GRIP (see below) can hold up to 32 bits per channel so by using multiple exposures (the last row in the table is for 64 of my 13-bit images) I can cover a greater range of magnitudes but the range will then have to be squashed for storage in a normal 16-bit image file. (This is a bit like the High Dynamic Range, HDR, capabilities of PhotoShop.)

   

 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. Then the resulting image is scaled into a normal 16-bit-per-channel one as the final result.

t (s)ISOImage extractProfileComments
33 x 103200The background noise has been smoothed - compare with single images above taken at 10s, ISO 3200.

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.94.26.79.612.225.5
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.58.08.67.112.212.5
Tycho 1634 152 112.9311.56G6.99.512.611.115.512.4
Tycho 1634 152 112.9311.56B6.07.610.78.211.69.3

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 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 then makes a 16-bit image (because that is displayable whereas the accumulator is not) by linearly scaling that range. It uses 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 have not gained very much.

However, at this point GRIP lets you set a different curve and then transforms the accumulator into the 16-bit image again. 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 from the accumulator 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. This happens either at the end of the batch astro-process when first combining photos or, if you saved the accumulator there, it will happen whenever the .accum file is re-opened by GRIP as an image file.

First we see a curves dialogue with the linear graph:

Curves dialogue with linear graph

Lurking behind that is another window showing a multi-channel histogram of the accumulator. Click on it to bring it forward:

Histogram of the accumulator

This is the histogram of the accumulator for my 33 images of Alpha Del, 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.

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

Better curve for going from accumulator to 16-bit image

As you adjust the left-most point on the curve you will very easily see 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. When we click on the OK button the accumulator is reconverted to the 16-bit image, using our new curve. 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.

NB:

  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.
 

 Neutralising the background

GRIP can also automatically stretch channels so that the channels with brighter background levels (green and blue in my examples) expand down to the lowest level (red). This 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.

 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:

 

 Exposing to avoid saturation

This 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 Newtonian with the camera at prime focus and no filters, based on the experiments described above. 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