DOE PAGES title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: py4DSTEM: A Software Package for Four-Dimensional Scanning Transmission Electron Microscopy Data Analysis

Abstract

Scanning transmission electron microscopy (STEM) allows for imaging, diffraction, and spectroscopy of materials on length scales ranging from microns to atoms. By using a high-speed, direct electron detector, it is now possible to record a full two-dimensional (2D) image of the diffracted electron beam at each probe position, typically a 2D grid of probe positions. These 4D-STEM datasets are rich in information, including signatures of the local structure, orientation, deformation, electromagnetic fields, and other sample-dependent properties. However, extracting this information requires complex analysis pipelines that include data wrangling, calibration, analysis, and visualization, all while maintaining robustness against imaging distortions and artifacts. In this paper, we present py4DSTEM, an analysis toolkit for measuring material properties from 4D-STEM datasets, written in the Python language and released with an open-source license. We describe the algorithmic steps for dataset calibration and various 4D-STEM property measurements in detail and present results from several experimental datasets. We also implement a simple and universal file format appropriate for electron microscopy data in py4DSTEM, which uses the open-source HDF5 standard. We hope this tool will benefit the research community and help improve the standards for data and computational methods in electron microscopy, and we invite the community tomore » contribute to this ongoing project.« less

Authors:
ORCiD logo [1];  [2];  [1]; ORCiD logo [1];  [3];  [3];  [4];  [1];  [3]; ORCiD logo [5];  [3];  [1];  [6];  [6];  [7];  [7];  [7];  [1];  [1];  [1] more »;  [3];  [1];  [3];  [1] « less
  1. Lawrence Berkeley National Lab. (LBNL), Berkeley, CA (United States)
  2. Univ. of California, Berkeley, CA (United States)
  3. Lawrence Berkeley National Lab. (LBNL), Berkeley, CA (United States); Univ. of California, Berkeley, CA (United States)
  4. Humboldt-Univ. zu Berlin (Germany)
  5. Lawrence Berkeley National Lab. (LBNL), Berkeley, CA (United States); Univ. of Michigan, Ann Arbor, MI (United States)
  6. Los Alamos National Lab. (LANL), Los Alamos, NM (United States)
  7. Toyota Research Inst., Los Altos, CA (United States)
Publication Date:
Research Org.:
Lawrence Berkeley National Laboratory (LBNL), Berkeley, CA (United States)
Sponsoring Org.:
USDOE Office of Science (SC), Basic Energy Sciences (BES). Scientific User Facilities Division; National Science Foundation (NSF); US Department of the Navy, Office of Naval Research (ONR); USDOE Office of Science (SC), Basic Energy Sciences (BES). Materials Sciences & Engineering Division; USDOE National Nuclear Security Administration (NNSA)
OSTI Identifier:
1798795
Alternate Identifier(s):
OSTI ID: 1894621
Grant/Contract Number:  
AC02-05CH11231; DMR 1548924; N00014-17-1-228; KC22ZH; 89233218CNA000001
Resource Type:
Accepted Manuscript
Journal Name:
Microscopy and Microanalysis
Additional Journal Information:
Journal Volume: 27; Journal Issue: 4; Journal ID: ISSN 1431-9276
Publisher:
Microscopy Society of America (MSA)
Country of Publication:
United States
Language:
English
Subject:
46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND TECHNOLOGY; calibration; diffraction; open source; STEM; 4D-STEM

Citation Formats

Savitzky, Benjamin H., Zeltmann, Steven E., Hughes, Lauren A., Brown, Hamish G., Zhao, Shiteng, Pelz, Philipp M., Pekin, Thomas C., Barnard, Edward S., Donohue, Jennifer, DaCosta, Luis Rangel, Kennedy, Ellis, Xie, Yujun, Janish, Matthew T., Schneider, Matthew M., Herring, Patrick, Gopal, Chirranjeevi, Anapolsky, Abraham, Dhall, Rohan, Bustillo, Karen C., Ercius, Peter, Scott, Mary C., Ciston, Jim, Minor, Andrew M., and Ophus, Colin. py4DSTEM: A Software Package for Four-Dimensional Scanning Transmission Electron Microscopy Data Analysis. United States: N. p., 2021. Web. doi:10.1017/s1431927621000477.
Savitzky, Benjamin H., Zeltmann, Steven E., Hughes, Lauren A., Brown, Hamish G., Zhao, Shiteng, Pelz, Philipp M., Pekin, Thomas C., Barnard, Edward S., Donohue, Jennifer, DaCosta, Luis Rangel, Kennedy, Ellis, Xie, Yujun, Janish, Matthew T., Schneider, Matthew M., Herring, Patrick, Gopal, Chirranjeevi, Anapolsky, Abraham, Dhall, Rohan, Bustillo, Karen C., Ercius, Peter, Scott, Mary C., Ciston, Jim, Minor, Andrew M., & Ophus, Colin. py4DSTEM: A Software Package for Four-Dimensional Scanning Transmission Electron Microscopy Data Analysis. United States. https://doi.org/10.1017/s1431927621000477
Savitzky, Benjamin H., Zeltmann, Steven E., Hughes, Lauren A., Brown, Hamish G., Zhao, Shiteng, Pelz, Philipp M., Pekin, Thomas C., Barnard, Edward S., Donohue, Jennifer, DaCosta, Luis Rangel, Kennedy, Ellis, Xie, Yujun, Janish, Matthew T., Schneider, Matthew M., Herring, Patrick, Gopal, Chirranjeevi, Anapolsky, Abraham, Dhall, Rohan, Bustillo, Karen C., Ercius, Peter, Scott, Mary C., Ciston, Jim, Minor, Andrew M., and Ophus, Colin. Fri . "py4DSTEM: A Software Package for Four-Dimensional Scanning Transmission Electron Microscopy Data Analysis". United States. https://doi.org/10.1017/s1431927621000477. https://www.osti.gov/servlets/purl/1798795.
@article{osti_1798795,
title = {py4DSTEM: A Software Package for Four-Dimensional Scanning Transmission Electron Microscopy Data Analysis},
author = {Savitzky, Benjamin H. and Zeltmann, Steven E. and Hughes, Lauren A. and Brown, Hamish G. and Zhao, Shiteng and Pelz, Philipp M. and Pekin, Thomas C. and Barnard, Edward S. and Donohue, Jennifer and DaCosta, Luis Rangel and Kennedy, Ellis and Xie, Yujun and Janish, Matthew T. and Schneider, Matthew M. and Herring, Patrick and Gopal, Chirranjeevi and Anapolsky, Abraham and Dhall, Rohan and Bustillo, Karen C. and Ercius, Peter and Scott, Mary C. and Ciston, Jim and Minor, Andrew M. and Ophus, Colin},
abstractNote = {Scanning transmission electron microscopy (STEM) allows for imaging, diffraction, and spectroscopy of materials on length scales ranging from microns to atoms. By using a high-speed, direct electron detector, it is now possible to record a full two-dimensional (2D) image of the diffracted electron beam at each probe position, typically a 2D grid of probe positions. These 4D-STEM datasets are rich in information, including signatures of the local structure, orientation, deformation, electromagnetic fields, and other sample-dependent properties. However, extracting this information requires complex analysis pipelines that include data wrangling, calibration, analysis, and visualization, all while maintaining robustness against imaging distortions and artifacts. In this paper, we present py4DSTEM, an analysis toolkit for measuring material properties from 4D-STEM datasets, written in the Python language and released with an open-source license. We describe the algorithmic steps for dataset calibration and various 4D-STEM property measurements in detail and present results from several experimental datasets. We also implement a simple and universal file format appropriate for electron microscopy data in py4DSTEM, which uses the open-source HDF5 standard. We hope this tool will benefit the research community and help improve the standards for data and computational methods in electron microscopy, and we invite the community to contribute to this ongoing project.},
doi = {10.1017/s1431927621000477},
journal = {Microscopy and Microanalysis},
number = 4,
volume = 27,
place = {United States},
year = {Fri May 21 00:00:00 EDT 2021},
month = {Fri May 21 00:00:00 EDT 2021}
}

Works referenced in this record:

Simulating high-angle annular dark-field stem images including inelastic thermal diffuse scattering
journal, December 1989


Atomic-scale quantification of charge densities in two-dimensional materials
journal, September 2018


Image registration of low signal-to-noise cryo-STEM data
journal, August 2018


USID and Pycroscopy – Open Source Frameworks for Storing and Analyzing Imaging and Spectroscopy Data
journal, August 2019

  • Somnath, Suhas; Smith, Chris R.; Laanait, Nouamane
  • Microscopy and Microanalysis, Vol. 25, Issue S2
  • DOI: 10.1017/S1431927619001831

Local, atomic-level elastic strain measurements of metallic glass thin films by electron diffraction
journal, June 2016


A high-speed area detector for novel imaging techniques in a scanning transmission electron microscope
journal, March 2009


