Anton Gladyshev (Berlin / DE), Marcel Schloz (Berlin / DE), Thomas C. Pekin (Berlin / DE), Benedikt Haas (Berlin / DE), Benjamin Plotkin-Swing (Kirkland, WA / US), Andreas Mittelberger (Kirkland, WA / US), Christoph T. Koch (Berlin / DE)

Abstract text (incl. figure legends and references)

**Introduction**

Electron ptychography is a computational imaging technique used to recover the phase of a specimen from a four-dimensional scanning transmission electron microscopy (4D-STEM) dataset consisting of two-dimensional diffraction patterns recorded from overlapping illuminated areas [1].

**Objectives**

Ptychography is a rapidly growing field, but several practical challenges limit its scope. The amount of data acquired is a major issue. One way to resolve this limitation is to find a lossy compression method for the diffraction patterns. Here we compare various methods that are based on a change of a basis spanning the detector plane.

**Materials and Methods**

A 4D-STEM dataset was simulated using qstem [2], including thermal diffuse scattering, an effective source of size 0.5 Å and a finite electron dose. To perform electron ptychography we reconfigured a gradient-based optimization framework ADORYM [3]. The object was reconstructed by minimizing the L2 norm of the difference between magnitudes of the experimentally measured diffraction patterns and the ones generated by the model. The loss calculation included transformations that allowed us to use basis sets with fewer elements than the number of pixels and therefore describe the patterns more efficiently.

**Results**

In the bright field area we compared three basis options: binning, Zernike polynomials and basis vectors generated by the Gram-Schmidt algorithm applied to diffraction patterns recorded before the main acquisition. The dark field region of the patterns was described by a single value accounting for the constant offset. The results are presented in Figure 1.

**Figure 1.** **a) Si** crystal ground truth potential** **used in qstem. **b)-d) **Reconstructed phases of the complex transmission functions obtained using three orthonormal basis sets. The lowest possible number of basis vectors and electron doses (shown in the lower right corners of **b)-d)**) were used. The basis in** b) **consisted of 15 randomly selected diffraction patterns, in **c) **of the first 36 Zernike Polynomials and in **d) **of 45 binning masks. **e) ** Fourier shell correlations between compressed reconstructions and ground truth. **f) **A typical log-scaled diffraction pattern. Enlarged bright field basis vectors are shown in **g)-h). g) **shows a basis vector used in **b)**, generated from a recorded pattern. **h)** shows a Zernike polynomial. Binning basis vectors denoted with individual colors are presented in **i)**.

**Conclusion**

Compressed datasets were 5,000-15,000 times smaller than the original. We show that it is possible to achieve atomic resolution in ptychographic reconstructions even with partial spatial coherence of the electron source and a finite electron dose. The proposed compression approach takes the specific geometry of diffraction patterns into account and retains a sufficient amount of the "intact" information after the transformation. No specific constraints, e.g. a regularization, were used, but as previously shown [4], this could improve the quality of the reconstructions.

[1] W Hoppe, Acta Crystallogr. (1969). pp. 495-514.

[2] C Koch, PhD thesis, Arizona State University (2002)

[3] M Du et al. Optical Express 29 (2021), pp. 10000-10035. doi: 10.1364/OE.418296

[4] M Schloz et al., Optical Express 28 (2020), pp. 28306-28323. doi: 10.1364/ OE.396925

[5] The authors acknowledge financial support through the DFG (SFB 951 and SFB 1404).