How many people tweak the gain and offsets of their cameras? and why? [Deep Sky] Acquisition techniques · Andy Wray · ... · 15 · 1286 · 2

andymw 11.01
...
· 
With so many variables in astrophotography, I have left the camera gain at unity (139 in my case) and the offset to the default in the driver (in ZWO ASI1600MM's case this appears to be 50).  

I'm just wondering how many people on here play with these variables and why?  Obviously when I was using a DLSR I would choose ISO settings to balance the noise versus signal capture.  I'm just not sure how to do the equivalent with gain and offset.  I do understand that it's something about balancing dynamic range versus SNR, but it would be good to see if someone could give me a bit more guidance before I tweak either of these.

As a more direct question:  if I moved from unity gain (139) down to a gain of 75 what would that mean for my captures?  In theory an improved dynamic range, but with an increased read noise?  and then what would I have to do to combat that read noise?  More longer or shorter exposures?

I guess I'm also asking this because I expect that seeing conditions (bortle sky etc.) and the specific target would be relevant.

Sorry for such a noob question.
Edited ...
Like
bennyc 8.42
...
· 
·  8 likes
Higher gain for lower read noise, lower gain for better dynamic range.
​​​​​​
If you're shooting broadband and/or your subs are long enough there's a point where read noise no longer matters so very high gain rarely makes sense. 

As for dynamic range your are limited by the full well capacity and the ADC bit depth as to how far you can push that. The full well capacity is basically how many electrons the pixel can hold, and the ADC bit depth is the number of shades it can digitally discern. So if you can have say 1000 shades of gray and your pixel can hold 10000 electrons you have a choice: do you count them one by one giving a pretty accurate count but saturating at only one tenth of what would physically max out the pixel (=high gain)? Or do you count them 10 at the time, using the pixel capacity at its fullest but getting a less accurate count (low gain)?

As you can see, gain then matters most if there is a big relative difference between the FWC and ADC bit depth. Many of the more recent cameras (533, 2600, 294) have 14 or even 16 bit ADCs and the ASI183 has only 12 bit but the pixels are tiny so the FWC is small. The 1600 being a slightly older model is really one of the last cameras with average sized pixels while at the same time suffering with a lower bit depth ADC. That makes it more important for that camera to get the gain right, for many others there's like one or 2 optimal values and that's it.

So to circle back to your question: if you lower the gain you might need to take longer subs (not necessarily increasing total exposure time) but it may very well be that your sub length was already longer than strictly necessary in which case you're fine. Either use sharpcap sensor analysis or PixInsight's Sky Limited Exposure script to find out what that minimum would be. (there may also be a free spreadsheet going around if you don't have those tools, but they are easier)

Finally: the offset is a small value that gets added to the pixel readout because negative numbers are not allowed and there's always some noise in the readout. But of course this then costs you a bit of dynamic range. Now if you truly need to get every last bit of dynamic range out of your sensor you can lower that setting to the point where darks or bias are just barely above 0 in their minimum value. However the defaults are pretty OK (these days, I do believe earlier drivers had less than optimal defaults) and it's generally not worth messing around with IMHO but YMMV
Like
velociraptor1 2.71
...
· 
I have ZWO ASI1600 MM-Pro and use the following settings,

Gain 200 for using with GSO 6 inch F9 RC tube
Gain 139 for Sharpstar 60ED APO Refractor and Sky-watcher 130PDS Newtonian tubes

I read in some article/forum topic that Offset value needs to be set at 56 don't know why earlier it was 10
Like
jhayes_tucson 22.40
...
· 
Benny Colyn:
Higher gain for lower read noise, lower gain for better dynamic range.
​​​​​​
If you're shooting broadband and/or your subs are long enough there's a point where read noise no longer matters so very high gain rarely makes sense. 

As for dynamic range your are limited by the full well capacity and the ADC bit depth as to how far you can push that. The full well capacity is basically how many electrons the pixel can hold, and the ADC bit depth is the number of shades it can digitally discern. So if you can have say 1000 shades of gray and your pixel can hold 10000 electrons you have a choice: do you count them one by one giving a pretty accurate count but saturating at only one tenth of what would physically max out the pixel (=high gain)? Or do you count them 10 at the time, using the pixel capacity at its fullest but getting a less accurate count (low gain)?

As you can see, gain then matters most if there is a big relative difference between the FWC and ADC bit depth. Many of the more recent cameras (533, 2600, 294) have 14 or even 16 bit ADCs and the ASI183 has only 12 bit but the pixels are tiny so the FWC is small. The 1600 being a slightly older model is really one of the last cameras with average sized pixels while at the same time suffering with a lower bit depth ADC. That makes it more important for that camera to get the gain right, for many others there's like one or 2 optimal values and that's it.

So to circle back to your question: if you lower the gain you might need to take longer subs (not necessarily increasing total exposure time) but it may very well be that your sub length was already longer than strictly necessary in which case you're fine. Either use sharpcap sensor analysis or PixInsight's Sky Limited Exposure script to find out what that minimum would be. (there may also be a free spreadsheet going around if you don't have those tools, but they are easier)

Finally: the offset is a small value that gets added to the pixel readout because negative numbers are not allowed and there's always some noise in the readout. But of course this then costs you a bit of dynamic range. Now if you truly need to get every last bit of dynamic range out of your sensor you can lower that setting to the point where darks or bias are just barely above 0 in their minimum value. However the defaults are pretty OK (these days, I do believe earlier drivers had less than optimal defaults) and it's generally not worth messing around with IMHO but YMMV

Benny,
I want to add my two cents to your excellent response.  The three important things that determine the optimum settings for DSO imaging are:
1)  Achieving unit gain (1e-/ADU),
2)  Maximizing well depth (to avoid over-exposed stars),  and
3)  Minimizing read noise relative to the signal.

