# Technical Note: Camera Test Protocol

Author: Dan Croucher, Applications Team Manager, Teledyne Photometrics

### Introduction

The detector is one of the most important components of any microscope system. Accurate detector readings are vital for collecting reliable biological data to process for publication.

To ensure your camera is performing as well as it should be, Teledyne Photometrics designed a range of tests that can be performed on any microscope. The results of these tests will give you quantifiable information about the state of your current camera as well as providing a method to compare cameras, which may be valuable if you’re in the process of making a decision for a new purchase.

This document will first take you through how to convert measured signal into the actual number of detected electrons and then use these electron numbers to perform the tests. The tests in this document make use of ImageJ and Micro-Manager software as both are powerful and available free of charge.

## Working With Photoelectrons

### Measuring Photoelectrons

#### Background

A fluorescence signal is detected when photons incident on the detector are converted into electrons. It’s this electron signal that’s converted by the analog-to-digital converter (ADC) in the camera to the Grey Levels (ADUs) reported by the computer.

Although grey levels are proportional to signal intensity, not every camera converts electrons to the same number of grey levels which makes grey levels impractical for quantifying signal for publication.

Instead, signal should be quantified in photoelectrons as these are real world values for intensity measurement that allow for consistent signal representation across all cameras. This signal can then be compared against noise to assess the quality of images by signal to noise.

#### Method

To convert signal in grey levels to signal in electrons:

1. Load an image into ImageJ, pick a fluorescent spot and draw a line across it
2. Select Plot Profile from the Analyse menu to get a peak representing the signal across the line in Grey Levels. Find the value at the top of the peak.
3. Subtract the camera bias from this Grey Level signal
4. Multiply the result by the camera system gain

The full equation is:

Signal in Electrons = (Signal in Grey Levels - Bias) * Gain

The camera bias and camera system gain can be found on the Certificate of Performance (COP) or other information provided with the camera or they can be calculated by tests explained below.

As an example, the data in the image above was taken with the Prime 95B™ which has a bias of ~100 and a gain of ~1.18. By inserting these values into the equation, we get the following result:

Signal in Electrons= (1791 - 100)*1.18
Signal = 1995 e-

### Measuring Camera Bias

#### Background

When visualizing a fluorescence image, we would expect the intensity value of a pixel to correspond only to the intensity of fluorescence in the sample. However, every camera has a background offset that gives every pixel a non-zero value even in the absence of light. We call this the camera bias.

The bias value is necessary to counteract fluctuating read noise values which might otherwise go below zero. The value of the bias therefore should be above zero and equal across all pixels. The bias value doesn’t contain any detected signal so it’s important to subtract it from an image before attempting to calculate the signal in photoelectrons.

#### Method

To calculate the camera bias:

1. Set your camera to a zero millisecond exposure time
2. Prevent any light entering the camera by closing the camera aperture or attaching a lens cap
3. Take 100 frames with these settings
4. Calculate the mean of every frame by selecting Stacks from the Image menu and then clicking on Plot Z-axis profile. This should give you the mean values of every frame in the Results window
5. Calculate the mean of the 100 frame means by selecting Summarize in the Results menu

The bias is the mean of a single frame so by plotting the mean values of all 100 frames we calculate a more accurate bias.

### Calibrating Your Camera for Photoelectron Measurement

#### Background

When the amount of light entering a camera is linearly increased, the response of the camera in grey levels should also linearly increase.

The gain represents the quantization process as light incident on the detector is processed and quantified. It varies from camera to camera depending on electronics and individual properties but it can be calculated experimentally. If a number of measurements are made and plotted against each other the slope of the line should represent the linearity of the gain.

#### Method

Camera system gain is calculated by a single point mean variance test which calculates the linear relationship between the light entering the camera and the cameras response to it. To perform this test:

1. Take a 100-frame bias stack with your camera like in the previous section and calculate the mean bias
2. Take 2 frames of any image using the same light level with a 5ms exposure time
3. In ImageJ, Measure the means of both images and average them. We’ll call this MeanImage1, Image2
4. Calculate the difference between the two images by selecting Image Calculator from the Analyze menu. Select the two frames and Subtract, you will need to float the result. Press OK to generate the diff image.
5. Measure the Standard Deviation of the diff image, we’ll call this Standard deviationDiff image.
6. Calculate the variance of the two images with the following equation:

$$\mathsf {Variance_{\,Image \, 1,Image \, 2}} = \mathsf {{Standard \, deviation _{Diff \, image}}^2 \over 2}$$

7. Calculate the gain from the variance using the following equation, remember to remove the previously calculated bias:

