Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Need Method to Determine Optimal Gain & Bias for CMOS Camera

  • Please log in to reply
17 replies to this topic

#1 Peregrinatum

Peregrinatum

    Ranger 4

  • *****
  • topic starter
  • Posts: 388
  • Joined: 27 Dec 2018

Posted 18 September 2019 - 10:41 AM

I’m looking for a method to determine the optimal gain setting for a CMOS camera… below is a graph I found somewhere here on CN that shows the dynamic range for various gain settings for the ASI1600MM camera… the graph clearly shows that dynamic range is maximized at a gain of close to 75, thus it's 'optimal gain' setting.

 

I would like to generate a similar graph for a different camera, how can I do this?

 

And, once I determine the optimal gain, how can I determine the optimal offset?

 

GyufoEZ.png



#2 nimitz69

nimitz69

    Apollo

  • *****
  • Posts: 1465
  • Joined: 21 Apr 2017
  • Loc: A barrier island 18 miles south of Cocoa Beach

Posted 18 September 2019 - 10:44 AM

what camera?  Chances are someone here uses it and already knows the answer and can tell you



#3 Jcwillis4

Jcwillis4

    Vostok 1

  • *****
  • Posts: 100
  • Joined: 16 Jul 2018
  • Loc: Plano, TX

Posted 18 September 2019 - 10:46 AM

SharpCap has a sensor analyzer feature that does a good job of building that kind of graph for your specific camera.  I used it on my ASI1600 to verify specs.  Did a good job.


  • psandelle and ramdom like this

#4 vehnae

vehnae

    Explorer 1

  • -----
  • Posts: 92
  • Joined: 17 May 2013
  • Loc: Finland

Posted 18 September 2019 - 11:01 AM

Offset is used to prevent your data from clipping to zero. Take a bias frame at your chosen gain, and if the minimum value in your data is above 0 you're set. But in practice the dynamic range advantage for using exactly the optimal offset is very small. Personally I use the offset that is good for my highest gain for all my exposures.

 

  ++ Jari


  • psandelle and Peregrinatum like this

#5 Peregrinatum

Peregrinatum

    Ranger 4

  • *****
  • topic starter
  • Posts: 388
  • Joined: 27 Dec 2018

Posted 18 September 2019 - 11:15 AM

what camera?  Chances are someone here uses it and already knows the answer and can tell you

 

QHY163C I searched high and low here on CN and could not find much on this camera.



#6 Peregrinatum

Peregrinatum

    Ranger 4

  • *****
  • topic starter
  • Posts: 388
  • Joined: 27 Dec 2018

Posted 18 September 2019 - 12:40 PM

I'm hoping someone can verify this, but I think what I can do is take bias/darks/flats at different Gains and use the Pixinsight Basic CCD Parameters Script to find the dynamic range value (bottom of pic) for each corresponding gain, make a plot (gain on the x axis, dynamic range on the y axis) and find the optimal gain value for the camera:

 

XYcCENq.gif



#7 vehnae

vehnae

    Explorer 1

  • -----
  • Posts: 92
  • Joined: 17 May 2013
  • Loc: Finland

Posted 18 September 2019 - 02:53 PM

Of course doing the measurements yourself is part of the fun, but have you looked at the official specifications? They have gain/noise/DR/etc graphs.

 

https://www.qhyccd.c...=94&id=15&cut=1

 

  ++ Jari


  • Peregrinatum likes this

#8 Peregrinatum

Peregrinatum

    Ranger 4

  • *****
  • topic starter
  • Posts: 388
  • Joined: 27 Dec 2018

Posted 18 September 2019 - 03:05 PM

Of course doing the measurements yourself is part of the fun, but have you looked at the official specifications? They have gain/noise/DR/etc graphs.

 

https://www.qhyccd.c...=94&id=15&cut=1

 

  ++ Jari

 

I did see that but the data listed is for the QHY163M, not the OSC version of that camera... would the curves be the same for mono and color if the same chip was used?



#9 Peregrinatum

Peregrinatum

    Ranger 4

  • *****
  • topic starter
  • Posts: 388
  • Joined: 27 Dec 2018

Posted 18 September 2019 - 03:18 PM

I just checked out the performance curves for the ASI183MC (osc) and the ASI183MM (mono) which both models use the same chip, and all the curves are identical.

 

Looks like you just saved me some time!



#10 bortle2

bortle2

    Sputnik

  • -----
  • Posts: 25
  • Joined: 18 Sep 2019

Posted 18 September 2019 - 05:06 PM

Here is a very good video on the subject, by Dr. Robin Glover, the author of SharpCap -- "Choosing the right gain for Deep Sky imaging with CMOS cameras":

 

https://www.youtube....h?v=ub1HjvlCJ5Y

 

BTW, the above video is an "addendum" to a more general/broad video on the topic of CMOS imaging, "Deep Sky CMOS Astrophotograhy | PAS 2019", which provides excellent outlook of how the use of CMOS (vs. CCD) sensors changes overall approach to DS imaging:

 

https://www.youtube....h?v=3RH93UvP358


Edited by bortle2, 18 September 2019 - 05:07 PM.

  • Peregrinatum likes this

#11 bortle2

bortle2

    Sputnik

  • -----
  • Posts: 25
  • Joined: 18 Sep 2019

Posted 18 September 2019 - 08:12 PM



Here is a very good video on the subject, by Dr. Robin Glover, the author of SharpCap -- "Choosing the right gain for Deep Sky imaging with CMOS cameras":

 

https://www.youtube....h?v=ub1HjvlCJ5Y

 

BTW, the above video is an "addendum" to a more general/broad video on the topic of CMOS imaging, "Deep Sky CMOS Astrophotograhy | PAS 2019", which provides excellent outlook of how the use of CMOS (vs. CCD) sensors changes overall approach to DS imaging:

 

https://www.youtube....h?v=3RH93UvP358

I should add that second video, while very interesting in itself, is also essential for full understanding the first one.

 

For instance, the first video starts with a formula with hard-coded coefficient of 10 in the equation for the optimal sub exposure length (10*R^2/P). Why "10"? That's a coefficient that Dr. Glover calls "C Factor", which corresponds to the noise tolerance of 5%, as shown in the second video, here: https://www.youtube....93UvP358&t=2940 (C factor is 25 for 2% of allowed noise, etc.; that video has a formula for it).

 

Additionally, there are some very useful resources at SharpCap site that greatly facilitate calculations of the amount of shot noise due to light pollution -- which propagates throughout all calculations (in a nut shell, the recommendation is use the lowest gain that fits your minimum sub exposure length requirement... plus some "nuances", of course, like step reduction etc.), so you should probably handle them first, and then get on with the optimal gain estimate. While videos contain data (tables and charts) for some LP/scope/camera combinations, you can precisely calculate coefficients for your own setup (LP/scope/camera/filter[s]) using the following:

 

http://tools.sharpcap.co.uk



#12 Jon Rista

Jon Rista

    ISS

  • *****
  • Posts: 23721
  • Joined: 10 Jan 2014
  • Loc: Colorado

Posted 18 September 2019 - 09:20 PM

I’m looking for a method to determine the optimal gain setting for a CMOS camera… below is a graph I found somewhere here on CN that shows the dynamic range for various gain settings for the ASI1600MM camera… the graph clearly shows that dynamic range is maximized at a gain of close to 75, thus it's 'optimal gain' setting.

 

I would like to generate a similar graph for a different camera, how can I do this?

 

And, once I determine the optimal gain, how can I determine the optimal offset?

 

GyufoEZ.png

Just curious...where are you getting 85dB of dynamic range? That is over 14 stops... There is no way the ASI1600 has that kind of DR. And for the 8300, 75dB is rather high. 

 

I've done extensive testing, and Gain 76 does indeed give you the optimal DR (anything below that and the ADC will effectively clip it back to 12 stops, even if in analog terms it is higher). But at Gain 76, you have 12 stops of DR. It's an FWC of 8192 over read noise of 2e-, so steps of 4096 which is 72dB, not 85dB. 

 

The 8300 should have around 70dB of dynamic range, give or take a decible or two depending on the exact read noise, which is 11.5-11.7 stops. 



#13 Jon Rista

Jon Rista

    ISS

  • *****
  • Posts: 23721
  • Joined: 10 Jan 2014
  • Loc: Colorado

Posted 18 September 2019 - 09:22 PM

In a nutshell, gain 76 is optimal. It gives you the maximum DR the camera, with its 12-bit ADC, can deliver: 12 stops, or 72dB. This is an FWC of 8192e-. and read noise of 2e-. 

 

For offset, just use 50 ADU. For every gain, use 50 ADU. This is necessary for higher gains, and rather harmless for lower gains like 76. Keeps things simple, and ensures you don't clip any signal to black during ADC due to a too-small offset. 



#14 Shiraz

Shiraz

    Viking 1

  • -----
  • Posts: 605
  • Joined: 15 Oct 2010
  • Loc: South Australia

Posted 18 September 2019 - 10:52 PM

Just curious...where are you getting 85dB of dynamic range? That is over 14 stops... There is no way the ASI1600 has that kind of DR. And for the 8300, 75dB is rather high. 

 

I've done extensive testing, and Gain 76 does indeed give you the optimal DR (anything below that and the ADC will effectively clip it back to 12 stops, even if in analog terms it is higher). But at Gain 76, you have 12 stops of DR. It's an FWC of 8192 over read noise of 2e-, so steps of 4096 which is 72dB, not 85dB. 

 

The 8300 should have around 70dB of dynamic range, give or take a decible or two depending on the exact read noise, which is 11.5-11.7 stops. 

Jon, this graph came from the 1600 sub-exposure thread - https://www.cloudyni...d-maybe-qhy163/

 

The original heading shows that it is the dynamic range after stacking - the DNR after stacking was assessed on a typical run as (Noofsubs x maxwelldepthatgain)/totalnoise

 

 