Using any gain setting higher than unit gain makes the image “brighter” without providing any additional information, while at the same time, reducing well depth.  Using a gain setting for less than unit gain throws away signal that contains image information.  You may get additional well depth, but that’s a secondary consideration in the face of lost information.  It’s worth noting that although we want signal, SNR is the most desirable thing to optimize.  Finally, the requirements for RN are driven by how the camera is used.  For long exposure imaging, RN is much less of a consideration than it is for lucking imaging where the photon noise is on the same order as RN.

I run a QHY600M-P and that camera offers multiple operating modes as well as the more common gain and offset settings.  With that camera, the mode selection is very important.  Mode 3 at a gain of 25 gives unity gain along with RN that is about half what you get with a 16803 sensor.  I believe that for long exposure imaging those are the optimum settings for the QHY600M-P.

John
Like
dkamen 6.89
...
· 
Technically you don't want one electron per ADU, you want differences in the signal to correspond to distinct ADUs. Electrons are simply the quantum of captured signal in the analog space. But such quanta are not collected at the same rate. It depends on the subject.

Perfectly okay to have e.g. two ADUs per electron if you have very few electrons per pixel ( faint signal or  short exposure).

Equally okay to have one ADU every ten electrons if you are capturing something that is too bright and want to record differences in the highlights.

In theory unity gain + 16 bit ADC is as good as it gets but in practice there are other considerations (non linearities in sensor response, noise, feasibility of longer exposures). 

Fundamental rule is the same as terrestrial photography, I would say: lower gain helps with the highlights, higher gain helps with the shadows. Stacking takes care of SNR in both cases, way more than individual subs do. Do not forget that planetary photographers get impressive results with 8bit ADC and frame rate matters to them much more than individual frame DR.

Cheers,

Dimitris
Like
bennyc 8.42
...
· 
John Hayes:
Benny Colyn:
Higher gain for lower read noise, lower gain for better dynamic range.
​​​​​​
If you're shooting broadband and/or your subs are long enough there's a point where read noise no longer matters so very high gain rarely makes sense. 

As for dynamic range your are limited by the full well capacity and the ADC bit depth as to how far you can push that. The full well capacity is basically how many electrons the pixel can hold, and the ADC bit depth is the number of shades it can digitally discern. So if you can have say 1000 shades of gray and your pixel can hold 10000 electrons you have a choice: do you count them one by one giving a pretty accurate count but saturating at only one tenth of what would physically max out the pixel (=high gain)? Or do you count them 10 at the time, using the pixel capacity at its fullest but getting a less accurate count (low gain)?

