Counting Electrons with CaLIGHTs v3.1.6

Starting with CaLIGHTs V3.1.6 it is now possible to select a custom output pedestal value. This creates an interesting opportunity to study your astrophotos at the electron level. You can now determine how many electrons have been collected at any given location in your astrophoto. You can also evaluate how much the CaLIGHTs noise filter can dramatically improve your astrophotos.

One piece of information you need to determine is the system gain of your camera. The system gain tells you how to convert the pixels values into electrons. This can take a lot of digging but some vendors do offer charts for you to use. I am going to use my QHY294C camera but I will first show you my method for calculating the system gain of my Nikon D5300 DSLR.

When the SENSORGEN site was still available I was able to screen capture this graphic. My D5300 is a 14 bit camera and the pixel values in the RAW photos ranged from 600 to 16384. The 600 value is the BLACKADU value for this camera. This means that the lowest value in every RAW photo is always adjusted up or down so that zero light corresponds to a pixel value of 600.

This leaves only 16,384 – 600= 15784 unique values available for collecting electrons. There is a column in this graphic called Saturation (e-). The “e-“ symbol stands for “electrons”. For ISO 1600, the Saturation (e-) value is 2097. This means that when a pixel collects 2097 electrons the corresponding pixel value will be 16,384. The corresponding system gain is 2097 / 15784 = 0.133e-. I tend to use ISO 200 with my D5300 and at ISO 200 the Saturation (e-) value is 16968. The corresponding system gain is 16968/15784 = 1.075e-. A system gain of 1 is called the “unity gain”.

Here is the system gain chart for my QHY294C:

With my QHY294C color camera I select a camera GAIN value which is shown here as the X-axis. I typically choose a GAIN of 1600 and I will be using a photo of the Crescent Nebula taken with my QHY294C at this GAIN. The SYSTEM GAIN(14BIT) value for GAIN=1600 equals 0.872.  The QHY294C is a 14 bit camera so it can only determine 16,384 unique values with its A/D converter.  The means that each increment of these values corresponds to an increase of 0.872 electrons. I will be using the symbol e- to represent the word “electrons”. So the system gain of my camera is 0.872e- at GAIN=1600.

My QHY294C always creates images where the A/D values are multipled by 4 so that the pixel values range from 0 to 65,535. We are going to be playing with pixel values so the system gain of my camera can be expressed as 0.872/4 = 0.218e-. The CaLIGHTs Multiplier value for my QHY294C is normally 1. I am going to select a custom Multiplier value of 0.218. Doing this causes CaLIGHTs to calibrate our LIGHT frames so that the pixel values are scaled in electrons.

The only “fly-in-the-ointment” here is that there is a BIAS in our calibrated LIGHT frames caused by the Output Pedestal. This means we don’t know what value corresponds to zero electrons. Starting with CaLIGHTs V3.1.6 we can choose a custom Output Pedestal value. I am going to choose a custom Output Pedestal value of zero. This means that a pixel value of zero equals zero electrons collected in the pixel well.

I am going to use a master DARK to eliminate the DARK current signal in my LIGHT frame. The DARK current noise remains because…reality sucks! I am also going to use a master BIAS to eliminate the BIAS signal. The READ noise of the camera remains because…reality sucks! I am NOT going to use a master FLAT because it only caters for optical issues like vignetting and dust motes. The camera’s pixels don’t care about these optical issues…they just collect electrons. OK…lets look at some pretty pictures!

Here is one of my Crescent Nebula LIGHT frames. It’s a 600 second exposure at GAIN=1600 using an OPTOLONG L-eNhance narrowband filter. I selected a small dark square of pixels at the bottom left of the image where I had CaLIGHTs calculate some statistics. I consider the statistics at this location to represent the sky background. The SNR values are calculated using a method that is unique to CaLIGHTs. The average pixel values are R:114 G:133 B:107.

Here is the same image but now I have changed the Multiplier and Output Pedestal so that the pixel values are now equal to the number of electrons captured in their pixel wells.

Now the average pixel values are R:15 G:19 B:14. There were only 15 electrons captured, on average, in the red pixels in this area. This also means that, at this location, the red pixels were collecting electrons at an average rate of 600/15 = 40 seconds per electron! It demonstrates why narrowband images requires very long exposures.

The SD value for the red pixels is 4.26. This means that the noise at this location for the red pixels is 4.26e-. We know that the average number of electrons in the red pixels is 15.27e-. The theoretical shot noise given this average number of electrons is sqrt(15.27) = 3.91e-. The read noise for the QHY294C at GAIN=1600 is 1.63e-. We can add shot noise and read noise together to see how close that total noise estimate compares to the SD value of 4.26e-. In order to add together different noise sources we need to create a sum of squares and then take the square root. So here goes…

Total Noise = SquareRoot ( 3.91 x 3.91 + 1.63 x 1.63 ) = SquareRoot ( 17.945) = 4.24e-

Wow!… The SD value is 4.26e-. These values are incredibly close. Just for completeness I calculated how much more noise would need to be accounted for to equal the 4.26e-. That value turned out to be 0.41e- which is not very much but it could be explained as DARK current noise, amplifier noise, quantization noise etc.

There is a guideline for astrophotography where you want to “swamp the read noise”. You want the sky background to be at least 3 times the read noise and ideally you want the sky background to be 10 times the read noise. In this case we are 4.26/1.63 = 2.61 times the read noise so I should consider exposing for more than 600 seconds. With longer exposures, star saturation is always a concern and there are stars that are saturated in this image so I’m caught between a rock and a hard place.

The star located roughly at the center of the Crescent Nebula is saturated. I moved the statistic to this bright star and it reported that the red pixels had a maximum value of 14,283e-.

Here is the Fullwell vs GAIN graph provided on the QHYCCD website. The value for the Fullwell at GAIN=1600 is 14,309e- which is virtually identical to the 14,283e- value I calculated using CaLIGHTs. I think that’s pretty cool how the values relate so well.

How does the CaLIGHTs noise filter fit into this discussion?

CaLIGHTs has a thresholded noise filter which is purpose built to attack the noise in the sky background of our astrophotos, but now we can express the improvement in terms of electrons.

To Recap…the statistics for the red pixels, in electrons, looked like this…

N=1024  dX x dY = 32 x 32

Range(X,Y)=(754,1706) to (786,1738)

RED       SNR=0.42  SD=4.25866e-

Min=   6e- Avg=15.2734e- Max=  29e-

Here I have reprocessed the image and used one iteration of the noise filter using a threshold of zero. A value of zero corresponds to the sky background. The SNR value has increased from 0.42 to 1.99 and the SD value has dropped from 4.26e- to 2.47e-. When I select 6 iterations of the noise filter, the SNR value climbs to 3.73 and the SD value drops to 1.65e-. This noise reduction has a cumulative effect as all of your calibrated LIGHT frames are stacked resulting in astrophotos that can tolerate much more stretching before the sky background displays noise.

Peter

Leave a Comment