Binning
The camera driver and user’s applications offer wide variety of binning modes up to 4 × 4 pixels as well as all combinations of asymmetrical binning modes 1 × 2, 1 × 3, 1 × 4, 2 × 4 etc. To allow such flexibility, binning is performed only in the camera driver (software binning) and does not rely on the limited capabilities of the hardware binning.
The negative side of software binning is the same download time like in the case of full-resolution 1 × 1 mode. For typical astronomy usage, the small fraction of second download time is irrelevant, but for applications sensitive to download time, the hardware 2 × 2 binning can be useful.
Hardware binning
The C5 camera implements 2 × 2 binning mode in hardware in addition to normal 1 × 1 binning. This mode can be turned on and off using the HWBinning parameter in the 'cXusb.ini' configuration file, located in the same directory like the 'cXusb.dll' driver DLL file itself.
[driver] HWBinning = true
When the HWBinning parameter is set to true, the in-camera hardware binning is used and software binning is no longer available. This mode brings faster download time, but also introduces several restrictions:
- Maximal binning is limited to 2 × 2, higher binning modes are not available.
- Asymmetrical binning modes (1 × 2, 2 × 1, ...) are not allowed.
Remark:
Despite the number of pixels in the 2 × 2 binned image is 1/4 of the full resolution image, the download time is not four-times lower. |
Adding vs. averaging pixels
The traditional meaning of pixel binning implies adding of binned pixels. This originated in CCD sensors, where pixel charges were literally poured together within the sensor horizontal register and/or the output node.
For CMOS sensors with full 16-bit dynamic resolution, the negative side of binning is limiting of the sensor dynamic range, as for instance only 1/4 of maximum charge in each of the 2 × 2 binned pixels leads to saturation of resulting pixel. CCDs eliminated this effect to some extend by increasing of the charge capacity of the output node and also by decreasing of the conversion factor in binned modes. But such possibilities are not available in CMOS detectors.#
Remark: CMOS sensors with less than 16-bit precision often just add binned pixels to fulfil the available resolution of 16-bit pixels. For instance, camera with 12-bit dynamic range can sum up to 4 × 4 pixels and still the resulting binned pixels will not overflow the 16-bit range. |
In theory, the resulting S/N ratio of binned pixel remains the same regardless if we add or average them. Let's take for example 2 × 2 binning:
- If we add 4 pixels, signal increases 4-times and noise increases 2-times — three additive operations increase noise by √((√2)^2×(√2)^2 ). Resulting S/N increases 2-times, but only until the sum of all pixels is lower than the pixel capacity.
- If we average 4 pixels, signal remains the same but the noise is lowered to 1/2 as noise is averaged √((√2)^2×(√2)^2 )/4. Resulting S/N also increases 2-times, but only until the noise decreases to lowest possible 1-bit of dynamic range.
As the C5 camera read noise in the maximum dynamic range (gain 0) is around 3.5 ADU, halving it in 2 × 2 binning mode still keeps the read noise above the lower 1-bit limit and at the same time binned pixel will not saturate. For higher binning modes, the noise approaches lower limit, but averaging pixels still protects from pixel saturation, which is more important than possible S/N limitation caused by underflow of read noise.
If we take into account that the image background noise is only rarely defined by the read noise of the sensor, as the noise caused by background sky glow is typically much higher, for 16-bit camera averaging pixels is definitely the better way to bin pixels compared to just adding them. This is why both software and hardware binning modes in the C5 cameras are by default implemented as averaging of pixels, not summing.
However, both software and hardware binning modes can be switched to sum binned pixels instead of average them by the BinningSum parameter in the 'cXusb.ini' configuration file:
[driver] BinningSum = true
Hint: Let’s note there is one more possibility to bin pixels — in the application software. This time binning is not performed in camera hardware nor in the camera driver. Full resolution 1 × 1 image is downloaded from the camera and software itself then performs binning. The SIPS software adds pixels instead of averaging them, but at the same time SIPS converts images from 16-bit to 32-bit dynamic range. This means S/N of the binned images always increases, pixels never saturate and read noise newer approaches lower limit. The negative side of this option is two-time bigger images. |
Binning in photometry
Saturated pixels within bright stars are no issue for aesthetic astro-photography, but photometry measurement is invalid if any pixel within the measured object reaches maximum value, because it is not possible to determine the amount of lost flux. Software performing photometry (e.g. the SIPS Photometry tool) should detect saturation value and invalidate entire photometric point not to introduce errors.
But binning efficiently obliterates the fact that any of the binned pixels saturated (with the exception of all binned pixels reached saturation value). So, using of binning modes for research applications (photometry and astrometry) can lead to errors caused by lost flux in saturated pixels, which cannot be detected by the processing software due to binning.
This is why the behavior of both software and hardware binning modes is user-configurable through the BinningSaturate parameter in the 'cXusb.ini' configuration file:
[driver] BinningSaturate = true
If the BinningSaturate parameter is set to true, resulting binned pixel is set to saturation value if any of the source pixels is saturated. For aesthetic astro-photography, keeping this parameter false could result into slightly better representation of bright star images, but for research applications, this parameter should always be set to true.