Efficient subpixel image registration algorithms
journal, January 2008

  • Guizar-Sicairos, Manuel; Thurman, Samuel T.; Fienup, James R.
  • Optics Letters, Vol. 33, Issue 2
  • DOI: 10.1364/OL.33.000156

Single Atom Detection from Low Contrast-to-Noise Ratio Electron Microscopy Images
journal, July 2018


Atomic Resolution Defocused Electron Ptychography at Low Dose with a Fast, Direct Electron Detector
journal, March 2019


Polycrystal orientation maps from TEM
journal, August 2003


Evaluation of two-dimensional strain distribution by STEM/NBD
journal, July 2011


Variable Coherence Microscopy: a Rich Source of Structural Information from Disordered Materials
journal, March 1996

  • Treacy, M. M. J.; Gibson, J. M.
  • Acta Crystallographica Section A Foundations of Crystallography, Vol. 52, Issue 2
  • DOI: 10.1107/S0108767395012876

Dynamische Theorie der Kristallstrukturanalyse durch Elektronenbeugung im inhomogenen Primärstrahlwellenfeld
journal, November 1970

  • Hegerl, R.; Hoppe, W.
  • Berichte der Bunsengesellschaft für physikalische Chemie, Vol. 74, Issue 11
  • DOI: 10.1002/bbpc.19700741112

Development of Diffraction Imaging for Orientation Analysis of Grains in Scanning Transmission Electron Microscopy
journal, August 2007


Linear-scaling algorithm for rapid computation of inelastic transitions in the presence of multiple electron scattering
journal, December 2019


Practical aspects of diffractive imaging using an atomic-scale coherent electron probe
journal, October 2016


Underneath the Bragg Peaks
journal, June 2003


Patterned probes for high precision 4D-STEM bragg measurements
journal, February 2020


A streaming multi-GPU implementation of image simulation algorithms for scanning transmission electron microscopy
journal, October 2017

  • Pryor, Alan; Ophus, Colin; Miao, Jianwei
  • Advanced Structural and Chemical Imaging, Vol. 3, Issue 1
  • DOI: 10.1186/s40679-017-0048-z

Computationally Mediated Experimental Science
journal, August 2003


Using STEM with quasi-parallel illumination and an automated peak-finding routine for strain analysis at the nanometre scale
conference, July 2009

  • Sourty, E.; Stanley, J.; Freitag, B.
  • 2009 16th IEEE International Symposium on the Physical and Failure Analysis of Integrated Circuits (IPFA)
  • DOI: 10.1109/IPFA.2009.5232604

Vortex beam production and contrast enhancement from a magnetic spiral phase plate
journal, January 2014


Differential phase-contrast microscopy at atomic resolution
journal, June 2012

  • Shibata, Naoya; Findlay, Scott D.; Kohno, Yuji
  • Nature Physics, Vol. 8, Issue 8
  • DOI: 10.1038/nphys2337

Experimental tests on double-resolution coherent imaging via STEM
journal, March 1993


Direct observation of Σ7 domain boundary core structure in magnetic skyrmion lattice
journal, February 2016


Design considerations and performance of an analytical stem
journal, January 1981


Automated nanocrystal orientation and phase mapping in the transmission electron microscope on the basis of precession electron diffraction
journal, January 2010

  • Rauch, Edgar F.; Portillo, Joaquin; Nicolopoulos, Stavros
  • Zeitschrift für Kristallographie, Vol. 225, Issue 2-3
  • DOI: 10.1524/zkri.2010.1205

Electroplating lithium transition metal oxides
journal, May 2017


Linear phase imaging using differential interference contrast microscopy
journal, April 2004


The theory of super-resolution electron microscopy via Wigner-distribution deconvolution
journal, June 1992

  • Rodenburg, J. M.; Bates, R. H. T.
  • Philosophical Transactions of the Royal Society of London. Series A: Physical and Engineering Sciences, Vol. 339, Issue 1655, p. 521-553
  • DOI: 10.1098/rsta.1992.0050

Metal-organic framework crystal-glass composites
journal, June 2019


(Invited) Nano-Beam Diffraction: Crystal Structure and Strain Analysis at the Nanoscale
journal, October 2010

  • Favia, Paola; Popovici, Mihaela; Eneman, G.
  • ECS Transactions, Vol. 33, Issue 11
  • DOI: 10.1149/1.3485694

Measuring nanometre-scale electric fields in scanning transmission electron microscopy using segmented detectors
journal, November 2017


Realistic models of paracrystalline silicon
journal, May 2001

  • Nakhmanson, S. M.; Voyles, P. M.; Mousseau, Normand
  • Physical Review B, Vol. 63, Issue 23, Article No. 235207
  • DOI: 10.1103/PhysRevB.63.235207