As you can see, gain then matters most if there is a big relative difference between the FWC and ADC bit depth. Many of the more recent cameras (533, 2600, 294) have 14 or even 16 bit ADCs and the ASI183 has only 12 bit but the pixels are tiny so the FWC is small. The 1600 being a slightly older model is really one of the last cameras with average sized pixels while at the same time suffering with a lower bit depth ADC. That makes it more important for that camera to get the gain right, for many others there's like one or 2 optimal values and that's it.

So to circle back to your question: if you lower the gain you might need to take longer subs (not necessarily increasing total exposure time) but it may very well be that your sub length was already longer than strictly necessary in which case you're fine. Either use sharpcap sensor analysis or PixInsight's Sky Limited Exposure script to find out what that minimum would be. (there may also be a free spreadsheet going around if you don't have those tools, but they are easier)

Finally: the offset is a small value that gets added to the pixel readout because negative numbers are not allowed and there's always some noise in the readout. But of course this then costs you a bit of dynamic range. Now if you truly need to get every last bit of dynamic range out of your sensor you can lower that setting to the point where darks or bias are just barely above 0 in their minimum value. However the defaults are pretty OK (these days, I do believe earlier drivers had less than optimal defaults) and it's generally not worth messing around with IMHO but YMMV

Benny,
I want to add my two cents to your excellent response.  The three important things that determine the optimum settings for DSO imaging are:
1)  Achieving unit gain (1e-/ADU),
2)  Maximizing well depth (to avoid over-exposed stars),  and
3)  Minimizing read noise relative to the signal.

Using any gain setting higher than unit gain makes the image “brighter” without providing any additional information, while at the same time, reducing well depth.  Using a gain setting for less than unit gain throws away signal that contains image information.  You may get additional well depth, but that’s a secondary consideration in the face of lost information.  It’s worth noting that although we want signal, SNR is the most desirable thing to optimize.  Finally, the requirements for RN are driven by how the camera is used.  For long exposure imaging, RN is much less of a consideration than it is for lucking imaging where the photon noise is on the same order as RN.

I run a QHY600M-P and that camera offers multiple operating modes as well as the more common gain and offset settings.  With that camera, the mode selection is very important.  Mode 3 at a gain of 25 gives unity gain along with RN that is about half what you get with a 16803 sensor.  I believe that for long exposure imaging those are the optimum settings for the QHY600M-P.

John

Thanks John, but I would caution against too much focus on unity gain for the sake of 1:1. It's a nice middle ground for most purposes, but read noise will dither the ADC output regardless, so there's no real loss shooting at say 2e-/DU if your camera has 1 or 2e- of read noise (I do this with my ASI183 when shooting broadband). 

There's a lot more to say on the subject, for instance I did not touch on the constraints of less-than-perfect sensors like my IMX183 which has horrible banding on gain 0 that is very hard to calibrate out. A bit more gain and the sensor behaves as it should. Add much more gain and the amp glow gets out of hand. We shouldn't forget these are imperfect devices and the manufacturer usually also optimizes for a certain range (incidentally, often also around unity gain). 

To give another example my ASI294 I set to gain 120 (where high conversion gain kicks in and read noise drops off a cliff) and never use anything else.

