Introduction

Bragg Coherent Diffraction Imaging (BCDI)1,2,3 by crystalline matter allows one to solve classical crystallographic inverse problems of phase retrieval using oversampling of experimental data4, 5 and iterative reconstruction algorithms (see e.g., ref. 6 and references therein). BCDI is a Bragg scattering variant of the forward-scattering approach of Coherent Diffractive Imaging (CDI) implemented by Miao et al.7 in 1999. Both forward-scattering and Bragg scattering techniques require the coherence length of the incident X-ray wave to be larger than the sample size. This condition is achievable at modern X-ray synchrotron sources that are already able to achieve a coherence volume of the order of several cubic micrometres8.

BCDI methods have been applied in a large variety of experimental settings. For example, they were successfully employed to investigate dynamic nanoscale processes9, to visualize in three dimensions, the entire network of dislocations present within an individual calcite crystal during repeated growth and dissolution cycles10, to report an in situ three-dimensional mapping of morphology and strain evolutions in a single-crystal nanocube within a high-pressure environment11, to understand the surface related properties of shaped nanocrystals12, to determine the stacking fault density in highly defective nanowires13, to study non-uniform strain relaxation in strained layer nano-objects14 and to indicate the presence of surface adsorbates on facetted nanocrystals15. This list of applications is indicative but not exhaustive.

In the case of a non-ideal crystal, containing defects of different kinds, the standard statistical approach of X-ray diffractometry allows one to obtain information averaged over ensembles in both the kinematical16, 17 or dynamical approaches (see e.g., ref. 18 and references therein). There is a large variety of crystallographic systems for which characterisation requires statistical diffraction theory approaches. These statistically averaging approaches were used, for instance, to characterise nanostructures, in particular, quantum wires19 and arrays of quantum dots20,21,22 (see also ref. 23 and references therein). Chaotically distributed spherical clusters24 and correlated dislocations25 are also still attractive objects of research. Other interesting objects for application of statistical diffraction approaches are crystallographic systems with included nanoclusters26, porous structures27, crystals having a net of periodic dislocations28 or a periodic domain structure29. BCDI avoids such an averaging over the illumination volume, demonstrated by standard methods of high resolution X-ray diffractometry (see e.g., ref. 30 and references therein) employing X-ray beams with a small coherence length. The solution of X-ray diffraction inverse problems in these standard diffractometry methods is often based on minimisation of the discrepancy between the simulated and experimental data30,31,32,33.

Potentially, the resolution obtained by BCDI is restricted only by the wavelength of the radiation used. Therewith, as mentioned in ref. 34 for present day sources with coherent flux of 108–109 photons per second, the minimum size of crystal, which can be investigated by BCDI is about 60 nm in diameter.

There exists a mathematical proof that non-uniqueness for complex-field reconstruction from Fourier modulus data in 2D and higher dimensions is very rare35 for functions not having zeros. However, this does not prove that non-linear iterative reconstruction methods (see review in ref. 6) are able to recover that unique solution. As said in ref. 6: “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.” However, the convergence to a particular solution does not mean, in general, that this particular solution is the correct solution, the uniqueness of which is discussed in ref. 35, as clearly demonstrated in the Figure in the Conclusions section in ref. 6. In contrast, deterministic reconstruction methods (see e.g., ref. 36; ref. 37 and references therein) are able to recover the unique solution. Such deterministic solutions come at the price of restricting the class of samples that can be reconstructed.

The deterministic reconstruction method, presented in this paper, also does not suffer from another well-known problem of BCDI iterative methods, namely issues with the reconstruction of large phase excursions38, 39. This problem prevents quantitative reconstruction of large displacement fields in crystalline samples, which are extremely likely to occur in practice38.

This paper provides a deterministic approach to kinematical BCDI, which allows one to stably recover a unique solution for structure factor and displacement fields in an imperfect crystal even in the case of large atomic displacements. Our analysis is restricted to kinematical X-ray scattering from a single imperfect crystal whose imperfections all lie within one particular half of the said crystal. Under this approximation the inverse problem, of reconstructing both the polarisability and the projection of the displacement field along a particular axis, can be performed by weighting the 3D diffracted intensity with a simple function, and then taking the 3D inverse Fourier transform of the resulting product. This remarkably simple reconstruction process directly produces the unique solution to the coherent diffraction imaging inverse problem studied in our paper, subject to the previously stated assumptions.

Theory

Let us consider an incident plane monochromatic X-ray wave having sigma polarisation and unit intensity, which illuminates a small imperfect crystal. The angle between the wave vector k of the incident wave and the X-axis is θ 1 = θ B  + Δθ 1 (see Fig. 1), where θ B is the Bragg angle for a symmetrical (00 L) reflection, Δθ 1 is an angular deviation and the Cartesian axes (X,Y,Z) are as defined in the Figure. The scattered wave is registered in the direction of the wave vector k′. The angle between k′ and the X-axis is θ 2 = θ B  + Δθ 2 (see Fig. 1), where Δθ 2 is the angular deviation. The wave vector k and the average wave vector k′ lie in the diffraction plane XOZ and \(|{\boldsymbol{k}}|=|{\boldsymbol{k}}^{\prime} |=k=2\pi /\lambda \), where λ is the wavelength in vacuum. The plane of detector D is perpendicular to the average vector k′.

Figure 1
figure 1

Monochromatic sigma-polarised X-rays from a source S are incident upon a three-dimensional crystalline sample, for which only one of the top corners is shown. Three-dimensional diffraction data is collected by a detector D which samples diffracted intensities over a three-dimensional range of scattering vectors Q = k′ − k, about a particular scattering direction. Such diffraction measurements form the data which may then be input into our method for deterministic Bragg CDI, to yield both the structure factor and the displacement field of the crystalline sample.

For simplicity, the crystalline structure is assumed to have cubic symmetry with lattice constant a and parallelepiped shape with dimensions L x , L y and L z . We consider two-beam diffraction in the coplanar geometry, where the XOY plane is the top surface of the crystal (see Fig. 1).

Because of the small size of this crystal, we employ a kinematical approximation to describe diffraction from this structure. We will start from a well-known expression for the amplitude of the scattered wave (in the Fraunhofer approximation) (see e.g., equation (5.3) in ref. 30):

$${E}_{kin}=4\pi {r}_{0}C{E}_{i}\iiint d{\bf{r}}{\boldsymbol{^{\prime} }}[-\frac{1}{4\pi }\,\frac{\exp (ik|{\bf{r}}-{\bf{r}}{\boldsymbol{^{\prime} }}|)}{|{\bf{r}}-{\bf{r}}{\boldsymbol{^{\prime} }}|}]\rho ({\bf{r}}{\boldsymbol{^{\prime} }})\exp (i{\bf{k}}\cdot {\bf{r}}{\boldsymbol{^{\prime} }}),$$
(1)

where r 0 is the classical electron radius, the incident amplitude E i  = 1 for the illuminating unit intensity wave, ρ(r′) is the electron density, C = sinϕ is the linear polarisation factor, and ϕ is the angle between the polarisation vector of the incident wave and the position vector r of the observation point. As we consider sigma polarised waves, C = 1. If one uses standard approximations for far-field diffraction, namely \(k|{\bf{r}}-{\bf{r}}{\boldsymbol{^{\prime} }}|\approx kr-{\bf{k}}{\boldsymbol{^{\prime} }}\cdot {\bf{r}}{\boldsymbol{^{\prime} }}\) for the exponent and \(|{\bf{r}}-{\bf{r}}{\boldsymbol{^{\prime} }}|\approx r\) for the denominator in (1), then equation (1) can be rewritten as:

$${E}_{kin}=-{r}_{0}\,\frac{\exp (ikr)}{r}\iiint d{\bf{r}}{\boldsymbol{^{\prime} }}\rho ({\bf{r}}{\boldsymbol{^{\prime} }})\exp (-i({\bf{k}}{\boldsymbol{^{\prime} }}-{\bf{k}})\cdot {\bf{r}}{\boldsymbol{^{\prime} }})={A}_{e}\iiint d{\bf{r}}{\boldsymbol{^{\prime} }}\rho ({\bf{r}}{\boldsymbol{^{\prime} }})\exp (-i{\bf{Q}}\cdot {\bf{r}}{\boldsymbol{^{\prime} }}),$$
(2)

where Q = k′ − k is the scattering vector and \({A}_{e}=-{r}_{0}\frac{\exp (ikr)}{r}\) is a spherical-wave envelope.

The electron density in perfect crystals is a three-dimensional (3D) periodic function, therefore we can further modify (2) (cf. equation (2) in ref. 40):

$${E}_{kin}={A}_{e}\sum _{p=1}^{N}{F}_{p}({\bf{Q}})\exp (-i{\bf{Q}}\cdot ({{\bf{R}}}_{p}+{{\bf{u}}}_{p})),$$
(3)

where R p defines the position of the p-th cell in an ideal 3D periodic lattice, u p describes a shift of the p-th cell from its position R p , defined in the ideal 3D periodic lattice, \({F}_{p}({\bf{Q}})=\sum _{j=1}^{S}\,{f}_{pj}({\bf{Q}})\exp (-i{\bf{Q}}\cdot {{\bf{r}}}_{pj})\) is the structure factor of the p-th cell, r pj is the position of the j-th atom in the p-th cell, and \({f}_{pj}({\bf{Q}})=\iiint {\rho }_{pj}({\bf{r}}{\boldsymbol{^{\prime} }})\exp (-i{\bf{Q}}\cdot {\bf{r}}{\boldsymbol{^{\prime} }})d{\bf{r}}{\boldsymbol{^{\prime} }}\) is the atomic scattering factor of the j-th atom in the p-th cell. It should be noted that we can choose the cell in (3) as an elementary cell, or we can choose this cell as a combination of elementary cells. In the latter case, which is used in our simulations, \({F}_{p}({\bf{Q}})=\sum _{l=1}^{R}{F}_{el}({\bf{Q}})\exp (-i{\bf{Q}}\cdot {{\bf{r}}}_{l})={F}_{el}({\bf{Q}})Z({\bf{q}})\), where F el is the structure factor of an elementary cell, r l defines the position of these elementary cells within the p-th cell and \(Z({\bf{q}})=\sum _{l=1}^{R}\exp (-i{\bf{Q}}\cdot {{\bf{r}}}_{l})=\sum _{l=1}^{R}\exp (-i{\bf{q}}\cdot {{\bf{r}}}_{l})\) is an interference function. Here we (i) assume that all elementary cells in the p-th cell are identical, (ii) neglect the effect of shifting the l-th elementary cell from its position (in the p-th cell), defined in the ideal 3D periodic lattice, and (iii) represent the scattering vector Q as Q = h + q, where (iv) h is the reciprocal lattice vector for a chosen reflection (e.g., (00 L) in our case) and (v) q is the deviation of the scattering vector Q from the reciprocal lattice vector h. Using the representation of the p-th cell as a combination of elementary cells significantly simplifies the simulation procedure because this diminishes the computer memory requirements for the computer simulation and speeds up calculations. This approach was also intrinsically used in iterative BCDI approaches (for a recent review, see e.g. ref. 41 and references therein).

We can further simplify equation (3):

$$\begin{array}{rcl}{E}_{kin} & = & {A}_{e}\sum _{p=1}^{N}{F}_{p}({\bf{Q}})\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})\exp (-i{\bf{Q}}\cdot {{\bf{u}}}_{p})\\ & \approx & {A}_{e}\sum _{p=1}^{N}{F}_{p}({\bf{Q}})\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p}).\end{array}$$
(4)

Here we have used the fact that h · R p  = 2πl, where l is an integer and Q · u p  ≈ h · u p in the vicinity of the reciprocal point h.

To proceed further, we divide the expression for the scattered wave given in (4) into two parts. The first part, \({E}_{kin}^{id}\), describes scattering from an ideal (i.e., without deformations and defects), although space-limited, 3D crystal of parallelepiped shape:

$${E}_{kin}^{id}={A}_{e}\sum _{p=1}^{N}{F}_{p}^{id}({\bf{Q}})\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p}),$$
(5)

