Camera characterization - Measuring the electron conversion factor, read-noise and offset using Photon Transfer Curves
–Nico 12:23, 30 September 2011 (PDT)
Based on a handout for the Bangalore Microscopy Course, 2011
Introduction
Figuring out which camera is best suited for your applications can be a daunting task. Luckily, most aspects of a camera can be described in straight forward physical terms and all scientific grade cameras should be delivered with a spec sheet detailing most aspects of the camera. However, it is also possible to determine some of these physical parameters yourself.
Parameters that strongly influence how well a camera performs under low light conditions are the readout noise and photon conversion factor. The readout noise is a constant amount of noise, mainly added by the CCD chip, readout amplifier and surrounding electronics. The faster the camera readout, the higher the readout noise. It is expressed in photo-electrons. The photon conversion factor relates the digital numbers associated with each pixel with the actual number of photo-electrons generated in each CCD (or CMOS) well. The photon-conversion factor changes when you change certain camera settings, such as the analogue and EM gain.
Below are methods to determine the camera’s readout noise and offset, approximate the electron conversion factor at different gain settings and fixed pattern noise. Please compare the numbers you find with the numbers on the data-sheet of the camera!
For these measurements, you will make extensive use of the Micro-Manager scripting facilities. Please have a look at the Script Panel GUI (you will find it under the “Tools” menu)
Constant/Even Illumination
To measure fixed pattern noise and the photon conversion factor, it is important to provide constant, even illumination. This is difficult to accomplish. One of the simplest ways is to use a smart phone with high resolution screen and display a white image (the flashlight application on the iPhone 4 works very well, other phones may work as well).
Measuring Camera Characteristics
Visual inspection of fixed pattern noise in dark images
- Make sure no light reaches the camera (cap it, or direct the light path to another microscope port).
- In Micro-Manager, acquire a sequence of images by accessing the Multi-D Acquisition. Set the exposure time of the camera to 0 ms (or the minimum allowed by the camera), uncheck everything in the MDA window except for “Time points”, set the number of time points to 100 and the interval to 0 and press ‘Acquire”.
- Inspect the resulting data for irregularities. Does the average intensity stay constant (press control-A, in the ImageJ menu select “Analyze”->”Tools”->”ROI manager”, in the ROI manager press “Add”, then select “More” -> “Multi Measure”, make sure “Measure all Slices” and “One row per slice” are checked and press OK) ?
- Calculate the sum using the ImageJ menu command ‘Image -> Stacks -> Z project…’. Choose the option ‘Sum of Slices’
- Inspect the resulting summed image for fixed patterns (look at the side, look for regular patterns).
- Repeat steps above using other readout speeds (if available on your camera).
Visual inspection for fixed pattern noise in bright images
- Use a smartphone as illumination source (see introduction). Remove an objective from the microscope and place the phone on the microscope (it may even fit in the sample holder on the stage). Place it such that the image is as evenly illuminated as possible. Find an exposure time such that the maximum pixel value is about 90% of the highest value of the camera (you can use the Micro-Manager AutoExposure script for this purpose).
- Repeat steps 1b-1f. You will note many imperfections in the output image. Some imperfections are caused by uneven illumination and dust in the microscope of on the camera front window, the remainder is caused by fixed pattern noise in the camera. You can discriminate imperfections in your microscope from camera imperfections by rotating the camera 90 degrees and taking another data set. Patterns that stay the same are caused by the camera, patterns that rotate 90 degrees are caused by your microscope.
Measure Offset and readout noise in digital numbers
Even when no light reaches the camera, there are variations in the measured pixel values caused by readout noise. Thus, if the average pixel value were to be zero, many pixels would have negative values. Negative values have no physical meaning and are hard to work with in a computer, therefore the camera manufacturers introduce an ‘offset’ (or, if they don’t, they should!) that sometimes can be changed by the end user. However, since you want to relate the digital numbers coming from your camera to a physical entity (the number of photons hitting a pixel), you will need to know what this offset is. Since the variation in pixel intensities of a ‘dark’ image is caused by readout noise, you can simply calculate the readout noise by calculating the standard deviation of the pixel intensity values in such a dark image.
- To measure the offset, take a single ‘dark’ image from the series described in 1 (or take a new one). Calculate the average intensity of the image or - if the camera has substantial fixed pattern noise - a subregion of the image (use the ImageJ command: Analyze->Measure). Make a note of the mean (which is the offset value expressed in digital numbers - DN).
- To measure the readout noise in digital numbers, take two ‘dark’ images (you can use ‘Snap’, then ImageJ menu, ‘Image’->’Duplicate’, then ‘Snap’ the second image). Subtract one image form the other (ImageJ menu: Process -> Image Calculator…, select the two images and subtract from each other). Open in a new window and use 32-bit (float) result. Calculate the standard deviation of the resulting image or a subregion if there are regions with detectable fixed pattern noise (ImageJ menu: Analyze->Set Measurements.. make sure that ‘standard deviation’ is checked, then select Analyze->Measure). The read-noise (in digital numbers) is the measured standard deviation divided by √2. The purpose of subtracting the two images is to remove fixed pattern noise. Make a note of the read-noise.
Estimate the electron conversion factor (electrons per digital number).
Theory: If a signal only contains Poisson (shot) noise, then: σ(N)=√(N) with N = number of electrons. A camera generates images expressed in digital numbers (DN) instead of electrons. The relation between digital numbers and electrons is given by: N=c . DN Where c is the constant that we are interested in (the electron conversion factor). The following equation also holds true: σ(N)=c . σ(DN) Substituting the last two equations in the first and solving for ‘c’ yields: c = DN/σ2(DN) Thus, if imaging conditions can be established in which the only significant noise source is shot noise, then the relation between digital number and number of electrons can be determined without a need to know the absolute number of electrons striking the CCD!
To relate the signal and noise, one illuminates the camera with constant, even illumination, and then record images at varying intensities by changing the exposure time of the camera. From these images one calculates the (average) intensity and standard deviation (noise). Plotting noise against signal generates the Photon Transfer Curve.
The three main sources of noise are read-noise, shot noise, and fixed pattern noise. Read noise is a constant, shot noise scales with the square root of the signal, and fixed pattern noise scales with the signal. On a log-log plot, read noise will cause a slope of 0, shot noise causes a slope of 0.5, and fixed pattern noise causes a slope of
- To find the area on the Photon Transfer Curve where shot noise is dominant, one needs to find the area where the slope is close to 0.5.

