Abstract
Fast pixelated detectors in scanning transmission electron microscopy (STEM) enable acquisition of a two-dimensional diffraction pattern at every probe position, known as four-dimensional STEM (4D-STEM). In 4D-STEM, each measured intensity has dual character, forming a pixel in diffraction space, and equally a pixel in real space. Applying binary masks in diffraction space is often used to produce ‘virtual’ bright-field or annular-dark field images. Here we present a complementary method for atomic-resolution 4D-STEM, using correlation between real-space images (templates) and the data to create weighted masks in diffraction space. These weighted masks provide significant improvement over binary masks, and can produce images specific to different types of atom columns. We demonstrate this approach by obtaining separate high contrast images of Li and O columns in LiFePO4 and O columns in PbTiO3. This method provides a computationally straightforward route to probe 4D-STEM data, and is particularly effective for specimens of moderate thickness where multiple scattering produces strong correlations in diffraction patterns.
Similar content being viewed by others
Data availability
The workflow, including the example codes running on both experiment and simulation are currently available at https://github.com/WarwickMicroscopy. All relevant data are available from the contributing author upon reasonable request.
References
Ophus, C. Four-Dimensional Scanning Transmission Electron Microscopy (4D-STEM): From Scanning Nanodiffraction to Ptychography and Beyond. Microsc. Microanal. 25, 563–582 (2019).
Barthel, J. Probe: A Software for High-Resolution STEM Image Simulation. Ultramicroscopy 193, 1 (2018).
Seifer, S. & Elbaum, M. Synchronization of scanning probe and pixelated sensor for image-guided diffraction microscopy. HardwareX 14, e00431 (2023).
Zambon, P. et al. High-frame rate and high-count rate hybrid pixel detector for 4D STEM applications. Front. Phys. 11, 1308321 (2023).
Brydson, R. & Brydson, R. Aberration-corrected analytical transmission electron microscopy. Vol. 280 (Wiley Online Library, 2011).
Findlay, S. et al. Dynamics of annular bright field imaging in scanning transmission electron microscopy. Ultramicroscopy 110, 903–923 (2010).
Okunishi, E. et al. Visualization of light elements at ultrahigh resolution by STEM Annular Bright Field Microscopy. Microsc. Microanal. 15, 164–165 (2009).
Shibata, N. et al. Differential phase-contrast microscopy at atomic resolution. Nat. Phys. 8, 611–615 (2012).
Okunishi, E., Sawada, H. & Kondo, Y. Experimental study of annular bright field (ABF) imaging using aberration-corrected scanning transmission electron microscopy (STEM). Micron 43, 538–544 (2012).
Oshima, Y., Lee, S. & Takayanagi, K. Visualization of lithium ions by annular bright field imaging. Microscopy 66, 15–24 (2016).
Wen, Y., Shang, T. & Gu, L. Analytical ABF-STEM imaging of Li ions in rechargeable batteries. Microscopy 66, 25–38 (2016).
de Graaf, S., Momand, J., Mitterbauer, C., Lazar, S. & Kooi, B. J. Resolving hydrogen atoms at metal-metal hydride interfaces. Sci. Adv. 6, eaay4312 (2020).
Ishikawa, R. et al. Direct imaging of hydrogen-atom columns in a crystal by annular bright-field electron microscopy. Nat. Mater. 10, 278–281 (2011).
Lazić, I., Bosch, E. G. & Lazar, S. Phase contrast STEM for thin samples: Integrated differential phase contrast. Ultramicroscopy 160, 265–280 (2016).
Li, Z., Biskupek, J., Kaiser, U. & Rose, H. Integrated differential phase contrast (IDPC)-STEM utilizing a multi-sector detector for imaging thick samples. Microsc. Microanal. 28, 611–621 (2022).
Gao, C. et al. Overcoming contrast reversals in focused probe ptychography of thick materials: An optimal pipeline for efficiently determining local atomic structure in materials science. Appl. Phys. Lett. 121, 081906-6 (2022).
Chen, Z. et al. Electron ptychography achieves atomic-resolution limits set by lattice vibrations. Science 372, 826–831 (2021).
Ma, D., Li, G., Muller, D. A. & Zeltmann, S. E. Information in 4D-STEM: Where it is, and How to Use it. Ultramicroscopy https://doi.org/10.1016/j.ultramic.2026.114351, 114351 (2026).
Zhang, H. et al. Three-dimensional inhomogeneity of zeolite structure and composition revealed by electron ptychography. Science 380, 633–638 (2023).
Allen, F. I. et al. Fast grain mapping with sub-nanometer resolution using 4D-STEM with grain classification by principal component analysis and non-negative matrix factorization. Microsc. Microanal. 27, 794–803 (2021).
Ni, H.-C., Yuan, R., Zhang, J. & Zuo, J.-M. Framework of compressive sensing and data compression for 4D-STEM. Ultramicroscopy 259, 113938 (2024).
Chen, Z. et al. Practical aspects of diffractive imaging using an atomic-scale coherent electron probe. Ultramicroscopy 169, 107–121 (2016).
Kang, S. et al. Mapping local atomic structure of metallic glasses using machine learning aided 4D-STEM. Acta Mater. 263, 119495 (2024).
Chen, Z. et al. Quantitative atomic resolution elemental mapping via absolute-scale energy dispersive X-ray spectroscopy. Ultramicroscopy 168, 7–16 (2016).
Yang, X.-G., Liu, T. & Wang, C.-Y. Thermally modulated lithium iron phosphate batteries for mass-market electric vehicles. Nat. Energy 6, 176–185 (2021).
Padhi, A. K., Nanjundaswamy, K. S. & Goodenough, J. B. Phospho-olivines as positive-electrode materials for rechargeable lithium batteries. J. Electrochem. Soc. 144, 1188 (1997).
Kim, Y.-M., Pennycook, S. J. & Borisevich, A. Y. Quantitative comparison of bright field and annular bright field imaging modes for characterization of oxygen octahedral tilts. Ultramicroscopy 181, 1–7 (2017).
Gonnissen, J., De Backer, A., den Dekker, A. J., Sijbers, J. & Van Aert, S. Detecting and locating light atoms from high-resolution STEM images: The quest for a single optimal design. Ultramicroscopy 170, 128–138 (2016).
Xiao, J. et al. From mining to manufacturing: scientific challenges and opportunities behind battery production. Chem. Rev. 125, 6397–6431 (2025).
Tang, Y. L. et al. Atomic-scale mapping of dipole frustration at 90° charged domain walls in ferroelectric PbTiO3 films. Sci. Rep. 4, 4115 (2014).
Ahmed, S. et al. Visualization of Light Elements using 4D STEM: The Layered-to-Rock Salt Phase Transition in LiNiO2 Cathode Material. Adv. Energy Mater. 10, 2001026 (2020).
Krajnak, M. & Etheridge, J. A symmetry-derived mechanism for atomic resolution imaging. Proc. Natl. Acad. Sci. USA 117, 27805–27810 (2020).
Liang, Z., Song, D. & Ge, B. Optimizing experimental parameters of integrated differential phase contrast (iDPC) for atomic resolution imaging. Ultramicroscopy 246, 113686 (2023).
Spence, J. H. & Taftø, J. ALCHEMI: a new technique for locating atoms in small crystals. J. Microsc. 130, 147–154 (1983).
Rossouw, C., Forwood, C., Gibson, M. & Miller, P. Zone-axis convergent-beam electron diffraction and ALCHEMI analysis of Ti [sbnd] Al alloys with ternary additions. Philos. Mag. A 74, 77–102 (1996).
Qiao, R., Chuang, Y.-D., Yan, S. & Yang, W. Soft x-ray irradiation effects of Li2O2, Li2CO3 and Li2O revealed by absorption spectroscopy. PLoS ONE 7, e49182 (2012).
Genreith-Schriever, A. R. et al. Oxygen hole formation controls stability in LiNiO2 cathodes. Joule 7, 1623–1640 (2023).
Savitzky, B. H. et al. py4DSTEM: A software package for four-dimensional scanning transmission electron microscopy data analysis. Microsc. Microanal. 27, 712–743 (2021).
Madsen, J. & Susi, T. The abTEM code: transmission electron microscopy from first principles. Open Res. Eur. 1, 24 (2021).
Acknowledgements
The authors would like to acknowledge funding from the United Kingdom Research and Innovation (UKRI) grant EP/V028596/1, the facilities at the University of Warwick Electron Microscopy Research Technology Platform (EMRTP), and useful discussions with Prof. B Mendis on links to ALCHEMI. Yining Xie would acknowledge the foundation from the China Scholarship Council (CSC).
Author information
Authors and Affiliations
Contributions
Simulations and 4D-STEM data acquisition were primarily performed by Y.X. with the guidance of E.M. The LiFePO4 powder was synthesised by L.F.P., and the PbTiO3 crystal was grown by M.A. TEM specimens were prepared by Y.X. and R.B. The project was supervised by A.M.S. and R.B. The manuscript was mainly written by Y.X. and R.B. with suggestions from all authors.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Communications Materials thanks Hamish Brown, Benedikt Haas, Anton Gladyshev, and the other anonymous reviewer(s) for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Xie, Y., Moynihan, E., Alexe, M. et al. Template-Derived Masks for 4D-STEM. Commun Mater (2026). https://doi.org/10.1038/s43246-026-01134-9
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s43246-026-01134-9