where \({F}_{p}^{id}\) is the structure factor of the p-th cell in the case of an ideal crystal. The structure factor \({F}_{p}^{id}({\bf{Q}})\) can be connected to the appropriate Fourier component of polarisability, \({\chi }_{h}^{id}\), of an ideal crystalline structure (comp. eq. 2.37 in ref. 42) corresponding to the reciprocal lattice vector h:

$${F}_{p}^{id}({\bf{Q}})=-\frac{\pi {V}_{cell}}{{r}_{0}{\lambda }^{2}}\,{\chi }_{h}^{id}Z({\bf{q}}),$$
(6)

where V cell is the volume of the unit cell. Then (5) can be rewritten in the following form:

$${E}_{kin}^{id}=-{A}_{e}\frac{\pi {V}_{cell}}{{r}_{0}{\lambda }^{2}}\,{\chi }_{h}^{id}Z({\bf{q}})\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})={B}_{e}{\chi }_{h}^{id}Z({\bf{q}})\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p}),$$
(7)

where \({B}_{e}=-{A}_{e}\frac{\pi {V}_{cell}}{{r}_{0}{\lambda }^{2}}=\frac{\pi {V}_{cell}}{{\lambda }^{2}}\,\frac{\exp (ikr)}{r}\).

The second part of equation (4), \({E}_{kin}^{def}\), is the difference between \({E}_{kin}\) and \({E}_{kin}^{id}\):

$$\begin{array}{rcl}{E}_{kin}^{def} & = & {B}_{e}Z({\bf{q}})[\sum _{p=1}^{N}{\chi }_{h}^{p}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})-{\chi }_{h}^{id}\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})]\\ & = & {B}_{e}Z({\bf{q}})\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})[{\chi }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})-{\chi }_{h}^{id}]\\ & = & {B}_{e}{\chi }_{h}^{id}Z({\bf{q}})\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})[{\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})-1]\end{array},$$
(8)

where \({\beta }_{h}^{p}={\chi }_{h}^{p}/{\chi }_{h}^{id}\) and \({\chi }_{h}^{p}\) is the polarisability for the p-th cell, which can be, for instance, zero, if there is no cell in the p-th position. Note that we do not consider forbidden reflections in this paper, therefore the function \({\beta }_{h}^{p}\) is always well-defined.

Now we combine our two parts of the scattering amplitude:

$$\begin{array}{rcl}{E}_{kin} & = & {E}_{kin}^{id}+{E}_{kin}^{def}\\ & = & {B}_{e}{\chi }_{h}^{id}Z({\bf{q}})\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})+{B}_{e}{\chi }_{h}^{id}Z({\bf{q}})\\ & & \times \,\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})[{\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})-1]\\ & = & {B}_{e}{\chi }_{h}^{id}\frac{\sin ({q}_{x}a{N}_{x}/2)}{\sin ({q}_{x}a/2)}\,\frac{\sin ({q}_{y}a{N}_{y}/2)}{\sin ({q}_{y}a/2)}\,\frac{\sin ({q}_{z}a{N}_{z}/2)}{\sin ({q}_{z}a/2)}\\ & & \times \,{e}^{-i{q}_{x}a({N}_{x}-1)/2}\,{e}^{-i{q}_{y}a({N}_{y}-1)/2}\,{e}^{-i{q}_{z}a({N}_{z}-1)/2}\\ & & +\,{B}_{e}{\chi }_{h}^{id}Z({\bf{q}})\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})[{\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})-1]\\ & \approx & {B}_{e}{\chi }_{h}^{id}{N}_{x}{N}_{y}{N}_{z}\frac{\sin ({q}_{x}a{N}_{x}/2)}{({q}_{x}a{N}_{x}/2)}\,\frac{\sin ({q}_{y}a{N}_{y}/2)}{({q}_{y}a{N}_{y}/2)}\,\frac{\sin ({q}_{z}a{N}_{z}/2)}{({q}_{z}a{N}_{z}/2)}\\ & & {e}^{-i{q}_{x}a({N}_{x}-1)/2}\,{e}^{-i{q}_{y}a({N}_{y}-1)/2}\,{e}^{-i{q}_{z}a({N}_{z}-1)/2}\\ & & +\,{B}_{e}{\chi }_{h}^{id}Z({\bf{q}})\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})[{\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})-1].\end{array}$$
(9)

All components of the first term in (9) are well known, therefore this part of the total scattering amplitude can be used in our deterministic approach to reconstruct the second term containing two unknown functions, namely \({\beta }_{h}^{p}\) and u p . The term \({\beta }_{h}^{p}\) is, in general, a complex function. As we have two unknown functions we need, in general, at least two independent sets of data. For instance, these two sets can be collected using different orders of reflection: with the vectors h and ht, where t is an integer. This allows one to distinguish between the phase component relating to \({\beta }_{h}^{p}\) and to the displacement field u p . However, if the imaginary component of \({\beta }_{h}^{p}\) is small in comparison to its real component (e.g., in the case of centre-symmetrical reflections), one can neglect the phase component of \({\beta }_{h}^{p}\) in comparison to the phase shift caused by the displacement field u p . Then one set of data is enough to recover u p and the real component of \({\beta }_{h}^{p}\). Also in equation (9) we can take into account that in BCDI experiments (see e.g., ref. 43), angular deviations from the Bragg position are small, therefore \(\sin ({q}_{x,y,z}a/2)\approx {q}_{x,y,z}a/2\).

The far-field intensity I kin (without noise) is:

$$\begin{array}{ccc}{I}_{kin}/({|{B}_{e}|}^{2}{|{\chi }_{h}^{id}|}^{2}) & = & {\{{N}_{x}{N}_{y}{N}_{z}\frac{\sin ({q}_{x}a{N}_{x}/2)}{{q}_{x}a{N}_{x}/2}\frac{{\rm{s}}{\rm{i}}{\rm{n}}({q}_{y}a{N}_{y}/2)}{{q}_{y}a{N}_{y}/2}\frac{{\rm{s}}{\rm{i}}{\rm{n}}({q}_{z}a{N}_{z}/2)}{{q}_{z}a{N}_{z}/2}\}}^{2}\\ & & +\,{N}_{x}{N}_{y}{N}_{z}\frac{\sin ({q}_{x}a{N}_{x}/2)}{{q}_{x}a{N}_{x}/2}\frac{\sin ({q}_{y}a{N}_{y}/2)}{{q}_{y}a{N}_{y}/2}\frac{\sin ({q}_{z}a{N}_{z}/2)}{{q}_{z}a{N}_{z}/2}\\ & & \times \,{e}^{i{q}_{x}a({N}_{x}-1)/2}{e}^{i{q}_{y}a({N}_{y}-1)/2}{e}^{i{q}_{z}a({N}_{z}-1)/2}\\ & & \times \,Z({\bf{q}})\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})[{\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})-1]\\ & & +\,{N}_{x}{N}_{y}{N}_{z}\frac{\sin ({q}_{x}a{N}_{x}/2)}{{q}_{x}a{N}_{x}/2}\frac{\sin ({q}_{y}a{N}_{y}/2)}{{q}_{y}a{N}_{y}/2}\frac{\sin ({q}_{z}a{N}_{z}/2)}{{q}_{z}a{N}_{z}/2}\\ & & \times \,{e}^{-i{q}_{x}a({N}_{x}-1)/2}{e}^{-i{q}_{y}a({N}_{y}-1)/2}{e}^{-i{q}_{z}a({N}_{z}-1)/2}\\ & & \times \,{Z}^{\ast }({\bf{q}})\sum _{p=1}^{N}\exp (i{\bf{q}}\cdot {{\bf{R}}}_{p})[{({\beta }_{h}^{p})}^{\ast }\exp (i{\bf{h}}\cdot {{\bf{u}}}_{p})-1]\\ & & +\,{|Z({\bf{q}})\sum _{p=1}^{N}\exp (-i{\bf{q}}\cdot {{\bf{R}}}_{p})[{\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})-1]|}^{2}.\end{array}$$
(10)

To proceed further we introduce the auxiliary function U(x, y, z), which is similar to that introduced in ref. 36 and which is able to provide a closed-form solution to the BCDI inverse problem of reconstructing \({\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})\):

$$U({\bf{R}}=(x,y,z))={|{B}_{e}|}^{-2}{|{\chi }_{h}^{id}|}^{-2}\frac{1}{{(2\pi )}^{3/2}}\iiint {q}_{x}{q}_{y}{q}_{z}{\hat{I}}_{kin}\exp (i{q}_{x}x+i{q}_{y}y+i{q}_{z}z)d{q}_{x}d{q}_{y}d{q}_{z}.$$
(11)

Here \({\hat{I}}_{kin}\) (shown in Fig. 2 for a “weak” object) is the intensity I kin with added Poisson noise. For real experimental data \({\hat{I}}_{kin}\) is proportional to the registered intensity. Thus the auxiliary function U(x, y, z) is simply formed by multiplying the measured noisy far-field diffracted intensity \({\hat{I}}_{kin}({q}_{x},{q}_{y},{q}_{z})\) by the product of Fourier coordinates q x  · q y  · q z , and then taking the 3D inverse Fourier transform of the result.

Figure 2
figure 2

Simulated 3D distributions of diffracted intensity for the case of weak parabolic displacement field and weak spherical inclusions, with no imperfections in the lower (“reference”) half of the crystal. All intensities are shown on a logarithmic scale, with the front octant subtracted to visualise the interior. The coefficient γ, which is inversely proportional to the radius of curvature introduced into the simulated crystal structure, is chosen to yield a maximum phase shift of 0.25π. The quantity \({\beta }_{h}^{p}\), namely the ratio of polarisability (corresponding to the reciprocal vector h) of the p-th cell to polarisability of the cell in the “reference” part of the crystal, is equal to 0.9 for the spherical inclusions modelled here. (a,c,e) and (g) - the intensity simulated using the original model for the phase and amplitude; (b,d,f) and (h) the intensity simulated using the reconstructed values for the phase and amplitude; (a,b) – no noise; (c,d) – maximum intensity of 109 photons per voxel; (e,f) – maximum intensity of 108 photons per voxel; (g,h) – maximum intensity of 105 photons per voxel. In all panels, Fourier-space coordinates qx, qy and qz lie within the range ±1.96 × 10−2 nm−1. See Supplementary Movie 2 for an animation corresponding to this Figure.

As shown in detail in the supplementary section, the auxiliary function U(x, y, z) reduces to

$$U({\bf{R}}=(x,y,z))=A+\sum _{j=1}^{8}({B}_{j}+{C}_{j})+D.$$
(12)

Here, A is a term proportional to the shape function of the sample, the B j and C j terms are 16 spatially-translated independent reconstructions of the unknown field \({\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})\) (the phase and amplitude of which are shown in Fig. 3 for a “weak” object) or its complex conjugate, and D is related to the derivative of the cross-correlation of the object. Further details are given in both the supplementary section, and the main text below. Note that the intensity \({\hat{I}}_{kin}\) and the phase and amplitude for a “strong” phase object are shown in Figs 4 and 5, respectively.

Figure 3
figure 3

Reconstruction of the crystal in the case of weak parabolic displacement field and weak spherical inclusions, for varying levels of noise, and no imperfections in the “reference” half of the crystal. The amplitude (shown in grey scale) and phase (shown in colour scale). The coefficient γ is chosen to yield a maximum phase shift of 0.25π. \({\beta }_{h}^{p}=0.9\) for spherical inclusions. (a) – the original model, (b) – the reconstruction in absence of noise, (c) – the reconstruction with maximum intensity of 109 photons per voxel, (d) – the reconstruction with maximum intensity of 108 photons per voxel, (e) – the reconstruction with maximum intensity of 106 photons per voxel, (f) – the reconstruction with maximum intensity of 105 photons per voxel. See Supplementary Figure 3 for a 2D slice going through the innermost sphere and Supplementary Movie 3 for an animation corresponding to this Figure.

Figure 4
figure 4