$$\mathsf {Gain} = {\mathsf {(Mean_{\,Image\,1,Image\,2}) - bias} \over \mathsf {Variance_{\,Image\,1,Image\,2}}}$$

Gain is represented as e–/grey level.

8. Repeat this process with 10ms, 20ms and 40ms exposure times to check that the gain is consistent across varying light levels.
9. You can also use the single-point mean variance (gain) calculator provided by Teledyne Photometrics.

### Calculating Signal to Noise Ratio (SNR)

#### Background

The signal to noise ratio describes the relationship between measured signal and the uncertainty of that signal on a per-pixel basis. It is essentially the ratio of the measured signal to the overall measured noise on a pixel. Most microscopy applications look to maximise signal and minimize noise.

All cameras generate electron noise with the main sources being read noise, photon shot noise and dark current. These noise values are displayed on the camera data sheet and are always displayed in electrons. This means that the most accurate way to calculate the signal to noise ratio is by comparing signal in electrons to noise in electrons.

#### Method

The signal to noise ratio can be calculated using the following equation:

$$\mathsf {SNR} = {\mathsf {S} \over \mathsf {\sqrt {S + [Nd * t] + Nr^2}} }$$

Where:

S = Signal in electrons.

The best way to calculate an electron signal for use in the equation is to use a line profile across an area of high fluorescence as described at the beginning of this document.

Nd = Dark current in electrons/pixel/second
Nr = Read noise in electrons
t = Exposure time in seconds

You can also use the signal to noise calculator provided by Teledyne Photometrics.

### Calculating Signal to Noise Ratio (SNR) of an EMCCD Camera

#### Background

EMCCD cameras are designed for very low light applications and function in the same way as a CCD but have additional electronics to multiply the captured electrons. This process occurs after the electron signal has been captured but before it’s been read out.

The multiplication process means that the camera read noise is effectively reduced to less than 1 electron, allowing the detection of very low signal. However, this is not free in terms of signal to noise. The multiplication process is not a definitive event – there is a probability associated with gaining extra electrons and this uncertainty adds an extra noise source to the SNR calculation, Excess Noise Factor. Excess noise factor has a value of √2 and effectively cuts the sensors quantum efficiency in half. When calculating the SNR of an EMCCD camera, this must be added to the equation.

#### Method

The signal to noise ratio can be calculated using the following equation:

$$\mathsf {EMCCD\,SNR} = { \mathsf {S} \over \mathsf {\sqrt { [S * F^2] + [Nd * t^2 * F^2] + [ {Nr \over E} ]^2}} }$$

Where:

S = Signal in electrons
Nd = Dark current in electrons/pixel/second
Nr = Read noise in electrons
t = Exposure time in seconds
F = Excess noise factor
E = EM gain

To get accurate electron counts from EMCCD data we recommend you use the QuantView™ function of the Teledyne Photometrics Evolve® Delta. QuantView converts Grey Level intensities into the number of electrons measured at the sensor so there are no calculations necessary to convert Grey Levels into electrons. To activate QuantView:

1. In Micro-Manager, open the Device Property Browser
2. Scroll down to QuantView and change it from off to on

Alternatively, locate the gain value of the camera on the Certificate of Performance (CoP) or other information provided with the camera and perform the calculation given at the beginning of this document to convert Grey Levels to electrons.

## Testing Camera Quality

### Evaluating Bias Quality

#### Background

There are two important things to look for in a bias, the stability and the fixed pattern noise.

The stability is simply a factor of how much the bias deviates from its set value over time. A bias that fluctuates by a large amount will not give reliable intensity values.

Fixed pattern noise is typically visible in the background with longer exposure times and it occurs when particular pixels give brighter intensities above the background noise. Because it’s always the same pixels, it results in a noticeable pattern seen in the background. This can affect the accurate reporting of pixel intensities but also the aesthetic quality of the image for publication.

#### Method

To evaluate the bias stability:

1. Plot the mean values of all 100 bias frames taken in the previous section
2. Fit a straight line and observe the linearity

Our goal at Teledyne Photometrics is to product a stable bias that doesn’t deviate by more than one electron, which is shown here using the Prime 95B™ Scientific CMOS data:

To evaluate fixed pattern noise:

1. Mount a bright sample on the microscope and illuminate it with a high light level
2. Set the exposure time to 100 ms
3. Snap an image
4. Repeat this experiment with longer exposure times if necessary

A ‘clean’ bias such as that demonstrated at right on the Prime 95B will give more accurate intensity data and produce higher quality images.

BAE sCMOS

Prime 95B

### Evaluating Gain Quality

