PtyRAD: A High-performance and Flexible Ptychographic Reconstruction Framework with Automatic Differentiation
arXiv:2505.07814 · doi:10.1093/mam/ozaf070
Abstract
Electron ptychography has recently achieved unprecedented resolution, offering valuable insights across diverse material systems, including in three dimensions. However, high-quality ptychographic reconstruction is computationally expensive and time consuming, requiring a significant amount of manually tuning even for experts. Additionally, essential tools for ptychographic analysis are often scattered across multiple software packages, with some advanced features available only in costly commercial software like MATLAB. To address these challenges, we introduce PtyRAD, an open-source software framework offers a comprehensive, flexible, and computationally efficient solution for electron ptychography. PtyRAD provides seamless optimization of multiple parameters--such as sample thickness, local tilts, probe positions, and mixed probe and object modes--using gradient-based methods with automatic differentiation (AD). By utilizing PyTorch's highly optimized tensor operations, PtyRAD achieves up to a 17x speedup in reconstruction time compared to existing packages without compromising image quality. In addition, we propose a real-space depth regularization, which avoids wrap-around artifacts and can be useful for twisted two-dimensional (2D) material datasets and vertical heterostructures. Moreover, PtyRAD integrates a Bayesian optimization workflow that streamlines hyperparameter selection. We hope the open-source nature of PtyRAD will foster reproducibility and community-driven development for future advances in ptychographic imaging.
17 pages, 6 figures
References in corpus (21)
- Relaxed Averaged Alternating Reflections for Diffraction Imaging
- High Dynamic Range Pixel Array Detector for Scanning Transmission Electron Microscopy
- Electron ptychography achieves atomic-resolution limits set by lattice vibrations
- py4DSTEM: a software package for multimodal analysis of four-dimensional scanning transmission electron microscopy datasets
- Visualization of Oxygen Vacancies and Self-doped Ligand Holes in La3Ni2O7-δ
- Tree-Structured Parzen Estimator: Understanding Its Algorithm Components and Their Roles for Better Empirical Performance
- Using Automatic Differentiation as a General Framework for Ptychographic Reconstruction
- Very-High Dynamic Range, 10,000 frames/second Pixel Array Detector for Electron Microscopy
- Overcoming information reduced data and experimentally uncertain parameters in ptychography with regularized optimization
- PtyLab.m/py/jl: a cross-platform, open-source inverse modeling toolbox for conventional and Fourier ptychography
- Adorym: A multi-platform generic x-ray image reconstruction framework based on automatic differentiation
- Three dimensions, two microscopes, one code: automatic differentiation for x-ray nanotomography beyond the depth of focus limit
- The 4D Camera: an 87 kHz direct electron detector for scanning/transmission electron microscopy
- Live processing of momentum-resolved STEM data for first moment imaging and ptychography
- Iterative Phase Retrieval Algorithms for Scanning Transmission Electron Microscopy
- Efficient and flexible approach to ptychography using an optimization framework based on automatic differentiation
- Sub-nanometer depth resolution and single dopant visualization achieved by tilt-coupled multislice electron ptychography
- Dose-efficient Automatic Differentiation for Ptychographic Reconstruction
- A modular software framework for the design and implementation of ptychography algorithms
- Electron Ptychography Reveals Correlated Lattice Vibrations at Atomic Resolution
- BEACON -- Automated Aberration Correction for Scanning Transmission Electron Microscopy using Bayesian Optimization