Photon Transfer Curve from: James R. Janesick, Photon Transfer, DN -> λ. SPIE Press, 2007
To facilitate measuring the photon conversion factor, we will remove fixed pattern noise by taking two images at each exposure time and calculate the noise after subtracting one image from the other.
- To create a Photon Transfer Curve we will take a series of images, using the Micro-Manager script ‘CameraLabs.bsh’. This script takes images at increasing exposure times (two images at each exposure time). We will then use the Micro-Manager script CameraAnalysis.bsh to calculate the mean and standard deviation for each of these images. The script will calculate the mean intensity from one image and calculate the standard deviation by subtracting one of the two images from the other to remove fixed pattern noise. The collected data will be plotted on a log-log scale, yielding the Photon Transfer Curve.
- In Micro-Manager, open the Script Panel (Tools->Script Panel).
Press the ‘Add’ button in the upper left corner and locate the file
‘CameraLabs.bsh’ in
C:\Program Files\Micro-Manager-2.0\scripts\CameraLabs
. Likewise, “add” the scripts: “plotData.bsh”, “CameraAnalysis.bsh”, and “FPN.bsh”. Run the script “plotData.bsh” (you will see no output, it simply loads the plotting code, you need to run this only once).- Use a smartphone display for even illumination as described above. Determine the maximum exposure time at which the image has not yet saturated pixels. Select the “CameraLabs” script and enter the measured time as the ‘finalExposure’ variable in the script. Set ‘nrExposures’ to 50. Run the script. Inspect the resulting data. Pixels values will initially be dim and finally should be close to saturation.
- (Optional). To get accurate measurements one should correct for the offset (measured above). To do so, select the just acquired data set, from the ImageJ menu, choose “Image”->”Duplicate”, and duplicate the whole stack. From the ImageJ menu choose “Process”->”Math”->”Subtract” and enter the offset you measured previously. Process all slices.
- While this data window is selected, run the script “CameraAnalysis.bsh”. The script will generate the “Photon Transfer Curve”. Inspect the Photon Transfer Curve (you can zoom in by drawing a box in a region of the plot, zoom out by right clicking the mouse). Note the region at low intensities where the slope of the curve is close to 0 (read-noise limited). Find the area of the curve where the slope is 0.5. To help you do so, the script outputs the slope at each data point in a table. The Photon Conversion Factor is calculated for you in the same table by dividing the signal by the square of the noise.
- If your Photon Transfer Curve did not bulge downwards at high intensities, increase the maximum exposure time by ~5% and repeat the procedure. The intensity at which the Photon Transfer Curve peaks is the full-well capacity.
- Determine the most appropriate Photon Conversion Factor. Express the readout-noise in terms of electrons. Express the full-well capacity in terms of electrons. Compare your measurements with the data sheet for the camera.
- Repeat these measurements at other settings of the camera. Changes in the analog gain and readout speed will affect these numbers. You can also look at the effect of EM gain and binning.
References
For the complete theory behind photon transfer curves, consult the following reference: James R. Janesick, Photon Transfer, DN -> λ. SPIE Press, 2007.