For the OP, I did post a link to the model that will let you do this sort of stuff, but will update it over the next couple of days and repost - it seems to be of some interest. However, setting the camera at around 75/50 as Jon suggests would be a good place to start

 

cheers Ray

 

edit: just noticed a scaling error in the original graph - doesn't affect the conclusions, but will correct in the original tread.


Edited by Shiraz, 18 September 2019 - 11:48 PM.

  • Peregrinatum likes this

#15 Peregrinatum

Peregrinatum

    Ranger 4

  • *****
  • topic starter
  • Posts: 388
  • Joined: 27 Dec 2018

Posted 18 September 2019 - 11:18 PM

Just curious...where are you getting 85dB of dynamic range? That is over 14 stops... There is no way the ASI1600 has that kind of DR. And for the 8300, 75dB is rather high. 

 

I've done extensive testing, and Gain 76 does indeed give you the optimal DR (anything below that and the ADC will effectively clip it back to 12 stops, even if in analog terms it is higher). But at Gain 76, you have 12 stops of DR. It's an FWC of 8192 over read noise of 2e-, so steps of 4096 which is 72dB, not 85dB. 

 

The 8300 should have around 70dB of dynamic range, give or take a decible or two depending on the exact read noise, which is 11.5-11.7 stops. 

Just so you know, I'm not getting that.  This is info from the CN search I performed.

 

Here's a question for you... the ASI1600MM, ASI1600MC (no longer manufactured), QHY163M, and QHY163C all use the same chip... does that mean that all the performance curves for all 4 are the same [specifically Gain (independent variable) vs. dynamic range (dependent variable)]???


Edited by Peregrinatum, 18 September 2019 - 11:22 PM.


#16 Jon Rista

Jon Rista

    ISS

  • *****
  • Posts: 23721
  • Joined: 10 Jan 2014
  • Loc: Colorado

Posted 19 September 2019 - 12:08 AM

Jon, this graph came from the 1600 sub-exposure thread - https://www.cloudyni...d-maybe-qhy163/

 

The original heading shows that it is the dynamic range after stacking - the DNR after stacking was assessed on a typical run as (Noofsubs x maxwelldepthatgain)/totalnoise

 

 

For the OP, I did post a link to the model that will let you do this sort of stuff, but will update it over the next couple of days and repost - it seems to be of some interest. However, setting the camera at around 75/50 as Jon suggests would be a good place to start

 

cheers Ray

 

edit: just noticed a scaling error in the original graph - doesn't affect the conclusions, but will correct in the original tread.

Thanks for the clarification, Ray.



#17 Jon Rista

Jon Rista

    ISS

  • *****
  • Posts: 23721
  • Joined: 10 Jan 2014
  • Loc: Colorado

Posted 19 September 2019 - 12:10 AM

Just so you know, I'm not getting that.  This is info from the CN search I performed.

 

Here's a question for you... the ASI1600MM, ASI1600MC (no longer manufactured), QHY163M, and QHY163C all use the same chip... does that mean that all the performance curves for all 4 are the same [specifically Gain (independent variable) vs. dynamic range (dependent variable)]???

Roughly speaking, yes, all the cameras that use this sensor deliver similar performance at similar gains. It would take explicit testing to figure out exactly which gain on a QHY163 corresponded with a given gain on an ASI1600, in terms of FWC (which would be the only term that I think is directly comparable between cameras without further qualification), but I wouldn't expect much more than very small differences in read noise and DR for any given FWC across cameras.


  • Peregrinatum likes this

#18 freestar8n

freestar8n

    Vendor - MetaGuide

  • *****
  • Vendors
  • Posts: 8823
  • Joined: 12 Oct 2007

Posted 19 September 2019 - 03:24 AM

I know that people like simple guidelines for what is 'best' in a general way - but simply focusing on max dynamic range as 'best' doesn't apply in general.

 

If you have very faint nebulosity and you want to capture it as well as possible - and you don't care about saturating stars - then you should just use very high gain so read noise is as low as possible.  In that regime, the "dynamic range" is the ratio of the electron count in the brightest patch of nebulosity divided by the read noise.  As long as the nebula itself doesn't saturate, you should use long exposures and high gain so that read noise is as low as possible.

 

Dynamic range in a single subexposure doesn't capture the role of clipping in the image and whether or not it matters.  And it doesn't capture the final dynamic range in a big stack of exposures.  Much of that is determined by what the imager wants to capture in the scene.

 

With ASI1600 I use gain 100 and offset 40 for almost everything - just as an overall compromise that has decent well depth and low read noise.  I then set exposure based on the faintness of the scene content and how important it is not to saturate stars.  None of it is "optimal" per se.  It's a basic trade off of competing factors - and I use subexposure time to balance read noise with saturation.

 

The final result doesn't critically depend on the choices made.  The only 'brick wall' you hit is when a star saturates and you have no color info for it.  But you can always reduce exposure to prevent that - with a given gain setting.

 

Frank


  • psandelle, Der_Pit and bortle2 like this


CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics