## Abstract

For performing phase retrieval in the extreme ultraviolet (EUV) regime more efficiently, developing polychromatic ptychography is desirable. As an alternative to the existing ptychographic information multiplexing (PIM) method, we present an another scheme where all monochromatic exit waves are expressed in terms of the amplitude of the transmission function and the thickness function of the object. Our proposed algorithm is a gradient based method and its validity is studied numerically. In addition, the sampling issue which appears in the polychromatic ptychography scheme and its influence to the reconstruction quality are discussed.

© 2019 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

## 1. Introduction

Ptychography [1–7] is a scanning coherent diffraction imaging (CDI) technique that is suitable for EUV and X-ray imaging applications due to its high fidelity and its minimum requirement on optical imaging elements. Its goal is to reconstruct a complex-valued object from a set of data which are recorded in the Fraunhofer or Fresnel diffraction region. In accordance with the meaning of ’ptychography’ (from the Greek ’$\pi \tau \nu \chi \eta$’ for ’*fold*’), for each measurement a part of the object is illuminated and adjacent illuminations should be partially overlap. This data redundancy and *a priori* information about the relative position between the illumination light beam and the object are the cause for the robustness of ptychography. During the last few years, many ptychography experiments have been successfully demonstrated with visible light sources [5–9], synchrotron radiation [3,4,10–14], electron beam [15,16], and tabletop high-harmonic generation laser [17–20]. It has been widely agreed that ptychography is able to provide not only a wide field-of-view (FoV), but also simultaneous reconstructions of the complex-valued function of the sample and the illumination probe function.

Regarding reconstruction algorithms in ptychography, the most commonly used approaches are the difference-map method [4] and the ptychographic iterative engine (PIE) [2,6]. The difference-map method is designed to solve problems which can be formulated in terms of finding the intersection of two constraint sets [7]. In contrast, the PIE method derived from a gradient descent scheme by sequentially minimizing the distance between the estimated diffraction intensities and the measurements [5]. In principle, a highly coherent illumination is always demanded while performing ptychography [21,22]. However, in the X-ray regime, where ptychography has been widely used, light sources are either spatially partially coherent (e.g. synchrotron radiation [23,24]) or temporally partially coherent (e.g. tabletop high-harmonic generation laser [25,26]). To mitigate the unwanted effect due to the partial coherence, and also to improve the throughput of the imaging system, more novel algorithms have been introduced into ptychography during the last decade, among which the most popular approaches are the blind deconvolution method [27] and the modes decomposition method [10]. Both of these approaches were initially utilized for performing ptychography with spatially partially coherent illumination. The mode decomposition method was later used to perform ptychography with spatially coherent but temporally broadband illumination. The polychromatic ptychography was named ptychographic information multiplexing (PIM) method [8], in which the object is illuminated by a spatially fully coherent light beam, which spectrum however consists of several wavelengths. The exit wave immediately behind the object is decomposed into mutually incoherent modes, each mode corresponding to one wavelength. Then these modes are reconstructed simultaneously by minimizing the distance between the estimated diffraction intensity and the measurement, which is the incoherent sum of the intensities of the separate wavelengths.

In this paper, we propose an alternative polychromatic ptychography scheme where the modes in the PIM method are all expressed in the transmission and the thickness function of the sample. We consider both the case that the probe for the different wavelengths is assumed known, and the case of simultaneous reconstruction of unknown probe and the object. Our method is described and derived in Section 2.1. After introducing the error functions in Section 2.3, our simulation settings and results are presented in Subsection 3.1.1, followed by a quantitative study on the error functions in Subsection 3.1.2 and a comparison with the PIM method in Subsection 3.1.3. The simulation includes probe reconstruction is demonstrated in Subsection 3.2. We conclude the paper with a summary and outlook in the last section.

## 2. Method

#### 2.1 Plane-wave illumination

We start by considering a polychromatic ptychography configuration as depicted in Fig. 1. A part of the object is illuminated by a spatially coherent plane-wave, which has distinct peaks in its temporal spectrum $S(\lambda )$. The object is moved to a number of positions while a set of ptychographic data is collected in the far field. For one position of the object and for one wavelength $\lambda$, we denote the exit wave immediately behind the object by $\varPsi (\textbf {r},\lambda )$ and the measured intensity of the diffracted field by $I_{M}(\textbf {r}')$. Here $\textbf {r}$ and $\textbf {r}'$ are 2-D coordinates in the object-plane and the detector-plane, respectively.

In our proposed scheme, instead of decomposing the exit wave into mutually incoherent modes and calculating their diffraction intensities, we consider the relation between these modes. In the plane-wave illumination configuration, the exit wave $\varPsi (\textbf {r},\lambda )$ is given by the object’s complex transmission function multiplied by a planar wave with wavelength $\lambda$. For the case where the illumination contains several separate wavelengths $\lambda _{1}<\lambda _{2}<\cdots <\lambda _{k}<\cdots <\lambda _{N}$ in its temporal spectrum $S(\lambda )$. The exit wave $\varPsi (\textbf {r},\lambda )$ for wavelength $\lambda _{k}$ and probe position $\textbf {R}_{j}$ is (apart from a phase constant, see in Appendix D.1):

The goal in our polychromatic ptychography scheme, for the case that the probe $P$ is known , is to retrieve $A(\mathbf {r})$ and $\mathbf {\phi }(\mathbf {r})$ simultaneously. To do that, we minimize the following cost function:

The reconstruction of $A(\mathbf {r})$ and $\mathbf {\phi }(\mathbf {r})$ is done by applying the steepest decent procedure to the cost function $\mathcal {E}_{j}(A,\phi )$. In Appendix A and B detailed derivations are given of the following formulas for updating $A(\mathbf {r})$ and $\mathbf {\phi }(\mathbf {r})$:

For successfully retrieving $A(\mathbf {r})$ and $\mathbf {\phi }(\mathbf {r})$, the complete ptychographic dataset must be used. To do that, we sequentially implement Eq. (7) on every lateral position of the object as a complete reconstruction procedure within one iteration. In the meantime, we also introduce a positive-value correction to the amplitude reconstruction $A(\mathbf {r})$ at the end of each iteration, so that a positive amplitude is obtained and hence the phase is well defined. A framework of our proposed model is summarized in Algorithm 1.

#### 2.2 With probe reconstruction

In the previous subsection we restricted ourselves to the case where the illumination (or probe) is a localized plane-wave. One can imagine that if in practice this condition is violated, directly applying the algorithm will end up with stagnation or an inaccurate reconstruction. Therefore to achieve a better of the reconstruction’s quality, simultaneously retrieving the probe function and the object’s transmission and thickness functions is necessary in such cases. As shown in Fig. 1, in our model the object is illuminated by a wavefield which contains multiple wavelength components. If these components have different intensity and wavefront profiles, then we have to model this polychromatic probe function as an incoherent superposition of different modes and using the PIM formula to reconstruct these modes would be the most reasonable choice. Here we only consider a simple situation where every mode shares the same intensity and wavefront profile. In that case the exit wave field $\varPsi (\textbf {r},\lambda )$ can be written as in Eq. (1). However, now $P(\mathbf {r})$ is a complex-valued probe function which represents the illumination wave field of all wavelengths. To incorporate the reconstruction of this probe function, Eq. (7) is modified as :

#### 2.3 Definition of error functions

To monitor our numerical experiment, we define an error function given by:

## 3. Simulation and discussion

#### 3.1 Plane-wave illumination

To examine our **Algorithm 1**, the results of numerical experiments are reported in this section. A detailed introduction and demonstration of our simulation is presented in the first part of this section, then in the following subsection we analysis the performance of the algorithm by studying the error functions. In the final part of the section a comparison study between **Algorithm 1** and the PIM method is reported.

### 3.1.1 Validation of the proposed algorithm.

### A. Parameter settings of the simulation

We first construct a complex-valued object with as amplitude map the ’Mona Lisa’ painting and as phase map the ’camera man’ picture. The amplitude map contains non-zero values ranging in $[0.1,1]$ to avoid phase uncertainty, and the phase map varies between $[0,\pi ]$ to prevent phase wrapping effect. A planar wavefield which contains a certain number of wavelength components, and which was transmitted by a circular aperture, is used as the probe function. For each wavelength component, the exit wavefield is modeled as in Eq. (1) and then is propagated to the far field where their intensities are added up. The measured total intensity is the polychromatic ptychographic data set in accordance with Eq. (4). Note that for every wavelength $\lambda _{k}$ other than the shortest one $\lambda _{1}$, the propagated wavefield is zoomed in with a rate $=\lambda _{k}/\lambda _{1}$. The far field diffraction patterns scale with the reciprocal wavelength. Since the discrete mesh in the far field region should correspond to the pixels of the detector, we use the chip z-transform [30,31] instead of the FFT to enable the desired flexibility of the mesh. The discretised regions of the diffraction patterns are limited to spatial frequencies that are below the maximum spatial limit defined by the Nyquist sampling for the shortest wavelength $\lambda _{1}$. To give an example, we assume in the configuration of Fig. 1 that there is a detector with a $320\times 320$ array of $15\mu m$ pixels, at a propagation distance of $z=1cm$ behind the object. Accordingly, the maximum spatial frequency that can be measured by this detector for the wavelengths $30nm$, $40nm$ and $50nm$ are listed in Table 1.

The probe function that we use is a matrix with $320\times 320$ pixels, which is in line with the number of pixels of the detector. The probe has circular support with diameter of 160 pixels, which is equivalent to a diameter size of $10\mu m$. The Fresnel number is $1/3$ for $30nm$ wavelength, and is smaller than $1/3$ for larger wavelengths. Therefore the detector is in the Fraunhofer region. The circular support is used as a priori knowledge in the reconstruction. In addition, the *a priori* knowledge is used that the object is moved over an equidistant 4x4 grid with 80% overlap between adjacent illuminated areas. Suppose the diameter of the circular support is $L$, and the distance between adjacent illumination positions is denoted by $d\in [0,L]$. The overlap ratio is defined by:

*a priori*knowledge about the probe’s support size can be estimated by Fourier transforming the diffraction intensity, and then can be registered with real-world spatial scale according to the propagation distance and camera’s parameters.

It is worth to note that, by taking more wavelengths into account, the computational cost of the algorithm is generally more expensive than the case of monochromatic illumination. This can be understood by inspecting the framework of **Algorithm 1** and Eq. (8). To complete a single iteration in **Algorithm 1**, one need to perform forward and backward propagation of the wavefield for every wavelengths and for every probe positions, which involve multiple FFTs. If the propagation is calculated for each $\lambda _{k}$ sequentially, the required computation time will increase almost linearly with respect to the number of wavelengths. To shorten the calculation duration, one can modify the code based on accelerated gradient-based algorithms (e.g. nonlinear optimization methods [34,35] and momentum-based methods [36]) or take an advantage of modern computational devices (e.g. GPU-based parallel computing [37–39]). In our numerical experiments, 1000 iterations were applied for each single simulation to ensure the convergence. To make the algorithm converges faster, Nesterov momentum-based algorithm [36] was implemented between 50th and 500th iteration. The momentum is added to the reconstruction formula in the manner as suggested in [40]. Our simulation is running on a NVIDIA GeForce GTX 1060 GPU. For easy integration with the device, our code is written in Python using the *scikit-cuda* package for calculating 2D-FFT and *pycuda* package for performing other operations.

Because in this part of our simulation the probe includes polychromatic plane-waves, we first investigate how the number of wavelengths in the probe’s temporal spectrum influence the quality of the reconstruction. The probe’s spectrum was generated as follows: (i) when the illumination is a monochromatic plane-wave, the wavelength is 30nm. (ii) for the polychromatic situation, we start with generating two spectral components at 30nm and 50nm. To include more spectral component (when $N>2$), we add the additional frequencies between 30nm and 50nm, while the distances in frequency between adjacent frequencies are identical. A schematic demonstration regarding how we generate the temporal spectrum can be found at the left of Fig. 2. When the measurements are noise free, we let all the wavelengths have the same intensity in the probe spectrum as shown in Fig. 2. Whereas for the noisy situation, we built the probe spectrum such that all the wavelengths share the same number of photons. A more detailed description about the noisy case can be found in the next subsection.

### B. Adding noise to the measurements

To investigate the influence of noise, we added Poisson noise to every diffraction intensity measurements. Considering that one of the tasks in the numerical experiment is to investigate how the algorithm performs with different number of wavelengths when the noise is kept at a certain amount, it is important to build a criterion of the noise level which is insensitive to the number of wavelength in the probe’s spectrum. In the simulation we pay attention to the total photon number of the diffraction intensity, we call this number TPN (short for ’total photon number’) and we use it as a reference to define the Poisson noise level. In accordance with the Poisson noise model, the signal-to-noise ratio (SNR) equals to $\sqrt {\textrm {TPN}}$. Hence when the TPN remains at the same value, each measurement will also stays at the same noise level for different number of wavelengths. Here it is notable that a single photon includes $hc/\lambda _{k}$ of energy for each wavelength $\lambda _{k}$, therefore each wavelength has different intensities with the same photon number. However, though a simple calculation we can find that the total energy of the diffraction intensity is the same for a fixed TPN. The calculation is presented in Appendix C.

### C. Reconstruction results

In Fig. 2, we present our simulation results for the cases where 1, 2, 5 and 20 spectral components are included in the probe’s spectrum, respectively. The results in Figs. 2(a1)–2(a8) are obtained with the PIE algorithm, while Figs. 2(b1)–2(b8), 2(c1)–2(c8) and 2(d1)–2(d8) are the reconstructions by implementing our proposed **Algorithm 1**. We use a constant amplitude map $A_{0}(\textbf {r}) = 0.5$ and a constant phase map $\phi _{0}(\textbf {r}) = 1$ as an initial guess for the object function, which is proven to be sufficient for our proposed algorithm to successfully alleviate the ambiguities described in Appendix D.2. Reconstruction results with different TPN value are also depicted in Fig. 2. By roughly examining these pictures, one can conclude that the reconstructions are visually acceptable when the TPN equals $10^{7}$ and $10^{6}$, whereas the reconstructions are corrupted by noise when the TPN is decreased to $10^{5}$. By carefully comparing the phase reconstructions (the ’camera man’ pictures), it is also noticeable that stronger defects occur when the probe contains 20 spectral components. For a better understanding on this defect, in the following subsection a more quantitative analysis is given by inspecting the evolution of the error functions.

### 3.1.2 Evolution of the error function.

To better understand the simulation results, it is necessary to examine the evolution of the error functions that are described in Subsection 2.3. A series of NERs and NEFs, which were computed from the simulation results described in Subsection 3.1.1 and Fig. 2, are drawn in Figs. 3(a) and 3(b) respectively. All the NERs and the NEFs were computed for the case that the probe contains 1-20 components in its spectrum, and the TPN varies from $10^{5}$ to $10^{7}$. If we only pay attention to a single TPN value, it is seen that although the NEFs stay at almost the same value, the NER increases with the number of wavelengths almost linearly, which agrees with what we already observed in Figs. 2(c1)–2(c8).

For seeking the reason behind this phenomenon, additional simulation have been performed. The difference between the new and previously discussed simulations is that we ignore the wavelength dependence in propagating the wavefields (see Eq. (4)). Figure 4 gives a schematic description of the two different ways of computing the polychromatic diffraction intensity pattern. In line with what has been discussed in Subsection 3.1.1, it is assumed that the shortest wavelength’s ($\lambda _{1}$) contribution to the diffraction intensity always fulfills the Nyquist sampling criterion. Hence in Fig. 4 we use a red frame to represent the Nyquist frequency with respect to $\lambda _{1}$, which is equivalent to the boundary of an imaginary detector $\textbf {1}_{D}(\textbf {r}')$. Figure 4(a) illustrates the calculation process in Eq. (4), which includes the wavelength-dependency of the wavefield propagation. In the new numerical experiment the wavefield propagation is without the wavelength-dependency, as shown in Fig. 4(b).

In correspondence with the wavefield propagation model shown in Fig. 4(b), the simulated NERs and NEFs, gathered after our algorithm converged, are illustrated in Figs. 5(a) and 5(b) respectively. By comparing Fig. 3 and Fig. 5, it is obvious that the wavelength-dependent error in the reconstruction disappears once the wavelength-dependency in the propagation model is removed. Hence, one can conclude that the way we measure and compute the polychomatic diffraction wavefield is the cause for the increase in NER in Fig. 5(a). This is because when the binary function $\textbf {1}_{D}(\textbf {r}')$ in Eq. (4) corresponds to a window size which fits the Nyquist sampling criterion for the short wavelength $\lambda _{1}$, the same maximum spatial frequency from larger wavelengths are not completely measurable (see in Table 1). As illustrated in Fig. 5(a), for wavelengths larger than $\lambda _{1}$, part of the diffraction wavefield (outside the red frame) is cut off by the boundary of the detector. Hence the recorded data is incomplete which leads to the increase of the NER. It follows that the theoretical resolution of the reconstruction cannot be estimated only by the size of the detector and the sampling rule of the shortest wavelength. This is important if one performs polychromatic ptychography without using wavelength-scanning or spectroscopic detection to separately detect the diffracted intensities of the individual wavelengths. In other words, although in principle performing ptychography with a polychromatic light source can gives higher SNR and shorter acquisition time, the reconstruction quality is not necessarily better than the monochromatic ptychography result. A similar effect was also reported in [8].

### 3.1.3 Comparison with PIM method.

In order to study the different performance between our proposed algorithm and the PIM method, we present some numerical simulations in this subsection. All parameter values are chosen the same as in Subsection 3.1.1. In Fig. 6 we illustrate the final reconstructed NERs and NEFs for simulated noise-free measurements. The NERs of our proposed algorithm were calculated as described in Section 2.3. While the NERs of the PIM method were calculated also from Eq. (11), in which the reconstructed object $O(\mathbf {r})_{n}$ is given by the exit wave in PIM corresponding to $\lambda _{1}$.

From Fig. 6 it can be concluded that although both **Algorithm 1** and the PIM method converged to a very low value of NEF, the reconstructed object functions have different qualities. When the probe function contains polychromatic plane waves with more than roughly 10 wavelengths, the PIM method suffers more from the limited detector size issue described in Subsection 3.1.2. As shown in Fig. 7, when the probe has 20 spectral components, all the reconstructed modes in the PIM method are disrupted. Hence in this case it is more suitable to employ **Algorithm 1**.

#### 3.2 With probe reconstruction

We also compare the simulation outcomes for different situations when the probe function is unknown. As has been mentioned in Subsection 2.2, we consider a relatively simple case where for every wavelength the complex probe function is the same. To inspect the performance of our proposed iterative scheme of Eq. (9), we use a complex initial probe function and show the noise-free reconstruction result in Figs. 8(a1)–8(a6). The probe’s temporal spectrum is assumed to contain 3 components with identically long wavelength intervals between them, as illustrated at the left of Fig. 8. It can be confirmed that the update formula given in Eq. (9) is able to retrieve the object and the probe function, even when the probe has a very complicated profile. However, due to the fact that in this simulation we set the relative position between the probe and the object $\textbf {R}_j$ to be a regular position grid in two orthogonal directions, raster grid pathology appears in both the reconstruction of the object and the probe. This kind of defect is more visually obvious when the initial probe function is a polychromatic plane-wave (the reconstruction result for this case is in Figs. 8(b1)–8(b4)). To eliminate the raster grid defect, ideas for optimizing the scanning trajectory were proposed in [41–43], which however are beyond the scope of this paper.

## 4. Conclusion and outlook

In this paper we have introduced a polychromatic ptychographic algorithm, which can be regarded as an alternative to the PIM approach. It is based on the idea that the mutually incoherent modes in the multiple wavelength scheme can be related by representing the object by real transmission and thickness functions. The algorithm is derived from the steepest descent method and is numerically validated. We first discussed polychromatic plane wave illumination which is assumed to be known and afterwards included the case of the reconstruction of an unknown probe. The results show that **Algorithm 1** performs nicely for a known probe, and that a reasonable level of noise can be handled by the algorithm. For a sufficiently thin object, the ptychography reconstruction given by the polychromatic approach has a higher NER than the case of monochromatic illumination. This is due to the fact that for longer wavelengths higher spatial frequencies are not capture by the detector because stronger diffraction effects. Hence, although in principle performing ptychography with a polychromatic light source can give higher SNR and shorter acquisition time, the reconstruction quality is not necessarily better than the monochromatic ptychography results. Compared to the PIM method, **Algorithm 1** is less sensitive to the missing data issue. However, defects are observed when a very complex unknown probe function is introduced and must be reconstructed as well. With varying parameter settings (i.e. noise and the number of spectral components in the probe), different behaviors are observed and discussed in this paper. As next steps for improvement, pathologies cause by the raster scanning grid of the probe function should be eliminated and the performance of the algorithm should be validated using experimental data.

## Appendix

## A. The steepest descent method and monochromatic ptychography algorithm

In this section of the Appendix we derive the ptychograpy algorithms for a single wavelength. The goal of ptychography is to reconstruct a complex-valued object from a set of diffraction intensity patterns which are recorded in the Fraunhofer or Fresnel region. Let $\textbf {r}$ and $\textbf {r}'$ be 2-D coordinates in the object-plane and the detector-plane, respectively. The exit wave immediately behind the object is denoted by $\varPsi (\textbf {r})$ and the measured diffraction intensity measurement $I_{M}(\textbf {r}')$. According to the thin object model, the exit wave $\varPsi (\textbf {r})$ is given by the multiplication of the probe function $P(\textbf {r}-\textbf {R}_{j})$ and the object function $O(\textbf {r})$:

*a priori*knowledge (i.e. the support constraint on the probe function, and the $j$th relative position $\textbf {R}_{j}$ between the probe and the object), while the cost function $\mathcal {E}$ is minimized.

To recover the object function, a straightforward way is sequentially performing projections in the Fourier plane and the object plane. In recent research works on phase retrieval, it has became more common to implement these projections in the Fourier and object domain with more advanced schemes (e.g. difference map [7,10,44], RAAR [37,45], etc.) for achieving better convergence.

Alternatively, one can obtain ptychography reconstruction by sequentially minimizing a cost function $\mathcal {E}_{j}$ with the steepest descent method. Let $\mathcal {E}_{j}$ be the difference between $I_{E,j}(\textbf {r}')$ and $I_{M,j}(\textbf {r}')$ for position $j$:

In a similar fashion, we can derive the iteration formula for updating the probe function using the steepest decent direction. We find:

## B. Polychromatic ptychography algorithm

In this section we propose a ptychography algorithm for multiple-wavelength illumination with mutually incoherent wavelengths and using measured total diffracted intensities (i.e. the intensities are not spectrally separated). As mentioned in the main text, for an non-dispersive thin object we can express the exit wave for wavelength $\lambda _{k}$ as:

## C. The relationship between the photon number and the total energy

In this appendix we aim to prove that the total energy of the measurements is a constant for a fixed total photon number. In line with Section 3.1.1, we denote $N$ as the number of wavelength and TPN as the total photon number in the diffracted wavefield. Because every wavelengths are presumed to have the same number of photons, the total energy $e_{N}$ of the measurement is given by:

where $h$ is the Planck constant and $\nu _{k}$ is the $k$th frequency. Considering that all the frequencies lie in the range [$\nu _{1}$,$\nu _{N}$], and have equal distance in frequency between adjacent ones, Eq. (36) can be rewritten as:## D. Ambiguities in ptychography

Compared to traditional single-measurement phase retrieval methods, ptychography alleviates amount of issues which might disrupt the reconstruction. However, there are still ambiguities that could lead us to an unwanted solution in ptychogrpahy.

#### D.1 Global phase shift

Due to the fact that in ptychography only diffracted intensities are detected, we can have:

#### D.2 Conjugate reconstruction

This ambiguity comes from the nature of the Fourier transform. For a given exit wave function $\varPsi _{j}(\textbf {r})$, we have the following relationship:

#### D.3 Raster grid pathology

The raster grid pathology is a periodical defect which can occur in ptychography reconstruction, if the relative positions $\textbf {R}_j$ between the probe and the object are on a regular position grid. To be explicit, we start with the expression of exit wave in Eq. (14):

## E. Additional simulations about the effect of incomplete measurements

In Subsection 3.1.2, we demonstrated that the quality of the reconstruction could degrades in the polychromatic ptychography scheme because a detector of limited size cannot capture strongly diffracted far field intensities at longer wavelengths. To demonstrate this, we described two simulations Subsection 3.1.2, namely: (1) with an incomplete ptychographic data-set; (2) with a complete measured data-set, which was obtained by ignoring the wavelength-dependency in the wavefield propagation model, as illustrated in Fig. 4. The simulation results are shown in Fig. 5.

In this Appendix, an alternative simulation is provided to further argue the cause of the inaccuracies of the reconstructions. As illustrated in Fig. 9(b), instead of ignoring the wavelength-dependency in the wavefield propagation model, we expand the boundary of the detector such that the maximum spatial frequency for the largest wavelength $\lambda _{N}$ can be collected. We emphasize that in this simulation all monochromatic diffracted wavefields have the same maximum spatial frequency, which equals to the largest wavelength $\lambda _{N}$. This is because the discretized object has the same pixel size and illuminated area for every wavelength. For the wavelengths shorter than $\lambda _{N}$, the relevant parts of the diffraction patterns of all wavelengths fall inside the area of the detector, and the pixel size is assumed to be sufficiently small that for the smallest wavelength (and hence for all wavelengths), the intensity patterns are sufficiently well sampled. As a comparison, we again inspect the reconstruction with the incomplete measurement. The reconstructed error functions for these two numerical experiments are plotted in Fig. 10.

Because limited size of the detector only influences the quality of reconstruction for the propagation model as shown in Fig. 9(a), we call the model of Fig. 9(a) model as the case ’with window function’ and similarly we call the model in Fig. 9(b) as the case ’without window function’, which explains the legend in Fig. 10. From Fig. 10(b) we see that all the NEFs have reached zero-value, which indicates that the algorithm has converged to the solutions with the same NEF for all the situations. However in Fig. 10(a) the NERs of the solutions obtained with window function are higher than without the window function. Therefore one can conclude that the limited size of the detector is the cause of the degradation of the results.

## F. Evolution of error functions

In this section we give an example of the evolution of the error functions, which aims to show the convergence of the algorithm. Each curve in Figs. 11(a) and 11(b) is related to one situation in Fig. 2. Although we have not decided a terminate criterion in our numerical experiment, it is clear that employing the algorithm for 1000 iterations is sufficient for reaching the minima in our simulation.

## G. Influence of the overlap ratio

Considering ptychography is a scanning diffraction imaging technique, it is reasonable that the overlap ratio defined in Eq. (13) plays an important role in the quality of the reconstructed image. In [32] the authors studied how the overlap ratio influences the performance of PIE through simulation and experiment for the first time. The result indicates that, with monochromatic and fully spatial coherent illumination, one can get hold of satisfactory reconstructions by employing 60%-85% of overlap ratio. It was also mentioned in the literature that 30% of overlap could be sufficient if fast overview scans are demanded. On the other hand, a theoretical explanation regarding how overlapped ptychographic scans facilitate the convergence of the algorithm was proposed in [46]. However, to the best of our knowledge, no optimal overlap ratio from theoretical point of view has been proposed yet.

In this appendix we conduct a simulation to demonstrate how the overlap ratio influences the performance of our proposed polychromatic ptychography method. In this numerical experiment, we presume the diffraction intensity measurements are noise free. The rest of the parameter settings for the simulation are duplicated from the Subsection 3.1.1. To observe how the overlap ratio affects the quality of the reconstruction, we adjust the overlap ratio from 0% to 100% with an interval of 10%. Once again in each simulation 1000 iterations were applied to ensure convergence. As an example of the reconstruction results, in Fig. 12(a) we show the reconstructed object when the probe only contains 5 wavelengths, and when the overlap ratio equals 0%, 80% and 99%, respectively. The NERs for a series of wavelengths overlap ratios can be found in Fig. 12(b). From Fig. 12(b), it can be concluded that the overlap ratio should be selected from 60% to 90% for achieving optimal performance of the algorithm, which is in good agreement with the monochromatic situation given in [32]. In line with this conclusion, we choose to employ 80% overlap ratio for the numerical studies in the main context.

## Funding

H2020 Marie Skłodowska-Curie Actions (675745).

## Acknowledgments

X. Wei thanks A. P. Konijnenberg for fruitful discussions. X. Wei also thanks W. M. J. Coene, S. Witte and his group members including G. S. M. Jansen, A. de Beurs, X. Liu, etc., for the inspiring meetings.

## References

**1. **H. M. L. Faulkner and J. M. Rodenburg, “Movable aperture lensless transmission microscopy: A novel phase retrieval algorithm,” Phys. Rev. Lett. **93**(2), 023903 (2004). [CrossRef]

**2. **J. M. Rodenburg and H. M. L. Faulkner, “A phase retrieval algorithm for shifting illumination,” Appl. Phys. Lett. **85**(20), 4795–4797 (2004). [CrossRef]

**3. **J. M. Rodenburg, A. C. Hurst, A. G. Cullis, B. R. Dobson, F. Pfeiffer, O. Bunk, C. David, K. Jefimovs, and I. Johnson, “Hard-x-ray lensless imaging of extended objects,” Phys. Rev. Lett. **98**(3), 034801 (2007). [CrossRef]

**4. **P. Thibault, M. Dierolf, A. Menzel, O. Bunk, C. David, and F. Pfeiffer, “High-resolution scanning x-ray diffraction microscopy,” Science **321**(5887), 379–382 (2008). [CrossRef]

**5. **M. Guizar-Sicairos and J. R. Fienup, “Phase retrieval with transverse translation diversity: a nonlinear optimization approach,” Opt. Express **16**(10), 7264–7278 (2008). [CrossRef]

**6. **A. M. Maiden and J. M. Rodenburg, “An improved ptychographical phase retrieval algorithm for diffractive imaging,” Ultramicroscopy **109**(10), 1256–1262 (2009). [CrossRef]

**7. **P. Thibault, M. Dierolf, O. Bunk, A. Menzel, and F. Pfeiffer, “Probe retrieval in ptychographic coherent diffractive imaging,” Ultramicroscopy **109**(4), 338–343 (2009). [CrossRef]

**8. **D. J. Batey, D. Claus, and J. M. Rodenburg, “Information multiplexing in ptychography,” Ultramicroscopy **138**, 13–21 (2014). [CrossRef]

**9. **A. M. Maiden, M. J. Humphry, and J. M. Rodenburg, “Ptychographic transmission microscopy in three dimensions using a multi-slice approach,” J. Opt. Soc. Am. A **29**(8), 1606–1614 (2012). [CrossRef]

**10. **P. Thibault and A. Menzel, “Reconstructing state mixtures from diffraction measurements,” Nature **494**(7435), 68–71 (2013). [CrossRef]

**11. **M. Dierolf, A. Menzel, P. Thibault, P. Schneider, C. M. Kewish, R. Wepf, O. Bunk, and F. Pfeiffer, “Ptychographic x-ray computed tomography at the nanoscale,” Nature **467**(7314), 436–439 (2010). [CrossRef]

**12. **B. Enders, M. Dierolf, P. Cloetens, M. Stockmar, F. Pfeiffer, and P. Thibault, “Ptychography with broad-bandwidth radiation,” Appl. Phys. Lett. **104**(17), 171104 (2014). [CrossRef]

**13. **S. O. Hruszkewycz, M. Allain, M. V. Holt, C. E. Murray, J. R. Holt, P. H. Fuoss, and V. Chamard, “High-resolution three-dimensional structural microscopy by single-angle bragg ptychography,” Nat. Mater. **16**(2), 244–251 (2017). [CrossRef]

**14. **M. Holler, M. Guizar-Sicairos, E. H. R. Tsai, R. Dinapoli, E. Müller, O. Bunk, J. Raabe, and G. Aeppli, “High-resolution non-destructive three-dimensional imaging of integrated circuits,” Nature **543**(7645), 402–406 (2017). [CrossRef]

**15. **M. Humphry, B. Kraus, A. Hurst, A. Maiden, and J. Rodenburg, “Ptychographic electron microscopy using high-angle dark-field scattering for sub-nanometre resolution imaging,” Nat. Commun. **3**(1), 730 (2012). [CrossRef]

**16. **Y. Jiang, Z. Chen, Y. Han, P. Deb, H. Gao, S. Xie, P. Purohit, M. W. Tate, J. Park, S. M. Gruner, V. Elser, and D. A. Muller, “Electron ptychography of 2d materials to deep sub-ångström resolution,” Nature **559**(7714), 343–349 (2018). [CrossRef]

**17. **M. D. Seaberg, B. Zhang, D. F. Gardner, E. R. Shanblatt, M. M. Murnane, H. C. Kapteyn, and D. E. Adams, “Tabletop nanometer extreme ultraviolet imaging in an extended reflection mode using coherent fresnel ptychography,” Optica **1**(1), 39–44 (2014). [CrossRef]

**18. **B. Zhang, D. F. Gardner, M. H. Seaberg, E. R. Shanblatt, C. L. Porter, R. Karl, C. A. Mancuso, H. C. Kapteyn, M. M. Murnane, and D. E. Adams, “Ptychographic hyperspectral spectromicroscopy with an extreme ultraviolet high harmonic comb,” Opt. Express **24**(16), 18745–18754 (2016). [CrossRef]

**19. **P. D. Baksh, M. Odstrčil, H.-S. Kim, S. A. Boden, J. G. Frey, and W. S. Brocklesby, “Wide-field broadband extreme ultraviolet transmission ptychography using a high-harmonic source,” Opt. Lett. **41**(7), 1317–1320 (2016). [CrossRef]

**20. **D. F. Gardner, M. Tanksalvala, E. R. Shanblatt, X. Zhang, B. R. Galloway, C. L. Porter, R. K. Jr, C. Bevis, D. E. Adams, H. C. Kapteyn, M. M. Murnane, and G. F. Mancini, “Subwavelength coherent imaging of periodic samples using a 13.5 nm tabletop high-harmonic light source,” Nat. Photonics **11**(4), 259–263 (2017). [CrossRef]

**21. **J. Spence, U. Weierstall, and M. Howells, “Coherence and sampling requirements for diffractive imaging,” Ultramicroscopy **101**(2-4), 149–152 (2004). [CrossRef]

**22. **K. A. Nugent, “Coherent methods in the x-ray sciences,” Adv. Phys. **59**(1), 1–99 (2010). [CrossRef]

**23. **L. W. Whitehead, G. J. Williams, H. M. Quiney, D. J. Vine, R. A. Dilanian, S. Flewett, K. A. Nugent, A. G. Peele, E. Balaur, and I. McNulty, “Diffractive imaging using partially coherent x rays,” Phys. Rev. Lett. **103**(24), 243902 (2009). [CrossRef]

**24. **J. Clark, X. Huang, R. Harder, and I. Robinson, “High-resolution three-dimensional partially coherent diffraction imaging,” Nat. Commun. **3**(1), 993 (2012). [CrossRef]

**25. **B. Chen, R. A. Dilanian, S. Teichmann, B. Abbey, A. G. Peele, G. J. Williams, P. Hannaford, L. Van Dao, H. M. Quiney, and K. A. Nugent, “Multiple wavelength diffractive imaging,” Phys. Rev. A **79**(2), 023809 (2009). [CrossRef]

**26. **S. Witte, V. T. Tenner, D. W. Noom, and K. S. Eikema, “Lensless diffractive imaging with ultra-broadband table-top sources: from infrared to extreme-ultraviolet wavelengths,” Light: Sci. Appl. **3**(3), e163 (2014). [CrossRef]

**27. **N. Burdet, X. Shi, D. Parks, J. N. Clark, X. Huang, S. D. Kevan, and I. K. Robinson, “Evaluation of partial coherence correction in x-ray ptychography,” Opt. Express **23**(5), 5452–5467 (2015). [CrossRef]

**28. **J. Goodman, * Introduction to Fourier Optics*, McGraw-Hill physical and quantum electronics series (W. H. Freeman, 2005).

**29. **J. R. Fienup, “Invariant error metrics for image reconstruction,” Appl. Opt. **36**(32), 8352–8357 (1997). [CrossRef]

**30. **L. Rabiner, R. Schafer, and C. Rader, “The chirp z-transform algorithm,” IEEE Trans. Audio Electroacoust. **17**(2), 86–92 (1969). [CrossRef]

**31. **G. D. Martin, “Chirp z-transform spectral zoom optimization with MATLAB,” Tech. rep. (2005).

**32. **O. Bunk, M. Dierolf, S. Kynde, I. Johnson, O. Marti, and F. Pfeiffer, “Influence of the overlap parameter on the convergence of the ptychographical iterative engine,” Ultramicroscopy **108**(5), 481–487 (2008). [CrossRef]

**33. **F. Zhang, I. Peterson, J. Vila-Comamala, A. Diaz, F. Berenguer, R. Bean, B. Chen, A. Menzel, I. K. Robinson, and J. M. Rodenburg, “Translation position determination in ptychographic coherent diffraction imaging,” Opt. Express **21**(11), 13592–13606 (2013). [CrossRef]

**34. **W. Murray, M. H. Wright, and P. E. Gill, * Practical Optimization* (Emerald Publishing Limited, 1982).

**35. **J. Zhong, L. Tian, P. Varma, and L. Waller, “Nonlinear optimization algorithm for partially coherent phase retrieval and source recovery,” IEEE Trans. Comput. Imaging **2**(3), 310–322 (2016). [CrossRef]

**36. **S. Ruder, “An overview of gradient descent optimization algorithms,” arXiv:1609.04747 (2016).

**37. **S. Marchesini, H. Krishnan, B. J. Daurer, D. A. Shapiro, T. Perciano, J. A. Sethian, and F. R. N. C. Maia, “SHARP: a distributed GPU-based ptychographic solver,” J. Appl. Crystallogr. **49**(4), 1245–1252 (2016). [CrossRef]

**38. **Z. Dong, Y.-L. L. Fang, X. Huang, H. Yan, S. Ha, W. Xu, Y. S. Chu, S. I. Campbell, and M. Lin, “High-performance multi-mode ptychography reconstruction on distributed GPUs,” in * 2018 New York Scientific Data Summit (NYSDS)*, (IEEE, 2018).

**39. **Y. S. G. Nashed, D. J. Vine, T. Peterka, J. Deng, R. Ross, and C. Jacobsen, “Parallel ptychographic reconstruction,” Opt. Express **22**(26), 32082–32097 (2014). [CrossRef]

**40. **A. Maiden, D. Johnson, and P. Li, “Further improvements to the ptychographical iterative engine,” Optica **4**(7), 736–745 (2017). [CrossRef]

**41. **X. Huang, H. Yan, R. Harder, Y. Hwu, I. K. Robinson, and Y. S. Chu, “Optimization of overlap uniformness for ptychography,” Opt. Express **22**(10), 12634–12644 (2014). [CrossRef]

**42. **X. Huang, K. Lauer, J. N. Clark, W. Xu, E. Nazaretski, R. Harder, I. K. Robinson, and Y. S. Chu, “Fly-scan ptychography,” Sci. Rep. **5**(1), 9074 (2015). [CrossRef]

**43. **A. Fannjiang, “Raster grid pathology and the cure,” arXiv:1810.00852v3 (2018).

**44. **V. Elser, “Phase retrieval by iterated projections,” J. Opt. Soc. Am. A **20**(1), 40–55 (2003). [CrossRef]

**45. **D. R. Luke, “Relaxed averaged alternating reflections for diffraction imaging,” Inverse Probl. **21**(1), 37–50 (2005). [CrossRef]

**46. **J. C. da Silva and A. Menzel, “Elementary signals in ptychography,” Opt. Express **23**(26), 33812 (2015). [CrossRef]