Jump to content
Welcome to Backyard Astronomy Space - please register to gain access to all of our features. Click here for more details. ×
SmallWorldsForum Microscopy and macro photography - a companion forum to BYA ×

The Curious Effects of Gain settings


Stub Mandrel

Recommended Posts

This is partly me trying to understand this topic better...

It's interesting trying to decide what is the best gain setting to use for astrophotography.

Let's imagine a simple camera with a well depth of just 15 electrons and no noise.

This table shows the ADU value (analogue to digital convert unit) given for any number of electrons from 0 to 15 at different gain settings. It doesn't tell us much, but as we would expect more electrons means a higher reading.

image.png.d7e0765d17416d4b9bae22558b3388b2.png

Bear in mind the output is digital so 3 electrons times a gain of 1.5 = 6 as you would expect, but 3 time 0.5 is just 1, as you can't have 'half a bit' of output. This means that at a gain of 0.5 levels of 2 and 3 electrons are indistinguishable, giving an ouput of 1.

Let's look in closer detail. This table shows, the output at each gain setting for each number of electrons:

image.png.e6aebc6111bd1509547c95e7108da53c.png

What is striking about this - several things!

Some assume gain less than 1 (e.g. 0.5) gives us more dynamic range - this is true if the full well capacity is greater than the resolution of the analogue to digital converter. In this example a gain of 0.5 would scale a range of 0-30 electrons to 0-15 ADU .

A gain of 2 'stretches' the data, but this just means that every other data value is missed, so you don't really gain anything.

Most interesting are gains of 0.9 and 1.1 - close to unity gain but not quite equal to it. This creates  a number of 'bad steps'. In the case of 0.9 gain the values of 0 and 9 both get 'double data' which will create artificial 'peaks' in the histogram, while at 1.1 gain there is no output of 10 for any input value creating a gap.

With real cameras with several more bits these discontinuities will still exist. When stacking very faint images its possible that such discontinuities could be perpetuated, the masking effect of noise may compensate enough that we don't really notice the effect.

However, can we benefit in any way from using a gain other than 1?

Gains less than 1 make sense if we need to be able to capture bright objects. Using a gain of 0.5, 0.25 or 0.125 (for example) would avoid discontinuities in the resulting histogram, but with gains less than 1 we will always lose sensitivity to faint objects.

Gains of more than 1 will create the illusion of more sensitivity to faint signals, but with the cost of dynamic range and no real improvement in the data and the introduction to discontinuities in the histogram.

Real World Stuff

If the camera applies electronic gain before the A2D converter, then electronic noise will probably obscure any discontinuities, but any gains from 'dithering' the data in this way just reproduce what we do anyway with stacking.

With my ASI1600 I have been using a gain of 150 instead of 139 (which is the unity gain figure). When I take flats I see prominent, narrow, spikes across the historgram - these are artefacts caused by this mismatch.

This suggests the gain in the ASI cameras is digital and applied after the A2D conversion.

As we can apply the same mathematical transformations in post-processing, but always with the option of going back to the original data and trying a different set of options, it makes no sense to apply irreversible positive digital gain in this way.

Conclusions

For cameras with digital gain, it's best to use a gain of 1 adu:1e unless you need to get greater dynamic range, but with low noise CMOS cameras reducing exposure time is probably a better option. There's no real reason to use gain greater than 1 in order to preserve the maximum information in your RAW data.

For cameras with electronic gain before the analogue to digital converter (I think some CCD cameras are like this) are less likely to produce artefacts but a gain greater than 1 is still not going to produce greater sensitivity.

 

 

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Welcome to Backyard Astronomy Space - please register to gain access to all of our features

    Once registered you will be able to contribute to this site by submitting your own content or replying to existing content. You will also be able to customise your profile, receive reputation points for submitting content, whilst also communicating with other members via your own private personal messaging inbox. 

     

    This message will be removed once you have signed in.

  • Tell a friend

    Love The Backyard Astronomy Space? Tell a friend!
  • Topics

×
×
  • Create New...