Single-shot ptychography at a soft X-ray free-electron laser

In this work, single-shot ptychography was adapted to the XUV range and, as a proof of concept, performed at the free-electron laser FLASH at DESY to obtain a high-resolution reconstruction of a test sample. Ptychography is a coherent diffraction imaging technique capable of imaging extended samples with diffraction-limited resolution. However, its scanning nature makes ptychography time-consuming and also prevents its application for mapping of dynamical processes. Single-shot ptychography can be realized by collecting the diffraction patterns of multiple overlapping beams in one shot and, in recent years, several concepts based on two con-focal lenses were employed in the visible regime. Unfortunately, this approach cannot be extended straightforwardly to X-ray wavelengths due to the use of refractive optics. Here, a novel single-shot ptychography setup utilizes a combination of X-ray focusing optics with a two-dimensional beam-splitting diffraction grating. It facilitates single-shot imaging of extended samples at X-ray wavelengths.

The order-specific diffraction efficiency of the grating and its transfer function were studied by evaluating intensity distributions measured without the sample. They are shown in Fig. S2. A close-up view of the intensity distributions produced by the individual beamlets is shown in Fig. S3. The grating was found to have a close to ideal transfer function resulting in intensity distributions almost identical up to the multiplicative factor caused by the diffraction efficiency of the grating. Order-specific diffraction efficiencies of the grating were experimentaly measured and found to be close to the design values. They were used as the initial values in the single-shot ptychography reconstructions. Counts, log scale S 2. Intensity distribution measured without the sample. It was measured at a FEL fundamental wavelength of λ = 13.5 nm with fully suppressed higher harmonics. The harmonics were suppressed using metal foil filters and a gas attenuator.

S2 Reconstructions from the simulated data
A binary 1951 USAF Target shown in Fig. S4 with transmission and phase varying from 0.2 to 0.9 and 0 to 2π, respectively, was used as the test sample. The sample was simulated on a numerical grid with a numerical resolution 669 nm/pixel corresponding nm. An ANDOR iKon-M (N = 1024, dx det = 13 µm) was used as the detector. The probe was initialized at the grating plane with a Gaussian intensity distribution and a defocus of 16cm. Additionally, to imitate the complex structure of the SASE beam and the effects of the KB mirror profile, the probe was modulated by a randomized speckle pattern with transmission and phase varying from 0.5 to 0.99 and −π to π, respectively. The wavefield after the grating was calculated by aperturing the probe with a square aperture of 200 × 200 µm 2 representing the active area of the grating. The wavefield at the sample plane was obtained by a near-field propagation through a grating to sample distance of 1 cm. The step size at the sample plane was estimated from the grating parameters and grating-sample distance to be 50 µm resulting in an inter-beamlet overlap of 75% between the neighboring beamlets.
The intensity at the detector plane was calculated as the intensity of coherently summed exit-waves produced by the individual beamlets propagated to the detector as where I sum is the resulting intensity, P sd is the sample-detector propagator, α j is the diffraction efficiency of the grating for the j-th beamlet, P is the beamlet wavefield, and O r j is the object transmission function at position r j . The resulting intensity with Poisson noise applied is shown in Fig. S5. For the reconstruction, the measured intensity distribution was separated into 16 individual intensity regions of 256 × 256 pixels corresponding to the individual beamlets. The separation was performed by an algorithm based on the Voronoi tessellation proposed in Barolak et al. 2 .
Individual intensity regions were used as the input data for the automatic differentiation (AD) based reconstruction algorithm described in the main body of this paper. The forward model describing the intensity I j produced by the j-th beamlet was formulated as where P 1 is the Fresnel transfer function propagator in the near field 3 describing the propagation of the probe from the grating plane to the sample plane, P 2 is the propagator describing the propagation of the exit-wave from the sample plane to the detector plane, S is the support representing the active area of the grating, A θ j represents an affine transformation and α j is the scaling coefficient representing the grating efficiency for the j-th diffraction order. To illustrate the effect of different choices for the propagator P on the achievable resolution, we performed two reconstructions with a differently formulated propagator P. The first 'single propagation' formulation utilizes a single Fresnel propagation as follows: where Ψ ρ s ,Ψ ρ d are complex wavefields in the sample, and detector planes respectively, z sd is the sample-detector distance, k = 2π λ is the wave number, ρ s and ρ d denote the transverse coordinates at the sample and detector planes, respectively, and Counts, log scale S 5. Simulated intensity distribution at the detector plane with Poisson noise applied. The (0,0) diffraction order is shown with a turquoise circle.
F denotes the forward Fourier transform. The numerical resolution in the sample plane achievable with this propagator can be calculated as λ z sd Ndx = 2.67 µm, where N = 256 is the column/row size of the intensity region attributed to the particular beamlet and dx = 13 µm is the pixel size of the detector.
Alternatively, the propagator can be formulated as a 'two-step' propagation with the intermediate propagation plane ρ i placed at the distance z si downstream of the sample plane. In this case the propagation can be calculated as: where ρ i denote the coordinate grid in the intermediate plane placed a distance of z si downstream of the sample. The 'two-step' propagator allows varying the numerical resolution in the sample plane as z si dx z id , where dx is the detector pixel size. This way it is possible to get a higher resolution in comparison to the 'single-step' propagator (Equation S3). However, the propagation distance z si cannot be decreased indefinitely, since the probe still needs to fully fit into the computational frame and all the phase terms need to be sampled properly to perform the propagation. In this simulated reconstruction, the intermediate distance was selected as z si = 6.16 cm resulting in a numerical resolution of 1.34 µm in the sample plane, which is two times higher than the one obtainable with the single propagation.
Samples reconstructed with the 'single-step' and the 'two-step' reconstructions are shown in Fig. S6 and S7, respectively. Both of the reconstructions lasted for 10 4 iterations (∼ 3 min of computational time). Sample O, probe P, sample translations A θ j , and order-specific diffraction grating efficiencies α j were optimized during the reconstruction. It is clearly seen that both of the reconstructions converged to the image of the sample and that the use of the 'two-step' propagator allows for obtaining a higher resolution of the reconstruction. We attribute the periodic artifacts appearing in the form of periodic bright dots in Fig. S6(d) and stripes in Fig. S7(a,b) to 'raster grid pathology' 4 emerging from the ideal scan grid used in the simulations.
Additionally, total variation denoising (TVD) of the sample was performed starting from the 5 × 10 3 rd iteration. The weight of the TVD term was initially selected to be one order of magnitude lower than the value of the loss function at the 5 × 10 3 rd iteration. The reconstruction results obtained with the use of TVD are shown in Fig. S6 and S7 (c,d). It can be clearly seen that TVD reduces the amount of noise in the sample reconstruction while preserving the small features. The evolution of the loss function during the reconstruction is shown in Fig. S8 Fig. S(7) respectively. The reconstruction consisted of 10 4 iterations of AD-powered reconstruction algorithm. The TVD regularization was applied after 5 × 10 3 iterations (shown with black dashed line).) 6/7