← Guides

Why you shouldn't worry about unity gain

Christian van den Bergeupdated 4 min read

First published on DSLR Astrophotography, revised for Owl Astro.

When you look for the best ISO for astrophotography, the term “unity gain” comes up a lot. It’s the ISO setting at which one electron is converted into one digital value (ADU) by the analog-to-digital converter (ADC). Intuitively that sounds appealing, and for quite a while many people chose their ISO based on it. Some still do.

Combined with the definition of the best ISO, this leads to two different questions:

To answer these, we need to understand what gain is and what using different gains does. If you just want the answer, skip to the summary.

The ADC, gain and quantisation error

The ADC turns an analog voltage into digital numbers. It counts the voltage in a fixed number of levels: most modern cameras use 14 bits, so there are 214=16,3842^{14} = 16{,}384 possible values. The analog signal is measured in electrons (e⁻), the digital values in ADU (analog-to-digital units).

The gain is the ratio the camera applies when it converts the signal into ADU. For example, a Nikon D600 at ISO 200 has a full well capacity of 38,610 e⁻, which is spread over 16,384 values:

gain=38,610 e−16,384 ADU=2.36 e−/ADU\text{gain} = \frac{38{,}610\ \text{e}^-}{16{,}384\ \text{ADU}} = 2.36\ \text{e}^-/\text{ADU}

A gain of exactly 1 e⁻/ADU is what’s called unity gain. Note that there’s no reason a camera should have an ISO setting with exactly this theoretical unity gain.

Because we’re counting in whole numbers, some rounding happens: the quantisation error, or quantisation noise. It’s small: about 0.29 times the least significant bit (LSB), the smallest change in signal the ADC can record. For a camera sensor, the LSB is set by the gain: at a gain of 2.36 e⁻/ADU, one LSB is 2.36 e⁻, so the quantisation noise is 0.29×2.36=0.680.29 \times 2.36 = 0.68 e⁻.

If you only think about the signal, it might seem that this gain throws away faint signal: a pixel that collects only one or two electrons during an exposure wouldn’t be counted at all. So surely a gain below unity would be better?

That reasoning is correct, but fortunately there’s a way around it: noise. Yes, we actually want noise in the signal!

The benefit of noise

Let’s look at how noise affects the accuracy of the ADC, starting with a graph of the analog input against the digital output of an ADC:

ADC behaviour: the digital output in ADU climbs in steps one LSB wide, while the analog input it represents is a straight dashed line through the steps

Because the ADC counts in whole numbers, its output is a staircase instead of a straight line. The difference between the staircase and the straight line at any point is the quantisation error.

Now watch what happens when we add 0.5 LSB of noise:

The same ADC with 0.5 LSB of noise added: each step is spread out by half an LSB to either side, so on average the output follows the straight line

The noise shifts the signal back and forth (it dithers the ADC). The quantisation error now behaves like ordinary Gaussian noise with a standard deviation of 1/12≈0.29\sqrt{1/12} \approx 0.29 LSB, so small you’ll practically never notice it in your images.

A properly dithered ADC doesn’t just keep the quantisation error small, it also lets you capture signals smaller than one LSB. Once the noise is larger than 1 LSB, signal below 1 LSB is still encoded in the raw data, on average, and stacking many frames recovers it.

Take the D600 at ISO 200 again, where one LSB is 2.36 e⁻. Without noise, a pixel that caught 2 e⁻ would always read 0 ADU: that signal would be lost. With noise of at least one LSB, the same pixel sometimes reads 0, sometimes 1 or 2 ADU, and the average over many frames reflects the 2 e⁻ that were really there. Jack Hogan explains this with examples in Sub-bit signal.

The noise that’s always in our images is read noise, and that’s almost always more than 1 LSB. Even when it isn’t, other sources such as shot noise from the sky background and dark current add to it. So under normal conditions there’s always more than 1 LSB of noise, and the ADC is properly dithered. And since we stack many frames when we’re after the faintest signal, gain isn’t a concern there either. So we don’t need to worry about gain in general, or unity gain in particular.

Summary: gain and unity gain

Once you consider how an ADC works, and that noise actually improves its accuracy, gain stops being something to worry about. To answer the questions from the start: there’s no downside for Canon users in going above unity gain, or for Nikon users in staying below it. As long as there’s enough noise to dither the ADC, and with real-world read noise and sky background there always is, you don’t lose accuracy or sensitivity.

So choose your ISO on read noise and dynamic range, as explained in What is the best ISO for your DSLR for astrophotography?, and ignore unity gain.

Sources and further reading

Comments

Loading comments…

Leave a comment

Comments appear once I've read them. No account needed; only your name and comment are shown.