Clear Sky Science · en

A Unified preprocessing framework for high-throughput diffraction pattern analysis

· Back to index

Seeing Atoms More Clearly

Modern microscopes can now watch how atoms are arranged inside materials, helping scientists design better batteries, alloys, and electronics. But the raw images these tools produce are often messy and distorted, making it hard to pull out reliable numbers. This article introduces a new artificial intelligence system, called 4D‑PreNet, that automatically cleans up this data so researchers can focus on understanding materials rather than wrestling with noisy images.

Figure 1
Figure 1.

Why Electron Patterns Matter

In a technique known as four‑dimensional scanning transmission electron microscopy, or 4D‑STEM, a tightly focused electron beam is scanned across a sample. At each position, the microscope records a tiny “firework” pattern created as electrons scatter from the atoms. Collecting a full image at every point produces an enormous stack of data that can reveal strain, crystal orientation, and defects at the atomic scale. The catch is that these patterns are easily spoiled by random noise, small shifts in the beam’s position, and subtle stretching that turns circular rings into ellipses. Even a one‑pixel error in the beam’s center can lead to misleading measurements of how much a material is stretched or squeezed.

One Tool Instead of Many

Traditionally, scientists have relied on a patchwork of separate algorithms to clean up 4D‑STEM data: one for denoising, another for finding the beam center, yet another for correcting geometric distortion. Each step often needs careful manual adjustment for every new material or experiment, which is slow and fragile. The authors of this paper propose 4D‑PreNet as a unified, end‑to‑end solution. It is a deep‑learning pipeline that takes raw diffraction patterns and, in a single pass, removes noise, recenters the beam, and straightens out elliptical distortions, producing data that is ready for quantitative analysis.

How the Smart Filter Works

4D‑PreNet is built from three specialized neural networks arranged in sequence. The first network acts like a smart noise filter, learning to strip away random speckles while preserving the fine spots and rings that carry physical meaning. The second network learns to pinpoint the true center of each diffraction pattern with accuracy better than a fraction of a pixel, then digitally shifts the image so that all patterns are aligned to a common reference. The third network looks at an averaged pattern from many probe positions and estimates how much it has been stretched or tilted, then applies the opposite transformation to restore circular symmetry. To teach these networks, the researchers generated vast numbers of realistic simulated patterns, covering many materials, orientations, noise levels, and distortion types, so the system would be robust when faced with real experiments.

Figure 2
Figure 2.

Sharper Data, Faster Experiments

Tests on both simulated and experimental data show that 4D‑PreNet significantly improves image quality. It cuts the average error in pixel intensity roughly in half and boosts a standard signal‑to‑noise measure by several decibels, meaning details become much clearer. For locating the beam center, its average error is about one‑third of a pixel, markedly better than common methods based on simple intensity averages or symmetry. The network also reduces measures of how uneven the diffraction rings are, confirming that stretched patterns are being corrected. Importantly, it achieves all this automatically: a large 4D‑STEM dataset can be processed in minutes on a modern graphics card, without manual tuning.

Toward Push‑Button Atomic Mapping

By turning messy diffraction data into clean, well‑aligned patterns in a single automated step, 4D‑PreNet helps unlock the full power of 4D‑STEM. Researchers can more confidently map strain, crystal orientation, and subtle structural changes across a sample, and they can do so at the speed required for high‑throughput or even real‑time experiments. In plain terms, this work moves electron microscopy closer to a push‑button tool: scientists feed in raw measurements, and the system quietly handles the complex cleanup behind the scenes, delivering reliable pictures of how atoms are arranged in advanced materials.

Citation: Liu, M., Mao, Z., Liu, Z. et al. A Unified preprocessing framework for high-throughput diffraction pattern analysis. npj Comput Mater 12, 145 (2026). https://doi.org/10.1038/s41524-026-01993-3

Keywords: 4D-STEM, electron microscopy, deep learning, diffraction analysis, materials characterization