Deterministic X-ray Bragg coherent diffraction imaging as a seed for subsequent iterative reconstruction

Coherent diffractive imaging (CDI), using both X-rays and electrons, has made extremely rapid progress over the past two decades. The associated reconstruction algorithms are typically iterative, and seeded with a crude first estimate. A deterministic method for Bragg Coherent Diffraction Imaging (Pavlov et al., Sci. Rep. 7, 1132 (2017)) is used as a more refined starting point for a shrink-wrap iterative reconstruction procedure. The appropriate comparison with the autocorrelation function as a starting point is performed. Real-space and Fourier-space error metrics are used to analyse the convergence of the reconstruction procedure for noisy and noise-free simulated data. Our results suggest that the use of deterministic-CDI reconstructions, as a seed for subsequent iterative-CDI refinement, may boost the speed and degree of convergence compared to the cruder seeds that are currently commonly used. We also highlight the utility of monitoring multiple error metrics in the context of iterative refinement.


Introduction
The "phase problem" for propagating complex scalar fields seeks to reconstruct both their phase and amplitude given measurements of wave-field modulus [1]. Such data may be directly obtained using experimental measurements of field intensity or probability density.
Phase retrieval has a rich history throughout many domains of optical and quantum physics, dating back at least as far as Wolfgang Pauli's famous question regarding the possibility of reconstructing a complex scalar wave-function given knowledge of the modulus of both its real-space and momentum-space wave-functions [2]. Accordingly, phase retrieval methodologies have been applied in many imaging-related fields including visible-light optics [3], X-ray optics [4][5][6][7], electron optics [8] and neutron optics [9]. While linear optics is typically considered, phase retrieval for non-linear fields (such as those obeying the non-linear Schrödinger equation) has also been studied [10]. The above rich variety of fields is accompanied by a variety of approaches to phase retrieval. These include but are not limited to interferometry [11]), holography (inline holography [12], off-axis holography [13][14][15], Fourier holography [16,17] etc.), through-focal series techniques [18], various means for the inversion of far field scattering data [5,19,20], ptychographic methods [21], and deliberate introduction of aberrations [22].
We restrict usage of the term "phase retrieval" to means of phase recovery that are not explicitly based on interferometry. Two features are common to many methods of phase retrieval. (i) Constructive use is made of the differential equation governing the evolution of the field, which couples the measured intensity and to-be-recovered phase and thereby permits one to pose the inverse problem of recovering the latter from the former. (ii) Use of relevant a priori knowledge is often crucial.
The phase-retrieval problem, of recovering phase information from a measurement of wave-field moduli, is an example of a so-called inverse problem [23]. A specified phase-retrieval scenario is "well-posed in the sense of Hadamard" if it satisfies the criteria of (i) existence of at least one solution, (ii) uniqueness of the solution modulo acceptable ambiguities such as meaningless global phase factors and transverse displacement of the object being reconstructed, and (iii) stability of the solution with respect to imperfections in the input intensity data (see e.g. p. 221 in [24]).
In deterministic approaches to phase retrieval [25], these three criteria for well-posedness may be explicitly addressed. This has the advantage of conceptual clarity and rigour, balanced against the negatives that (i) it severely restricts the scope of phase-retrieval problems that may be addressed; (ii) reconstruction errors can result from a realistic sample's deviation from the strong assumptions often needed to develop a deterministic solution.
A complementary strategy adopts iterative approaches to solving the inverse problem of phase retrieval [26,3]. Here, one typically sets up an error metric which quantifies the degree of mismatch between the data implied by a given candidate reconstruction (of the complex wave-field, or of a given object which has resulted in a measured wave-field). One seeks to minimise this error metric, subject to suitable constraints (such as the finite domain occupied by the object, atomicity and/or positivity of the object, etc.) and other relevant a priori knowledge. The approach pioneered by Gerchberg & Saxton [26] and Fienup [3], together with its successors (e.g. [27]), has been particularly successful. Such iterative approaches to phase retrieval have the advantage that they can be practically applied to a much broader class of problem than is amenable to deterministic approaches, while having the drawback that they can lack the conceptual clarity and rigour that deterministic methods provide. This drawback may be problematic, for example, when an iterative phase-retrieval algorithm is trapped in a non-global local minimum of the error metric, making it unclear whether the stagnated solution is indeed acceptably close to the correct solution.
Iterative and deterministic approaches to the inverse problem are not necessarily mutually exclusive. Deterministic phaseretrieval methods can be used to give a good first estimate to the solution to a specified phase problem, which can then be iteratively refined into a better solution. The key idea is that the deterministic method locates a point in the solution space that is sufficiently close to the global error-metric minimum corresponding to the true solution, thereby aiding both the rapidity and the correctness of the iterative-method convergence to a better solution to the particular phase problem.
We focus attention on "coherent diffractive imaging" (CDI) [28]. This relates to phase retrieval for non-crystalline (or imperfectly crystalline) samples using far-field optical scattering data. CDI is a non-destructive technique enabling nanoresolution imaging, particularly using X-rays and electrons, whose success has been demonstrated in a number of applications [29].
Until recently, most CDI reconstruction techniques available were iterative. An exception is given by methods related to Fourier holography [30], about which more will be said later. Contemporary iterative approaches to CDI have enjoyed an impressive chain of successes, with the associated iterative phase-retrieval methods having achieved a high level of accuracy and robustness.
Nevertheless, the previously-described issues intrinsic to iterative approaches are not entirely eliminated. Indicative is the following statement from a recent review: "The presence of noise and limited prior knowledge (loose constraints) increases the number of solutions within the noise level and constraints. Confidence that the recovered image is the correct and unique one can be obtained by repeating the phase-retrieval process using several random starts." [31]. Usually, these iterative reconstruction techniques use as a starting guess in real space an autocorrelation of the object function, obtained as the inverse Fourier transform of the far-field diffraction pattern (e.g. [27]) or a random set of parameters (e.g. the guided hybridinput-output (HIO) method [32]).
We explore deterministic phase-retrieval seeding of subsequent iterative-method refinement in the problem of Bragg-CDI phase retrieval. Bragg CDI is a variant of CDI applied to small imperfect crystals, using 3D far-field diffracted-intensity measurements in the vicinity of a Bragg peak as data from which one seeks to reconstruct both the shape and strain-field distribution data in the crystal [33][34][35]. Typical crystal dimensions are on the order of tens of nanometres through to several microns. We are particularly interested in investigating whether an iterative technique can help to remove or reduce the  [37]. In ou ystal is ideal, efects) in the u (see Fig. 2a In this paper, we place weak inclusions in the upper half of the crystal, each filled with a material having a smaller structure factor than the bulk (minimum 0.9 h   ). The remainder of the simulated crystalline structure (i.e. all but the spherical inclusions) has 1 h   (see Fig. 2a showing The cropped data array of far-field intensity used in the reconstructions results in a voxel resolution in real space of 80×80×80 nm 3 , which is comparable to the resolution demonstrated in [40]. However, it should be noted that a better resolution is reported in more recent literature (e.g. [41]). Application of the proposed reconstruction technique for a smaller voxel size is straightforward.
The expression for the simulated far-field intensity (without noise) is given in [36]: Here,  (11) in [36]) by introducing the auxiliary function: Here ˆk in I is the intensity kin I with added Poisson noise. In our simulations, we consider two cases of noise applied to the simulated data, namely, noise free and with a maximum intensity of 10 11 photons per voxel (at q=0). As we want to compare the effectiveness of deterministic and iterative reconstruction procedures in this paper, we have not excluded the brightest voxel, corresponding to the origin in Fourier space, from the noise adding procedure as was done in [36]. For real experimental data, ˆk in I is proportional to the registered intensity.
As shown in detail in [36], the auxiliary function U(x,y,z) reduces to Here, A is a term proportional to the shape function of the sample, the B j and C j terms are 16  The closed-form solution to the BCDI inverse problem, obtained using equation (2), is exact if a) there is no noise in ˆk in I and b) the reference part is indeed a perfect undeformed crystal. If either of these conditions is not fulfilled, the reconstruction h u r will contain some errors. The stronger the deviations from the ideal reconstruction conditions, the greater these errors will typically become.
To reduce the reconstruction errors associated with our deterministic BCDI algorithm, we employ the widely-used shrinkwrap iterative reconstruction algorithm [27]. The shrink-wrap algorithm, being very well known, will not be described here.
In the original paper [27], it was suggested that one could use the autocorrelation function as a starting point for this iterative reconstruction algorithm. Such a choice has been commonly employed, in a large number of successful CDI reconstructions. However, as an alternative that is explored in the present paper, one can choose a BCDI reconstruction result as a starting point for subsequent iterative refinement.

Modelling, Results and Discussion
Now we apply our deterministic BCDI reconstruction (see equation (2)) to the simulated X-ray intensity (equation (1)) to obtain a starting point for the shrink-wrap iterative reconstruction procedure. This iterative reconstruction procedure uses the χ 2 error metric in Fourier space, as is typical for iterative CDI algorithms (see e.g. [40]): In our case, We restrict the total number of shrink-wrap iterations to 2000, because, as shown in Fig. 3, no improvements are observed beyond 1800 iterations. Figure 3 clearly demonstrates that the shrink-wrap iterative reconstruction procedure improves the χ 2 metric for both starting points (deterministic BCDI or autocorrelation function) in real space in comparison to the one-step deterministic BCDI reconstruction, which is shown in Fig. 3 only for the case of the maximum intensity of 10 11 photons per pixel, because it is indistinguishable from the noise-free reconstruction. The use of the deterministic BCDI reconstruction as the starting point in the iterative procedure allows faster convergence and the final χ 2 result is better than the one obtained when the starting point is the autocorrelation function.