Influence of distortions of recorded diffraction patterns on strain analysis by nano-beam electron diffraction
journal, January 2019


Optimizing disk registration algorithms for nanobeam electron diffraction strain mapping
journal, May 2017


Phase contrast STEM for thin samples: Integrated differential phase contrast
journal, January 2016


Efficient linear phase contrast in scanning transmission electron microscopy with matched illumination and detector interferometry
journal, February 2016

  • Ophus, Colin; Ciston, Jim; Pierce, Jordan
  • Nature Communications, Vol. 7, Issue 1
  • DOI: 10.1038/ncomms10719

Radial distribution function and structural relaxation in amorphous solids
journal, December 1981


A fast image simulation algorithm for scanning transmission electron microscopy
journal, May 2017


Nanoscale mosaicity revealed in peptide microcrystals by scanning electron nanodiffraction
journal, January 2019

  • Gallagher-Jones, Marcus; Ophus, Colin; Bustillo, Karen C.
  • Communications Biology, Vol. 2, Issue 1
  • DOI: 10.1038/s42003-018-0263-8

Fluctuation microscopy in the STEM
journal, November 2002


Electron Vortex Beams with High Quanta of Orbital Angular Momentum
journal, January 2011

  • McMorran, B. J.; Agrawal, A.; Anderson, I. M.
  • Science, Vol. 331, Issue 6014, p. 192-195
  • DOI: 10.1126/science.1198804

Accurate evaluation of size and refractive index for spherical objects in quantitative phase imaging
journal, January 2018

  • Müller, Paul; Schürmann, Mirjam; Girardo, Salvatore
  • Optics Express, Vol. 26, Issue 8
  • DOI: 10.1364/OE.26.010729

Confirmation of the Domino-Cascade Model by LiFePO 4 /FePO 4 Precession Electron Diffraction
journal, October 2011

  • Brunetti, G.; Robert, D.; Bayle-Guillemaud, P.
  • Chemistry of Materials, Vol. 23, Issue 20
  • DOI: 10.1021/cm201783z

Improved precision in strain measurement using nanobeam electron diffraction
journal, September 2009

  • Béché, A.; Rouvière, J. L.; Clément, L.
  • Applied Physics Letters, Vol. 95, Issue 12
  • DOI: 10.1063/1.3224886

Direct Imaging of Nanoscale Phase Separation in La 0.55 Ca 0.45 MnO 3 : Relationship to Colossal Magnetoresistance
journal, August 2009


Quantitative analysis of the accuracy and sensitivity of strain measurements from nanobeam electron diffraction
conference, June 2015

  • Williamson, M. J.; van Dooren, P.; Flanagan, J.
  • 2015 IEEE 22nd International Symposium on the Physical and Failure Analysis of Integrated Circuits (IPFA)
  • DOI: 10.1109/IPFA.2015.7224366

Hyperspectral Imaging in TEM: New Ways of Information Extraction and Display
journal, August 2008


Pixelated detectors and improved efficiency for magnetic imaging in STEM differential phase contrast
journal, June 2016


Scanning transmission electron microscopy of thin specimens
journal, January 1976


Strain analysis from nano-beam electron diffraction: Influence of specimen tilt and beam convergence
journal, July 2018


Demonstration of a 2 × 2 programmable phase plate for electrons
journal, July 2018


Influence of electron dose rate on electron counting images recorded with the K2 camera
journal, November 2013

  • Li, Xueming; Zheng, Shawn Q.; Egami, Kiyoshi
  • Journal of Structural Biology, Vol. 184, Issue 2
  • DOI: 10.1016/j.jsb.2013.08.005

High Dynamic Range Pixel Array Detector for Scanning Transmission Electron Microscopy
journal, January 2016

  • Tate, Mark W.; Purohit, Prafull; Chamberlain, Darol
  • Microscopy and Microanalysis, Vol. 22, Issue 1
  • DOI: 10.1017/S1431927615015664

Correcting the linear and nonlinear distortions for atomically resolved STEM spectrum and diffraction imaging
journal, January 2018

  • Wang, Yi; Suyolcu, Y. Eren; Salzberger, Ute
  • Microscopy, Vol. 67, Issue suppl_1
  • DOI: 10.1093/jmicro/dfy002

The 4D Camera – An 87 kHz Frame-rate Detector for Counted 4D-STEM Experiments
journal, July 2020


Topology of covalent non-crystalline solids I: Short-range order in chalcogenide alloys
journal, October 1979


Strain relaxation of strained-Si layers on SiGe-on-insulator (SGOI) structures after mesa isolation
journal, March 2004


The scattering of electrons by atoms and crystals. I. A new theoretical approach
journal, October 1957


Size analysis of nanoscale order in amorphous materials by variable-resolution fluctuation electron microscopy
journal, September 2010


RDFTools: A software tool for quantifying short-range ordering in amorphous materials
journal, July 2011

  • Mitchell, D. R. G.; Petersen, T. C.
  • Microscopy Research and Technique, Vol. 75, Issue 2
  • DOI: 10.1002/jemt.21038

High Resolution Radial Distribution Function of Pure Amorphous Silicon
journal, April 1999


Electron Bessel beam diffraction for precise and accurate nanoscale strain mapping
journal, June 2019

  • Guzzinati, Giulio; Ghielens, Wannes; Mahr, Christoph
  • Applied Physics Letters, Vol. 114, Issue 24
  • DOI: 10.1063/1.5096245

Local nanoscale strain mapping of a metallic glass during in situ testing
journal, April 2018

  • Gammer, Christoph; Ophus, Colin; Pekin, Thomas C.
  • Applied Physics Letters, Vol. 112, Issue 17
  • DOI: 10.1063/1.5025686

Sub-Ångstrom electric field measurements on a universal detector in a scanning transmission electron microscope
journal, August 2018

  • Hachtel, Jordan A.; Idrobo, Juan Carlos; Chi, Miaofang
  • Advanced Structural and Chemical Imaging, Vol. 4, Issue 1
  • DOI: 10.1186/s40679-018-0059-4

Strain characterization in SOI and strained-Si on SGOI MOSFET channel using nano-beam electron diffraction (NBD)
journal, December 2005

  • Usuda, Koji; Numata, Toshinori; Irisawa, Toshifumi
  • Materials Science and Engineering: B, Vol. 124-125
  • DOI: 10.1016/j.mseb.2005.08.062

Imaging of built-in electric field at a p-n junction by scanning transmission electron microscopy
journal, June 2015

  • Shibata, Naoya; Findlay, Scott D.; Sasaki, Hirokazu
  • Scientific Reports, Vol. 5, Issue 1
  • DOI: 10.1038/srep10040

Quantitative Measurements of Magnetic Vortices using Position Resolved Diffraction in Lorentz Stem
journal, August 2002


Advanced Computing in Electron Microscopy
book, January 2010


Simultaneous atomic-resolution electron ptychography and Z-contrast imaging of light and heavy elements in complex nanostructures
journal, August 2016

  • Yang, H.; Rutte, R. N.; Jones, L.
  • Nature Communications, Vol. 7, Issue 1
  • DOI: 10.1038/ncomms12532

The quickhull algorithm for convex hulls
journal, December 1996

  • Barber, C. Bradford; Dobkin, David P.; Huhdanpaa, Hannu
  • ACM Transactions on Mathematical Software, Vol. 22, Issue 4
  • DOI: 10.1145/235815.235821

Averaging of low exposure electron micrographs of non-periodic objects
journal, January 1975


Comparison of first moment STEM with conventional differential phase contrast and the dependence on electron dose
journal, August 2019


Fast computation of Lyot-style coronagraph propagation
journal, January 2007

  • Soummer, R.; Pueyo, L.; Sivaramakrishnan, A.
  • Optics Express, Vol. 15, Issue 24
  • DOI: 10.1364/OE.15.015935

LiberTEM/LiberTEM: 0.4.1
software, February 2020


Simulated calibration dataset for 4D scanning transmission electron microscopy
dataset, January 2019


Optimization of NBED simulations for disc-detection measurements
journal, October 2017


Generation of electron vortex beams using line charges via the electrostatic Aharonov-Bohm effect
journal, October 2017


Strain relaxation in transistor channels with embedded epitaxial silicon germanium source/drain
journal, December 2008

  • Liu, J. P.; Li, K.; Pandey, S. M.
  • Applied Physics Letters, Vol. 93, Issue 22
  • DOI: 10.1063/1.3040323

Beugung in inhomogenen Primärstrahlenwellenfeld. II. Lichtoptische Analogieversuche zur Phasenmessung von Gitterinterferenzen
journal, July 1969


Diffraction contrast imaging using virtual apertures
journal, August 2015


The direct determination of magnetic domain wall profiles by differential phase contrast electron microscopy
journal, January 1978


Simulated calibration dataset for 4D scanning transmission electron microscopy
dataset, January 2019