Matlab Source Codes for Projection Alignment

in Atomic Electron Tomography (AET)


Posted on Sept. 27, 2017


I. Overview

To achieve atomic resolution reconstruction using AET [1], the projections in a tilt series have to be aligned to a common axis (not necessarily the true tilt axis) with atomic level precision along both the x and y axes. We have implemented two different alignment procedures: center of mass (CM) and common line methods [2]. These methods have been successful for achieving high-precision alignment of electron tomography tilt series. Combined with powerful reconstruction algorithms such as EST and GENFIRE [3-5], they produce atomic resolution reconstructions to reveal crystal defects and disorder in materials with unprecedented 3D detail [1,2,4-7].


II. Center of Mass Alignment

To align the projections along the direction perpendicular to the tilt axis, we developed a method based on the CM [2]. When a 3D object is tilted around the y axis from 0° to 360°, the CM of the object forms a circle. However, in the special geometry where the center of mass coincides with the origin of the x axis, this circle becomes a point. To determine the center of mass in this special geometry, one can project each 2D projection onto the x axis, chose a pixel as the origin and calculated the center of mass (CM) along the x axis, xCM=i xi ρ(xi)/i xi ρ(xi), where ρ(xi) is the Coulomb potential at position xi. We then shifted this projection to set xCM as the new origin of the x axis. Through repeating this process for all projections, we aligned the tilt series to the common axis that coincides with the new origin. Both our simulation and experimental results indicate that the center-of-mass alignment is a general method and can align the projections of a tilt series at atomic level accuracy, even with relatively high noise and the nonlinear effects [1,2,4-7].


III. Common Line alignment

Common line alignment method has been developed in the electron tomography community since 1970, especially for accurate spatial alignment along the tilt axis [8,9]. According to the Fourier slice theorem, each measured 2D projection image corresponds to a slice through the origin of 3D Fourier space. Therefore, for a single tilt tomography dataset, all projections (i.e., Fourier slices) will intersect on a single line along the tilt axis in Fourier space. In real space, this means that if we further project the measured 2D projection images onto the tilt axis to obtain 1D curves, they all should exactly overlap each other. By using cross-correlation, we can align all 1D projected curves together to achieve accurate alignment along the tilt axis.


To facilitate those who are interested in our method, we make the alignment method codes in Matlab freely available below.


Click here to download a .zip archive including MATLAB codes for the CM and common line alignment methods with an example dataset.


To achieve the best result, we suggest that you combine the CM and common line alignment methods with angular refinement using GENFIRE. For experimental tilt series, the background of each projection must be carefully subtracted before the alignment.     


If you use the above source codes in your publications and/or presentations, we request you cite our paper: M. C. Scott, C. C. Chen, M. Mecklenburg, C. Zhu, R. Xu, P. Ercius, U. Dahmen, B. C. Regan and J. Miao, "Electron tomography at 2.4-ångström resolution", Nature 483, 444–447 (2012).


This document was prepared by Yongsoo Yang, AJ Pryor, and John Miao in the Department of Physics & Astronomy and California NanoSystems Institute, University of California, Los Angeles, California, 90095, USA. Email:



1. J. Miao, P. Ercius and S. J. L. Billinge, "Atomic electron tomography: 3D structures without crystals", Science 353, aaf2157 (2016).

2. M. C. Scott, C. C. Chen, M. Mecklenburg, C. Zhu, R. Xu, P. Ercius, U. Dahmen, B. C. Regan and J. Miao, "Electron tomography at 2.4-ångström resolution", Nature 483, 444–447 (2012).

3. J. Miao, F. Förster and O. Levi, "Equally Sloped Tomography with Oversampling Reconstruction", Phys. Rev. B. 72, 052103 (2005).

4. Y. Yang, C.-C. Chen, M. C. Scott, C. Ophus, R. Xu, A. Pryor Jr., L. Wu, F. Sun, W. Theis, J. Zhou, M. Eisenbach, P. R. C. Kent, R. F. Sabirianov, H. Zeng, P. Ercius and J. Miao, "Deciphering chemical order/disorder and material properties at the single-atom level", Nature 542, 75-79 (2017).

5. A. Pryor Jr., Y. Yang, A. Rana, M. Gallagher-Jones, J. Zhou, Y. H. Lo, G. Melinte, W. Chiu, J. A. Rodriguez and J. Miao, "GENFIRE: A generalized Fourier iterative reconstruction algorithm for high-resolution 3D imaging", Sci. Rep. 7, 10409 (2017).

6. C. C. Chen, C. Zhu, E. R. White, C.-Y. Chiu, M. C. Scott, B. C. Regan, L. D. Marks, Y. Huang and J. Miao, “Three-dimensional imaging of dislocations in a nanoparticle at atomic resolution”, Nature 496, 74–77 (2013).

7. R. Xu, C.-C. Chen, L. Wu, M. C. Scott, W. Theis, C. Ophus, M. Bartels, Y. Yang, H. Ramezani-Dakhel, M. R. Sawaya, H. Heinz, L. D. Marks, P. Ercius and J. Miao, "Three-Dimensional Coordinates of Individual Atoms in Materials Revealed by Electron Tomography", Nature Mater. 14, 1099-1103 (2015).

8. R. A. Crowther, L. A. Amos, J. T. Finch, D. J. De Rosier, and A. Klug, “Three dimensional reconstructions of spherical viruses by Fourier synthesis from electron micrographs.”, Nature 226, 421–425 (1970).

9. Y. Liu, P. A. Penczek, B. McEwen, and J. Frank, “A marker-free alignment method for electron tomography”, Ultramicroscopy 58, 393–402 (1995).