Abstract
In order to count photons with a camera, the camera must be calibrated. Photon counting is necessary, e.g., to determine the precision of localizationbased superresolution microscopy. Here we present a protocol that calibrates an EMCCD camera from information contained in isolated, diffractionlimited spots in any image taken by the camera, thus making dedicated calibration procedures redundant by enabling calibration post festum, from images filed without calibration information.
Introduction
In bioscience and technology, the nanoscale is investigated with optical microscopy by observing fluorescent probes attached to biological structures of interest. Isolated single molecules are routinely imaged, e.g. in singleparticle tracking^{1,2,3,4} and superresolution microscopy^{2,5,6}. So are distributions of fluorophores, e.g. to track moving biological filaments^{7} or DNA in nanochannels^{8}. All these methods overcome the diffraction limit of conventional fluorescence microscopy by fitting theoretical intensity profiles to experimental diffractionlimited intensity distributions that typically are recorded with an electronmultiplying CCD (EMCCD) camera.
An EMCCD camera’s outputsignal refers to an arbitrary scale chosen by its user. Calibration of the camera determines its gain, the constant that converts detected photon numbers to camera outputsignal for a given configuration of the camera. Without calibration it is impossible (i) to compare results across different experimental settings and laboratories, (ii) to determine the precision of localization in an image^{2} and (3) use that precision to discriminate between actual dynamics and fluctuations due to finite statistics on the level of a single measurement^{2,3}. Here we present a simple, easy and reliable protocol for calibration of EMCCD cameras. This protocol only uses information contained in a recorded image. Thus it simplifies future data collection by making dedicated calibration procedures redundant. It also makes it possible to determine the gain in old images that were filed without calibration data.
All calibrations of EMCCDcameras determine the gain, G, from the manner pixel outputvalues scatter about their expected value as function of that expected value. So one can calibrate from any image if one knows which pixels record identical intensities of light. Any set of such pixels have the same expected value, v, for the number of photons they register and hence have the same expected value for their output signals, . The actual number of photons that falls on any of these pixels is a random integer, Poisson distributed with expected value v. The variance with which these random integers scatter about v is also v; this follows from their Poisson distribution. The stochastic element of the EM amplification makes the variance of the output signals in these pixels Var(S) = 2G^{2}v, which is a factor two larger than what would result from deterministic amplification—this factor two is due to the excess noise^{2,9,10} of the electronmultiplication process, which adds to the Poisson noise of the photon number, a.k.a. photonic shot noise. The gain now seems known through . In practice, however, an EMCCD camera^{9,10,11} is designed to ensure positive output values in the presence of Gaussian readout noise by having a constant offset, S_{offset}, added to all its output signal values (Supplementary Note). So
and
Hence, the variance Var(S) of the output signal from pixels exposed to the same intensity of light grows as a firstdegree polynomial in their expected outputsignal . Thus, a plot of experimental estimates for such variances against corresponding experimental mean values will scatter about a straight line with slope 2G that intersects the first axis at S_{offset}. Given such data for a range of light intensities, the parameters G and S_{offset} in equation 2 are determined by fitting a straight line to these data^{12,13}.
Results
Methodology of calibrationonthespot
In the logic outlined above, it is actually not necessary to have many pixels exposed to the same intensity of light for each intensity used in the calibration. One pixel is enough. What matters is that one knows the expected output from a large number of pixels. Knowing that, the mean squared deviation between actual and expected output from a single pixel is an estimate of the variance of the output from that pixel. It is a rough estimate, but by combining many of these, a fine calibration results. So if one can estimate the expected outputsignals for many pixels in an image, covering a range of intensities, one can calibrate an EMCCD camera from such an image. This one can do in images containing isolated point sources of light (Fig. 1a), be they fluorescent probes or distant stars. What matters is that isolated pointsources image as isolated diffraction limited spots and that one knows the point spread function (PSF) for such sources. We fit the appropriate PSF to such a diffractionlimited spot, after which it tells us the expected outputsignal in each pixel in the diffractionlimited spot it was fitted to. Applying the logic above, we calibrated the camera by estimating Var(S) for each pixel in a spot by , where S is the actual outputsignal and is our estimate for the expected outputsignal. We refer to this protocol as “calibrationonthespot” for this reason and because the calibration achieved is the one that was valid for the camera in the instant that the image was taken. In practice, for better statistics, one fits PSFs to several different isolated point sources in an image and/or to different images of the same spot imaged as a timelapse movie.
For demonstration, localization microscopy provides a pertinent example: An isolated fluorescent probe images as a diffractionlimited spot (Fig. 1a) with an intensity distribution that often may be approximated well by a 2dimensional (2D) Gaussian plus a constant “background”^{2} (Methods, Supplementary Fig. 1). This theoretical point spread function (PSF) is routinely fitted to such experimental spots to localize probes^{1,2,3,4,5,6}.
The optimal statistical procedure to this end is maximum likelihood estimation (MLE), but MLE requires known photon statistics, i.e., it requires a calibrated camera^{2}. Ordinary leastsquares fitting of the PSF to the image works fine with unknown photon statistics/camera calibration. It results in the socalled Gaussian Mask Estimator^{2,4} (GME, Methods, Supplementary Note), which is suboptimal^{2}. But once calibration has been performed with GME as described below, the PSF can be fitted again, using MLE for optimal precision^{2}. Thus, suboptimal fitting is the gateway to optimal fitting.
Using GME for localization of the fluorophore imaged in Fig. 1a also yields the width of the spot, the total source intensity and the constant background (Methods). The PSF with these parameters defines a theoretical image (Fig. 1b). In this theoretical image, the value in each pixel is our estimate for the pixel’s expected outputsignal. This estimate is relatively well determined statistically, because it depends only on the few parameters of the theoretical PSF and they were determined by a fit to all experimental pixel outputsignals in the spot shown. The experimental values (Fig. 1a) scatter around their expected values (Fig. 1b) with s.d. given by the square root of equation (2) (Fig. 1c). This and the variation in expected signal across a diffractionlimited spot (Fig. 1b,c), is sufficient to determine both parameters of the EMCCD camera from just a single image of the spot (Fig. 1c, Methods).
Since we do not know , but estimate it, our estimates for Var(S) as function of are conditional averages, which slightly complicates the determination of the calibration parameters from pairs of these estimates. It affects our estimates for G and S_{offset} with biases that depend in magnitude on the number of pixels covering a spot but has negligible effects on their precision (Supplementary Note and Supplementary Figs 2–4). With small pixels (<40 nm), these biases are insignificant (<10 percent) for most purposes, but for situations where they are not and for use of calibrationonthespot with experimentally relevant larger pixels (<70 nm), we give their values analytically (Supplementary Note) and used them to correct for bias (Fig. 1c and Supplementary Figs 2–5). This makes calibrationonthespot accurate and precise over a large parameter space (Methods, Supplementary Figs 3–5).
Calibration performance using singlemolecule data
To illustrate the performance of the method, we calibrated an EMCCD camera repeatedly, from each frame in timelapse movies of (i) single rhodamine fluorophores, each attached to a molecular motor, myosin V, that moved processively along actin^{1} and (ii) single Cy3 fluorophores immobilized on the coverslip surface but free to rotate (Methods). These movies were recorded with total internal reflection fluorescence (TIRF) microscopy. In each frame of these movies, we localized the isolated fluorophores using GME and then applied calibrationonthespot, as described above, to determine the camera parameters as G and , respectively (Methods). This combination of parameters appears linearly in equation (2), which ensures good convergence properties for their estimates, as singleframe estimates for the gain scattered around common constant values with normal distributions (Fig. 2a,b) and so did the estimates for the product of the gain and the offset (Supplementary Fig. 6). In each case, the scatter had an s.d. given by the theoretical covariance matrix for the estimates (Fig. 2a,b and Supplementary Figs 6 and 7). We then used the average gain to calculate singleframe estimates of the signal offset. They also scattered around a common constant value (Fig. 2c,d) with an s.d. calculated from the theoretical covariance matrix for those estimates (Fig. 2c,d and Supplementary Fig. 7). This analysis demonstrates that the fluctuations in the estimates are fully accounted for by our finite statistics and hence that calibrationonthespot is optimally precise (Methods).
We repeated this analysis sixteen times: for six myosin motor molecules and for ten single Cy3 fluorophores. The timeaveraged calibration parameters for each experiment scatter around constant values (Fig. 2e–h), which is expected when all probes in each experiment have been recorded with the same camera settings. Furthermore, for each experiment, the scatter of each timeaveraged quantity is fully explained by our finite statistics. This demonstrates that calibrationonthespot provides singlemolecule results and consistently so from molecule to molecule.
We compared the calibration parameters obtained for the Cy3 probes using calibrationonthespot to values obtained using an alternative calibration procedure^{2,3,11} (Methods, Supplementary Fig. 8 and Supplementary Note) and found agreement within one per cent, fully consistent with the precision of our results from calibrationonthespot (Fig. 2f,h, Methods). This agreement between the two calibrations indicates that calibrationonthespot provides accurate estimates for calibration parameters in an experimental setting. This alternative calibration procedure was not available for the myosin data set (Fig. 2e,g), as suitable regions were not imaged in those movies. This left calibrationonthespot as the only way to calibrate post festum.
As an additional demonstration and to show that the analysis also works for other fluorescent probes, we repeated the analysis for a single 40nm fluorescent bead imaged with a TIRF microscope (Methods). In this case we determined timeaveraged calibration parameters from 500 frames in a timelapse movie with less than one per cent error (Supplementary Fig. 9).
Discussion
Although the data presented here demonstrate the performance of the method in the context of localizationbased microscopy and EMCCD cameras, the method must work for other applications that use other theoretical intensity distributions^{2,3,7,8} and/or detectors^{13} and its application should be straightforward.
Calibrationonthespot in its simplest form is implemented with just a few extra lines of code (Methods) in the localization software used in a given laboratory. Supplementary Software presents an implementation of calibrationonthespot that corrects for bias due to conditional averaging and calculates the variancecovariance matrix for the estimates.
With calibrationonthespot, data sets already on file may be calibrated or recalibrated now. Irrespective of whether the cameras still exist, calibrationonthespot calibrates it for the state it was in at the instant it recorded the data. Moreover, calibrationonthespot is so accurate and precise that each snapshot of an isolated fluorescent probe may be analyzed independently. This allows for elimination of possible outlying calibration measurements on the singlesnapshot level before data are pooled into averages^{14}. Calibrationonthespot also provides an easytouse method for future data acquisition, since a separate calibration experiment can be skipped: all information necessary for calibration is already encoded in experimental images and may be extracted as demonstrated here. Separate calibration experiments can also be skipped with the latest generation of EMCCD cameras, which can calibrate themselves. But the experimental and/or dataanalytic protocols of this functionality may differ between vendors, which may complicate comparison of experiments. In contrast, calibrationonthespot calibrates independently—independent of cameras, camera settings, experiments and laboratories—it constitutes a lingua franca of calibration.
Methods
Localization analysis
We selected isolated, diffractionlimited spots in microscope images (Fig. 1a). Typically, we ensured that a single, fluorescent probe produced each spot, by verifying that the spot intensity remained constant in time until it photobleached in a single step. For analysis, we used pixels in a square region around each spot (Fig. 1a), where the region’s size was chosen such that most of the “shoulders” of the theoretical PSF were included (Supplementary Fig. 1). This choice ensured that a 2DGaussianplusaconstantbackground PSF accurately approximates the theoretical PSF (Supplementary Fig. 1) and in turn that calibrationonthespot calibrates with accuracy and precision (Supplementary Figs 2–5).
Without a calibration of the EMCCD camera, the output statistics of individual pixel signals are unknown, precluding use of maximum likelihood estimation (MLE). Instead, we used the socalled Gaussian Mask Estimator (GME)^{2,4}, which results from applying unweighted leastsquares estimation in conjunction with a 2DGaussianplusaconstantbackground as a model for the PSF (Supplementary Note). This estimator is suboptimal^{2}, however, because it ignores the weights of the contributions of the individual pixels in the localization analysis. In a practical setting, the localization analysis should therefore be repeated using MLE, which is optimal^{2}, once the calibration of the EMCCD camera has been performed.
In the application of GME to each frame in a timelapse movie of an isolated spot (Fig. 1b), we estimated five parameters: the two coordinates of the location of the probe, the width of the PSF, the expected total detected signal, the expected constant “background” signal. In this process, we also recorded (i) the expected value of the pixel output signals, obtained from the theoretical image (Fig. 1b); and (ii) the values of a function that describes how statistical fluctuations of experimental pixel outputsignals affect the fluctuations in the fitted, theoretical pixel outputsignal of any given pixel (Supplementary Note). The latter is used only to calculate the covariance matrix of the calibration parameters estimated using calibrationonthespot and to correct for bias.
Protocol for calibrationonthespot
For each pixel, we assumed that the experimental outputsignal value is normally distributed around its true outputsignal value with a variance given by equation (2) (Supplementary Fig. 10 and Supplementary Note). The validity of this assumption increases with larger incident photon number but was typically satisfactory everywhere in images because of background fluorescence and the fact that the “shoulder” of the theoretical PSF is interpreted as additional background in the localization analysis (Methods, Supplementary Fig. 1).
For each pixel, the true outputsignal is inherently unknown, so in its place we used the fitted expected value obtained from the localization analysis. Note that the expected pixel outputsignal itself is an explicit function of the calibration parameters (Supplementary Note). However, none of its parameters may be independently determined without a calibration, only its value may (Supplementary Note). Therefore, in the methodology of calibrationonthespot, this dependence on the calibration parameters is immaterial and for the same reason, the localization analysis may be done prior to the calibration rather than jointly with it. Thus, only the explicit dependence on the gain and the signal offset in equation (2) matters for calibration. The latter we parameterized as , with and proceeded to initially estimate, respectively, G and in individual images of a spot. Estimation with this parameterization ensured superior convergence properties, because the fitted function depends linearly on these two parameters.
Thus, to calibrate using MLE, we maximized the loglikelihood
with respect to the parameters G and (Supplementary Note). Here the summation is over all pixels in the region of the image around the spot (Fig. 1a and Supplementary Fig. 2a) and it is understood that fitted expected pixel outputsignals, known from the localization analysis, replace their true values everywhere. This determined the parameters G and from single images (Fig. 2a,b and Supplementary Figs 2,6 and 9).
The use of the fitted expected pixel outputsignal values instead of their true values, above, introduces a bias in the estimated parameters. The magnitude of this bias increases with the pixel size, because fewer pixels then cover a spot. For small pixels (<40 nm), however, it remains below 10 percent (Supplementary Fig. 5). For applications where this bias cannot be ignored and for larger pixels (<70 nm), we proceeded to calculate the bias analytically and used that result to correct for bias (Supplementary Fig. 5). To this end, we initially determined the calibration parameters G and from either a single image or all images in a timelapse movie. We then used their (timeaveraged) values and the fitted expected pixel outputsignal values from the localization analysis (Methods) to calculate corrections for each frame (Supplementary Note). Then, we corrected the values of each estimate for G and before we used them to calculate S_{offset}.
Covariance matrix for parameter estimates
Similarly, we calculated the theoretical covariance matrix for each calibrationonthespot estimate of the parameters G and (Supplementary Note). Using this, the theoretical uncertainties for the timeaveraged values of G and S_{offset} were found by propagation of errors. All singleframe variation in parameter estimates is explained by the theoretical uncertainty as calculated from the theoretical covariance matrix (Fig. 2a–d and Supplementary Figs 2,3,6 and 9), demonstrating that calibrationonthespot is optimally precise.
For single image calibrations (Fig. 1), the offset is found directly from the estimated parameters by division as . For timelapse movies (Fig. 2), on the other hand, initially, we found the singleframe values of G (Fig. 2a,b and Supplementary Figs 2 and 9) and (Supplementary Figs 2,6 and 9) and then used the timeaverage of to estimate the singleframe estimates for from the singleframe estimates of (Fig. 2c,d), but we used the timeaveraged values of both G and to calculate reported (timeaveraged) values for . Because the theoretical errors themselves are calculated based on the estimated calibration parameters, we avoided bias in the calculation of the timeaveraged calibration parameters, by calculating these as unweighted averages over individual frames in Fig. 2a–d and Supplementary Figs 2,6 and 9. On the other hand, the errors on these timeaveraged estimates were so well determined that we calculated the weighted averages of the calibration parameters from different probes in Fig. 2e–h and Supplementary Figs 2 and 4.
Simulations
To simulate images, we used the theoretical PSF for a freely rotating fluorescent probe, as previously described^{2}. For each pixel in an image, we calculated the probability of detecting a photon there as the integral of the PSF over the area of that pixel. Multiplication with the expected total photon number and addition by the number of expected background photons per pixel yielded the expected number of photons recorded by that pixel. With this expected value, we generated a Poisson distributed random number, to simulate the number of detected photons in that pixel. Based on this, an Erlang distributed random number modeled the amplification process in the EMCCD camera and with addition of the constant signal offset and a normally distributed random number to model readoutnoise distribution, we simulated a pixel outputsignal value (Supplementary Figs 2 and 3 and Supplementary Note).
To demonstrate that the assumption of normally distributed pixel outputsignal values did not significantly compromise calibrations with calibrationonthespot, we also generated images using normally distributed pixel outputsignals with moments given by Eqs (1) and (2). This modelled the amplification process. We assessed the performance of calibrationonthespot in this approximation (Supplementary Figs 3–5). The assumption of a 2DGaussianplusaconstantbackground PSF assumed in GME did not significantly compromise calibrations, we demonstrated with simulations using a 2DGaussianplusaconstantbackground as the PSF (Supplementary Figs 3–5). For those simulations, we adjusted the 2DGaussian’s total photon number as well as the background, so they agree with the PSF for a freely rotating probe (Supplementary Fig. 1).
Source of experimental data
We assessed the applicability and performance of calibrationonthespot on sets of experimental data graciously shared by Professor James A. Spudich’s laboratory (Stanford University School of Medicine). The laboratory provided TIRF microscopy timelapse movies recorded with an EMCCD camera (Andor Technology; iXon DV 887 EMCCD) of (i) the processive molecular motor myosin V labeled with a rhodamine fluorophore and stepping along actin filaments on the coverslip surface. The effective EMCCD pixel size was 44 nm and the average emission wavelength was 580 nm. The timelapse movies were recorded at 5 Hz; (ii) single Cy3 fluorophores immobilized on the coverslip surface. The effective camera pixel size was 28 nm and the average emission wavelength was 580 nm; and (iii) a 40nm fluorescent bead immobilized on the coverslip surface, as previously described^{2}. The effective pixel size was 28 nm and the peak emission wavelength was 605 nm.
Additional Information
How to cite this article: Mortensen, K. I. and Flyvbjerg, H. “Calibrationonthespot”: How to calibrate an EMCCD camera from its images. Sci. Rep. 6, 28680; doi: 10.1038/srep28680 (2016).
References
Yildiz, A. et al. Myosin V walks handoverhand: single fluorophore imaging with 1.5nm localization. Science 300, 2061–2065 (2003).
Mortensen, K. I., Churchman, L. S., Spudich, J. A. & Flyvbjerg, H. Optimized localization analysis for singlemolecule tracking and superresolution microscopy. Nat. Methods 7, 377–381 (2010).
Mortensen, K. I., Sung, J., Flyvbjerg, H. & Spudich, J. A. Optimized measurements of separations and angles between intramolecular fluorescent markers. Nat. Commun. 6, 8621 10.1038/ncomms9621 (2015).
Thompson, R. E., Larson, D. R. & Webb, W. W. Precise nanometer localization analysis for individual fluorescent probes. Biophys. J. 82, 2775–2783 (2002).
Betzig, E. et al. Imaging intracellular fluorescent proteins at nanometer resolution. Science 313, 1642–1645 (2006).
Rust, M. J., Bates, M. & Zhuang, X. W. Subdiffractionlimit imaging by stochastic optical reconstruction microscopy (STORM). Nat. Methods 3, 793–795 (2006).
Ruhnow, F., Zwicker, D. & Diez, S. Tracking single particles and elongated filaments with nanometer precision. Biophys. J. 100, 2820–2828 (2011).
Tegenfeldt, J. O. et al. The dynamics of genomiclength DNA molecules in 100nm channels. Proc. Natl. Acad. Sci. 101, 10979–10983 (2004).
Hynecek, J. & Nishiwaki, T. Excess noise and other important characteristics of low light level imaging using charge multiplying CCDs. IEEE Trans. Electron Devices 50, 239–245 (2003).
Robbins, M. S. & Hadwen, B. J. The noise performance of electron multiplying chargecoupled devices. IEEE Trans. Electron Devices 50, 1227–1232 (2003).
Ulbrich, M. H. & Isacoff, E. Y. Subunit counting in membranebound proteins. Nat. Methods 4, 319–321 (2007).
Lidke, K. A., Rieger, B., Lidke, D. S. & Jovin, T. M. The role of photon statistics in fluorescence anisotropy imaging. IEEE Trans. Image Process. 14, 1237–1245 (2005).
Huang, F. et al. Videorate nanoscopy using sCMOS cameraspecific singlemolecule localization algorithms. Nat. Methods 10, 653–658 (2013).
Vestergaard, C. L., Pedersen, J. N., Mortensen, K. I. & Flyvbjerg, H. Estimation of motility parameters from trajectory data. Eur. Phys. J. Spec. Top. 224, 1151–1168 (2015).
Acknowledgements
We thank L. Stirling Churchman and James A. Spudich for experimental data recorded in James A. Spudich’s laboratory. This work was supported by a Lundbeck Foundation postdoctoral fellowship (to K.I.M.) and by the Danish Council for Strategic Research through the Strategic Research Center PolyNano (grant no. 10092322/DSF).
Author information
Affiliations
Contributions
K.I.M. and H.F. designed research. K.I.M. performed analytical calculations, simulations and analyzed the data. H.F. supervised the theoretical analysis. K.I.M. and H.F. prepared the manuscript.
Ethics declarations
Competing interests
The authors declare no competing financial interests.
Electronic supplementary material
Rights and permissions
This work is licensed under a Creative Commons Attribution 4.0 International License. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in the credit line; if the material is not included under the Creative Commons license, users will need to obtain permission from the license holder to reproduce the material. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/
About this article
Cite this article
Mortensen, K., Flyvbjerg, H. “Calibrationonthespot”: How to calibrate an EMCCD camera from its images. Sci Rep 6, 28680 (2016) doi:10.1038/srep28680
Received
Accepted
Published
DOI
Further reading

Precise Time Superresolution by Event Correlation Microscopy
Biophysical Journal (2019)

Regulation of Plasma Membrane Nanodomains of the Water Channel Aquaporin3 Revealed by Fixed and Live Photoactivated Localization Microscopy
Nano Letters (2019)

Enhancing optical microscopy illumination to enable quantitative imaging
Scientific Reports (2018)

How To Characterize Individual Nanosize Liposomes with Simple SelfCalibrating Fluorescence Microscopy
Nano Letters (2018)

Subnanometer localization accuracy in widefield optical microscopy
Light: Science & Applications (2018)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.