Human interactivity

Key paper: S. Lee et al., Interactive framework for real-time 4D-STEM analysis and reconstruction, Microscopy and Microanalysis 32 (Suppl. 1) (2026)

A framework for human interactivity lets scientists develop algorithms and analyze multidimensional data with real-time feedback at 60 to 120 frames per second: seeing results as they are computed, adjusting parameters, and steering the analysis. Electron microscopy is one application, and quantem.widget is its implementation, running in Jupyter or as standalone WebGPU pages on a workstation, cluster, laptop, or phone.

Schematic of interactive widgets connecting 4D-STEM algorithms, researchers, and microscopes

Interactive widgets bridge 4D-STEM algorithms, researchers, and microscopes for real-time feedback: algorithms stream results to the widgets, and the researcher’s input flows back as new parameters and as detector and scan control.

quantem.widget includes:

Show4DSTEM widget with a diffraction pattern and live virtual detector image

Show4DSTEM in the browser with WebGPU. Liquid-cell Au nanoparticle data courtesy of Serin Lee (paper, data).

The interactivity framework has supported the development and adoption of these electron microscopy algorithms:

  • Drift correction of 2D images, spectrum images, and 4D-STEM datasets (see Drift correction)

  • ACOM (automated crystal orientation mapping) from 4D-STEM diffraction

  • MAPED (multi-angle precession electron diffraction)

  • Strain mapping from 4D-STEM nanobeam diffraction

  • Lattice finding

  • PDF (pair distribution function) analysis

Code · Documentation

Co-authored publications

  • Interactive framework for real-time 4D-STEM analysis and reconstruction. S. Lee et al., Microscopy and Microanalysis 32 (Suppl. 1) (2026).

  • Optimizing strain mapping using nanobeam diffraction in 4D-STEM. Microscopy and Microanalysis 32 (Suppl. 1) (2026). A new method that improves the precision of strain reconstruction from 4D-STEM nanobeam diffraction, where Bragg-disk localization is limited by scattering and background noise.