Measuring the gain of your imaging system

The images obtained from a 2-photon laser scanning microscope, or a CCD-based system, consist of an array of pixel values. For 8-bit images, each pixel value ranges from 0-255; for 16-bit images, the pixel values range from 0-65535. What do these numbers mean? Ideally, they’re linearly related to the number of photons detected for each pixel: pixel value = number of photons detected * g. The letter g stands for gain. It’s good to know this parameter. If the gain is less than 1, say 0.25, then 4 photons must be detected for an increase in pixel value of 1. If the gain is more than one, say 3, then each photon detected increases the pixel value by a magnitude of 3. As you can see, it’s good to have a gain higher than 1, so that each photon detected results in an increase in the pixel value; but gains above 1 are not typically necessary.

To measure the gain of an imaging system, we take advantage of the Poisson statistics of photon counting. Specifically, in a Poisson process like photon counting, which is effectively what all PMTs and CCDs do, the variance is equal to the mean.

Here is a general protocol that will work for PMT-based laser scanning microscopes (e.g., 2-photon LSM), and also CCD-based imaging systems (though there, the gain may be less than 1 and influenced by the electronics within the chip):

Step 1

Take a picture of some homogeneous object, a piece of fluorescent plastic works great (these slides from Ted Pella are a handy tool, but really any reasonably homogeneous source will work). Be sure to zoom in until there are no spatial inhomogeneities. If you need to, crop the image to the most homogeneous portion. Calculate the mean and standard deviation of the pixel values in that region. The gain of the system is (roughly) equal to the square of the standard deviation (aka the variance) divided by the mean. This is based on the fact that for a Poisson process, the variance is equal to the mean.

Here’s a brief derivation:

where g is the gain (in units of pixel values per photon), v is the pixel value, n is the number of photons, and m represents the mean of the subscripted variable. Similarly, for the standard deviation:

And the variance:

For a Poisson process, the variance is equal to the mean, so:

Rearrange the earlier equations to give:

Substituting these two equations into the third one up from here and solving for g yields:

Step 2 (optional)

For a better gain measurement, turn the illumination intensity (e.g., laser power) up and down and repeat step 1 each time. Then plot the variance versus the mean and fit a linear regression. The slope is equal to the gain. In the plot above, we see how the voltage on the PMT affects the gain. The gain increases from 1.5 pixel values per photon at 0.5 volts, to 4.8 pixel values per photon at 0.6 volts.

Photons per pixel

Once you’ve computed the gain, you can compute the number of photons per pixel, on average. This is simply the mean pixel value divided by the gain. Of course, you can cut straight to the chase, skipping the gain calculation, by computing the square of the ratio of the mean pixel value to the standard deviation (start with the last three equations above if you want to derive it for yourself).

Final notes

The gain parameter we just computed is not a measure of sensitivity, it is a measure of how our digitally recorded signal relates to the actual photons detected. To measure sensitivity, we need to use a calibrated photon source and then measure the output based on the known source. For example, for PMTs we would calculate this as the PMT current per unit of incident light (amperes per watt). This can in turn be converted to quantum efficiency. See section 4.1.3 of Hamamatsu’s PMT Handbook for more details.

Tags: