TEM · 4D-STEM
4D-STEM basics: one diffraction pattern at every probe position
Start by clicking anywhere on the sample map below and watch the diffraction pattern change between vacuum, three grains, a grain boundary and a precipitate. Then draw your own detector in widget 2 and see the image form from the same data.
What is 4D-STEM?
In scanning TEM (STEM) a focused probe steps across the sample. A normal STEM detector keeps one number per step. In 4D-STEM a fast pixel camera records the whole diffraction pattern at every step. Two scan coordinates (x, y) and two pattern coordinates (kx, ky) make a four-dimensional data set. Here: a 48 × 48 scan, 5 nm steps, 64 × 64 pixel patterns, 300 kV, of a thin aluminium foil.
Probe and camera
The 4D data set
What is a virtual detector in 4D-STEM?
Because every pattern is stored, you can choose the detector after the experiment. A virtual detector is a mask on the pattern: sum the counts inside it at every scan position and you get one image. A disc on the central beam gives bright field (BF). A ring outside it gives annular dark field (ADF). A small aperture on one Bragg spot gives virtual dark field: only the crystals that send electrons into that spot light up.
Virtual detector
What can you compute from one 4D-STEM dataset?
A virtual detector keeps one number per pattern. Better methods use the whole pattern: match it to calculated patterns to find the orientation and phase, measure where the Bragg discs sit to get strain, or take the centre of mass (CoM) of the intensity to measure how far the beam was deflected by fields in the sample. All three run here on the same stored data set.
What to compute
Template matching
Strain from disc positions
Centre of mass (DPC)
How big is a 4D-STEM dataset, and how long does it take?
The size is (scan positions) × (pattern pixels) × (bytes per pixel). The time is scan positions divided by the camera frame rate. The dose is beam current × time per pattern, spread over one scan step. Pick a camera and a scan and read the three numbers off the bars.
| Example camera | Pixels | Frame rate | Stored here as | Source |
|---|---|---|---|---|
| EMPAD | 128 × 128 | 1.1 kHz | 32 bit | Tate et al. 2016 |
| 4D Camera (NCEM) | 576 × 576 | 87 kHz | 16 bit dense (counted data is stored sparse) | Ercius et al. 2024 |
| ARINA (hybrid pixel) | 192 × 192 | up to 120 kHz | 16 bit (an assumption) | DECTRIS brochure 2022 |
Camera and scan
What to remember
More detail: how the synthetic data set is made, and the limits of the model
Geometry. 300 kV electrons, λ = 1.969 pm. Pattern pixel = 0.05 Å−1 = 0.98 mrad. Aluminium, a = 4.0495 Å; Al3Sc (L12), a = 4.103 Å, 1.32% larger (Knipling et al. 2006). The precipitate has the cube-on-cube orientation with grain 1 and is assumed to run through the whole foil. The foil is a wedge from the vacuum edge (thickness rises 1 nm per nm) to about 68 nm, then slowly to about 85 nm.
Intensities. Kinematic: each Bragg disc gets |F|2 t2/(1 + (π t s)2), with s the excitation error from Ewald-sphere curvature and specimen tilt, and a smooth limit on the total scattered fraction. Atomic scattering amplitudes use a rough rule (∝ Z0.8 with a Gaussian fall-off); relative intensities are only approximate. A broad diffuse halo stands for thermal diffuse and inelastic scattering and grows with thickness and Z. Disc edges are softened by a camera point-spread function (Gaussian, σ = 0.7 pixel). Counts are Poisson with no read noise (an ideal counting camera). Real patterns show dynamical contrast inside the discs, Kikuchi bands and higher-order Laue zones; the model has none of these.
Template matching (as in ASTAR/ACOM, Rauch and Véron 2014, and py4DSTEM, Savitzky et al. 2021): after subtracting a radial background, the square root of each pattern is correlated with kinematic templates for Al and Al3Sc along [001], [011], [111] and [112], at every in-plane angle in the chosen step. The best score gives zone, angle and phase. Real ACOM uses precession to make patterns less sensitive to small tilts.
Strain. For every pattern indexed as grain 1 ([001]), the centre of mass of each fundamental disc (inside a window of radius R + 2 pixels, background removed) is found, and a lattice (origin plus two reciprocal vectors) is fitted by weighted least squares. With M the fitted reciprocal basis and M0 the reference, I + ε = (M0 M−1)T. The reference is the median of the boxed unstrained region. Measured strain is relative to that reference, so a different lattice parameter (the precipitate) reads as "strain". Here it reads about 1.0%, not 1.32%: with its superlattice spots removed the same fit gives 1.35%, so the weak spots next to each disc bias the background and the centre. Zeltmann et al. (2020) show that patterned probes and cross-correlation beat plain discs on real data; this model has no dynamical disc contrast, so its precision is a best case for these pixels and counts.
Centre of mass. A slowly varying phase φ(x) = σV0t(x) tilts the beam by β = (λ/2π)∇φ = λσV0∇t/2π; at 300 kV σ = 6.53 × 10−4 rad V−1 Å−1, so a 1:1 wedge with V0 = 12 V gives 24.5 µrad. The whole pattern moves by β. V0 for aluminium is set here as an assumption; measured values for crystals are about 9 to 17 V (Si 9.26 V, MgO 13.01 V, PbS 17.19 V; Gajdardziska-Josifovska et al. 1993). The CoM noise is about √〈k2〉/N, which is why taking the CoM of the central disc alone (small 〈k2〉) is quieter and ignores uneven Bragg spots. Scan and descan: the vacuum mean is subtracted as the zero.
On this site: STEM detectors guide · Aberration correction · SAED pattern simulator · Grain orientations in reciprocal space · GPA strain mapping · Quantitative HAADF · Beam damage and dose · CBED thickness
Related chapters: EBSD 2: reading IPF maps · EBSD 6: TKD at the nanoscale · EBSD 8: KAM, GNDs and step size · Strengthening mechanisms
Questions people ask
What is 4D-STEM?
A STEM method in which a pixel camera records a full diffraction pattern at every probe position. The data set has two real-space and two reciprocal-space dimensions, hence "4D". It is also called scanning nanobeam electron diffraction when the probe is nearly parallel.
What is virtual dark field imaging?
You place a small software aperture on one diffraction spot and sum the counts inside it at every scan position. Only regions that diffract into that spot are bright. Unlike a real objective aperture, you can move it after the experiment and try many spots on one data set.
How is 4D-STEM orientation mapping different from EBSD?
EBSD reads Kikuchi patterns from the surface of a bulk sample in the SEM, with a step of tens of nm at best. 4D-STEM orientation mapping reads spot patterns through a thin foil in the TEM, with steps of a few nm. Both give orientation maps coloured the same way (inverse pole figure colours).
What convergence angle should I use for 4D-STEM strain mapping?
Small enough that the Bragg discs do not overlap (below λg/2 for the lowest-order spot, 4.9 mrad for Al 200 at 300 kV), and large enough that the probe is as small as you need. Nanobeam strain maps often use about 0.5 to 2 mrad, giving probes of one to a few nm.
How big is a 4D-STEM dataset?
Scan positions × pattern pixels × bytes per pixel. A 256 × 256 scan with 128 × 128 pixel, 32-bit patterns is 4.29 GB; the same scan with 576 × 576, 16-bit patterns is 43.5 GB. Counting cameras store only the electron hits, which is often far smaller.
What is the difference between DPC and centre-of-mass imaging?
Differential phase contrast (DPC) uses a detector split into segments and takes differences of their signals. Centre-of-mass imaging uses the full pattern from a pixel camera and computes its intensity-weighted mean position. Both measure how far the beam is deflected, which tracks electric or magnetic fields in the sample.
What software is used to analyse 4D-STEM data?
Open-source Python packages such as py4DSTEM (Savitzky et al. 2021), pyxem (Johnstone et al.) and LiberTEM do virtual imaging, disc finding, strain, orientation mapping, CoM and ptychography. Vendor software for ACOM (such as ASTAR) does template matching.
Does 4D-STEM give a higher dose than normal STEM?
Not by itself: the dose depends on beam current, dwell time and step size. Pixel cameras are slower than a normal STEM detector, so dwell times are often longer, but fast counting cameras now reach tens of kHz, and one low-dose scan can give many signals at once.
References
Show the 11 references
- C. Ophus, Four-dimensional scanning transmission electron microscopy (4D-STEM): from scanning nanodiffraction to ptychography and beyond, Microscopy and Microanalysis 25, 563 to 582 (2019), doi:10.1017/S1431927619000497. The review this page follows.
- B. H. Savitzky, S. E. Zeltmann, L. A. Hughes et al., py4DSTEM: a software package for four-dimensional scanning transmission electron microscopy data analysis, Microscopy and Microanalysis 27, 712 to 743 (2021), doi:10.1017/S1431927621000477.
- D. N. Johnstone, P. Crout, M. Nord et al., pyxem: an open-source Python library for multi-dimensional diffraction microscopy, Zenodo, doi:10.5281/zenodo.2649351.
- S. E. Zeltmann, A. Müller, K. C. Bustillo, B. Savitzky, L. Hughes, A. M. Minor and C. Ophus, Patterned probes for high precision 4D-STEM Bragg measurements, Ultramicroscopy 209, 112890 (2020), doi:10.1016/j.ultramic.2019.112890.
- E. F. Rauch and M. Véron, Automated crystal orientation and phase mapping in TEM, Materials Characterization 98, 1 to 9 (2014), doi:10.1016/j.matchar.2014.08.010.
- M. W. Tate, P. Purohit, D. Chamberlain et al., High dynamic range pixel array detector for scanning transmission electron microscopy, Microscopy and Microanalysis 22, 237 to 249 (2016), doi:10.1017/S1431927615015664. EMPAD: 128 × 128 pixels, 1.1 kHz, 106:1 dynamic range.
- P. Ercius, I. J. Johnson, P. Pelz et al., The 4D Camera: an 87 kHz direct electron detector for scanning/transmission electron microscopy, Microscopy and Microanalysis 30, 903 to 912 (2024), doi:10.1093/mam/ozae086. 576 × 576 pixels, 87 kHz, about 480 Gbit/s.
- DECTRIS, DECTRIS ARINA: an ultra-fast 4D STEM hybrid-pixel detector, product brochure (2022). 192 × 192 pixels, up to 120 000 frames per second.
- K. E. Knipling, D. C. Dunand and D. N. Seidman, Criteria for developing castable, creep-resistant aluminum-based alloys: a review, Zeitschrift für Metallkunde 97, 246 to 265 (2006). Al a = 4.0496 Å, Al3Sc a = 4.103 Å, misfit +1.32%.
- M. Gajdardziska-Josifovska, M. R. McCartney, W. J. de Ruijter, D. J. Smith, J. K. Weiss and J. M. Zuo, Accurate measurements of mean inner potential of crystal wedges using digital electron holograms, Ultramicroscopy 50, 285 to 299 (1993).
- E. J. Kirkland, Advanced Computing in Electron Microscopy, 3rd ed., Springer (2020): electron wavelength, the interaction parameter σ and STEM probe formation.
BibTeX
@misc{tripathy2026fourdstem,
author = {Tripathy, Manisha},
title = {4D-STEM Basics},
year = {2026},
howpublished = {\url{https://untetheredatom.com/tem/4d-stem-basics}},
note = {Interactive web tool}
}