Estimation of high-order aberrations and anisotropic magnification from cryo-EM data sets in RELION-3.1

Methods are presented that estimate symmetrical and antisymmetrical optical aberrations, as well as magnification anisotropy, in a cryo-EM data set. Considering these effects improves the resolution of the 3D reconstruction when these effects are present.


Introduction
Structure determination of biological macromolecules using electron cryo-microscopy (cryo-EM) is primarily limited by the radiation dose to which samples can be exposed before they are destroyed. As a consequence of the low electron dose, cryo-EM has to rely on very noisy images. In recent years, advances in electron-detector technology and processing algorithms have enabled the reconstruction of molecular structures at resolutions sufficient for de novo atomic modelling (Fernandez-Leiro & Scheres, 2016). With increasing resolutions, limitations imposed by the optical system of the microscope are becoming more important. In this paper, we propose methods to estimate three optical effects -symmetrical and antisymmetrical aberrations, and magnification anisotropy -which, when considered during reconstruction, increase the attainable resolution.
In order to increase contrast, cryo-EM images are typically collected out of focus, which introduces a phase shift between the scattered and unscattered components of the electron beam. This phase shift varies with spatial frequency and gives rise to the contrast-transfer function (CTF). Since the electronscattering potential of the sample corresponds to a real-valued function, its Fourier-space representation exhibits Friedel symmetry: the amplitude of the complex structure factor at spatial frequency k is the complex conjugate of the structure factor at frequency Àk. Traditionally, the phase shift of these two frequencies has been assumed to be identical, which corresponds to a real-valued CTF. Imperfections of the optical system can, however, produce asymmetrical phase shifts that break the Friedel symmetry of the scattered wave. The effect of this is that the CTF has to be expressed as a complex-valued function, which affects not only the amplitudes of the structure factors but also their phases.
The phase shifts of a pair of corresponding spatial frequencies can be separated into a symmetrical component (i.e. their average shift) and an antisymmetrical component (i.e. their deviation from that average). In this paper, we will refer to the antisymmetrical component as antisymmetrical aberrations. The symmetrical component of the phase shift sometimes also deviates from that predicted by the aberrationfree CTF model (Hawkes & Kasper, 1996). The effect of this is that the CTF is not always adequately represented by a set of elliptical rings of alternating sign, but these so-called Thon rings can take on slightly different shapes. We will refer to this deviation from the traditional CTF model as symmetrical aberrations.
In addition to the antisymmetrical and symmetrical aberrations, the recorded image itself can be distorted by a different magnification in two perpendicular directions. This is called anisotropic magnification. Anisotropic magnification can be detected by measuring the ellipticity of the power spectra of multi-crystalline test samples (Grant & Grigorieff, 2015). This has the advantage of providing a calibration of the absolute magnification, but does require additional experiments, and microscope alignments may drift in between such experiments. For several icosahedral virus data sets, it has been shown that anisotropic magnification may be detected and corrected by an exhaustive search over the amount and the direction of the anisotropy while comparing projections of an undistorted three-dimensional reference map with individual particle images (Yu et al., 2016).
Because the antisymmetrical and symmetrical aberrations and the anisotropic magnification produce different effects, we propose three different and independent methods to estimate them. We recently proposed a method to estimate a specific type of antisymmetrical aberration that arises from a tilted electron beam (Zivanov et al., 2018). In this paper, we propose an extension of this method that allows us to estimate arbitrary antisymmetrical aberrations expressed as linear combinations of Zernike polynomials (Zernike, 1934). The methods to estimate symmetrical aberrations and anisotropic magnification are novel. Similar to the method for antisymmetrical aberration correction, the method for symmetrical aberration correction also uses Zernike polynomials to model the estimated aberrations. The choice of Zernike polynomials as a basis is to some degree arbitrary, and the methods described here could be trivially altered to use any other function as a basis. In particular, we make no use of the orthogonality of Zernike polynomials, since they are only defined to be orthogonal on the entire, evenly weighted unit disc. In our case, the evidence is distributed non-uniformly across Fourier space, and accounting for this fact breaks the orthogonality of the polynomials.
Optical aberrations in the electron microscope have been studied extensively in the materials science community (Batson et al., 2002;Krivanek et al., 2008;Saxton, 1995Saxton, , 2000Meyer et al., 2002). However, until now, their estimation has required specific test samples of known structure and of greater radiation resistance than biological samples. The methods presented in this paper work directly on cryo-EM single-particle data sets of biological samples, making it possible to estimate the effects after the data have been collected, and without performing additional experiments on specific test samples. Using data sets that are publicly available from the EMPIAR database (Iudin et al., 2016), we illustrate that when these optical effects are present their correction leads to reconstruction with increased resolution.

Observation model
We are working on a single-particle cryo-EM data set consisting of a large number of particle images. We assume that we already have a preliminary 3D reference map of the particle up to a certain resolution, and that we know the approximate viewing parameters of all observed particles. This allows us to predict each particle image, which in turn allows us to estimate the parameters of the optical effects by comparing these predicted images with the observed images.
Let X p,k 2 C be the complex amplitude of the observed image of particle p 2 N for 2D spatial frequency k 2 Z 2 . Without loss of generality, we can assume that the observed image is shifted so that the centre of the particle appears at the origin of the image. We can obtain the corresponding predicted image by integrating over the 3D reference along the appropriate viewing direction. According to the centralslice theorem, the corresponding complex amplitude V p,k 2 C of the predicted particle image is given by where W : R 3 7 !C is the 3D reference map in Fourier space and A p is a 3 Â 2 projection matrix arising from the viewing angles. Since the back-projected positions of the 2D pixels k mostly fall between the 3D voxels of the reference map, we determine the values of W(A p k) using linear interpolation. Further, we assume that we have an estimate of the defocus and astigmatism of each particle, as well as the spherical aberration of the microscope, allowing us to also predict the CTFs. We can therefore write where ' k is the phase-shift angle induced by the antisymmetrical aberration, CTF p,k is the real part of the CTF and n p,k represents the noise. The three methods presented in the following all aim to estimate the optical effects by minimizing the squared difference between X p,k and exp(i' k )CTF p,k V p,k . This is equivalent to a maximum-likelihood estimate under the assumption that all n p,k are drawn from the same normal distribution.

Antisymmetrical aberrations
Antisymmetrical aberrations shift the phases in the observed images and they are expressed by the angle ' k in (2). We assume that ' k is constant for a sufficiently large number of particles. This assumption is necessary since, in the presence research papers 254 Jasenko Zivanov et al. High-order aberrations and anisotropic magnification of typically strong noise, we require the information from a large number of particle images to obtain a reliable estimate.
We model ' k using antisymmetrical Zernike polynomials as a basis, where c b 2 R are the unknown coefficients describing the aberration and Z b (k) are a subset of the antisymmetrical Zernike polynomials. The usual two-index ordering of these polynomials is omitted for the sake of clarity. This set of polynomials always includes the first-order terms Z 1 À1 (k) and Z 1 1 (k) that correspond to rigid motion in 2D. It is essential to consider these terms during estimation, since they capture any systematic errors in particle positions that arise when the positions are estimated under antisymmetrical aberrations, in particular under axial coma arising from beam tilt. In that situation, the particles are erroneously shifted in order to neutralise the coma in the mid-frequency range, which overcompensates for the phase shift in the low-frequency range. The measured phase shift is therefore a superposition of an axial coma and a translation and has to be modelled as such.
The coefficients c b are determined by minimizing the following sum of squared differences over all particles, where f k is a heuristical weighting term given by the FSC of the reconstruction; its purpose is to suppress the contributions of frequencies |k| for which the reference is less reliable. Since typical data sets contain between 10 4 and 10 6 particles, and each particle image typically consists of more than 10 4 Fourier pixels, optimizing the nonlinear expression in (4) directly would be highly impractical, especially since the images would likely have to be reloaded from disc in each iteration. Instead, we apply a two-step approach. Firstly, we reduce the above sum over sums of quadratic functions to a single sum over quadratic functions, one for each Fourierspace pixel k, where K is a constant that does not influence the optimum of c b . The per-pixel optimal phase shifts q k 2 C and weights w k 2 R are given by This is the same transformation that we have applied for the beam-tilt estimation in RELION-3.0 (Zivanov et al., 2018); beam tilt is in fact only one of the possible sources of antisymmetrical aberrations. The computation of q k and w k requires only one iteration over all the images in the data set, and for the data sets presented here it took of the order of one hour of time on a 24-core 2.9 GHz Intel Xeon workstation.
Once the q k and w k are known, the optimal c b are determined by minimizing the following sum of squared differences using the Nelder-Mead downhill simplex (Nelder & Mead, 1965) This step requires only seconds of computation time. In addition to making the problem tractable, this separation into two steps also allows us to inspect the phase angles of the perpixel optima q k visually and to determine the type of antisymmetrical aberration present in the data set. After the optimal antisymmetrical aberration coefficients c have been determined, they are used to invert the phase shift of all observed images X when a 3D map is being reconstructed from them.

Symmetrical aberrations
Unlike the antisymmetrical aberrations, the symmetrical aberrations act on the absolute value of the CTF. In the presence of such aberrations, the CTF no longer consists of strictly elliptical rings of alternating sign, but can take on a more unusual form. In our experiments, we have specifically observed the ellipses deforming into slightly square-like shapes. In order to estimate the symmetrical aberration, we need to determine the most likely deformations of the CTFs hidden underneath the measured noisy pixels. Since the micrographs in a cryo-EM data set are usually collected at different defoci, it is not sufficient to measure the collective power spectrum of the entire data set; instead, we need to determine one deformation applied to different CTFs.
In RELION-3.1, the CTF is defined as where D p is the real symmetrical 2 Â 2 astigmatic-defocus matrix for particle p, C s is the spherical aberration of the microscope, is the electron wavelength and p is a constant offset given by the amplitude contrast and the phase shift owing to a phase plate (if one is used). We chose this formulation of astigmatism because it is both more concise and also more practical when dealing with anisotropic magnification, as shown in Section 2.4. In Appendix A, we define D p and we show that this is equivalent to the more common formulation (Mindell & Grigorieff, 2003). We model the deformation of the CTF under symmetrical aberrations by offsetting , where k (d) is modelled using symmetrical Zernike polynomials combined with a set of coefficients d 2 R B that describe the aberration, research papers IUCrJ (2020). 7, 253-267 The optimal values of d b are determined by minimizing another sum of squared differences, where the predicted complex amplitude e V V p;k contains the phase shift induced by the antisymmetrical aberration (if it is known), This is again a nonlinear equation with a large number of terms. In order to make its minimization tractable, we perform the following substitution, with the known column vector r p,k 2 R 2 given by and the unknown t k (d) 2 R 2 by This allows us to transform the one-dimensional nonlinear term for each pixel k into a two-dimensional linear term, In this form, we can decompose E symm into a sum of quadratic functions over all pixels k. This is equivalent to the transformation in (5), only in two real dimensions instead of one complex dimension, where the real symmetrical 2 Â 2 matrix R k is given by and the corresponding per-pixel optimat t k 2 R 2 bŷ Again, computing R k andt t k only requires one iteration over the data set, where for each pixel k five numbers need to be updated for each particle p: the three distinct elements of R k (the matrix is symmetrical) and the two of k . Once R k andt t k are known, the optimal Zernike coefficients d are determined by minimizing E symm in (20) using the Nelder-Mead downhill simplex algorithm. Analogously to the case of the antisymmetrical aberrations, a visual inspection of the optimal k (d) for each pixel allows us to examine the type of aberration without projecting it into the Zernike basis. The CTF phase-shift estimate for pixel k is given by tan À1 ½t t ð1Þ k =t t ð2Þ k , wherê t t ð1Þ k andt t ð2Þ k refer to the two components of t k . Once the coefficients d of the symmetrical aberration are known, they are used to correct any CTF that is computed in RELION-3.1.

Anisotropic magnification
To determine the anisotropy of the magnification, we again compare predicted images with the observed images. We assume that the 3D reference map W has been obtained by averaging views of the particle at in-plane rotation angles drawn from a uniform distribution. This is a realistic assumption, since unlike the angle between the particle and the ice surface, where the particle often shows a preferred orientation, the particle is oblivious to the orientation of the camera pixel grid. Thus, for a data set of a sufficient size, the anisotropy in the individual images averages out and the resulting reference map depicts an isotropically scaled 3D image of the particle (although the high-frequency information on the periphery of the particle is blurred out by the averaging). We can therefore estimate the anisotropy by determining the optimal deformation that has to be applied to the predicted images in order to best fit the observed images.
We are only looking for linear distortions of the image. Such a distortion can be equivalently represented in real space or in Fourier space: if the real-space image is distorted by a 2 Â 2 matrix M, then the corresponding Fourier-space image is distorted by M À1> . We choose to operate in Fourier space since this allows us to determine the deformation of the predicted image without also distorting the CTF. We assume that the CTF parameters known at this point already fit the Thon rings observed in the image, so we only deform the particle itself.
Formally, we define the complex amplitude V p,k (M) of the predicted image deformed by a 2 Â 2 matrix M by and we aim to determine such a matrix M that minimizes where e V V again refers to the phase-shifted complex amplitudes as defined in (15). We are not assuming that M is necessarily symmetrical, which allows it to express a skew component in addition to the anisotropic magnification. Such skewing effects are considered by the models commonly used in computer vision applications (Hartley, 1994;Hartley & Zisserman, 2003), but not in cryo-EM. We have decided to model the skew component as well, in case it should manifest in a data set. The expression given in (25) is yet another sum over a large number of nonlinear terms. In order to obtain a sum over squares of linear terms, we first express the deformation by M as a set of per-pixel displacements k 2 R 2 , Next, we perform a first-order Taylor expansion of W around A p k. We know that this linear approximation of W is research papers 256 Jasenko Zivanov et al. High-order aberrations and anisotropic magnification reasonable for all frequencies k at which the reference map contains any information, because the displacements d k are likely to be smaller than one voxel there. If they were significantly larger then they would prevent a successful computation of the complex amplitudes of the reference map at these frequencies, except if a very large number of particles were to be considered. The linear approximation is given as where the gradient g p,k 2 C 2 is a column vector that is computed by forward-projecting the 3D gradient of W (which is given by the linear interpolation), It is essential to compute g p,k in this way, since computing it numerically from the already projected image V p,k would lead to a systematic underestimation of the gradient (owing to the interpolation) and thus to a systematic overestimation of the displacement. Note also that the change in '(k) as a result of the displacement is being neglected. This is owing to the fact that the phase shift, like the CTF, has also been computed from the distorted images, so that we can assume it to be given correctly in the distorted coordinates.
Using the terms transformed in this way, the sum of squared errors can be approximated by This corresponds to two linear systems of equations to be solved in a least-squares sense, either for the per-pixel displacements k (29) or for the global deformation matrix M (30). Analogously to the aberrations methods, we solve for both. Knowing the per-pixel solutions again allows us to confirm visually whether the observed deformations are consistent with a linear distortion; if they are, then the perpixel displacements k will follow a linear function of k.
The optimal displacements k k 2 R 2 are equal tô with the real symmetrical 2 Â 2 matrix S k given by Note that this is equivalent to treating the real and imaginary components of (29) as separate equations, since Re(z*w) = Re(z)Re(w) + Im(z)Im(w) for all z, w 2 C. Analogously to the estimation of the symmetrical aberrations, S k and e k are computed in one iteration by accumulating five numbers for each pixel k over the entire data set. The optimal 2 Â 2 deformation matrix M is determined by first reshaping it into a column vector m 2 R 4 , The expression in (30) can then be written as with the column vector a p,k 2 C 4 given by We can now compute the optimal m, where the real symmetrical 4 Â 4 matrix T and the column vector l 2 R 4 are equal to There is no need to compute T and l explicitly by iterating over all particles p again, since all the necessary sums are already available as part of S k and e k . Instead, we only need to sum up the corresponding values over all pixels k. This is shown in Appendix B.
In order to correct for the anisotropy after M has been estimated, we never resample the observed images. When we compute a 3D map from a set of observed images, we do so by inserting 2D slices into the 3D Fourier-space volume. Since this process requires the insertion of 2D pixels at fractional 3D coordinates (and thus interpolation), we can avoid any additional resampling of the observed images by instead inserting pixel k into the 3D map at position A p Mk instead of at A p k. Analogously, if the methods described in Sections 2.2 and 2.3 are applied after the distortion matrix M is known, then the predicted images are generated by reading the complex amplitude from W at 3D position A p Mk. This has been omitted from the description of these methods to aid readability.
Furthermore, when dealing with anisotropic magnification in RELION, we have chosen to always define the CTF in the undistorted 2D coordinates. The primary motivation behind this is the assumption that the spherical aberration (the second summand in equation 10) should only be radially symmetrical if the image is not distorted. For this reason, once the distortion matrix M is known, we need to transform the astigmaticdefocus matrix D into the new undistorted coordinate system. This is performed by conjugating D under M À1 , When a CTF value is computed after this transformation has been performed, it is always computed as CTF(Mk) instead of as CTF(k).

research papers
IUCrJ (2020). 7, 253-267 The Zernike polynomials that are used as a basis for the symmetrical and antisymmetrical aberrations are also defined in the undistorted coordinates, i.e. the Zernike polynomials are also evaluated at Z b (Mk). Note that correction of these coefficients after estimating M cannot be performed analytically, but would require a numerical solution. Instead, we propose that the aberrations be estimated only after M is known. In severe cases, a better estimate of M can be obtained by repeating the magnification refinement after determining optimal defocus and astigmatism estimates using the initial estimate of M. We illustrate this scenario on a synthetic example in Section 3.4.

Implementation details
The three methods described above need to be applied to a large number of particles in order to obtain a reliable estimate. Nevertheless, we allow the three effects to vary within a data set in RELION-3.1. To facilitate this, we have introduced the concept of optics groups: partitions of the particle set that share the same optical properties, such as the voltage or pixel size (or the aberrations and the magnification matrix). As of RELION-3.1, those optical properties are allowed to vary between optics groups, while particles from different groups can still be refined together. This makes it possible to merge data sets collected on different microscopes with different magnifications and aberrations without the need to resample the images. The anisotropic magnification refinement can then be used to measure the relative magnification between the optics groups by refining their magnification against a common reference map.
Since most of the optical properties of a particle are now defined through the optics group to which it belongs, each particle STAR file written out by RELION-3.1 now contains two tables: one listing the optics groups and one listing the particles. The particles table is equivalent to the old table, except that certain optical properties are no longer listed. Those are typically the voltage, the pixel and image sizes, the spherical aberration and the amplitude contrast, and they are instead specified in the optics groups list. This reduces the overall file size, and makes manual editing of these properties easier.
A number of other optical properties are still stored in the particles list, allowing different values for different particles in the same group. These properties make up the per-particle part of the symmetrical aberration, i.e. the coefficient p,k in (10). The specific parameters that can vary per particle are the following: the phase shift, defocus, astigmatism, the spherical aberration and the B-factor envelope.
The B-factor envelope is a two-dimensional parameter consisting of a scale factor S and the B factor itself. It corresponds to a Gaussian envelope over the CTF [given by S exp(À4B|k| 2 )] and it provides a means of weighting different particles against each other. Specifically, a greater B factor means that the particle will contribute less to the higher frequencies of the reconstruction. Although B factors on the CTF have been available in earlier releases of RELION, the method to estimate them is new in version 3.1.
We have developed a new CTF refinement program that considers all particles in a given micrograph and locally optimises all of the above five parameters, while each parameter can be modelled either per particle, per micrograph or remain fixed. The program then uses the L-BFGS algorithm (Liu & Nocedal, 1989) to find the least-squares optimal parameter configuration given all the particles in the micrograph. This allows the user to find, for example, the most likely phase shift of a micrograph while simultaneously finding the most likely defocus value of each particle in it. The program has been engineered to offer a wide range of combinations, even though some of those may not appear to be useful at first, for example estimating the spherical aberration or the phase shift per particle. In this manner the program allows exceptions, for example very large particles, but we recommend most users to only model the defocus per particle and everything else per micrograph or not at all.
Note that the terms defocus and astigmatism above refer specifically to z (defocus) and a 1 and a 2 (astigmatism), where the astigmatic defocus matrix D p of particle p in (10) is composed as follows: a 2 a 2 z À a 1 : As an example, this would allow the defocus to be expressed per particle by allocating a separate z for each particle, while the astigmatism could be estimated per micrograph by requiring a 1 and a 2 to be identical for all particles.

Results
To validate our methods and to illustrate their usefulness, we describe four experiments using publicly available data sets. Firstly, we assess aberration correction on two data sets that were collected on a 200 keV Thermo Fisher Talos Arctica microscope. Secondly, we illustrate a limitation of our method for modelling aberrations using a data set that was collected on a 300 keV Thermo Fisher Titan Krios microscope with a Volta phase plate with defocus (Danev et al., 2017). Thirdly, we apply our methods to one of the highest resolution cryo-EM structures published so far, collected on a Titan Krios without a phase plate. Finally, we determine the precision to which the magnification matrix M can be recovered in a controlled  Table 1 Half-set resolutions (Å ) obtained at different stages of our processing pipeline in the aberration experiment on aldolase and 20S proteasome at 200 keV.

Aberration experiment at 200 keV
We reprocessed two publicly available data sets: one on rabbit muscle aldolase (EMPIAR-10181) and the other on the Thermoplasma acidophilum 20S proteasome (EMPIAR-10185). Both data sets were collected on the same 200 keV Talos Arctica microscope, which was equipped with a Gatan K2 Summit direct electron camera. At the time of the original publication (Herzik et al., 2017), the aldolase could be reconstructed to 2.6 Å resolution and the proteasome to 3.1 Å resolution using RELION-2.0.
We picked 159 352 particles for the aldolase data set and 74 722 for the proteasome. For both data sets, we performed five steps and measured the resolution at each step. Firstly, we refined the particles without considering the aberrations. The resulting 3D maps were then used to perform an initial CTF refinement in which the per-particle defoci and the aberrations were estimated. The particles were then subjected to Bayesian polishing , followed by another iteration of CTF refinement. In order to disentangle the effects of improved Bayesian polishing from the aberration correction, we also performed a refinement with the same polished particles, but assuming all aberrations to be zero. We measured the Fourier shell correlation (FSC) between the two independent half sets and against maps calculated from the known atomic models (PDB entries 1zah and 6bdf, respectively; St-Jean et al., 2005;Campbell et al., 2015). The plots are shown in Fig. 1 and the resolutions measured by the half-set method, using a threshold of 0.143, in Table 1. Plots of the aberration estimates are shown in Fig. 2. Fig. 2 indicates that both data sets exhibit antisymmetrical as well as symmetrical aberrations. For both data sets, the shapes of both types of aberrations are well visible in the per-pixel plots, and the parametric Zernike fits capture these shapes well. The antisymmetrical aberrations correspond to a trefoil (or threefold astigmatism) combined with a slight axial coma and they are more pronounced than the symmetrical aberrations. The  Left: FSC plots from the aberration experiments on aldolase and 20S proteasome at 200 keV. The top plot shows the half-set FSC and the bottom plot shows the FSC against maps calculated from the respective atomic models (PDB entries 1zah and 6bdf; see text for details). Note that estimating the aberrations during the initial CTF refinement already produces a significant increase in resolution (red line). It also allows more effective Bayesian polishing and defocus refinement, increasing the resolution further (solid black line). Neglecting the aberrations while keeping the remainder of the parameters the same (dashed black line) allows us to isolate the effects of aberration correction. For the proteasome, it also exposes a slight (false) positive peak in the half-set FSC around 2.7 Å which corresponds to a negative peak in the reference FSC. This indicates that the phases of the complex amplitudes of the 3D map are, on average, flipped at this frequency band owing to the strong aberrations. Right: small regions of the resulting maps illustrating the effect of considering the aberrations. The maps correspond to the solid black lines (aberrations considered) and the dashed black lines (aberrations not considered) in the FSC plots. The aldolase maps were sharpened by a B factor of À50 Å 2 and contoured at 3.7. The proteasome maps were sharpened by a B factor of À55 Å 2 and contoured at 3.5. All maps were rendered by PyMOL v.1.8.4.1. trefoil is visible as three alternating areas of positive and negative phase difference, with approximate threefold symmetry, in the images for the antisymmetrical aberration estimation (on the left in Fig. 2). The axial coma breaks the threefold symmetry by making one side of the image more positive and the opposite side more negative. The apparent fourfold symmetry in the images for the symmetrical aberrations (on the right in Fig. 2) corresponds to fourfold astigmatism and is strongest for the proteasome data set. The proteasome also shows the stronger antisymmetrical aberrations, which even exceed 180 at the higher frequencies.
Note that because the per-pixel plots show the phase angle oft t k from (20), they wrap around once they reach 180 . This has no effect on the estimation of the parameters, however, sincet t k itself, which is a 2D point on a circle, is used in the optimization and not its phase angle.
The FSC plots (Fig. 1) indicate that aberration correction leads to higher resolution, as measured by both the FSC between independently refined half-maps and the FSC against maps calculated from the atomic models. Comparing the result of the second CTF refinement and its equivalent run without aberration correction (the lower two lines in Table 1; Fig. 3), the resolution increased from 2.5 to 2.1 Å for the aldolase data set and from 3.1 to 2.3 Å for the proteasome. In addition, aberration correction also allows more effective Bayesian polishing and defocus estimation, which is the reason for performing the CTF refinement twice.

Phase-plate experiment
We also analysed a second data set on a T. acidophilum 20S proteasome (EMPIAR-10078). This data set was collected using a Volta phase plate (VPP; Danev et al., 2017) under defocus. We picked 138 080 particles and processed them analogously to the previous experiment, except that the CTF refinement now included the estimation of anisotropic magnification. The estimated aberrations are shown in Fig. 4 and the FSCs in Fig. 6. Antisymmetrical and symmetrical aberration experiments on aldolase and the 20S proteasome at 200 keV. The upper image of each pair shows the independent phase-angle estimates for each pixel, while the lower image shows the parametric fit using Zernike polynomials. These types of aberrations are referred to as trefoil or threefold astigmatism (left) and fourfold astigmatism (right). The proteasome trefoil exceeds 180 at the very high frequencies, so the sign in the per-pixel plot wraps around. This has no impact on the parametric fit. The dashed circles indicate resolutions of 1.94 and 1.98 Å , respectively.
The purpose of a VPP is to shift the phase of the unscattered beam in order to increase the contrast against the scattered beam. This is accomplished by placing a heated film of amorphous carbon (the VPP) at the back-focal plane of the microscope and letting the electron beam pass through it after it has been scattered by the specimen. The central, unscattered beam, which exhibits much greater intensity than the unscattered components, then spontaneously creates a spot of negative electric potential on the VPP (Danev et al., 2014). It is this spot which then causes the phase shift in the unscattered beam. After being used for a certain amount of time, the spot charges up even more and develops imperfections. At this point, the user will typically switch to a different position on the carbon film. The charge at the previous position will decay, although some charge may remain for an extended period. If the VPP is shifted by an insufficient distance, the old spot will reside in a position traversed by scattered rays corresponding to some higher image frequency. We hypothesize that we can observe these spots in our symmetrical aberration plots. The symmetrical plots show a positive phase shift at the center of frequency space (Fig. 4). We hypothesize that this spot is caused by the size of the charge built up at the currently used position on the phase plate (Danev & Baumeister, 2016). Moreover, this plot shows four additional spots at higher spatial frequencies. We hypothesize that these may arise from residual charges on previously used phase-plate positions. These charges would then interfere with the diffracted rays at higher spatial frequency from the current position, resulting in the observed spots in the aberration image. The absence of the vertical neighbor spots from the antisymmetrical plot suggests that the spots were scanned in a vertically alternating but horizontally unidirectional sense. This is illustrated in Fig. 5.
Because these types of aberrations do not satisfy our smoothness assumptions, they cannot be modelled well using a small number of Zernike basis polynomials. Although increasing the number of Zernike polynomials would in principle allow the expression of any arbitrary aberration function, it also decreases the ability of the system to extrapolate the aberration into the unseen high-frequency regions. As a consequence, our aberration model cannot be used to neutralise the effects of the phase-plate positions, which is Effects of the symmetrical aberrations on the CTF of the 20S proteasome as part of the aberration experiment at 200 keV. The image on the left shows a CTF expressed by the traditional model, while that on the right shows the fit of our new model which considers higher-order symmetrical aberrations. Note that the slightly square-like shape that arises from fourfold astigmatism cannot be expressed by the traditional model. The aberrations correspond to the bottom right image in Fig. 2.

Figure 4
Antisymmetrical (left) and symmetrical (right) aberrations measured on the phase-plate data set. The upper image shows independent per-pixel estimates and the lower image shows the parametric fits. Note the four afterimages of previously used phase-plate spots in the upper right image. They cannot be represented by our model. The dashed circle indicates a resolution of 2.12 Å .
confirmed by the FSC plots in Fig. 6. In practice, this problem can be avoided experimentally by spacing the phase-plate positions further apart and thus arbitrarily increasing the affected frequencies.
The estimated magnification anisotropy for this data set is relatively weak. The final magnification matrix M we recovered was M ¼ 1:006 0:005 0:006 0:998 ; which corresponds to 1.35% anisotropy along two perpendicular axes rotated by 66 .

High-resolution experiment
We applied our methods to a mouse heavy-chain apoferritin data set (EMPIAR-10216) collected on a 300 keV Titan Krios fitted with a Falcon 3 camera. At the time of its publication, the particle could be reconstructed to a resolution of 1.62 Å using RELION-3.0 (Danev et al., 2019). This data set thus offers us a means to examine the effects of higher-order aberrations and anisotropic magnification at higher resolutions.
We compared the following three reconstructions. Firstly, the original, publicly available map. Since it had been estimated using RELION-3.0, the effects of beam tilt could be corrected for, but none of the other high-order aberrations or anisotropic magnification. Secondly, the aberrations alone: for this, we proceeded from the previous refinement and first estimated the higher order aberrations and then, simultaneously, per-particle defoci and per-micrograph astigmatism. Thirdly, we performed the same procedure but only after first estimating the anisotropic magnification. For the third case, the entire procedure was repeated after a round of refinement. For all three cases, we calculated the FSC between the independently refined half-maps and the FSC against an atomic model, PDB entry 6s61, that was built into an independently reconstructed cryo-EM map of mouse apoferritin at a resolution of 1.8 Å . In the absence of a higher-resolution atomic model, comparison with PDB entry 6s61 relies on the assumption that the geometrical restraints applied during atomic modelling resulted in predictive power at resolutions beyond 1.84 Å . We used the same mask as in the original publication for correction of the solvent-flattening research papers 262 Jasenko Zivanov et al. High-order aberrations and anisotropic magnification IUCrJ (2020). 7, 253-267

Figure 5
Our interpretation of the aberration plots in Fig. 4. The presence of all four neighbouring spots in the symmetrical plot, together with the absence of the vertical neighbours from the antisymmetrical plot, indicates that the VPP spots were scanned in a vertically alternating and horizontally unidirectional sense, as shown in the first image. This partitions a majority of the spots into two classes, a and b, in which the direct vertical neighbour is located on opposite sides. The total phase shift induced by the neighboring spots is decomposed into an antisymmetrical and a symmetrical part. Both of them are averaged over particles from both classes during estimation, so the vertical neighbor partially cancels out in the antisymmetrical plot but not in the symmetrical plot.

Figure 6
Half-set (top) and map versus atomic model (bottom) FSC plots for the phase-plate data set. The atomic model used was again PDB entry 6bdf. Note that considering the aberrations does not improve the resolution, since these types of aberrations cannot be expressed by our model. Nevertheless, the CTF refinement does improve the resolution owing to the new micrograph global defocus and phase-shift estimation and owing to considering the slightly anisotropic magnification. effects on the FSC between the independent half-maps, and we used the same set of 147 637 particles throughout.
The aberration plots in Fig. 7 show that this data set exhibits a trefoil aberration and faint fourfold astigmatism. In the magnification plot in Fig. 8, we can see a clear linear relationship between the displacement of each pixel k and its coordinates. This indicates that the measured displacements stem from a linearly distorted image and that the implied distortion is a horizontal dilation and a vertical compression. This is consistent with anisotropic magnification, since the average magnification has to be close to 1 because the reference map itself has been obtained from the same images under random in-plane angles. The smoothness of the per-pixel plot suggest that the large number of particles allows us to measure the small amount of anisotropy reliably. The magnification matrix we estimated was which corresponds to 0.54% anisotropy. As can be seen in the FSC curves in Fig. 9, considering either of these effects is beneficial, while considering both yields a resolution of 1.57 Å , an improvement of three shells over the reconstruction obtained using RELION-3.0.

Simulated anisotropic magnification experiment
To measure the performance of our anisotropic magnification estimation procedure in the presence of a larger amount of anisotropy, we also performed an experiment on synthetic data. For this experiment, we used a small subset (9487 particles from 29 movies) taken from a human apoferritin data set (EMPIAR-10200), which we had processed before (Zivanov et al., 2018). We distorted the micrographs by applying a known anisotropic magnification using MotionCor2 (Zheng et al., 2017). The relative scales applied to the images were 0.95 and 1.05, respectively, along two perpendicular axes rotated at a 20 angle. In this process, about 4% of the particles were mapped outside the images, so the number of distorted particles is slightly smaller at 9093.
We then performed four rounds of refinement on particle images extracted from the distorted micrographs in order to recover the anisotropic magnification. Each round consisted of a CTF refinement followed by an autorefinement. The CTF refinement itself was performed twice each time: once to estimate the anisotropy and then again to determine the per-particle defoci and per-micrograph astigmatism. The FSC curves for the different rounds can be seen in Fig. 10. We observe that the FSC already approaches that of the undistorted particles after the second round. In the first round, the initial 3D reference map is not precise enough to allow a reliable recovery of anisotropy.
The magnification matrix M recovered in the final round is M ¼ 1:060 À0:032 À0:032 0:984 : It corresponds to the relative scales of 0.951 and 1.049, respectively, along two perpendicular axes rotated by 19.939 , although it also contains an additional uniform scaling by a factor of 1.022. The uniform scaling factor has no influence on the refinement, but it does change the pixel size of the resulting map. We therefore note that caution must be taken to either enforce the product of the two relative scales to be 1, or to otherwise calibrate the pixel size of the map against an external reference. This experiment shows that the anisotropy of the magnification can be estimated to three significant digits, even from a relatively small number of particles. Since the estimate arises Higher-order aberrations measured on the high-resolution mouse apoferritin data set. The antisymmetrical plot (left) shows a significant trefoil aberration, while the symmetrical plot (right) shows a faint fourfold astigmatism. Although the aberrations are comparatively weak, they are clearly measurable and considering them does lead to a small improvement in resolution (see Fig. 9). The dashed circle indicates a resolution of 1.04 Å . from adding up contributions from all particles, the precision increases with their number.