#### Background

Gain linearity is very important as the gain directly influences how the electron signal is converted into the digital signal read by the computer. Any deviation from a straight line represents inaccurate digitization.

#### Method

To evaluate the gain linearity:

1. Plot the MeanImage1 – Image2 against the VarianceImage1 – Image2 data collected in the ‘Calibrating your camera for photoelectron measurement’ section
2. Fit a straight line and observe the linearity

Teledyne Photometrics recommends that any deviation from the line be no more than 1%, as shown using the CoolSNAP™ DYNO data:

### Evaluating EM Gain Quality

#### Background

All EMCCD cameras suffer from EM gain fall-off over time. This means that the EM gain multiplication of any EMCCD camera will be reduced with usage. Most modern EMCCD cameras have ways to recalibrate the EM gain multiplication so there will not be any noticeable change but eventually there will come a point when no more can be done.

This becomes a problem when, for example, 300x EM gain was used to overcome read noise but due to EM gain fall-off the camera can no longer reach this gain level. At this point the camera has lost its EM gain functionality and the only option is to buy a new camera.

#### Method

To test the EM gain multiplication of your camera:

1. Take a 100-frame bias stack with your EMCCD camera and calculate the mean bias
2. Take a long exposure (~1s) image of a dim sample without EM gain
3. Without changing anything about the sample, take a short exposure (~10ms) with EM gain

Note - It’s necessary to lower the exposure time for point 3. to avoid saturating the pixels when using EM gain. We’ll correct for time in point 4.

4. Subtract the bias value from both images and divide both by their respective exposure time in milliseconds to equalize them
5. The factor difference in signal per time unit should be the EM gain multiplication factor

If you’re worried about EM gain fall-off, you can reduce its impact by following these guidelines:

1. Only use the EM gain necessary to overcome read noise. An EM gain of 4 or 5 times the root-mean-square (rms) read noise should be enough. It should almost never be necessary to go above an EM gain of 300 to achieve this.
2. If EM gain isn’t necessary for your work, don’t use it. Most EMCCD cameras have non-EM ports to read out the signal without using the EM register
3. Avoid over-saturating the EMCCD detector

#### Background

Read noise is present in all cameras and will negatively contribute to the signal to noise ratio. It’s caused by the conversion of electrons into the digital value necessary for interpreting the image on a computer. This process is inherently noisy but can be mitigated by the quality of the camera electronics. A good quality camera will add considerably less noise.

Read noise will be stated on the camera data sheet, certificate of performance or other information provided with the camera. It can also be calculated as explained below.

#### Method

Read noise can be calculated with the following method:

1. Take two bias images with your camera
2. In ImageJ, calculate the difference between the two images by selecting Image Calculator from the Analyze menu. Select the two frames and Difference, you will need to float the result. Press OK to generate the diff image.
3. Measure the Standard Deviation of the diff image, we’ll call this Standard deviationDiff image
4. Use the following equation to calculate system read noise, you’ll need the previously calculated gain value or you can use the gain value given in the information provided with the camera:

$$\mathsf {Read\,Noise} = { \mathsf {Standard\,deviation_{Diff\,image} * Gain} \over \mathsf {\sqrt 2} }$$

You can also use the read noise calculator provided by Teledyne Photometrics.

### Calculating Dark Current

#### Background

Dark current is caused by thermally generated electrons which build up on the pixels even when not exposed to light. Given long enough, dark current will accumulate until every pixel is filled. Typically, pixels will be cleared before an acquisition but dark current will still build up until the pixels are cleared again. To solve this issue, dark current is drastically reduced by cooling the camera. You can calculate how quickly dark current builds up on your camera with the method below.

#### Method

To calculate how much dark current is accumulating over differing exposure times, you need to create a dark frame. A dark frame is a frame taken in the dark or with the shutter closed. By creating multiple dark frames with varying exposure times or acquisition times, you can allow more or less dark current to build up.

To do this:

1. Prevent any light entering the camera and take images at exposure times or acquisition times you’re interested in. For example, you may use a 10ms exposure time but intend to image for 30 seconds continuously. In this case, you should prepare a 30 second dark frame.
2. Take two dark frames per time condition
3. In ImageJ, calculate the difference between the two dark frames by selecting Image Calculator from the Analyze menu. Select the two frames and Difference, you will need to float the result. Press OK to generate the diff image.
4. Measure the Standard Deviation of the diff image, we’ll call this Standard deviationDiff image
5. Use the following equation to calculate system read noise and dark current:

$$\mathsf {Read\,Noise + Dark\,current} = { \mathsf {Standard\,deviation_{Diff\,image} * Gain} \over \mathsf {\sqrt 2} }$$

