Source-linked AI summary

Universal Drift Correction for Multidimensional Scanning Microscopy

Sangjoon Lee, William Millsaps, Dasol Yoon, Caitlyn Obrero, Guoliang Hu, Corrie Barnes, Cedric Lim, Andrew Barnum, Arthur R. C. McCray, Colin Ophus

arXiv:2609.30866v1cond-mat.mtrl-scics.CV

TL;DR

Drift shifts sampled specimen locations from nominal probe positions, changing the spatial assignment of signals and affecting quantitative measurements. The paper recovers corrected positions through a unified, structure-agnostic method for multidimensional scans, with processing times reduced by two to three orders of magnitude.

  • Problem

    Drift displaces sampled specimen locations from nominal probe positions, altering the spatial assignment of signals and structural, chemical, and diffraction-based measurements.

    Source: §1 · p. 2
  • Method

    The method recovers probe positions from two or more scans using complementary affine and non-rigid correction, and reuses the geometry across images, spectrum images, and diffraction datasets.

    Source: §1 · p. 2, §4 · pp. 10–11
  • Results

    The structure-agnostic method covers 2D images, XEDS spectrum images, and 4DSTEM datasets, with processing time reduced by two to three orders of magnitude relative to the previous implementation.

    Source: §1 · p. 2
  • Takeaways & Limitations

    Recovered positions support downstream strain and orientation mapping, atomic-scale spectroscopic mapping, phase mapping, and iterative ptychographic reconstruction.

    Source: §5 · p. 13

    Correction depends on corresponding structural features remaining identifiable; weak contrast, low signal-to-noise ratio, repetitive structures, or acquisition-to-acquisition changes can make alignments ambiguous or bias recovered positions.

    Source: §4 · pp. 12–13

Abstract

from arXiv · show

In scanning microscopy, drift causes the specimen to be sampled at positions displaced from the nominal probe positions. This displacement alters the spatial assignment of the recorded signals and biases quantitative measurements across two-dimensional imaging, channel-resolved spectroscopic mapping, and scan-position-resolved diffraction analysis. Here, we extend orthogonal-scan drift correction from 2D images to spectrum images and diffraction datasets. We demonstrate how to recover probe positions using either differently oriented multidimensional scans or structural reference images. The recovered positions are used either to resample the multidimensional data onto a regular grid or to assign each recorded signal to its corrected coordinate. Our method combines affine and non-rigid correction, requires no prior structural model, and is implemented as open-source, GPU-accelerated software that reduces processing times by two to three orders of magnitude, enabling routine and automated drift correction for quantitative multidimensional microscopy.

1 Introduction

Scan drift displaces the specimen from nominal probe positions, affecting the spatial assignment of recorded signals and quantitative measurements. The paper extends structure-agnostic orthogonal-scan correction to multidimensional datasets, reusing recovered probe positions across imaging, spectroscopy, and diffraction.

Motivation

  • Drift can arise from specimen, instrument, experimental, and environmental factors, including thermal expansion, stage creep, vibration, and acoustic noise.In situ temperature ramps and gradients can drive continuous thermal drift.Source: §1 · p. 1

Prior work

  • Earlier 2D methods used periodic crystal structures, repeated scans [10] [15], or differing fast-scan directions without a prior structural model.Orthogonal-scan correction has supported quantitative studies across several materials and measurement targets.Source: §1 · pp. 1–2

Motivation

  • Drift displaces sampled specimen locations from nominal scan positions, altering signal assignment and structural, chemical, and diffraction-based measurements.Scan drift correction is routine across STEM, SEM, and AFM.Source: §1 · pp. 1–2

Contribution

  • A unified, structure-agnostic method recovers corrected probe positions from two or more scans; differing fast-scan directions improve accuracy, and positions apply to 2D images, spectrum images, and scan-position-resolved diffraction data.Source: §1 · p. 2

2 Materials and Methods

The method estimates scan drift from two or more scans with differing fast-scan directions and recovers scan-line origins that define corrected probe positions. Its affine stage estimates dominant global linear drift by aligning and scoring candidate drift corrections.

2.1 Overview

  • Recovered scan-line origins and each scan’s fast-scan direction define subpixel probe positions, which can resample 2D images, every spectrum channel, or 4D signals onto corrected coordinates.For 4D data, signals may instead remain unchanged and be associated with their recovered probe positions.Source: §2.1 · p. 3

2.2 2D affine correction

  • Figure 2 follows a 0°/90° silicon scan pair from raw scans through the combined uncorrected image to individually and jointly affine-corrected images.Red lines mark recovered scan-line origins in the corrected individual scans.Source: Figure 2 · p. 4
  • The affine stage models each fast-scan line as rigid, with one knot representing its origin, and estimates dominant global linear drift from candidate corrections.Candidate scans are resampled onto a common grid, aligned by FFT-based cross-correlation with subpixel peak refinement, and scored; the best drift estimate updates the knot positions.Source: §2.2 · p. 4

2.3 2D non-rigid correction

Non-rigid correction refines affine-corrected scan-line positions to address residual nonlinear distortion. For reference-based strip alignment, consecutive lines are aligned together to a corrected structural reference before optional finer refinement.

2.3 2D non-rigid correction

  • Independent fast-scan-line updates refine residual nonlinear distortion using an averaged reference rebuilt from the other scans after each update.Regularization includes displacement limits, slow-scan smoothing, and applying only a fraction of each proposed update; center-out solving can help with large drift.Source: §2.3 · p. 5

2.4 2D reference-based strip alignment

  • When a corrected reference or ground truth exists, strips of consecutive lines from a simultaneous structural image are aligned to it by rigid cross-correlation.Interpolated strip translations produce smooth scan-line origins, which can initialize finer non-rigid refinement.Source: §2.4 · p. 5
  • Grouping lines into strips increases available signal when individual lines have insufficient contrast or counts.The method applies to long-dwell multidimensional acquisitions with a simultaneously recorded structural image.Source: §2.4 · p. 5

2.5 3D spectrum-image correction

For spectrum images, a corrected structural reference can be used to align a simultaneous image, then the full spectra are interpolated onto a regular output grid with shared weights across energy channels. For diffraction-resolved data, registration images recover probe positions for the patterns, which can be resampled or retained at corrected coordinates.

2.5 3D spectrum-image correction

  • For a long-dwell spectrum image, a fast 0°/90° image pair can be corrected to make a structural reference for aligning a simultaneously acquired image.The approach contrasts with repeated fast scans, which can reduce drift artifacts but may require energy alignment for EELS.Source: §2.5 · pp. 5–6
  • Each corrected-grid point maps to a subpixel position in the drifted acquisition, and neighboring spectra are bilinearly interpolated using the same weights across all energy channels.Source: §2.5 · p. 6

2.6 4D diffraction-resolved correction

  • For diffraction-resolved data, integrated-intensity or phase-retrieved images support scan alignment, after which patterns can be assigned corrected positions or resampled onto a corrected grid.Figure 3 compares raw, affine, and non-rigid WS2 images alongside A-site and bond-vector diagnostics; its columns combine the two raw images to improve signal-to-noise ratio.Source: Figure 3 · p. 6, §2.6 · p. 7

2.7 Multiresolution search and GPU acceleration

The section describes GPU acceleration and a multiresolution search for drift correction, alongside the microscope and detector settings used to acquire the datasets.

2.7 Multiresolution search and GPU acceleration

  • 5.79 s on an NVIDIA RTX PRO 6000 Blackwell GPU versus 2440 s for the previous CPU implementation; multiresolution search reduced GPU time to 0.441 s while recovering drift rates within 6.5 × 10−4 pixels per scan line.The comparison used the 2048 × 2048 silicon scan pair on the same workstation; multiresolution search proceeds from downsampled images to native-resolution verification.Source: §2.7 · p. 7

2.8 Data acquisition

  • Datasets were acquired on a Thermo Fisher Spectra 300 STEM at 300 kV, except WSe2, which was acquired at 80 kV.The probe convergence semi-angle was 30 mrad, screen current was 20–150 pA, XEDS used a Super-X detector, and 4DSTEM used a DECTRIS ARINA detector.Source: §2.8 · p. 7

3 Results

Across image, spectrum-image, and diffraction datasets, the method corrected drift using recovered scan positions. Results include improved alignment across diverse samples, corrected XEDS maps, and combined orthogonal 4DSTEM images.

3.1 Strong non-rigid drift in WS2 and WSe2

  • For severely drift-distorted WSe2, standard affine and non-rigid refinement did not fully correct the raw frame, while center-out refinement prevented unit-cell skips.The center-out result is shown alongside affine and traditional non-rigid alignments.Source: Figure 4 · p. 8, §3.1 · pp. 8–9
  • More non-rigid knots sharpened the WS2 bond-vector distribution after affine correction left spatially varying misregistration.The WS2 pair had strong drift varying within and between fast-scan lines; the tested non-rigid refinements used 1, 2, and 3 knots.Source: §3.1 · p. 8

3.2 2D HAADF imaging across sample types

  • Across silicon, SrTiO3, WS2, and Co3O4, corrected orthogonal scans converged to a single set of structural features across periodic lattices and aperiodic particle contrast.For SrTiO3, combining corrected scans also improved atomic-resolution image signal-to-noise ratio.Source: §3.2 · p. 9, Figure 5 · p. 10

3.3 3D XEDS spectrum imaging

  • Normalized cross-correlation within the common-coverage mask rose from −0.012 before correction to 0.693 after affine correction and 0.854 after strip correction.The mask covered 75.7% of pixels; the same spatial interpolation weights were applied independently to each energy channel, without interpolation along the energy axis.Source: §3.3 · p. 9

3.4 4DSTEM with two orthogonal scans

  • In the gold-nanoparticle 4DSTEM pair, scan-line origins recovered from scalar virtual images enabled corrected probe positions and combined corrected virtual bright-field images.The datasets were acquired with orthogonal fast-scan directions.Source: §3.4 · p. 10

4 Discussion

The discussion presents a shared scan geometry for correcting images, spectra, and diffraction data, using complementary affine and non-rigid stages. It also describes implementation prospects and conditions that can limit alignment.

4 Discussion

  • Affine correction models a global linear trajectory of scan-line origins, while non-rigid refinement allows independent knot motion for changing drift and local deviations.Both stages use the same knot-based scan-line representation and rely on scan geometry and shared structural information rather than a STEM-specific image-formation model.Source: §4 · p. 11
  • For spectrum imaging, each energy channel is resampled onto the corrected integer grid; diffraction patterns may instead remain unchanged while their probe positions are updated.Corrected positions can also support strain mapping, orientation mapping, and ptychographic reconstruction, or diffraction data can be resampled when a regular grid is needed.Source: §4 · pp. 11–12
  • Alignment assumes corresponding structural features remain identifiable across scans or between a target dataset and its reference; weak, noisy, or repetitive contrast can make alignment ambiguous.In periodic structures, ambiguity may lead to lattice-equivalent unit-cell shifts; solving outward from the center or a local fiducial can mitigate this artifact.Source: §4 · p. 12
  • The authors recommend orthogonal image scans, translation, affine, and non-rigid alignment, and visual validation of merged outputs, especially for periodic datasets.For 3D spectrum data they recommend single scans rather than multi-pass scans; edge softening and center-out refinement may be enabled for challenging datasets.Source: §4 · p. 13
  • The open-source GPU-accelerated implementation is intended to support drift correction during microscope operation; recovered scan-line origins could also offset upcoming rasters.The discussion describes possible integration with microscope and detector-control software for transferring scan geometry to downstream analyses and in situ measurements.Source: §4 · p. 13

5 Conclusion

The method corrects drift across 2D images, channel-resolved spectrum images, and scan-position-resolved 4DSTEM datasets. GPU acceleration and open-source release make this correction accessible on acquisition-relevant timescales.

  • The method corrects drift in 2D images, channel-resolved spectrum images, and scan-position-resolved 4DSTEM datasets.Source: §5 · p. 13
  • GPU acceleration reduces correction time by two to three orders of magnitude, bringing affine and non-rigid stages to acquisition-relevant timescales.Source: §5 · p. 13
  • Corrected probe positions support strain and orientation mapping, atomic-scale spectroscopic mapping, phase mapping, and iterative ptychographic reconstruction.Source: §5 · p. 13
  • The open-source software includes curated tutorials and reproducible workflows for multidimensional scanning microscopy.Source: §5 · p. 13

7 Code Availability

The drift-correction method is available in the open-source quantem Python package, with workflow-reproducing tutorial notebooks provided separately.

  • The drift-correction method is implemented in the open-source quantem Python package.The passage provides the package's GitHub address.Source: §7 · p. 13
  • Tutorial notebooks reproducing the workflows are available in the quantem-tutorials repository.The passage provides the repository's GitHub address.Source: §7 · p. 13
  • Readers may contact the corresponding authors by email with implementation or support questions.Source: §7 · p. 13

9 Author contributions statement

The contributions span algorithm development, analysis, microscopy data acquisition, manuscript preparation, and review. The statement also identifies support for automated scanning acquisition and iterative ptychographic reconstruction.

  • CO implemented the original orthogonal-scan non-rigid correction and supervised the work; SL developed strip-based alignment, multidimensional correction, and GPU acceleration.Source: §9 · p. 14
  • WM implemented the center-out algorithm and analyzed WS2 non-rigid correction; SL also analyzed results.Source: §9 · p. 14
  • SL, WM, DY, and CO wrote the manuscript, while DY, WM, SL, COb, GH, CB, and CL acquired microscopy data.Source: §9 · p. 14
  • AB and CL developed automated scanning acquisition, and ARCM implemented drift-adjusted positions for iterative ptychographic reconstruction; all authors reviewed, edited, and approved the text.Source: §9 · p. 14

11 Funding sources

The research received support from the U.S. Department of Energy through the Basic Energy Sciences Microelectronics ESTEEM Program, as well as from Samsung Electronics, Toyota Research Institute, and Stanford University.

  • The U.S. Department of Energy supported the research under Contract No. DE-AC02-76SF00515.Source: §11 · p. 14
  • The Department of Energy support was through the Basic Energy Sciences Microelectronics ESTEEM Program (101256).Source: §11 · p. 14
  • Additional support came from Samsung Electronics Co. Ltd., the Toyota Research Institute, and Stanford University.Source: §11 · p. 14
Loading 2609.30866v1…