Discussion
Although we previously described a method to estimate and correct for beam-tilt-induced axial coma , no methods to detect and correct for higher-order optical aberrations have been available until now. It is therefore not yet clear how often these aberrations are a limiting factor in cryo-EM structure determination of biological macromolecules. The observation that we have already encountered several examples of strong threefold and fourfold astigmatism on two different types of microscopes suggests that these aberrations may be relatively common.
Our results with the aldolase and 20S proteasome data sets illustrate than when antisymmetrical and/or symmetrical aberrations are present in the data, our methods lead to an important increase in the achievable resolution. Both aldolase and the 20S proteasome could be considered as 'easy' targets for cryo-EM structure determination: they have both been used to test the performance of cryo-EM hardware and software (see, for example, Li et al., 2013;Danev & Baumeister, 2016;Herzik et al., 2017;Kim et al., 2018). However, our methods are not limited to standard test samples, and have already been used to obtain biological insights from much more challenging data. Images of brain-derived tau filaments from an ex-professional American football player with chronic traumatic encephalopathy that we recorded on a 300 keV Titan Krios microscope showed severe threefold and fourfold astigmatism. Correction for these aberrations led to an increase in resolution from 2.7 to 2.3 Å , which allowed the visualisation of alternative side-chain conformations and of ordered water molecules inside the amyloid filaments (Falcon et al., 2019).
Titan Krios microscopes come equipped with lenses that can be tuned to correct for threefold astigmatism, although this operation is typically only performed by engineers. The Titan Krios microscope that was used to image the tau filaments from the American football player is part of the UK national cryo-EM facility at Diamond (Clare et al., 2017). After measuring the severity of the aberrations, its lenses were re-adjusted, and no higher-order aberrations have been detected on it since (Peijun Zhang, personal communication). Talos Arctica microscopes do not have lenses to correct for trefoil, and the microscope that was used to collect the aldolase and the 20S proteasome data sets at the Scripps Research Institute continues to yield data sets with fluctuating amounts of aberrations (Gabriel Lander, personal communication). Until the source of these aberrations are determined or better understood, the corrections proposed here will be important for processing of data acquired on these microscopes. The extent to which higher-order aberrations are limiting will depend on the amount of threefold and fourfold astigmatism, as well as on the target resolution of the reconstruction. We have only observed noticeable increases in resolution for data sets that yielded reconstructions with resolutions beyond 3.0-3.5 Å before the aberration correction. However, the effects of the aberrations are more pronounced for lowerenergy electrons. Therefore, our methods may become particularly relevant for data from 100 keV microscopes, the development of which is envisioned to yield better images for thin specimens and to bring down the elevated costs of modern cryo-EM structure determination Naydenova et al., 2019).
The effects of anisotropic magnification on cryo-EM structure determination of biological samples have been described previously, and methods to correct for it have been proposed (Grant & Grigorieff, 2015;Yu et al., 2016). Our method bears some resemblance to the exhaustive search algorithm implemented in JSPR (Guo &   Anisotropic magnification plots for the high-resolution mouse apoferritin data set. The top row shows the estimated displacement for each pixel ( k k in equation 31), while the bottom row shows the displacement corresponding to the estimated magnification matrix M (i.e. Mk À k). Note that the per-pixel estimates follow a linear relationship, indicating that the displacements are indeed caused by a linear transformation of the image. The horizontal coordinate is defined as increasing to the right and the vertical coordinate as increasing downwards, so the two plots indicate a horizontal dilation and a vertical compression. The dashed circle indicates a resolution of 1.04 Å . Jiang, 2014;Yu et al., 2016), in that it compares reference projections with high signal-to-noise ratios and the particle images of an entire data set. However, our method avoids the computationally expensive two-dimensional grid search over the direction and magnitude of the anisotropy in JSPR. In addition, our method is, in principle, capable of detecting and modeling skew components in the magnification.
In addition to modeling anisotropic magnification, our method can also be used for the combination of different data sets with unknown relative magnifications. In cryo-EM imaging, the magnification is often not exactly known. Again, it is possible to accurately measure the magnification using crystalline test specimens with known diffraction geometry, but in practice errors of up to a few percent in the nominal pixel size are often observed. When processing data from a single data set, such errors can be absorbed, to some extent, in the defoci values. This produces a CTF of very similar apperance but at a slightly different scale. Therefore, a small error in pixel size only becomes a problem at the atomic modeling stage, where it leads to overall contracted or expanded models with bad stereochemistry. (Please note that this is no longer true at high spatial frequencies owing to the absolute value of the C s ; e.g. beyond 2.5 Å for non-C scorrected 300 kV microscopes.) When data sets from different sessions are combined, however, errors in their relative magnification will affect the 3D reconstruction at much lower resolutions. Our method can directly be used to correct for such errors. In addition, to provide further convenience, our new implementation allows the combination of particle images with different pixel and box sizes into a single refinement. The performance of our methods under these conditions remains to be illustrated. Often, when two or more different data sets are combined, a single data set outperforms the other data sets at the resolution limit of the reconstruction and combination of the data sets does not improve the map.
Our results illustrate that antisymmetrical and symmetrical aberrations, as Half-set (top) and map versus atomic model (bottom) FSC plots for the simulated anisotropic magnification experiment on human apoferritin. The atomic model used was PDB entry 5n27 (Ferraro et al., 2017). From the second iteration onward, the curves lie close to their final positions. Note that the resolution of the undistorted reconstruction cannot be reached by the distorted reconstructions, since particles have been lost along the way and the image pixels have been degraded by resampling.

Figure 9
Half-set (top) and map versus atomic model (bottom) FSC plots for the high-resolution mouse apoferritin data set. Considering the anisotropic magnification (black line) produces a further improvement in terms of resolution beyond what is attainable by considering the aberrations alone (blue line). The atomic model used was PDB entry 6s61, another publicly availably cryo-EM structure. The resolution indicated by the bottom plot is limited by the fact that the resolution of the atomic model is only 1.84 Å .
well as anisotropic magnification, can be accurately estimated and modelled a posteriori from a set of noisy projection images of biological macromolecules. No additional test samples or experiments at the microscope are necessary; all that is needed is a 3D reconstruction of sufficient resolution that the optical effects become noticeable. Our methods could therefore in principle be used in a 'shoot first, ask questions later' type of approach, in which the speed of image acquisition is prioritized over exhaustively optimizing the microscope settings. In this context, we caution that while the boundaries of applicability of our methods remain to be explored, it may be better to reserve their use for unexpected effects in data from otherwise carefully conducted experiments.

APPENDIX A
In the following, we show that our formulation of the astigmatic-defocus term as a quadratic form is equivalent to the traditional form as defined in RELION, which in turn was based on the model in CTFFIND (Mindell & Grigorieff, 2003). Let the two defoci be given by Z 1 and Z 2 , the azimuthal angle of astigmatism by ' A and the wavelength of the electron by . We then wish to show that for the astigmatic-defocus matrix D defined as The multiplication by Q rotates k into the coordinate system of the astigmatism, Multiplying out the quadratic form and applying the definitions of Z and Z d yields k > Dk ¼ ðQkÞ > ÁðQkÞ ð 49Þ ¼ À½Z 1 cos 2 ð' k Þ þ Z 2 sin 2 ð' k Þjkj 2 ¼ ½ðZ þ Z d cos 2 ð' k Þ À Z d sin 2 ð' k Þjkj 2 : By substituting cos(2' k ) for cos 2 (' k ) À sin 2 (' k ) we see that this is equivalent to the original formulation.
In order to convert a given D into the traditional formulation, we perform an eigenvalue decomposition of ÀD/(). The two eigenvalues are then equal to Z 1 and Z 2 , respectively, while the azimuthal angle of the eigenvector corresponding to Z 1 is equal to ' A .

APPENDIX B
Computing T and l explicitly through (38) would require iterating over all particles p in the data set. Since we have already accumulated the terms in S k and e k over all p, we can avoid this by instead performing the following summation over all pixels k, T ¼ P k f k e S S k ð e k k e k k > Þ; ð52Þ l ¼ P