Note - the equation remains the same as in the previous section but because we’ve allowed the camera to expose for a certain amount of time, dark current has now built up on top of the read noise.

6. Subtract the number of electrons contributed by read noise - calculated in the previous section - to be left with the noise contributed by dark current
7. Compare the calculated dark current value to the acquisition time to determine how much dark current built up per unit time
8. This experiment can be repeated at differing exposure times and temperatures to determine the effect of cooling on dark current build-up

### Counting Hot Pixels

#### Background

Hot pixels are pixels that look brighter than they should. They are caused by electrical charge leaking into the sensor wells which increases the voltage at the well. They are an aspect of dark current so the charge builds up over time but they are unable to be separated from other forms of dark current.

#### Method

To identify hot pixels:

1. Take a bias frame with your camera
2. Prevent any light entering the camera and take a 10-frame stack with a long (~5 sec) exposure
3. In ImageJ, subtract the bias frame from one of the long exposure frames by selecting Image Calculator from the Analyze menu. Select the two frames and Subtract, you will need to float the result. Press OK to generate the image.
4. Hot pixels should immediately be visible as bright white spots on the dark background. Draw line profiles over individual hot pixels to measure the intensity
5. Compare hot pixels between all 10 long exposure frames

The advantage of hot pixels is that they always stay in the same place so once they are identified these pixels can be ignored for data processing.

Like normal dark current, camera cooling drastically reduces hot pixel counts. If you are still having issues with hot pixels you may be able to adjust the fan speed of the camera to provide more cooling or even switch to a liquid cooled system.

## Other Factors to Consider

### Saturation and Blooming

#### Saturation

Saturation and blooming occur in all cameras and can affect both their quantitative and qualitative imaging characteristics.

Saturation occurs when pixel wells become filled with electrons. However, as the pixel well approaches saturation there is less probability of capturing an electron within the well. This means that as the well approaches saturation the normally linear relationship between light intensity and signal degrades into a curve. This affects our ability to accurately quantify signal near saturation.

To control for saturation, we call the full well capacity before it starts to curve off the linear full well capacity. A high-quality camera will be designed so that the linear full well capacity fills the full 12-, 14- or 16-bit dynamic range so no signal is lost. At Teledyne Photometrics, we always restrict the full well capacity to the linear full well so you’ll never experience saturation effects.

#### Blooming

An additional saturation problem is that when the pixel reaches saturation, the extra charge can spread to neighbouring pixels. This spread is known as blooming and causes the neighbouring pixels to report false signal values.

To control for blooming Teledyne Photometrics cameras feature the anti-blooming technology, clocked anti-blooming. In this technique, during an exposure two of the three clock-voltage phases used to transfer electrons between neighbouring pixels are alternately switched. This means that when a pixel approaches saturation, excess electrons are forced into the barrier between the Si and SiO2 layers where they recombine with holes. As the phases are switched, excess electrons in pixels approaching saturation are lost, while the electrons in non-saturated pixels are preserved. As long as the switching period is fast enough to keep up with overflowing signal, electrons will not spread into neighbouring pixels. This technique is very effective for low-light applications.

### Speed

#### Types of Speed

Biological processes occur over a wide range of time scales, from dynamic intracellular signalling processes to the growth of large organisms. To determine whether the speed of your camera can meet the needs of your research, you need to know which aspects of the camera govern its speed. These aspects can be broken down to readout speed, readout rate, readout time and how much of the sensor is used for imaging.

Readout speed tells you how fast the camera is able to capture an image in frames per second (fps). For a camera with a readout speed of 100 fps for example, you know that a single frame can be acquired in 10 ms. All latest model Teledyne Photometrics cameras are able to show hardware generated timestamps that give much more reliable readout speed information than the timestamps generated by imaging software. This can be shown in PVCAMTest provided with the Teledyne Photometrics drivers or turned on in Micro-Manager by enabling metadata. The .tiff header will then show the hardware generated timestamps.

Readout rate tells you how fast the camera can process the image from the pixels. This is particularly important for CCD and EMCCD cameras which have slow readout rates because they convert electrons into a voltage slowly, one at a time, through the same amplifier.

CMOS cameras have amplifiers on every pixel and so are able to convert electrons into a voltage on the pixel itself. This means that all pixels convert electrons to voltage at the same time. This is how CMOS devices are able to achieve far higher speeds than CCD and EMCCD devices, they have far higher readout rates.

Readout rate is typically given in MHz and by calculating 1/readout rate you can find out how much time the camera needs to read a pixel.

