Skip to main content
QUICK REVIEW

[Paper Review] PtyLab.m/py/jl: a cross-platform, open-source inverse modeling toolbox for conventional and Fourier ptychography

Lars Loetgering, Mengqi Du|arXiv (Cornell University)|Jan 16, 2023
Advanced X-ray Imaging TechniquesPhysics and Astronomy3 citations
TL;DR

PtyLab.m/py/jl is a cross-platform, open-source inverse modeling toolbox that unifies conventional and Fourier ptychography data analysis within a single framework. By leveraging the mathematical equivalence of both modalities, it enables seamless algorithm transfer, supports multiple programming languages (Matlab, Python, Julia), and integrates advanced self-calibration techniques and algorithmic innovations such as aPIE, zPIE, and POCT.

ABSTRACT

Conventional (CP) and Fourier (FP) ptychography have emerged as versatile quantitative phase imaging techniques. While the main application cases for each technique are different, namely lens-less short wavelength imaging for CP and lens-based visible light imaging for FP, both methods share a common algorithmic ground. CP and FP have in part independently evolved to include experimentally robust forward models and inversion techniques. This separation has resulted in a plethora of algorithmic extensions, some of which have not crossed the boundary from one modality to the other. Here, we present an open source, cross-platform software, called PtyLab, enabling both CP and FP data analysis in a unified framework. With this framework, we aim to facilitate and accelerate cross-pollination between the two techniques. Moreover, the availability in Matlab, Python, and Julia will set a low barrier to enter each field.

Motivation & Objective

  • To bridge the algorithmic divide between conventional ptychography (CP) and Fourier ptychography (FP), which have evolved independently despite shared mathematical foundations.
  • To reduce barriers to entry in ptychographic research by providing implementations in Matlab, Python, and Julia.
  • To accelerate cross-pollination of methods and innovations between CP and FP communities by enabling direct conversion and shared analysis workflows.
  • To offer a comprehensive, extensible software framework supporting advanced self-calibration algorithms and novel ptychographic techniques.
  • To provide a unified environment for prototyping and deploying ptychographic inversion algorithms across diverse experimental setups and imaging modalities.

Proposed method

  • Formalizes the mathematical equivalence between CP and FP by showing that the same data cube can be interpreted as either a CP or FP problem through phase-space rotation.
  • Implements a unified forward model where CP and FP are treated as dual formulations: CP uses spatial scan positions and probe-object convolution, while FP uses illumination direction and Fourier domain sampling.
  • Supports data conversion between CP and FP representations via inverse Fourier transforms of reconstructed spectra, enabling cross-modal analysis.
  • Integrates state-of-the-art ptychographic solvers such as aPIE, zPIE, sPIE, and POCT within a single software stack.
  • Provides modular, reusable components for scan grid generation, data I/O, and visualization to optimize data acquisition and post-processing workflows.
  • Offers native support for GPU acceleration via CUDA in the Julia version and leverages optimized FFT libraries (FFTW.jl, FFTW) for high-performance computation.
Figure 1: Illustration of the operation principle and equivalence of conventional and Fourier ptychography. (a) An object is laterally translated against a localized illumination profile. (b) In CP, the recorded data cube is a sequence of diffraction patterns, providing spatial frequency ( $\boldsym
Figure 1: Illustration of the operation principle and equivalence of conventional and Fourier ptychography. (a) An object is laterally translated against a localized illumination profile. (b) In CP, the recorded data cube is a sequence of diffraction patterns, providing spatial frequency ( $\boldsym

Experimental results

Research questions

  • RQ1Can the mathematical equivalence between conventional and Fourier ptychography be leveraged to unify their data analysis workflows?
  • RQ2To what extent can algorithmic advances in one ptychographic modality (CP or FP) be transferred to the other through a shared software framework?
  • RQ3How can a cross-platform, multi-language toolbox reduce barriers to entry and accelerate innovation in ptychographic imaging?
  • RQ4What is the impact of unified self-calibration techniques (e.g., aPIE, zPIE) on the robustness and accuracy of ptychographic reconstructions across different modalities?
  • RQ5Can a single software framework support both CP and FP workflows while maintaining high performance and extensibility?

Key findings

  • The same data cube can be interpreted as either a conventional ptychography or a Fourier ptychography problem, with the two formulations being mathematically equivalent through phase-space rotation.
  • Reconstruction of the object spectrum in FP can be converted to a CP reconstruction via inverse Fourier transform, enabling direct comparison and cross-modal analysis.
  • The software framework successfully supports the implementation and integration of advanced self-calibration algorithms such as aPIE, zPIE, sPIE, and POCT, which were previously unavailable in open-source ptychography tools.
  • The availability of PtyLab in Matlab, Python, and Julia enables broader community access and facilitates collaborative development and method transfer between CP and FP research communities.
  • The framework includes tools for scan grid generation and data processing that enhance data acquisition efficiency and reconstruction quality.
  • The open-source release of PtyLab.m/py/jl with accompanying tutorials and open data promotes reproducibility and accelerates adoption in both academic and industrial research settings.
Figure 2: Workflow in PtyLab . Experimental data is converted into a preprocessed hdf5 data set. The remaining parameters controlling algorithmic and monitoring behavior and required for reconstruction are set by an initialization routine. Various reconstruction engines and forward models can be cho
Figure 2: Workflow in PtyLab . Experimental data is converted into a preprocessed hdf5 data set. The remaining parameters controlling algorithmic and monitoring behavior and required for reconstruction are set by an initialization routine. Various reconstruction engines and forward models can be cho

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.