Novel computational framework streamlines ptychography imaging at FLASH

sample modus

Reconstructed sample through the A-AD ptychography at the FLASH2 facility at the beamline FL24. Without applying the A-AD model it was impossible to fully retrieve the sample. The A-AD concept relaxes the constraints and disentangles the uncertainties (Figure from original publication).

microscopic imaging

Single-shot pulse reconstruction in terms of a coherent basis describing the FEL source. The white numbers indicate the contribution of each mode to the coming pulse. In average, the FLASH2 pulses were labelled as highly coherent during this experiment (Figure from original publication).

Microscopic imaging using X-ray free-electron lasers like FLASH enables studies of structural features with a resolution down to a few nanometers and has become a major field of these facilities worldwide. Among the pure imaging routines, X-ray ptychographic microscopy combines the advantages of X-ray scanning microscopy with the recently developed techniques of coherent diffraction imaging. By using the highly intense and ultra-short coherent laser pulses, diffraction imaging has flourished as one of the techniques applicable to structural analysis of a large variety of samples in the soft and hard X-ray regimes. It offers, in principle, wavelength-limited resolution imaging in contrast to conventional optics.

Ptychography, as a modern computational microscopy technique, simultaneously retrieves the object under study and information on the light pulses illuminating it. High-resolution ptychographic images are collected through scanning a larger object by the focused free-electron lasers (FEL) pulses. It has to be ensured that the light pulses are moved across the sample with sufficient overlap from position to position. This process allows the retrieval of both, object and light pulse. However, standard ptychography algorithms require an ideal stable light pulse from shot to shot. Thus, the chaotic fluctuations of the FEL pulse properties, caused by the SASE (self-amplified spontaneous emission) process, complicate the implementation and data analysis of such experiments under real conditions.

To overcome these difficulties and to facilitate ptychography at FELs, a research team from FLASH at DESY developed a new computational framework (further information see below). ‘Here, automatic differentiation builds the backbone of our ptychography algorithm. It is a modern computational technique borrowed from deep learning”, explains Konstantin Kharitonov, PhD student at DESY and the first author of the study. The automatic differentiation (AD) approach is mainly used to solve optimisation problems. AD is a family of techniques for efficiently and accurately evaluating derivatives of numeric functions expressed as computer programs. Hence, various optimisation tasks, such as X-ray ptychography imaging, can be handled with AD without a need for the manual deriving of gradients. However, a ptychography model purely based on AD may not perform satisfactorily at FELs since it excludes fluctuations to optimise. Therefore, we built up an Adaptive Automatic Differentiation (A-AD) ptychography routine. Fluctuations of the incoming light pulses and partial spatial coherence, as well as scanning imprecisions– all these parameters can be numerically integrated into our model to enhance the accuracy of the retrievals. The A-AD’s computational power permits near-, intermediate- and far-field ptychography in one experiment without a need to modify the analytical calculations.

For the first time, ptychography was performed at the FLASH2 beamline FL24 which is equipped with KB micro-focusing optics employing bendable mirrors. By using the A-AD model for reconstruction, a resolution below 3 𝜇m at 13.5 nm wavelength, for an intermediate-field geometry, could be achieved. During the ptychography experiment at FLASH, near- and intermediate-field diffraction patterns were measured with the same setup, and collected datasets were retrieved nearly online. The A-AD approach will enable our users to perform new types of measurements.

"While recovering the studied object, our ptychography routine yielded insight into every FEL pulse and captured them shot-to-shot.’ explains Masoud Mehrjoo, DESY scientist. Single-shot characterisation of FEL pulses is of vital importance to control experiment parameters and perform successful imaging experiments.

The study shows that recent advances in computer science and machine learning pave the way to non-destructive and high-resolution imaging at current and future FEL facilities like FLASH2020+.



K. Kharitonov, M. Mehrjoo, M. Ruiz-Lopez, B. Keitel, S. Kreis, M. Seyrich, M. Pop, and E. Plönjes, Flexible ptychography platform to expand the potential of imaging at free-electron lasers, Opt. Express (2021), DOI: 10.1364/OE.426931