:tocdepth: 1 .. _drift-correction: ================ Drift correction ================ **Key paper:** S. Lee *et al.*, `Universal drift correction for multidimensional scanning microscopy `__, arXiv:2609.30866 (2026) While the probe rasters across a specimen, the specimen drifts, so every pixel, spectrum, or diffraction pattern is recorded somewhere other than where the scan says. Drift correction recovers the true probe positions from two or more scans of the same region taken at different angles, then puts every recorded signal back where it belongs. - Works on **2D images**, **spectrum images** (XEDS, EELS), and **4D-STEM** datasets with the same correction - Affine and non-rigid stages, with **no structural model** required - **GPU-accelerated**, two to three orders of magnitude faster than previous approaches - Open source in `quantem `__ with `tutorial notebooks `__ .. figure:: ../img/research/drift-overview.png :width: 100% :alt: Schematic of drift correction from two differently oriented scans **Overview.** (a) Scans acquired at different angles record different distortions of the same specimen; affine and non-rigid correction recover the probe positions, and the recovered scan-line origins are reused for 2D images, channel-resolved multidimensional data, and scan-position-resolved diffraction data. (b) Knot representation of the scan geometry, from the initial scan-line grid to affine (one knot per scan line) and non-rigid (three knots per scan line) correction. On a silicon lattice, two orthogonal scans look distorted in different ways, and their naive combination is a mess. After correction, the recovered scan-line origins (red) show how the drift unfolded, and the combined image is a clean lattice. .. figure:: ../img/research/drift-silicon.png :width: 100% :alt: Silicon lattice HAADF images before and after drift correction **Silicon (HAADF).** Affine drift correction of a 0°/90° scan pair from the same region: the 0° and 90° scans (a, b) and their combination before correction (c); the scans after correction with red lines marking the recovered scan-line origins (d, e); and the combined scan after affine correction (f). Because the correction lives in the probe positions, it carries over to every channel recorded at those positions. In an XEDS spectrum image, the Ti and Sr maps sharpen along with the HAADF reference. .. figure:: ../img/research/drift-eds.png :width: 100% :alt: SrTiO3 XEDS spectrum image before and after drift correction **XEDS spectrum image (SrTiO₃).** The 0° HAADF before and after correction (a, b) and the corrected 0°/90° HAADF reference (c); the Ti K map before and after correction (d, e); and the Ti K (magenta) and Sr L (green) composite on the corrected HAADF (f). The same holds for 4D-STEM: each diffraction pattern is reassigned to its corrected position, so virtual images and the patterns behind them line up. .. figure:: ../img/research/drift-4dstem.png :width: 100% :alt: 4D-STEM virtual images of gold nanoparticles before and after drift correction **4D-STEM (gold nanoparticles).** Virtual bright-field images from the 0° and 90° acquisitions (a, b), the uncorrected combined image (c), the corrected virtual bright-field images (d, e), and the corrected combined image (f). Insets show the individual diffraction patterns nearest the selected positions. Co-authored publications ------------------------ - **Universal drift correction for multidimensional scanning microscopy.** S. Lee *et al.*, `arXiv:2609.30866 `__ (2026).