Abstract
Blurring due to specimen-holder drift is a common occurrence in cryo-EM images. Cameras employing active-pixel sensors are capable of high frame rates such that a single low-dose exposure can be acquired as a series of frames. In this paper we consider the possibility of tracking and compensating for overall drift in typical single-particle specimens through the analysis of frame sequences. A problem that arises in tracking through cross-correlation of frames obtained with the DE-12 camera from Direct Electron LLC is the presence of “hot-pixel noise”. This random pattern of bright pixels is highly correlated among frames. We show how a model of this noise can be employed to greatly reduce its effects. A filter function is derived that optimizes the tracking of image shifts by cross-correlation, and we demonstrate the tracking of specimen drift in typical cryo-EM specimens.
Keywords: Transmission electron microscopy, Electron cryomicroscopy, Cross-correlation function
1. Introduction
Monolithic active-pixel sensors [1–3] allow the construction of sensitive cameras for electron microscopy. In such a sensor, incident high-energy electrons are detected directly within a silicon chip, and the signal representing the deposited charge is read out by CMOS circuitry that can support very high frame rates. The Gatan K-2 camera [4] can acquire images at 400 frames per second, and provides images from single electron counting mode at 40 frames per second. The Direct Electron DE-12 camera can acquire images at 40 frames per second [5]. As individual frames are 12–16 megapixels in size, these cameras provide a flood of data. A very important advantage of acquiring images at high rates is that movements of the specimen can be tracked and compensated. Brilot et al. [6] have exploited high-speed acquisition by the DE-12 camera to track the displacements and rotations of virus particles as imaged in cryo-EM specimens at low doses of 5 e/A2 per frame. They were able to do this tracking by comparing individual images with the known structure of the particles. On the basis of improved images from tracking they have obtained a high-resolution structure with a much smaller dataset than usual [7]. Similarly, Bai et al. [8] have obtained a remarkably high-resolution ribosome structure through the statistical processing of information contained in frames acquired with doses of 1 e/Å2.
In principle it should be possible to follow the movements any cryo-EM specimen as long as it contains a consistent “signal” that can be recognized in the individual images. There is enough information in a typical cryo-EM specimen that a relative shift from one micrograph to the next can be tracked even if the micrographs are acquired with a dose of 2 e/Å2 or less. Drift of the specimen holder is a recurring problem in cryo-EM image acquisition, and in a typical image-acquisition session much time is spent waiting for the drift rate to fall below a one or a few angstroms per second. Only at these low rates will an image recorded with a typical exposure time of 1–2 s not be blurred by the specimen movement.
To search for displacements due to specimen drift, the standard technique is to compute the cross-correlation or phase-correlation between frames, and evaluate displacements of the correlation peak from the origin. This is implemented in automated microscopy software, for example Leginon [9] and SerialEM [10]. We sought to use cross correlation to track movements in images acquired with the DE-12 camera from Direct Electron LLC. A typical cryo-EM image is shown in Fig. 1A, and a portion of a frame, representing a 2 e/Å2 dose, is shown in Fig. 1B. The problem that gave rise to the investigations in this paper is demonstrated in Fig. 1D. The cross-correlation between the first frame and the others shows a very strong, spurious peak at the origin, much larger than the low-amplitude diffuse peak arising from actual image drift. Only when the spurious peak is removed (Fig. 1E) can the true cross-correlation peak be evaluated.
The origin of the spurious peak is “pixel noise” arising from trapped charges in individual pixel elements of the detector. The charge decays with a very broad time course ranging from seconds to hours. Figure 2A and B illustrate the pixel noise in a single “dark” raw image from the camera, acquired with no electron beam. Since a dark-image correction is always applied to micrographs, it is more relevant to examine the changes in pixel noise from one image to the next. On a short time scale the difference between two raw dark images is small; the great majority of pixels in the difference image at an interval of 1 second (Fig. 2C and D) show normally-distributed values that reflect the readout noise of the imaging device. This readout noise has a standard deviation of less than 1/10 of the single-electron event size. In addition there is a population of pixels having outlying values, but they comprise only about 1% of the total.
If a comparison is made between two raw images acquired 2 hours apart, the pixel noise is more prominent, presumably due to slow kinetics of recombination of trapped charge in the sensor. The difference (Fig. 2 E and F) has perhaps 10% outlier pixels. The outlier values show a distribution having long tails, with a total spread of ± 100 units, corresponding to the signal from about ± 3 single-electron events. In comparison, a low-dose exposure under our imaging conditions may yield about 4 electrons per pixel in a raw frame. Thus the pixel noise affects a small fraction of the pixels, but it is of considerable magnitude. In this paper we characterize the pixel noise and describe a way in which its effect on cross-correlations can be mitigated.
2. Methods
We acquired low-dose images from cryo-EM specimens using an FEI Tecnai F20 microscope operated at 200 kV. Raw images from the DE-12 camera were stored as 4096 × 3072 pixel TIFF files at a rate of 25 per second. We combined them by summing five images at a time into “frames” to yield an effective rate of 5 per second. The dose rate was 10 e/Å2 s, so that each frame represents an electron dose of 2 e/Å2. A typical 1.8 s exposure was thus reduced to a “movie” of 9 frames. The specimen-referred pixel size was 2.9 Å. The data in Fig. 5 consisted of a movie with a very large total accumulated dose. It was obtained by Melody Campbell at the National Resource for Automated Molecular Microscopy under similar conditions except that the pixel size was 1.4 Å and the dose rate was 50 e/Å2s. At this dose rate (2 e/Å2 the grouping of images was not necessary for analysis.
3. Theory
3.1. Image model
The real-space, ith frame of a movie is denoted m0i(x, y), where the subscript zero denotes the absence of corrections for pixel offset and gain. Those corrections are applied through the use of averaged bright and dark images μr and νr which are taken with a flood beam or no electron beam, respectively. The subscript r enumerates independently-acquired sets of references.
Linear “flat-field” correction of the pixels in a frame is accomplished by pixel-wise operations according to
(1) |
where the scalar knorm is typically set to the mean pixel value of μr −νr. Noise is introduced in this process mainly through the shot noise in the bright reference image. The reason for acquiring multiple sets of references is to avoid the situation in which common, that is correlated, noise appears in images that are to be cross-correlated. Thus we identify a corrected frame with the subscript indicating which set of references was used.
The specimen being imaged is described by a position-dependent phase shift φ(x, y) of the imaging electrons. In the course of image collection the pattern is translated, operated on by transfer functions, and is corrupted by noise. We denote the Fourier duals of real-space variables by capital letters, so in Fourier space these operations can be represented as pixel-wise products according to
(2) |
where HS is the real-valued modulation transfer function of the camera, C is the real-valued phase-contrast transfer function, and Tdi is the operator for translation of the image through the vector di. Noise is modeled by a white, Gaussian noise field Nshot which is operated on by a modulation transfer function HN which is distinct from HS [11]. Also operated on by HN is the residual shot noise Nref from the bright reference that was used to correct the image. Finally there is fixed pixel noise Npix due to the detector itself and which is not filtered by HN. Because frames are acquired in rapid succession, we assume that the pixel noise is a fixed pattern that is the same in all frames of the movie.
3.2. Cross spectrum and cross-correlation
Tracking the drift in the specimen position is accomplished by estimating changes in the translation vector d between a frame and a template by cross correlation. For frame i we use as a template the mean of all the other frames in the n-frame movie,
(3) |
and the corresponding translation operator T̄i for this mean is given by
(4) |
The estimated raw cross-spectrum (Fourier transform of the cross-correlation) is computed with distinct references to eliminate any bias from common noise sources,
(5) |
It is modeled as
(6) |
where SP is the power spectrum of the fixed pixel noise, and the zero-mean random variable NQ represents the noise in the cross spectrum that arises from the various noise terms in (2).
The power spectrum Pi = |Mi|2 of an individual frame is similar to that of the cross-spectrum, except that it includes the contributions from shot noise in the image and in the reference:
(7) |
Figure 3 A and B compares the estimated power spectrum and cross-spectrum from a frame. The two functions are similar, but as can be seen in the circularly-averaged quantities in Fig. 3C the power spectrum is much larger in magnitude. At high frequencies the cross-spectrum is comprised almost entirely of pixel noise. The pixel noise, in turn, is a minor part of the total power spectrum, which is dominated by the shot noise.
3.4. Estimating the pixel noise spectrum
A very successful model for the pixel noise of the DE12 camera, as expressed in Fourier space, is
(8) |
where fx, the frequency component in the x-direction. We do not know the true physical origin of this noise, but a reasonable explanation is that the trapped charge in each pixel is not a completely independent random quantity; instead roughly 20% of the random charge introduced into each pixel spreads to the horizontally adjacent pixels. The result is a pixel noise spectrum that is not flat in the x-direction, but instead shows a Gaussian peak.
To estimate the parameters of the model, we consider the cross-spectrum (eqn. 6). The factors in that equation become very small at high frequencies; thus if we define a binary mask (illustrated in Fig. 3D) that excludes the low-frequency components of the measured cross-spectrum , we can perform a least-squares fit of (8) to the unmasked region to obtain values for the three parameters a0, a1 and σP. A representative fit is illustrated in Fig. 3E and F.
Finally given the model for the pixel noise, a corrected cross-correlation is obtained
(9) |
The fourier transform of this is the quantity displayed in Fig. 1D where it can be seen that the very large, delta-function-like peak has been eliminated by the estimation and subtraction of the model for SP.
3.3. An optimum filter for cross-correlation
The performance of cross-correlation alignment can be improved through appropriate weighting of the computed cross-spectrum. For example, in some image-alignment problems “phase correlation” is used, where the amplitudes of all Fourier components are forced to unity, and only phase information is used in defining the alignment. We seek to find a function of frequency W for weighting the amplitudes of the cross-spectrum and producing the corresponding weighted cross-correlation,
(10) |
An example of a weighting function is a classical matched filter; this maximizes the peak-to-rms noise ratio of the cross-correlation function. However, we wish to maximize the precision of location of the peak. Let us model the cross-correlation of two identical images as the sum of a function r0 that is symmetric about the origin, and random noise,
(11) |
as illustrated in Fig. 4A. Suppose the presence of noise causes the peak of the cross-correlation to shift to a position δ away from the origin; thus ∇r(δ) = 0. We also know that at the origin ∇r(0) = δnR(0). A Taylor expansion of r then yields
(12) |
and an estimate for the variance of δ is
(13) |
As in Canny’s analysis of line detection [12] let us define a localization parameter which is to be maximized through the choice of the weighting function W (eqn. 10). Making use of the Fourier representation of spatial derivatives and writing out explicitly the dependencies on frequency we have
(14) |
where f=|f| is the magnitude of the spatial frequency, and the sums are take up to a maximum frequency fmax.
Choosing W to be constant along rings of constant frequency ρf, we find that L is maximized by the choice
(15) |
With W set to zero at frequencies above some bandwidth fmax to avoid divergence at high frequencies. This function is the same as a matched filter except for the additional factor f which accentuates high-frequency information, helping to sharpen the cross-correlation peak. In practice an average over i of the observed Qi can serve as the estimate of Q in (15), and a convenient estimate for the noise spectrum is the average of 2Im{Qi}2 because when alignment is exact the imaginary part of Qi is pure noise. Fig. 4B plots the estimated numerator and denominator of (15) from an actual dataset. Fig. 4C shows the resulting W which has oscillations arising from the contrast-transfer function of the images. Fig. 4D shows the localization parameter as a function of bandwidth.
The approximation in (12) fails when the noise is large, and our approach to this problem is to limit the bandwidth fmax to a value that provides reliable results. At high bandwidth one problem arises with spurious peaks in the cross-correlation when the noise nR becomes comparable in size to the peak value of the cross-correlation. Another is the possibility of a reversal in sign of the second derivative of the cross correlation; this can occur when the second derivative of the noise ∇2nR(0) becomes larger in magnitude than the second derivative of the cross-correlation “signal” ∇2r0(0). In practice a criterion based on this second consideration is more restrictive. We estimate as a reliability parameter the ratio σ2 of second derivatives, comparing signal amplitude to noise standard deviation,
(16) |
and choose the value of fmax at which σ2 falls to a threshold value of say 5, corresponding to a ratio of 5 standard deviations. Figure 4E shows the dependence of σ2 on fmax in the representative dataset.
3.4. Tracking specimen movement
The estimation of specimen movement in a frame can be obtained as the displacement vector di that maximizes the observed cross-correlation function ri(d). This is only approximate, however, because ri as computed from eqns. (5) and (9) represents the translation of frame i relative to the average of all the other frames. In this case it is best to use an iterative process in which a new average is computed after each frame has been translated. When this is done, however, the appropriate translations have to be applied to the correction term S̃P of eqn. (9) as well. The algorithm can be described as follows.
First set the iteration number k=1 and initialize the displacement vectors for all i=1..n. Find the displacement vectors from the peaks of the cross correlations computed as
(17) |
Then set , update W, and evaluate (17) again to find . This process is repeated a few times to ensure convergence. The sum of aligned images is finally obtained as
(18) |
Results
We implemented a least-squares fitting of the model for pixel noise (eqn. 8) based on cross-spectra computed from the full-size images. Then for the displacement-tracking algorithm (17) the 4096 × 3072 pixel images were first Fourier filtered and downsampled to 1024 × 768 in size, a process that is justified by the fact that high frequency components make little significant contribution to determining the displacement, and interpolation of the cross-correlation peak can be performed to high accuracy as long as the signal is band-limited. All computations were performed in Matlab (MathWorks, Natick MA, USA). Cross-correlations were computed according to eqn. (9) with weights computed from (15) at each iteration.
Figure 5 shows the result of aligning the nine frames of the movie shown Figs. 1 and 3. In this series of frames there was a large, three-pixel initial jump in the y-position between frames 1 and 2 (Fig. 5B), probably due to initial beam-induced specimen movement like that observed by Brilot et al. [6]. In succeeding frames the motion consisted of a gradual displacement in the x direction. When the frames were simply summed the power spectrum (Fig. 5C) shows a substantial loss of information in the x direction, as evidenced by the loss of Thon rings in that direction beyond the first zero, at about 0.1 pixel−1 (0.03 Å−1 at the magnification used). When summed after alignment the resulting image shows Thon rings beyond 0.25 pixel−1 in all directions (Fig. 5D), representing a dramatic improvement in resolution.
The image in Fig. 5A has a strong signal from the thick carbon film that surrounds the hole. Would alignment be possible if only the image in the center of the hole is used, where the only signal arises from protein particles and a thin carbon support film? Fig. 5E-H shows the same analysis performed on a central region that constitutes 1/3 of the image area. Because beam-induced movement might cause different regions of the specimen to show different displacements, the shifts in the whole micrograph and in the central region will not necessarily match. Nevertheless in this case the shifts match within 1 pixel.
How precise are the estimates of shifts? To address this question, we made use of a more recent acquisition series from another cryo-EM specimen, provided to us by Drs. A. Chen and M. Campbell at the National Resource for Automated Molecular Microscopy. This series was acquired with a new backthinned sensor chip and at a higher dose per raw image (2 e/Å2). Recall that in the dataset of Figs. 1, 3 and 5, five raw images were summed to produce each frame of approximately 2 e/Å2 dose. The higher dose per raw image in the new series meant that no summation was necessary, and therefore the pixel noise was also not summed. The end result was that the spurious peak in the cross correlation was smaller by about a factor of 5 than in the case shown in Fig. 1. The 52 raw images were separated into two groups of 26 by selecting alternate images. Each movie frame consisted of a single raw image and each of the independent 26-frame movies was analyzed, with results shown in Fig. 6. The entire specimen area included a region of thick carbon in which details are much clearer after alignment (Fig. 6B). The two movies show an rms discrepancy of less than ¼ pixel in both the x and y directions (Fig. 6C and D).
The tracking of shifts was then repeated after the frames were cropped to remove the carbon region, leaving only single particles in ice (Fig. 6E). Because of the smaller signal in the cropped images, the rms discrepancy between the two independent movies increased to about 0.6 pixel (Fig. 6G and H) which would correspond to an rms error of 0.4 pixel from the true position in each of the independent movies. The signal in this set of cropped images of single particles in ice, with a dose of 2 e per frame and a specimen area of 0.45 μm on a side, appears to be close to the limit of reliable tracking by cross-correlation. However, summing sets of 2–4 of raw images to produce higher-dose frames, or smoothing the estimated time course of displacements, can readily decrease the tracking error to below ¼ pixel.
5. Discussion
Image blurring due to specimen-holder drift is a common occurrence in cryo-EM studies, and the advent of cameras that provide high-speed acquisition now provides an opportunity for this drift to be tracked and compensated. Brilot et al. [6] have shown that both the position and orientation of single virus particles can be tracked to high precision from cryo-EM images obtained with 5 e/Å exposures. The situation is more difficult in arbitrary cryo-EM specimens where a precise model for the imaged objects is not available; in that case, tracking must make use of the direct comparison of pairs of noisy images.
In this paper we examine this possibility, and find that one problem in comparing noisy images is the fixed-pattern noise due to “hot pixels” in the sensor chip. The effect of this noise is particularly large when the dose per raw image is small. Using a model for this noise, we are able to reduce its influence on specimen tracking by cross-correlation. We also derive an optimized filter for weighting the Fourier components of the cross-correlation function. We find that the effects of specimen-holder drift can be compensated readily when cryo-EM images contain a region of the carbon support film, as in Fig. 5A and 6A. The drift compensation can also be carried out images containing only protein particles suspended in ice (Fig. 5E, 6E) although it is not as precise.
Highlights.
Active-pixel cameras allow high-frame-rate recording of TEM images.
We investigate the use of multi-frame exposures to track and compensate for cryo-EM specimen drift.
Once electronic “hot-pixel” noise is characterized, cross-correlation allows tracking of drift in cryo-EM specimens at low dose.
We derive a Fourier-space filter that optimizes the tracking of image shifts by cross-correlation.
Acknowledgments
This work was supported by NIH grant NS021501. We are grateful to Drs. A. Cheng and M. Campbell of NRAMM for providing the images used in Fig. 6, and to Direct Electron LP for the loan of the camera.
Abbreviations
- CMOS
Complementary metal-oxide-semiconductor
- Cryo-EM
Electron cryomicroscopy
Footnotes
Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.
Contributor Information
H. Shigematsu, Email: hideki.shigematsu@yale.edu.
F. J. Sigworth, Email: fred.sigworth@yale.edu.
References
- 1.Faruqi AR, McMullan G. Electronic detectors for electron microscopy. Q Rev Biophys. 2011;44:357–390. doi: 10.1017/S0033583511000035. [DOI] [PubMed] [Google Scholar]
- 2.Turchetta R, Berst JD, Casadei B, Claus G, Colledani C, Dulinski W, Hu Y, Husson D, Le Normand JP, Riester JL, Deptuch G, Goerlach U, Higueret S, Winter M. A monolithic active pixel sensor for charged particle tracking and imaging using standard VLSI CMOS technology. Nuclear Instruments & Methods in Physics Research Section a-Accelerators Spectrometers Detectors and Associated Equipment. 2001;458:677–689. [Google Scholar]
- 3.Jin L, Milazzo AC, Kleinfelder S, Li S, Leblanc P, Duttweiler F, Bouwer JC, Peltier ST, Ellisman MH, Xuong NH. Applications of direct detection device in transmission electron microscopy. Journal of Structural Biology. 2008;161:352–358. doi: 10.1016/j.jsb.2007.10.007. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Mooney P, Contarato D, Denes P, Gubbens A, Lee B, Lent M, Agard D. A High-Speed Electron-Counting Direct Detection Camera for TEM. Microscopy and Microanalysis. 2011;17:1004–1005. [Google Scholar]
- 5.Bammes BE, Rochat RH, Jakana J, Chen DH, Chiu W. Direct electron detection yields cryo-EM reconstructions at resolutions beyond 3/4 Nyquist frequency. Journal of Structural Biology. 2012;177:589–601. doi: 10.1016/j.jsb.2012.01.008. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Brilot AF, Chen JZ, Cheng A, Pan J, Harrison SC, Potter CS, Carragher B, Henderson R, Grigorieff N. Beam-induced motion of vitrified specimen on holey carbon film. Journal of Structural Biology. 2012;177:630–637. doi: 10.1016/j.jsb.2012.02.003. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Campbell MG, Cheng A, Brilot AF, Moeller A, Lyumkis D, Veesler D, Pan J, Harrison SC, Potter CS, Carragher B, Grigorieff N. Movies of ice-embedded particles enhance resolution in electron cryo-microscopy. Structure. 2012;20:1823–1828. doi: 10.1016/j.str.2012.08.026. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Bai XC, Fernandez IS, McMullan G, Scheres SH. Ribosome structures to near-atomic resolution from thirty thousand cryo-EM particles. eLife. 2013;2:e00461. doi: 10.7554/eLife.00461. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Suloway C, Pulokas J, Fellmann D, Cheng A, Guerra F, Quispe J, Stagg S, Potter CS, Carragher B. Automated molecular microscopy: the new Leginon system. Journal of Structural Biology. 2005;151:41–60. doi: 10.1016/j.jsb.2005.03.010. [DOI] [PubMed] [Google Scholar]
- 10.Mastronarde DN. Automated electron microscope tomography using robust prediction of specimen movements. Journal of Structural Biology. 2005;152:36–51. doi: 10.1016/j.jsb.2005.07.007. [DOI] [PubMed] [Google Scholar]
- 11.Kirkland A. The effects of electron and photon scattering on signal and noise transfer properties of scintillators in CCD cameras used for electron detection. Ultramicroscopy. 1998 [Google Scholar]
- 12.Canny J. A computational approach to edge detection. IEEE Trans Pattern Analysis and Machine Intelligence. 1986;8:679–698. [PubMed] [Google Scholar]