Simulated 3D distributions of diffracted intensity for the case of strong parabolic displacement field and strong spherical inclusions, with no imperfections in the lower (“reference”) half of the crystal. All intensities are shown on a logarithmic scale, with the front octant subtracted to visualise the interior. The coefficient γ is chosen to yield a maximum phase shift of 3π. \({\beta }_{h}^{p}=0\) for spherical inclusions. (a,c,e) and (g) - the intensity simulated using the original model for the phase and amplitude; (b,d,f) and (h) the intensity simulated using the reconstructed values for the phase and amplitude; (a,b) – no noise; (c) and (d) – maximum intensity of 109; (e,f) – maximum intensity of 108; (g,h) – maximum intensity of 105. In all panels, Fourier-space coordinates qx, qy and qz lie within the range ±1.96 × 10−2 nm−1. See Supplementary Movie 4 for an animation corresponding to this Figure.

Figure 5
figure 5

Reconstruction of the crystal in the case of strong parabolic displacement field and strong spherical inclusions, for varying levels of noise, and no imperfections in the “reference” half of the crystal. The amplitude (shown in grey scale) and phase (shown in colour scale). The coefficient γ is chosen to yield a maximum phase shift of 3π. \({\beta }_{h}^{p}=0\) for spherical inclusions. (a) – the original model, (b) – the reconstruction in absence of noise, (c) – the reconstruction with maximum intensity of 109, (d) – the reconstruction with maximum intensity of 108, (e) – the reconstruction with maximum intensity of 106, (f) – the reconstruction with maximum intensity of 105. See Supplementary Figure 5 for a 2D slice going through the most inner sphere and Supplementary Movie 5 for an animation corresponding to this Figure.

The previously-mentioned spatially translated reconstructions are spatially separated from the derivative of the cross-correlation function, namely the term D in (12), placed in the centre. The term A equals constants within each of 8 octants of the reconstruction. The condition of the separation, namely having the reconstructions B j and C j each exhibiting no overlap with any other terms in (12), is that the part of the crystal with deformations and defects should be smaller than 1/2 of the total volume. This key restriction on our method is similar to one obtained in a deterministic variant for transmission-based 2D coherent diffractive imaging36, 44, 45. In this paper, for simplicity, we can neglect the imaginary component (as is usually done in BCDI, see e.g., ref. 41) of the function \({\beta }_{h}^{p}={\chi }_{h}^{p}/{\chi }_{h}^{id}\) because the imaginary parts of the functions \({\chi }_{h}^{p}\) and \({\chi }_{h}^{id}\) are typically significantly smaller than the corresponding real parts. Then the reconstructed function \(\psi ({\bf{R}})\approx \mathrm{Re}({\beta }_{h}^{p})\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})\) directly supplies information about \({\rm{Re}}({\beta }_{h}^{p})=|\psi ({\bf{R}})|\) and \(\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})=\psi ({\bf{R}})/|\psi ({\bf{R}})|\). However, if h · u p  > 2π this causes problems38 in determining the displacement field u because of the well-known problems of phase unwrapping.

To solve the problem of the phase unwrapping, we introduce three modified auxiliary functions W x,y,z (x, y, z), which are essentially the appropriate partial derivatives of the function U(x, y, z) with respect to the x (or y, or z) coordinate:

$${W}_{x,y,z}({\bf{R}}=(x,y,z))={\partial }_{x,y,z}U(x,y,z)={\partial }_{x,y,z}[A+\sum _{j=1}^{8}({B}_{j}+{C}_{j})+D].$$
(13)

As discussed above, the functions B 1,2,3,4,5,6,7,8 contain the spatially translated variants of the reconstructed function \(\psi ({\bf{R}})={\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})\). Thus their derivatives, \({\partial }_{x,y,z}\psi ({\bf{R}})\), produced by W x,y,z (x, y, z), will also be spatially separated. As we already reconstructed the function \(\psi ({\bf{R}})={\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})\), we can obtain the appropriate partial derivatives of its phase:

$${\partial }_{x,y,z}(-i{\bf{h}}\cdot {{\bf{u}}}_{p})\approx \frac{{\psi }^{\ast }({\bf{R}})\cdot {\partial }_{x,y,z}\psi ({\bf{R}})-\psi ({\bf{R}})\cdot {\partial }_{x,y,z}{\psi }^{\ast }({\bf{R}})}{2{({\beta }_{h}({\bf{R}}))}^{2}}.$$
(14)

This allows us to reconstruct the phase, −h · u p , of the complex function \(\psi ({\bf{R}})={\beta }_{h}^{p}\exp (-i{\bf{h}}\cdot {{\bf{u}}}_{p})\) from its derivatives. In particular, we use 2D “slices” of partial derivatives46. To avoid division by 0 in equation (14) the following regularisation procedure was employed: if the reconstructed amplitude is less than a particular small constant, the phase and its derivatives are all assumed be 0. The physical meaning of this regularisation is obvious. As a small (comparable to noise) reconstructed amplitude indicates that this particular voxel does not produce a meaningful signal, we cannot obtain the phase of a complex function having amplitude close to 0. However, some additional operations, for instance, averaging over neighbouring voxels, can be used to reconstruct the phase (as a continuous function) in voxels having amplitude undistinguishable from noise.

The unwrapped phase, ϕ unwr , reconstructed from its derivatives (see equation (14)) is usually noisier in comparison to the wrapped phase, ϕ wr , reconstructed directly using (11). Therefore, we apply a simple unwrapping algorithm allowing us to unwrap ϕ wr to obtain the phase ϕ:

$$\varphi ={\varphi }_{wr}+2\pi \cdot INT\{({\varphi }_{unwr}-{\varphi }_{wr})/2\pi \},$$
(15)

where INT stands for an operation of finding the nearest integer. If the argument E of INT is exactly half-integral, then INT rounds down to the nearest integer that is smaller than E.

Numerical Results

In our simulations we use the following model for the crystal: a parallelepiped having dimensions L x , L y and L z , where the z-direction is vertical and XOY is the horizontal plane (cf. Fig. 1). For simplicity, L x  = L y  = L z . The upper half of this crystalline structure contains a “non-ideal” crystalline structure. The “non-idealness” is assumed to be caused by existence of a deformation field, which is specified below, and three spherical inclusions. These inclusions are either “strong” inclusions filled with air (i.e., minimum \({\beta }_{h}^{p}=0\)) or “weak” inclusions filled with a material having a smaller structure factor (minimum \({\beta }_{h}^{p}=0.9\)). The remainder (apart from the spherical inclusions) of the crystalline structure has \({\beta }_{h}^{p}=1\). The cropped data array of far-field intensity used in reconstructions results in a voxel resolution in real space of 80 × 80 × 80 nm3, which is comparable to the resolution demonstrated in ref. 43. However, it should be noted that a better resolution is reported in more recent literature47, 48. Demonstration of the applicability of the proposed reconstruction technique for a smaller voxel size is planned for future research.

In the “non-ideal” part of the crystalline object (see Figs 3(a) and 5(a)) we use a model of deformation, which is an extended (3D) variant of the 1D model of the deformation field reported in ref. 38. This parabolic displacement may be associated38 with the attachment of the “non-ideal” part of the crystal (z [0, L z /2]) to an “ideal” (i.e., \({\beta }_{h}^{p}\equiv 1\) and u(r) ≡ 0) part of the crystal (z ]L z /2, L z ]) and can be approximated as \(\exp (-i{\bf{h}}\cdot {\bf{u}}({\bf{r}}))=\exp (i\gamma [{(x-{L}_{x}/2)}^{2}+{(y-{L}_{y}/2)}^{2}]\cdot [1-2z/{L}_{z}])\) for z [0, L z /2], where γ is a constant that is inversely proportional to the radius of curvature. In our simulations we have chosen the values of the coefficient γ to yield a maximum phase shift of either 0.25π (“weak” case) or 3π radians (“strong” case) at the edges of the “non-ideal” part of the crystal. The latter “strong” phase limit, namely with phase shift of more than 2π radians, is extremely likely to occur in practice38. We note, in this context, that the support-based phasing method, used in the iterative reconstruction procedure reported in ref. 38, was not successful for such large phase shifts. As shown in Table 1 and in Figs 3 and 5, our technique allows reconstruction of the phase even for such a large phase range.

Table 1 Error metrics for the real space and Fourier space data, for the case where the lower (“reference”) half of the crystal is assumed to be perfect.

To demonstrate the robustness of the reconstruction algorithm, for which a flow-chart is given in Fig. 6, we incorporate pseudo-random Poisson noise (see e.g., refs 36, 49) in the simulated intensity function. We use four levels of the maximum intensity in our simulations of the intensity with noise, namely 105, 106, 108 and 109 photons per voxel of the diffracted intensity distribution. It should be noted that the brightest voxel, corresponding to the origin q x  = q y  = q z  = 0 of Fourier space, was excluded from the noise adding procedure as the appropriate intensity is multiplied by zero (see equation (11)) during the reconstruction process. Figures 25 (with associated Supplementary movies) show the diffracted intensity distributions (on a logarithmic scale) and the original and reconstructed phase and amplitude for two cases: a so-called “weak” object (see Figs 2 and 3) (a maximum phase shift of 0.25π and \({\beta }_{h}^{p}=0.9\) for spherical inclusions) and a “strong” phase object (see Figs 4 and 5) (a maximum phase shift of 3π and \({\beta }_{h}^{p}=0\) for spherical inclusions). The error metrics for other cases (not shown here) can be found in Table 1.

Figure 6
figure 6

Flow chart of the forward problem of modelling the far-field intensity produced by X-rays illuminating a non-ideal crystal (red arrows) and solution to the associated inverse problem given by our reconstruction procedure as specified by equations (11) and (12) (blue arrows). Here, FT and FT−1 stand for the direct and inverse 3D Fourier transforms.

The simulated far-field diffraction patterns for different levels of noise are shown in Figs 2 and 4, where parts (a), (c), (e) and (g) show the intensity simulated using the original model for the phase and amplitude, and parts (b), (d), (f) and (h) show the intensity simulated using the reconstructed values for the phase and amplitude. The former corresponds to the simulated “experimental” intensity, while the latter is typically used in the iterative reconstruction algorithms to estimate the “closeness” of the obtained solution for the phase and amplitude. To estimate errors in the reconstructed functions, with amplitude, \({\beta }_{h}^{p}\), and phase, (−i h · u p ), we use for real space data two metrics50, namely a normalised root-mean-square (RMS) error criterion, defined as

$$d=\sqrt{\sum {({G}_{ijk}^{rec}-{G}_{ijk}^{ideal})}^{2}/\sum {({G}_{ijk}^{ideal}-\langle {G}^{ideal}\rangle )}^{2}},$$
(16)

and a normalised absolute difference,

$$r=\sqrt{\sum |{G}_{ijk}^{rec}-{G}_{ijk}^{ideal}|/\sum |{G}_{ijk}^{ideal}|},$$
(17)

where \({G}_{ijk}^{ideal}\) and \({G}_{ijk}^{rec}\) are ideal and reconstructed three-dimensional functions, respectively. \(\langle {G}^{ideal}\rangle \) is the mean of the original function. Table 1 shows values of criteria d_ph, r_ph and d_amp, r_amp for the phase and amplitude, respectively, for different values of maximum phase shift, minimum amplitude in spherical clusters and noise levels. The last column in Table 1 shows the error metric in Fourier space, which is defined as

$${\chi }^{2}={{\sum }_{i=1}^{N}(\sqrt{{\hat{I}}_{kin,i}}-\sqrt{I{r}_{i}})}^{2}/{\sum }_{i=1}^{N}({\hat{I}}_{kin,i}),$$
(18)

where \({\hat{I}}_{kin,i}\) is the 3D array of the simulated intensity distribution (with added noise) in Fourier space modelled using the original model for the phase and amplitude, and Ir i is the 3D array of the simulated intensity distribution in Fourier space modelled using the reconstructed (using equations (1115)) values for the phase and amplitude. This error metric is typically used in iterative reconstruction algorithms43. The χ 2 error metric achieved in iterative reconstruction using real experimental data43 is similar to our results (see Table 1) for the maximum intensities of 105 and 106. However, the improved signal-to-noise ratio (SNR) for the maximum intensities of 108 and 109 photons per voxel produced smaller χ 2 (see Table 1). As expected, the larger SNR of the diffraction data causes better reconstruction of the phase and amplitude (see Table 1).

