How can I test my camera's dynamic range in binning mode?

Anything that doesn't fit into any of the other forums
Post Reply
DMD
Posts: 3
Joined: Sat Feb 18, 2023 10:34 pm

How can I test my camera's dynamic range in binning mode?

#1

Post by DMD »

Does binning the ASI6200 2x2 affect the 16 bit dynamic range? I wish to bin 2x2 so that the camera sends smaller files, 30MB instead of 120MB. Will this cause a loss of dynamic range? My understanding is that with 2x2 binning the camera averages four pixels. If these are 16 bit averages I believe that would require 18 bits to do the sum and division. If that's the case, how does the camera send out 16 bit binned pixel data without losing resolution and dynamic range? What is the dynamic range of the binned pixel data leaving the camera? Is there a way to test the camera's dynamic range in binning mode with Sharpcap? Thanks
User avatar
admin
Site Admin
Posts: 17517
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: How can I test my camera's dynamic range in binning mode?

#2

Post by admin »

Hi,

you can do it with some basic maths based on the 1x1 binning values...

You are correct that averaging 4 16 bit values effectively throws away 2 bits of information (which would be the fractional part of the average). However, that's not always a big problem, since the data in those bits is usually going to be largely noise. For instance, consider minimum gain on the ASI6200, read noise is about 3.5e, e/ADU is about 0.8, so the read noise in ADU is about 4.4. This gives you a dynamic range of 65535 / 4.4 (ie max pixel value divided by the smallest possible noise value), or about 14900.

Now if you think about 2x2 binning that is using averaging - that still has a maximum pixel value of 65535, but the averaging of four pixels reduces the noise by a factor of 2 (square root of the number of pixels being averaged), so the noise is now effectively 2.2 ADU, giving a doubling of dynamic range for a single frame.

Note that binning that adds the pixel values will not give an increase in dynamic range in this situation, in fact quite the reverse... The noise on 4 added pixels is 8.8 ADU and the maximum value is still 65535...

cheers,

Robin
DMD
Posts: 3
Joined: Sat Feb 18, 2023 10:34 pm

Re: How can I test my camera's dynamic range in binning mode?

#3

Post by DMD »

Robin, thanks for your clear response, that helps.

A follow-up question if you please:

So I assume after 2x2 binning in the camera, I'm still left with 16 bit resolution because the averaging was done with 18 bits and then the last two 2 bits (containing the fractional part) are discarded before the data is sent out in 16 bit format.

Now I'm wondering just how much is lost by discarding the fractional information. With 2x2 binning, up to just less than 1 ADU could be in the fractional part and discarded. That's 0.8e at gain zero for the ASI6200. So how much is that 0.8e worth SNR-wise? Would that be equivalent to raising the effective 2.2 ADU read noise floor by 0.8e? This 0.8e of course is a maximum, whereas it would probably on average be half of that, so more like 0.4e? Or am I way off base here?

-Dave
User avatar
admin
Site Admin
Posts: 17517
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: How can I test my camera's dynamic range in binning mode?

#4

Post by admin »

Hi Dave,

assuming the averaging rounds properly to the nearest integer (rather than always rounding down), then the error introduced can be

0 unbinned ADU (if the sum of the 4 pixels is a multiple of 4)
1 unbinned ADU (2 chances - either a multiple of 4 plus 1 or minus 1)
2 unbinned ADU (if the sum is 2 off a multiple of 4)

So, that truncation error averages to 1 unbinned ADU, or about 0.8e. This is also 0.25 'binned' ADU.

Now we already have the read noise, which at minimum gain is about 2.2 binned ADU. Adding uncorrelated noise sources needs to be done in 'quadrature' - that means you square the values, add the squares and then take the square root of the sum. This accounts for the fact that sometimes the two noises will be opposite to each other and cancel partly.

So, we can calculate a total noise of 2.21e - this is typical when one noise level is significantly lower than the other... the lower noise has very little effect on the total.

Effectively, in this situation the truncation is not making any difference to the data - looking at it another way, all the information in the lowest two bits that are being thrown away is noise due to read noise from the camera.

cheers,

Robin
DMD
Posts: 3
Joined: Sat Feb 18, 2023 10:34 pm

Re: How can I test my camera's dynamic range in binning mode?

#5

Post by DMD »

Thanks Robin.

Just an FYI, my testing comparing binned and unbinned image statistics in Pixinsight indicates that ZWO always rounds down the fractional average. Probably easiest for them to just discard the 2 18bit LSBs. This makes the error a bit worse but still insignificant. One of the ZWO techs also confirmed the rounding method.

regards,

Dave
User avatar
admin
Site Admin
Posts: 17517
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: How can I test my camera's dynamic range in binning mode?

#6

Post by admin »

Hi Dave,

yes, that makes sense as it is the simplest way to do it and therefore the fastest (no need to worry about fractions). Of course you could get the same result with just one more operation - add a constant (1 for 2x2 binning) before dividing and discarding the fractional part.

cheers,

Robin
Post Reply