Readout time is only relevant for sCMOS devices and tells you the readout rate of the entire pixel array. This can be calculated as 1/readout speed, so if the readout speed of the camera is 100 fps, the readout time is 10 ms.

#### Binning and Regions of Interest (ROI)

When speed is more important than resolution pixels can be binned or a region of interest (ROI) can be set to capture only a subset of the entire sensor area.

Binning involves grouping the pixels on a sensor to provide a larger imaging area. A 2x2 bin will group pixels into 2x2 squares to produce larger pixels made up of 4 pixels. Likewise, a 4x4 bin will group pixels into 4x4 squares to produce larger pixels made up of 16 pixels, and so on.

On a CCD or EMCCD, binning increases sensitivity by providing a larger area to collect incident photons as well as increasing readout speed by reducing the number of overall pixels that need to be sent through the amplifier.

Binning on an sCMOS also increases sensitivity but cannot increase readout speed because electrons are still converted to voltage on the pixel. Binning is therefore only useful to increase sensitivity and reduce file size.

Both devices can benefit from setting an ROI as this limits the number of pixels that need to be read out. The less pixels to read out, the faster the camera can read the entire array.

### Camera Sensitivity

#### Quantum Efficiency

Sensitivity is a function of both quantum efficiency and pixel size.

Quantum efficiency (QE) tells you what percentage of photons incident on the sensor will be converted to electrons. For example, if 100 photons hit a 95% QE sensor, 95 photons will be converted into electrons.

72% QE sCMOS was made 82% quantum efficient with the addition of microlenses. By positioning microlenses over the pixels, light from wider angles was able to be directed into the active silicon. However, it’s important to make a photoelectron detection comparison with both types of sCMOS as most light used in biological applications is columnated which gives limited light collection advantage to the microlenses.

#### Pixel Size

Pixel size on the other hand tells you how large an area the pixel has for collecting photons. For example, a 6.5x6.5 µm pixel has an area of 42.25 µm2 and an 11x11 µm pixel has an area of 121 µm2 which makes the 11x11 µm pixel ~2.86x larger than the 6.5x6.5 µm pixel. So, if the 11x11 µm pixel collects 100 photons, the 6.5x6.5 µm pixel only collects ~35 photons.

This means that, as far as sensitivity is concerned, a high QE and a large pixel are preferred. However, larger pixels can be disadvantageous for resolution.

#### Pixel Size and Resolution

The optical resolution of a camera is a function of the number of pixels and their size relative to the image projected onto the pixel array by the microscope lens system.

A smaller pixel produces a higher resolution image but reduces the area available for photon collection so a delicate balance has to be found between resolution and sensitivity. A camera for high light imaging, such as CCD cameras for brightfield microscopy, can afford to have pixel sizes as small as 4.5x4.5 µm because light is

plentiful. But for extreme low light applications requiring an EMCCD or scientific CMOS camera, pixel sizes can be as large as 16x16 µm.

However, a 16x16 µm pixel has significant resolution issues because it can’t achieve Nyquist sampling without the use of additional optics to further magnify the pixel.

In light microscopy, the Abbe limit of optical resolution using a 550 nm light source and a 1.4 NA objective is 0.20 µm. This means that 0.20 µm is the smallest object we can resolve, anything smaller is physically impossible due to the diffraction limit of light.

Therefore, to resolve two physically distinct fluorophores, the effective pixel size needs to be half of this value, so 0.10 µm. Achieving this value is known as Nyquist sampling.

Using a 100x objective lens, a pixel size of 16x16 µm couldn’t achieve Nyquist sampling as the effective pixel size would by 0.16 µm. The only way to reach 0.10 µm resolution would be to use 150x magnification by introducing additional optics into the system.

This makes it very important to choose the camera to match your resolution and sensitivity requirements. The table below outlines which Teledyne Photometrics cameras achieve Nyquist under which magnification:

Magnification NA of objective Wavelength of light Required Pixel Size for Nyquist Ideal camera (pixel size)
40X 1.3 509nm (GFP) 4.8 µm CoolSNAP DYNO (4.54 µm)
60X 1.4 6.7 µm Prime™ (6.5 µm)
100X 1.4 11.1 µm Prime 95B (11 µm)
150X 1.4 16.6 µm Evolve 512 Delta (16 µm)

Note – It’s often the case that sensitivity is more important than resolution. In this case, choosing the Prime 95B for use with a 60x objective is far superior to choosing the Prime even though the Prime matches Nyquist. This is where the researcher will need to balance the demands of their application with the best available camera. Additional optics can always be used to reduce the effective pixel size without changing the objective.