We augment the preceding simulations by considering the effectiveness of the method when there is a deviation from ideal conditions, such as when the crystal geometry is not known or is not perfect in the ‘reference’ part of the sample. Accordingly, we test the robustness of our reconstruction technique in the case of the bottom half of the crystal being non-ideal (see Table 2 and Fig. 7). We consider three cases with increasing level of imperfections, all of which may be compared to the ideal case in Fig. 7a. In all cases the maximum intensity is 109 photons per voxel (excluding the origin, for reasons outlined earlier). In the first non-ideal case (see Fig. 7b) the deformation field is extended to the entire crystal according to the previously-stated functional form: \(\exp (-i{\bf{h}}\cdot {\bf{u}}({\bf{r}}))=\exp (i\gamma [{(x-{L}_{x}/2)}^{2}+{(y-{L}_{y}/2)}^{2}]\cdot [1-z/{L}_{z}])\) for z [0, L z ]. In these simulations (see Fig. 7) we have chosen the values of the coefficient γ to yield a maximum phase shift of 0.25π at the edges of the crystal to make displacements in the bottom half of the crystal relatively small. In the second non-ideal case the reconstruction (see Fig. 7c) is done for the same displacement field as in the first case above when a slice having dimensions 1 pixel(X) × 16 pixels(Z) × 64 pixels(Y) is removed from the bottom part of the crystal. In the third (most extreme) non-ideal case (see Fig. 7d) the reconstruction is done for the displacement field (same as in the first case) when a slice 32 pixels(X) × 1 pixels(Z) × 64 pixels(Y) is removed from the bottom part of the crystal. One voxel in real space has dimensions 80 nm × 80 nm × 80 nm. As shown in Table 2 and in Fig. 7, our technique allows reconstruction (with artefacts) of the phase and amplitude even for the case of non-ideal bottom half of the crystal. The stronger the deteriorations in the bottom half of the crystal are, the more artefacts are observed (see Fig. 7) and the worse the error metrics become (see Table 2). The error metrics shown in Table 2 are similar to the case of ideal bottom half of the crystal if the maximum intensity is of 108 photons per voxel (see Table 1). However, there are visible artefacts in the reconstructed samples (see Fig. 7). See also Supplementary Movie 7 for an animation corresponding to Fig. 7.

Table 2 Error metrics for real space and Fourier space data, for the case where the lower (“reference”) half of the crystal is assumed to be imperfect.
Figure 7
figure 7

Input versus reconstruction of the crystal in the case of weak parabolic displacement field and strong spherical inclusions, for a fixed level of noise, and three different departures from ideality in the “reference” half of the crystal. The amplitude (shown in grey scale) and phase (shown in colour scale). The coefficient γ is chosen to yield a maximum phase shift of 0.25π. \({\beta }_{h}^{p}=0\) for spherical inclusions. The maximum intensity is 109 photons per voxel. (a) – the original model for a displacement field throughout the crystal (shown only the upper part of the crystal), (b) – the reconstruction for a displacement field throughout the crystal, (c) – the reconstruction for a displacement field throughout the crystal when a slice 1 pixel(X) × 16 pixels(Z) × 64 pixels(Y) is removed from the bottom part of the crystal, (d) – the reconstruction for a displacement field throughout the crystal when a slice 32 pixels(X) × 1 pixel(Z) × 64 pixels(Y) is removed from the bottom part of the crystal. See Supplementary Figure 7 for a 2D slice going through the most inner sphere and Supplementary Movie 7 for an animation corresponding to this Figure.

The d and r error metrics (see Table 1) for low SNR show that the phase reconstructions are more robust than the amplitude reconstructions for noisy data. It should be also noted that without noise, the phase reconstructions using the phase derivatives (equations (1315)) produce the same level of errors as for direct phase reconstruction (equation (11)) for a smaller phase. The errors in the reconstruction of the amplitude are smaller if there is a larger difference between the scattering factor of the spherical inclusion and surrounding material.

It should be noted that an 80 nm resolution was achieved only for a low level of noise as demonstrated in Fig. 8, which shows how the radial power spectrum depends on the maximum intensity level for two models shown in Figs 3 and 5. Note that this radial power spectrum is calculated using the synthesized three-dimensional diffracted intensity corresponding to each reconstruction at each specified maximum number of photons per voxel. We chose, as indicators of the achieved resolution, the points, where the radial power spectrum deviates significantly from that obtained using the essentially perfect reconstruction obtained at the highest flux. This highest-flux-data reconstruction, namely the reconstruction corresponding to 108 photons per voxel in the most intensely illuminated voxel, was considered to have a reconstruction resolution equal to the real-space pixel size, namely 80 nm (see black curve in Fig. 8).

Figure 8
figure 8

Investigation of the resolution of the simulated reconstructions obtained using our method. Radial power spectra of the intensity simulated using values for the phase and amplitude reconstructed from the intensity (with maximum intensity of 108 (black lines), 106 (red lines) and 105 (blue lines)) simulated using the original model for the phase and amplitude. (a) The coefficient γ is chosen to yield a maximum phase shift of 0.25π. \({\beta }_{h}^{p}=0.9\) for spherical inclusions. (b) The coefficient γ is chosen to yield a maximum phase shift of 3π. \({\beta }_{h}^{p}=0\) for spherical inclusions. The achieved resolution is shown in colours corresponding to the initial maximum intensity. We chose the largest spatial frequencies, above which the power spectrum deviates significantly from that obtained using the essentially perfect reconstruction obtained at the highest photon flux, namely 80 nm, as indicators of the achieved resolution.

We close this section with some remarks on the sampling of the diffracted intensity data. While the simulations of this section have assumed, for simplicity, that these data are sampled along a Cartesian grid, in an actual experiment the detection frame of points will be different to the Cartesian grid used in the simulations. Interpolation will therefore be required – as is usual for BCDI experiments51 – e.g. with the transformations given in ref. 51 (see also refs 52 and 53). Importantly, whether these interpolations are linear or non-linear in terms of coordinates, the said interpolations will be linear in terms of detected intensities. Given that (i) the sum of Gaussian random processes is itself Gaussian, and (ii) all photon fluxes considered in the present paper are sufficiently high for Gaussian statistics to apply, the interpolation of the intensity data will (iii) lead to negligible artefacts provided that the detection frame has a sufficiently high resolution as specified by the rocking-curve sampling condition given by equation 4 in ref. 53 and (iv) preserve the Gaussian nature of the photon statistics, which will in turn leave unaltered the noise propagation properties of our algorithm as presented in the above numerical simulations. Some authors (see e.g., ref. 54) apply the iterative methods of BCDI for the intensity data set directly in the detection frame of points to preserve counting statistics. However, a more detailed consideration of the effects of interpolation of the intensity data, from the detection frame to a Cartesian frame, is beyond the scope of this paper and would form an interesting point of departure for future investigations.

Discussion

Our means of deterministic coherent diffractive imaging, based on (11) and (12), may be viewed as a somewhat distant variant of Fourier holography (cf. a similar observation made in a different but related context in ref. 36). When the simple closed-form reconstruction of (11) and (12) is viewed from such a perspective, the far-field intensity data in the vicinity of a given Bragg peak, may be viewed as a generalised Fourier hologram in which the reference wave is produced by the locally-cylindrical Young–type boundary waves55 scattered by the edges of the crystal.

The above physical picture, for how our reconstruction method works, has the following corresponding loose mathematical picture which may be taken as giving some guidance to the detailed calculations presented in the main text and Supplementary Section of our paper. Loosely, then, our infinite-extent crystal structure is truncated by a rectangular prism envelope given by a product of top-hat (“rect”) functions in x, y and z, before being Fourier transformed, and the squared magnitude taken, to yield the raw intensity diffraction data for our method. Multiplying by qx·qy·qz and then inverse Fourier transforming (equation (11)), will - by recalling both the Fourier derivative and convolution theorems of Fourier analysis - yield the derivative of the autocorrelation of the desired structure. The derivative of the correlation of two functions is equal to the correlation of one function with the derivative of the other; the derivative of the top-hat function yields spatially separated Dirac deltas which then sift out (via the sifting property of the Dirac delta) the spatially separated independent reconstructions (“B” and “C” terms in equation (12)).

It is self-evident that the solution provided by (11) and (12) is the solution to an inverse problem which is well-posed in the sense of Hadamard56. The absolute simplicity of the coherent diffractive imaging reconstruction process is obtained at the price of the stated, rather strong, simplifying assumptions (rectangular crystal whose imperfections are restricted to any half of the scattering volume, kinematical scattering etc.). Regarding these strong assumptions, we make two points:

  1. (i)

    One can always determine a posteriori whether or not the stated assumptions regarding imperfections filling no more than half of the crystalline volume have been met, by simply inspecting whether or not there are overlapping regions in the multiple reconstructions furnished by the auxiliary function U given by (11).

  2. (ii)

    A key motivation of the present work is to suggest and hopefully stimulate a relatively new line of research in the coherent diffractive imaging community, in pursuing closed-form solutions to the problem of phasing Fourier-modulus data. Our approach may be counterpointed against the much more prevalent iterative approaches, which have already been brought to a high stage of perfection, but which suffer from the lack of conceptual clarity which closed-form solutions provide. We (S.G. Podorov, K.M. Pavlov & D.M. Paganin) have previously expressed such a motivation for deterministic coherent diffractive imaging in our previous works in a two-dimensional context36, 57, which have stimulated some further work in the field (e.g., refs 44, 45, 58,59,60,61,62,63,64,65,66 and many others). It is our hope that the present paper, together with refs 67 and 68, may stimulate further work in three-dimensional deterministic CDI.

We close this discussion with some obvious extensions of the work presented here: (i) Bragg CDI has resolutions larger than typical unit cells, and thus is not affected by the symmetry of the unit cell. Hence the inversion procedure presented in our article is valid for any crystal which can be described as repeated unit cells, irrespective of the crystal space group69; (ii) Another obvious extension is to the case of general convex polyhedra (convex faceted crystals); (iii) The deterministic reconstruction method of the present paper may without modification be applied to “imperfections” which lie partly within and partly outside, or even entirely outside, the crystal (i.e., ideal and non-ideal parts can form one piece or be separated) (cf. refs 36, 58, 68); (iv) The deterministic reconstruction method of the present paper may subsequently be used to seed an iterative refinement, for structures which weakly violate the validity conditions for the deterministic algorithm (cf. ref. 36); (v) The methods of compressed sensing (see e.g. refs 70, 71) may be fruitfully applied to the question of reconstructing the complex polarisability for defects that are distributed throughout the entire volume of an otherwise perfect crystal but which are either suitably sparse or may be rendered so through an appropriate sparsifying operator; (vi) It would be interesting to systematically extend the preliminary studies given above regarding the deviations from ideality of the part of the crystal which we assume to be known; (vii) The methods developed in this paper might be adapted to give a technique for deterministic protein crystallography, e.g. by modifying the well-known iterative techniques72 along the following or similar lines: a small crystal of an unknown protein is attached to a known crystalline reference structure, of similar size, and with very similar lattice constants.

Conclusions

In summary, we introduced a deterministic Bragg Coherent Diffraction Imaging approach, which was successfully employed to analytically reconstruct the amplitude (structure factor) and phase (displacement field) from noisy simulated 3D diffracted intensity distributions. This robust unambiguous reconstruction algorithm uses a holographical type interference between “ideal” and “damaged” part of crystalline structure, where the “damaged” part is less than a half of the total volume of the object. The approach can be used for both weak and strong phase objects. The algorithm has been tested using a variety of simulated scenarios, performing well in the presence of both (i) realistic levels of noise, and (ii) departures from ideality in the part of the crystal that is assumed to be undamaged.