In the end, it's a very different story from sensor to sensor. I don't own a 1600 but I hear gain 0 and/or 76 often for broadband (where more read noise is tolerable because there's also more shot noise from LP to drown it in, and stars burn out faster if dynamic range is lacking) and 139 (unity) or 200 for narrowband.
Edited ...
Like
umasscrew39 12.53
...
· 
·  3 likes
Andy- in addition to the excellent information provided, I highly recommend you watch these two videos by Robin Glover:

https://www.youtube.com/watch?v=3RH93UvP358
https://www.youtube.com/watch?v=ub1HjvlCJ5Y

Robin, a physicist and developer of SharpCap, gives an excellent lecture on CMOS sensor gain, offset, exposure times, etc.  These talks are from 2019 but are very relevant to your questions.  He also explains and discusses (in the second video) why he believes unity gain is not relevant.  Overall, these are pack with some very useful information, so much so, you may want to watch them several times.

Bruce
Like
JamesPeirce 2.11
...
· 
I think it always makes sense to set those things mindfully. Gain in particular. If you've got something like an ASI2600, gain 100 (dual gain) is going to cover almost every scenario. But say you're imaging with a RASA, or a bright telescope under very intense light pollution. It would make more sense to run at gain 0 for the expanded dynamic range and to capture and work with much fewer photographs.

The ASI1600 is a whole lot more variable. A host of sky glow and focal ratio considerations can mean a different range of gain settings are practical or beneficial. Even in the same setup. Say, imaging in LRGB vs narrowband. There it has a lot more to do with balancing exposure times with dynamic range. There have been some really excellent (and deeply involved) discussions on that camera at Cloudy Nights, among other places.

Generally, for many cameras, it usually makes sense to find some level of gain/ISO which offers good performance characteristics and exposure times while not overly restricting dynamic range. And ISO invariant ranges can mean there's little to gain in upping ISO beyond a certain point. And then there's entirely different issues, such as with the cameras that exhibit greater banding or amp glow issues relative to gain and exposure time.
Like
andymw 11.01
...
· 
One thing I have gathered from the above is that no-one can explain the way to choose gain settings in simple english to people who are less experienced in astrophotography.  It does seem that we should stop fretting about the offset and probably stick with the manufacturer's defaults in their drivers.

Most modern sensors have an obvious inflexion point for gain where the electronics switch their working mode means you probably should aim for that gain.

For me, where I have the older ASI1600MM, I have the luxury of playing with slightly lower gains than unity to increase dynamic range on specific targets.
Like
andymw 11.01
...
· 
Benny Colyn:
In the end, it's a very different story from sensor to sensor. I don't own a 1600 but I hear gain 0 and/or 76 often for broadband (where more read noise is tolerable because there's also more shot noise from LP to drown it in, and stars burn out faster if dynamic range is lacking) and 139 (unity) or 200 for narrowband.


Thanks for this!  I'll give that a go.  I have seen that unity gain (139) has worked well for narrowband, but was not working well for broadband.  I'm going to go for a gain of 76 for galaxies through LRGB filters from now on and see how that goes.
Like
jhayes_tucson 22.40
...
· 
Benny Colyn:
Thanks John, but I would caution against too much focus on unity gain for the sake of 1:1. It's a nice middle ground for most purposes, but read noise will dither the ADC output regardless, so there's no real loss shooting at say 2e-/DU if your camera has 1 or 2e- of read noise (I do this with my ASI183 when shooting broadband). 

There's a lot more to say on the subject, for instance I did not touch on the constraints of less-than-perfect sensors like my IMX183 which has horrible banding on gain 0 that is very hard to calibrate out. A bit more gain and the sensor behaves as it should. Add much more gain and the amp glow gets out of hand. We shouldn't forget these are imperfect devices and the manufacturer usually also optimizes for a certain range (incidentally, often also around unity gain). 

To give another example my ASI294 I set to gain 120 (where high conversion gain kicks in and read noise drops off a cliff) and never use anything else.

In the end, it's a very different story from sensor to sensor. I don't own a 1600 but I hear gain 0 and/or 76 often for broadband (where more read noise is tolerable because there's also more shot noise from LP to drown it in, and stars burn out faster if dynamic range is lacking) and 139 (unity) or 200 for narrowband.

It depends on the camera but in most cases shooting at a gain of 2e-/DU cuts the well depth in half, which leads to more clipped stars.  As I've said, using a gain with 2e-/DU does not provide any additional information to the signal over 1e-/DU.  I understand that you can mitigate the effects of RN by doubling the gain but for long exposure imaging, the improvement in SNR due to RN issues isn't worth it.   I completely agree that using very high gain is valuable for lucking imaging but that's a completely different subject.

John
Like
bennyc 8.42
...
· 
John Hayes:
Benny Colyn:
Thanks John, but I would caution against too much focus on unity gain for the sake of 1:1. It's a nice middle ground for most purposes, but read noise will dither the ADC output regardless, so there's no real loss shooting at say 2e-/DU if your camera has 1 or 2e- of read noise (I do this with my ASI183 when shooting broadband). 

There's a lot more to say on the subject, for instance I did not touch on the constraints of less-than-perfect sensors like my IMX183 which has horrible banding on gain 0 that is very hard to calibrate out. A bit more gain and the sensor behaves as it should. Add much more gain and the amp glow gets out of hand. We shouldn't forget these are imperfect devices and the manufacturer usually also optimizes for a certain range (incidentally, often also around unity gain). 

To give another example my ASI294 I set to gain 120 (where high conversion gain kicks in and read noise drops off a cliff) and never use anything else.

In the end, it's a very different story from sensor to sensor. I don't own a 1600 but I hear gain 0 and/or 76 often for broadband (where more read noise is tolerable because there's also more shot noise from LP to drown it in, and stars burn out faster if dynamic range is lacking) and 139 (unity) or 200 for narrowband.

It depends on the camera but in most cases shooting at a gain of 2e-/DU cuts the well depth in half, which leads to more clipped stars.  As I've said, using a gain with 2e-/DU does not provide any additional information to the signal over 1e-/DU.  I understand that you can mitigate the effects of RN by doubling the gain but for long exposure imaging, the improvement in SNR due to RN issues isn't worth it.   I completely agree that using very high gain is valuable for lucking imaging but that's a completely different subject.

John

with 2 e- per DU I mean "half unity" John, aka lower gain than unity would be. Not higher. My point is you don't "miss" signal by counting every other e- since your read uncertainty is bigger than that anyway (and it averages out to fractional DUs by stacking).
Like
StuartT 4.69
...
· 
·  2 likes
Watching Robin Glover's excellent videos has convinced me that 'unity gain' is a bit of a red herring. I run my ASI2600MC at gain 105 as this makes the best compromise between read noise (which falls off sharply at around 100 in my sensor analysis) and dynamic range
asi2600.JPG
Edited ...
Like
dkamen 6.89
...
· 
·  1 like
Andy Wray:
One thing I have gathered from the above is that no-one can explain the way to choose gain settings in simple english to people who are less experienced in astrophotography.  It does seem that we should stop fretting about the offset and probably stick with the manufacturer's defaults in their drivers.

Most modern sensors have an obvious inflexion point for gain where the electronics switch their working mode means you probably should aim for that gain.

For me, where I have the older ASI1600MM, I have the luxury of playing with slightly lower gains than unity to increase dynamic range on specific targets.

When offset is not high enough, you can tell immediately because the images will be clipped to the left side of the histogram, i.e. dark areas will be completely dark and the transition to non-dark areas will be abrupt instead of gradual:

m20.jpg

This is *not* easy to happen. It may only happen if your exposure is not sufficient. For example: < 30 second subs with a Ha filter. Or normal subs with an f/12 scope. Or a very dark region of the sky in a Bortle 1 area and a sensor with relatively low QE. It is very seldom the case in the typical suburban astrophotography session with a typical f/4 to f/9 scope, a broadband subject and exposures of circa 1 minute or more. Also, if you do get clipped images on one occasion and increase the offset e.g. to 50, you can just leave it there as the new default. It won't do any harm, only reduce contrast a little but this is very easy to fix in post processing. 

Same goes for gain. If your individual subs have decent SNR because they are 3 minutes each and you are taking maybe 80 of them and you have a 16 bit DAC gain is not so important and you can mostly go with unity gain or less than unity gain (to avoid burning up stars).

Coincidentally, all of the aforementioned tend to be true in the case of a "traditional" high end CCD-based rig, because of the very long exposures that are involved. But the CMOS sensors many of us are using have different characteristics (typically: much lower read noise that is further reduced as you increase the gain). Thereby, they inherently lend themselves to more and relatively shorter exposures as the way of increasing SNR and reducing quantization error. So you see higher gains and 11,12 or 14 bit ADCs. It is a different imaging technique and the rules are different. And yes, the how and why you should fiddle with the gain tends to be very technical. But in the end, like I said, the rules are simple: increase the gain if your result is underexposed (very dark subject) and the situation does not improve with stacking, decrease it if it is overexposed (too bright subject). Increase offset if the shadows are clipped. 


Cheers,
Dimitris
Edited ...
Like
Rouzbeh 8.40
...
· 
John Hayes:
Benny Colyn:
Higher gain for lower read noise, lower gain for better dynamic range.
​​​​​​
If you're shooting broadband and/or your subs are long enough there's a point where read noise no longer matters so very high gain rarely makes sense. 

As for dynamic range your are limited by the full well capacity and the ADC bit depth as to how far you can push that. The full well capacity is basically how many electrons the pixel can hold, and the ADC bit depth is the number of shades it can digitally discern. So if you can have say 1000 shades of gray and your pixel can hold 10000 electrons you have a choice: do you count them one by one giving a pretty accurate count but saturating at only one tenth of what would physically max out the pixel (=high gain)? Or do you count them 10 at the time, using the pixel capacity at its fullest but getting a less accurate count (low gain)?

As you can see, gain then matters most if there is a big relative difference between the FWC and ADC bit depth. Many of the more recent cameras (533, 2600, 294) have 14 or even 16 bit ADCs and the ASI183 has only 12 bit but the pixels are tiny so the FWC is small. The 1600 being a slightly older model is really one of the last cameras with average sized pixels while at the same time suffering with a lower bit depth ADC. That makes it more important for that camera to get the gain right, for many others there's like one or 2 optimal values and that's it.

So to circle back to your question: if you lower the gain you might need to take longer subs (not necessarily increasing total exposure time) but it may very well be that your sub length was already longer than strictly necessary in which case you're fine. Either use sharpcap sensor analysis or PixInsight's Sky Limited Exposure script to find out what that minimum would be. (there may also be a free spreadsheet going around if you don't have those tools, but they are easier)

Finally: the offset is a small value that gets added to the pixel readout because negative numbers are not allowed and there's always some noise in the readout. But of course this then costs you a bit of dynamic range. Now if you truly need to get every last bit of dynamic range out of your sensor you can lower that setting to the point where darks or bias are just barely above 0 in their minimum value. However the defaults are pretty OK (these days, I do believe earlier drivers had less than optimal defaults) and it's generally not worth messing around with IMHO but YMMV

Benny,
I want to add my two cents to your excellent response.  The three important things that determine the optimum settings for DSO imaging are:
1)  Achieving unit gain (1e-/ADU),
2)  Maximizing well depth (to avoid over-exposed stars),  and
3)  Minimizing read noise relative to the signal.

Using any gain setting higher than unit gain makes the image “brighter” without providing any additional information, while at the same time, reducing well depth.  Using a gain setting for less than unit gain throws away signal that contains image information.  You may get additional well depth, but that’s a secondary consideration in the face of lost information.  It’s worth noting that although we want signal, SNR is the most desirable thing to optimize.  Finally, the requirements for RN are driven by how the camera is used.  For long exposure imaging, RN is much less of a consideration than it is for lucking imaging where the photon noise is on the same order as RN.

I run a QHY600M-P and that camera offers multiple operating modes as well as the more common gain and offset settings.  With that camera, the mode selection is very important.  Mode 3 at a gain of 25 gives unity gain along with RN that is about half what you get with a 16803 sensor.  I believe that for long exposure imaging those are the optimum settings for the QHY600M-P.

John

That's my approach as well, but I'm not sure what the advantage gain 25 would have over gain 0 in mode 3?

Specially for LRGB with lots of signal, the RN is of less importance. 

Gain 0 would offer more FWC with no RN increase penalty (hence the higher DR).

Why does system gain =1 0r 1.2 matter, its just a conversion factor isn't it?




Rouz
Like
Rouzbeh 8.40
...
· 
·  1 like
Andy Wray:
One thing I have gathered from the above is that no-one can explain the way to choose gain settings in simple english to people who are less experienced in astrophotography.  It does seem that we should stop fretting about the offset and probably stick with the manufacturer's defaults in their drivers.

Most modern sensors have an obvious inflexion point for gain where the electronics switch their working mode means you probably should aim for that gain.

For me, where I have the older ASI1600MM, I have the luxury of playing with slightly lower gains than unity to increase dynamic range on specific targets.



Basics are for LRGB FWC is of more importance and for NB with less signal (specially 3nm) then best increase the gain to lower the RN.
If the camera has a step (as most do) you can usually use that step to low RN.

With LRGB you can stick to gain 0 and maximize you FWC.

So in reality you really only need 2 settings in most cases.



Rouz,
Like
 
Register or login to create to post a reply.