Research Article  Open Access
Mansi Butola, Sunaina Rajora, Kedar Khare, "Robust Phase Retrieval with ComplexityGuidance for Coherent XRay Imaging", Intelligent Computing, vol. 2022, Article ID 9819716, 12 pages, 2022. https://doi.org/10.34133/2022/9819716
Robust Phase Retrieval with ComplexityGuidance for Coherent XRay Imaging
Abstract
Reconstruction of a stable and reliable solution from noisy and incomplete Fourier intensity data is a challenging problem for iterative phase retrieval algorithms. The typical methodology employed in the coherent Xray imaging (CXI) literature involves thousands of iterations of wellknown phase retrieval algorithms, e.g., hybrid inputoutput (HIO) or relaxed averaged alternating reflections (RAAR), that are concluded with a smaller number of error reduction (ER) iterations. Since the single run of this methodology may not provide a reliable solution, hundreds of trial solutions are first obtained by initializing the phase retrieval algorithm with independent random guesses. The resulting trial solutions are then averaged with appropriate phase adjustment, and resolution of the averaged reconstruction is assessed by plotting the phase retrieval transfer function (PRTF). In this work, we examine this commonly used RAARER methodology from the perspective of the complexity parameter introduced by us in recent years. It is observed that the single run of the RAARER algorithm provides a solution with undesirable grainy artifacts that persist to some extent even after averaging the multiple trial solutions. The grainy features are spurious in the sense that they are smaller in size compared to the resolution predicted by the PRTF curve. This inconsistency can be addressed by a novel methodology that we refer to as complexityguided RAAR (CGRAAR). The methodology is demonstrated with simulations and experimental data sets from the CXIDB database. In addition to providing consistent solution, CGRAAR is also observed to require reduced number of independent trials for averaging.
1. Introduction
Imaging of micro and nanosized objects remains one of the prime interests in structural biology, material science, chemistry, medical science, etc. With the rapid advancements in coherent diffraction imaging hardware, particularly in Xray free electron lasers (XFELs) [1], it is possible to perform single particle imaging (SPI) [2, 3]. In order to determine the structure of objects of interest, the acquisition of Fourier diffraction data is a challenging task that is being carried out by a number of dedicated instruments [4–6]. On the other hand, reconstruction of robust and reliable solution from an incomplete noisy diffraction data acquired by a typical CXI experiment remains an equally important and fundamental task which is addressed by phase retrieval algorithms [7–12]. Since uniqueness of the solution from a single coherent Xray diffraction data frame cannot be guaranteed by phase retrieval algorithms, the typical procedure for the solution recovery [13] requires running the algorithm over hundreds of times starting with independent random guesses to get multiple trial solutions that are finally averaged together. The resolution of this averaged solution is estimated using the phase retrieval transfer function (PRTF), which is the ratio between the Fourier magnitude of the average solution and the measured Fourier magnitude as a function of the spatial frequencies.
In recent works [14, 15], we have proposed a novel approach that we call “complexityguided phase retrieval” (CGPR) that is meant to address the typical stagnation problems with phase retrieval algorithms. This methodology uses a complexity parameter which is computed directly from the Fourier intensity data and provides a measure of fluctuations in the desired phase retrieval solution. As observed in [14, 15], the complexity parameter can be used to guide the application of constraints in the object domain and provides artifact free phase retrieval solution which degrades benignly with increasing noise. In [14, 15], the CGPR methodology was mainly developed with simulated noisy data in combination with the Fienup’s hybrid inputoutput (HIO) algorithm. The complexityguidance idea is put to test for the first time in this work for experimental data available from the CXIDB database. The complexityguidance concept is used along with the relaxed averaged alternating reflection (RAAR) phase retrieval algorithm in this study as RAAR is now commonly used in the CXI literature.
Our first aim is to examine the behavior of the phase retrieval solution obtained using the popular RAARER methodology (both single run and averaged solution) from the perspective of the complexity parameter. A single run of RAARER uses a number of RAAR iterations [11] that are concluded with a smaller number of errorreduction (ER) iterations for the purpose of stabilizing the solution. We observe that both single run and averaged solutions from RAARER methodology consist of grainy artifacts and features that are smaller in size compared to the resolution as predicted by the PRTF. Such high frequency features are difficult to interpret [16] and therefore likely to be considered as “spurious.” In order to address this inconsistency, we add the complexityguidance component to the RAAR algorithm to present what we call as complexityguided RAAR (CGRAAR) algorithm. CGRAAR is first tested with simulated noisy data (with two noise levels) that do not have missing pixels for providing a clear understanding of the proposed methodology. The methodology is then applied to the real cyanobacterium diffraction data from the CXIDB database [16] to further validate our results. The experimental data is noisy and also has missing pixels. We report two main observations based on our study. First of all, a single run of CGRAAR provides a solution without the high frequency grainy artifacts that are typically present in the RAARER solution. A further consequence of this is that the number of independent runs required for averaging is reduced significantly. CGRAAR essentially provides a regularized solution that does not contain spurious grainy features. The regularization is controlled in this methodology by means of the complexity parameter, thus making the solution consistent with the data.
In view of the rapid advancements in coherent Xray imaging (CXI) experiments, the phase retrieval algorithms are critical for obtaining a reliable solution. Recent development of opensource software called Hawk [17] provides the platform for the entire process of solution reconstruction from the oversampled diffraction data and creating high performance algorithms. The Hawk software implements hybrid inputoutput (HIO) [8], difference map (DM) [9], and RAAR as phasing algorithms. From our prior work in [15] and from our experimental and simulation results demonstrated here, it is evident that complexityguidance when combined with traditional phase retrieval algorithms such as HIO and RAAR can offer a better noiserobust estimate of the object. We believe that complexityguidance as an idea may potentially be integrated into existing software tools and can improve the performance of existing phasing algorithms in coherent Xray imaging.
2. Methods: Fourier Phase Retrieval
In a typical coherent Xray imaging experiment, where Xray beam illuminates the object or sample, the Fourier intensity measured at the detector can be mathematically expressed as where and are the spatial and Fourier space coordinates. is the electron density of the object, and is the Fourier transform of . Throughout the paper, the hat notation will be the representative of Fourier domain. The aim of iterative phase retrieval algorithms is to find from the measured intensity . Starting with a random guess , the Fourier magnitude constraint can be defined [18] as
Here, is the Fourier modulus projection operator in the Fourier domain, and is the set of pixels in that have zero photon counts (either due to Poisson noise or missing pixels). The above equation can be translated in the real space as where is the Fourier projection operator in the object domain. The second projection operator in object domain is the support projection which signifies the extent of the object contained within the support and is defined as
Commonly used phase retrieval algorithms aim to reach a solution that satisfies the Fourier magnitude and a priori object domain constraints in an iterative fashion. Inspired by the work of Gerchberg and Saxton [19] from electron microscopy for two measurements, the error reduction (ER) algorithm [8] tries to solve the phase retrieval problem for single Fourier measurement via following solution update:
The Fourier constraint being nonconvex in nature makes the problem harder and the ER algorithm is known to suffer from stagnation in the sense that the quality of the solution does not improve even after a large number of iterations. The hybrid inputoutput (HIO) algorithm [7] addresses the stagnation issue by introducing a negative feedback outside the object support. The HIO feedback step can be stated as
where is the feedback parameter in the range . For noiseless data case, in a wide variety of images, the HIO algorithm shows a significantly improved reconstruction that is close to an ideal solution [20]. However, for the noisy data case, HIO solution also shows stagnation artifacts [8] that corrupt the quality of the recovered solution. Phase retrieval with noisy data is an illposed problem, and therefore a unique solution to the problem cannot be estimated by satisfying both the Fourier magnitude and object support constraints. The difference map (DM) proposed by Elser [9] is an interesting approach which avoids local minima by using relaxed projections. The th iteration of the DM is given as
Here, and are the relaxed generalized projections of and , respectively [21], and is the identity operator. is the relaxation parameter which needs to be optimized depending on the problem at hand, while the other two parameters and are generally chosen to be and [22]. Finally, in DM the final solution is obtained as . Another approach that is also known to surpass the stagnation problems is the relaxed averaged alternating reflections (RAAR) [11] algorithm, which is a descendant of the hybrid projection reflection (HPR) algorithm [23]. The RAAR algorithm shows good convergence to a stable solution even when an exact solution satisfying both the Fourier magnitude and the support constraints does not exist. The RAAR update is given as where and are the reflections of and that are obtained by setting . Apart from this, some other variants of HIO algorithm have also been reported for the noisy data case [24–26]. At this point, we remark that among all the phase retrieval algorithms HIO, DM, and RAAR are the most widely used ones in CXI. They are included in the Hawk opensource software and have been tested for a numerous coherent Xray imaging data sets. From application point of view where there is a wide range of CXI data, it is not easy to compare these algorithms. One of the reasons is that the behavior of phase retrieval solution is not clearly understood for the various phasing schemes. In phase retrieval literature, the performance of the iterative algorithms is commonly evaluated by means of the error function which calculates the L2norm of the error between the Fourier magnitude data and the Fourier magnitude of the iterative solution. While this measure is natural, its use can pose problems when the data is corrupted with high degree of noise and missing pixels. In such cases, matching the Fourier magnitude of the solution and the raw data may lead to overfitting the noise, resulting in appearance of grainy artifacts in the solution. This practical problem of examining the quality of phase retrieval solutions from noisy data is a challenge that needs further work.
In this paper, our effort is to understand the nature of phase retrieval solution from a new perspective of the complexity parameter. The complexity information which can be computed a priori and provides a measure of fluctuations present in the groundtruth object is utilized to evaluate the characteristics of the phase retrieval solution. For the present work, we examine the behavior of the solution obtained by the RAAR algorithm which is popularly used by the CXI community. It is a common practice to conclude the standard algorithms like RAAR (or HIO) with ER iterations to further stabilize/refine the RAAR solution and improve the error performance in Fourier domain [16, 27]. We use the combination of RAAR algorithm followed by 100 iterations of ER throughout this paper which will be referred by the name “RAARER” algorithm.
For the sake of completeness, we start by describing the complexity parameter which was introduced in [14]. The parameter is a measure of fluctuations present in pixel values of an object , where the coordinate r is expanded as . Mathematically, the complexity is defined as follows [14]:
Here, and are the partial derivatives with respect to the and coordinates, respectively. Using Parseval’s theorem and employing the derivative property of Fourier transform along with the notion of modified wave numbers, the above equation can be equivalently written as where and are the grid spacing in spatial domain and denote the spatial frequency samples as per the FFT convention. Note that the usual continuous case of this result is evident by setting . Interestingly, the complexity parameter is a real space constraint but derived directly from the raw Fourier intensity data . Moreover, the complexity information in the form of as defined in Equation (10) is readily available a priori to all the phase retrieval algorithms. We observe empirically that the complexity parameter is not too sensitive to the typical Poisson noise in the Fourier magnitude data. As discussed in Section 3, we will explain how the complexity information may be utilized when applying object domain constraints to obtain a noise robust phase retrieval solution.
3. Complexity Behavior of the RAARER Solution with Noisy Data
In this section, we investigate the nature of a single run of RAARER solution recovered from simulated noisy Fourier intensity data from the complexity viewpoint. The practical CXI data is noisy and has missing information due detector beam stop, hot pixels, and gaps between the detector segments, etc. For simplicity of understanding the complexity behavior, we restrict our initial simulation study to noisy data without any missing pixels. The missing pixels in the data can add one more factor of uncertainty since the complexity calculation as per Equation (10) requires the Fourier magnitude information at all pixels. As we will describe later in Section 6, we handle the missing pixels in the real data with the standard methodology prevalent in the literature.
In order to illustrate the effect of noise on the phase retrieval solution, we simulate two Fourier intensity data corresponding to a red blood cell (RBC) object in a computational window of size pixels. The amplitude of this test object (included within the central pixels) is shown in Figure 1(a). The complexvalued RBC object for simulating noisy diffraction patterns was generated using a digital holographic microscope system (make: Holmarc) and corresponds to image plane field for the cell recovered using an offaxis hologram. The noisy Fourier intensity data corresponding to this RBC object have been simulated by assuming the Poisson noise corresponding to two different average photon count levels of 1000 and 500 photons/pixels. The noisy data frames have ~36% and 51% pixels with zero photon counts as shown in Figures 1(b) and 1(c), respectively. These noise levels are comparable to those in the experimental CXI data to be discussed in Section 6. The Fourier intensities are oversampled by a factor of approximately 3 in both directions.
We ran 1100 iterations of RAARER algorithm comprising of 1000 RAAR iterations, as per Equation (8), that were concluded by 100 ER iterations starting with the data in Figures 1(b) and 1(c). The relaxation parameter for RAAR update was selected to be . Since the object is complexvalued, only support constraint has been used. Figures 1(d) and 1(e) are the absolute magnitudes of the solution after 1000 RAAR iterations for the noisy data in Figures 1(b) and 1(c), respectively, whereas the same solutions after additional 100 ER iterations are shown in Figures 1(f), and 1(g), respectively. From the solution recoveries, we clearly see that for the higher noise data, both the RAAR and RAARER solutions contain grainy features that were not present in the ground truth in Figure 1(a).
Next, we examine the complexity behavior of RAAR and RAARER solutions shown in Figures 1(d)–1(g). To do that in each RAAR or ER iteration, the complexity of the solution is calculated using Equation (9) and is denoted by . In a similar vein, complexity inside and outside the support can be evaluated by summing over corresponding pixels. Clearly, we have . Figures 2(a) and 2(b) show the graphs of complexities , , and along with the groundtruth complexity against the iteration number for the Fourier intensities with Poisson noise corresponding to average light levels of 1000 photons/pixel and 500 photons/pixel, respectively. The complexities and for both the cases stabilize to values higher and lower than the groundtruth complexity . In terms of complexity behaviour of solution, we observe that the solution’s complexity within the support stabilizes at a higher level for data with higher noise. The outside support complexity is also seen to stabilize to a slightly higher value for the higher noise data. The manifestation of higher complexity or fluctuations inside the support region with increasing noise can be clearly seen in solutions in Figures 1(e) and 1(g) when compared to those in Figures 1(d) and 1(f). When ER iterations are applied after 1000 RAAR iterations, stabilizes to a lower value than that in the RAAR case. On the other hand increases as compared to that at the end of RAAR iterations and also contributes most to the total complexity . The reduction of during ER iterations is easy to understand as the pixels outside the support region are set to zero during the ER iterations so that only contribution to comes from the pixels adjacent to the support boundary. From the complexity curves and in Figures 2(a) and 2(b) and solutions in Figures 1(f) and 2(g), we observe that in the process of applying the ER iterations (for “stabilizing” the solution), the complexity of the RAAR solution within the support region has actually increased, which causes additional grainy artifacts that in our opinion are due to overfitting of noise. The application of ER iterations that typically reduce the data domain error is thus not necessarily desirable in our opinion, as this is accompanied by appearance of increased grainy artifacts within the support region. The high frequency nature of the grainy artifacts may also lead to a slightly exaggerated estimate of the resolution of the solution based on the PRTF curve as we will see later in Section 5.
The prior literature [12, 24, 25] has stated the significance of outside support region in relation to noise in the Fourier intensity data. However, the procedures for suppressing outside support information in the literature are somewhat ad hoc in our opinion. In the complexityguided phase retrieval approach described next, the a priori knowledge about the groundtruth complexity plays an important role in application of constraints in the object domain (both within and outside the support).
4. ComplexityGuided RAAR (CGRAAR) Algorithm
From the complexity curves in Figures 2(a) and 2(b), we observed that the solution complexity for RAAR as well as RAARER algorithms stabilizes to a higher numerical value compared to the groundtruth complexity computed from the raw data. The concept of complexityguidance is based on the strategy of matching with . Instead of concluding the RAAR algorithm with ER iterations (which leads to undesirable increase in solution complexity within the support), we match the total complexity of the guess solution with the groundtruth complexity in each RAAR iteration. To bring down to the level of , the values of and are decreased via complexity reduction steps in an adaptive manner. In our previous work [15], while studying the behavior of the HIO solution, we observed that for the increasing noise in the data, the showed a monotonic increase with iteration number, and for that reason, was required to be suppressed actively in each HIO iteration. Unlike HIO solution, the RAAR solution does not show continous increase in complexity outside the support region with iterations. This observation has not been reported before in our opinion in the context of the RAAR algorithm. Therefore, most complexity reduction in the present case needs to be done within the support region. It is interesting to note that an improvement over the native RAAR algorithm has been suggested previously by introducing a generalized feedback term inside the support region [28]. Based on our observations, we control the total complexity of the RAAR solution primarily by suppressing the complexity within the support which is essentially like providing a complexity feedback within the support.
We remark that complexityguidance is essentially a regularization scheme where complexity (or degree of fluctuations) in the desired solution is predetermined from the raw data. In order to implement complexityguidance, the recursive iterations for complexity reduction are applied to the RAAR solution in Equation (8) in the outside and inside the support region in each outer RAAR iteration. For brevity of notation, we denote the outside and inside part of the solution as and , respectively. Firstly, recursive subiterations are applied outside the support as represented by
Next, further recursive complexity reduction iterations similar to above are also applied to the :
For both the above equations, is the step size which was chosen to be so that the solution changes by a small amount in each subiteration and is the normalized functional gradient of complexity defined as where is the complex derivative [29] of complexity parameter . As explained in [15], the number of subiterations for reduction are adjusted by actively tracking the trend of . Particularly, the value is nudged towards the mean minus the standard deviation of of the previous iterates in order to control any growth in . After that, the complexity reduction subiterations within the support are applied until the numerical value of the total complexity is close to (within ) the groundtruth complexity . The number of subiterations in this step typically depends on the noise level (higher noise data requires more complexity reduction subiterations inside the support). The (n +1)th iterate of CGRAAR is updated as
Here, and refer to the inside and outside support solutions after applying the complexityguidance subiterations. The recovered solutions using a single run of CGRAAR from the same noisy data in Figures 1(b) and 1(c) are shown in Figures 1(h) and 1(i), respectively. Visually, the CGRAAR solution in Figures 1(h) and 1(i) are free from severe grainy artifacts that were seen in RAAR and RAARER solutions in Figures 1(d)–1(g), respectively.
Our implementation used initial 500 RAAR iterations followed by 500 RAAR iterations with complexityguidance. In Figures 2(c) and 2(d), we observe that after iterations when complexityguidance subiterations are applied, by design, the complexity of the solution matches well with . In particular, the high frequency artifacts within the support are now suppressed by the complexityreduction steps. Therefore, the CGRAAR solution is smoother in nature and is much closer to the groundtruth shown in Figure 1(a). We want to emphasize here that all the results shown in Figure 1 correspond to a single run of the corresponding algorithms (RAAR or RAARER or CGRAAR). The use of complexity constraint with noisy data is observed to provide a better estimate for single run of the phase retrieval algorithm. In turn, this is beneficial for the averaging process as well as we will see in the next section. The trial solutions selected for the averaging process can be improved further by methods suggested by [30] such as voting, patching, and use of noncentrosymmetric support [27] as well as by use of sparsity enhancing functionals like total variation, Huber, or other penalties [31].
5. Evaluating the Resolution of Reconstructed Solution Using Phase Retrieval Transfer Function (PRTF)
The reconstruction of solution from the experimental Fourier transform intensity data consisting of noise and missing pixels due to detector blocking poses challenges. First of all, generally just one realization of the data is often available as the sample may get destroyed after exposure to high energy Xray pulse. Secondly, a single run of the algorithm starting with a random guess cannot be fully relied upon when the data is corrupted by noise and missing pixels. It is therefore a standard practice to arrive at a better estimate of the solution by averaging a large number of trial solutions [13] starting with the same data. These independent trial solutions are obtained by running the phase retrieval algorithm over hundreds of runs that are initialized with different random guesses. Among a number of trial reconstructions, only some following a certain criterion are selected for the averaging process. The averaging criterion can be decided on the basis of least errors in real space or Fourier space. Here, we have selected correlation coefficient between trial solution and a reference solution with least error as an averaging criterion. Since the final reconstruction is based on the averaging process, the goodness of reconstruction can be assessed using phase retrieval transfer function (PRTF) which compares the magnitude of Fourier transform of averaged complex reconstruction with the measured Fourier modulus and defined as follows [27, 32]:
Here, the average of complex Fourier estimates can be simplified as where denotes the trial number index and represents the phase adjusted trial reconstructions following the correlation criterion for averaging. In order to add the trial solutions coherently, the phases of trial solutions are adjusted to a common value so that the variation in phases does not reduce the average value. The phase adjustment of all the trial reconstructions can be done as per [27]. The PRTF curve can provide a measure of the resolution of the recovered solution by selecting the point where PRTF falls to 1/e [27]. In this section, we first present the PRTF curves for the simulated data followed by similar analysis of the experimental data in the next section.
Figures 3(a) and 3(b) are the solutions obtained after averaging over trials of RAARER and CGRAAR algorithms, respectively, for noisy data in Figure 1(b). The correlation coefficient with value 0.96 is chosen as the criterion for selecting a trial solution. For the simulated data, we have not assumed any missing pixels due to detector blocking and assumed that the data is corrupted by Poisson noise alone. In this case, we observe that an average over a small number of trial solutions is sufficient to stabilize the PRTF curve. One can clearly see that the averaging process has reduced the grainy appearance of the RAARER solution. However, some of the faint artifacts are still persistent which may possibly get misinterpreted as the real features, particularly in the case of experimental Fourier intensity data where the groundtruth object is unknown. Since the individual CGRAAR solution was already free from grainy artifacts, the averaged CGRAAR solution closely resembles the groundtruth object. The performance of the CGRAAR and RAARER solutions are tabulated in Table 1 in terms of error in Fourier and real domain. The real space error metric is defined as follows [33]: where

Here, represents the solution estimate (individual trial or average solution), is the groundtruth object, and is the correlation between and . Next, the relative Fourier domain error for the Fourier modulus estimate with respect to the measured Fourier modulus can be written as
Both RAARER and CGRAAR solutions seem to have errors of similar orders in terms of the above metrics despite the fact that CGRAAR solution has much reduced grainy artifacts. Figure 3(c) shows the PRTF curves for the solutions in Figures 3(a) and 3(b) obtained by both the algorithms. The spatial resolution for the averaged RAARER and CGRAAR solutions is ~3 pixels. The resolution estimate for the RAARER solution is slightly higher compared to the CGRAAR solution. This higher resolution estimate is however spurious and arises mainly due to the remaining grainy artifacts. From the zoomedin portions of Figures 3(a) and 3(b) and the profile plot in Figure 3(d) across the yellow dotted lines in both the solutions, we see that the CGRAAR solution is smooth on a 3pixel scale unlike the RAARER solution. Therefore, it is quite evident from the PRTF plot that the proposed CGRAAR method leads to a selfconsistent solution compared to that obtained by the traditional RAARER methodology for noisy Fourier intensity data.
6. Tests with Experimental CXI Data
In order to further demonstrate the performance of CGRAAR algorithm, we take an experimental CXI data submitted to the coherent Xray imaging data bank (CXIDB) [34]. The experiment was carried out in Linac coherent light source (LCLS), and the extensive details about the experimental setup are described in [16]. The data set contains ten Fourier intensity frames corresponding to live cyanobacteria at ten different stages. For the illustration purpose, we take two of these Fourier intensity data (Figures 2(i) and 2(j) of [16]), which contain a total of and photon counts and are shown in Figures 4(a) and 4(b), respectively. The Fourier intensities in Figures 4(a) and 4(b) have ~51% and 46% of missing pixels due to detector blocking, gaps between the detector segments, Poisson noise, etc. The only modification required to handle all the missing pixels is to replace them with the Fourier magnitude corresponding to the current iterate. The masks provided in the “.cxi” file for the corresponding intensities were used as the known object supports.
We ran both RAARER and CGRAAR algorithms 400 and 200 times independently in a MATLAB environment. In the first case, 2000 RAAR iterations were concluded by 100 ER steps. In CGRAAR initial 1500 RAAR iterations were followed by the 500 outer RAAR iterations with complexityguidance subiterations. Since we are filling the missing pixels with the Fourier magnitude of the current iterate, the groundtruth complexity estimate also needs to be revised in each CGRAAR iteration. We however note that by 1500 RAAR iterations (after which we use the complexityguidance), the numerical values in the missing pixels are seen to stabilize and the estimated does not fluctuate significantly. All these cases with multiple independent initial random guesses ran on the high power computing (HPC) cluster at Indian Institute of Technology Delhi.
Figures 4(c) and 4(e) show one of the trial solutions obtained using the RAARER and CGRAAR algorithms, respectively. Visually, we observe that the single instance of the CGRAAR solution is smoother compared to that obtained using the RAARER algorithm. The averaged solution for both the respective algorithms is shown in Figures 4(d) and 4(f). The averaging procedure is the same as followed in the simulations. Based on the correlation criterion as before, 261 out of 400 RAARER solutions were selected for the averaging while in CGRAAR 94 out of 200 solutions followed the criterion. Further, the performance of RAARER and CGRAAR algorithms for both the Fourier intensity data shown in Figures 4(a) and 4(b) has comparable orderofmagnitude error performance as shown in Table 2.

We observe that the PRTF curve is stabilized for both RAARER and CGRAAR cases and additional trial runs will not have any perceptible effect on the PRTF curve. In order to assess the quality of averaged solutions, we plot the PRTF as a function of spatial frequency which is shown in Figure 4(k). The PRTF curve is vanishing near zero frequency since there are blocked pixels in this region where the Fourier intensity data is missing. The spatial resolution (reciprocal of spatial frequency) at which the PRTF falls to is 4.54 and 4.76 for the RAARER and CGRAAR solution, respectively, which can be rounded off to ≈5 pixels. The white circles in Figures 4(d) and 4(f) represent resolution scale as estimated from the PRTF curve. From the zoomedin portion of the averaged RAARER solution in Figure 4(l), we clearly see features smaller than 5 pixels that are spurious and difficult to interpret. On the other hand from Figure 4(m), the CGRAAR solution is clearly observed to be smoother and consistent with the spatial resolution reflected in PRTF curve.
We remark that the spatial resolution given here is in terms of pixels, however, one can always express it in physical units by the relation , where is the wavelength of the Xrays, is the distance between specimen and detector, is the pixel size of the detector, and is the half pixel number. For the Fourier intensity data shown in Figure 4(b), one can make similar observations from Figures 4(g)–4(j) and 4(n)–4(p). The final solutions shown in Figures 4(h) and 4(j) are obtained after averaging over 385 and 188 RAARER and CGRAAR trial solutions, respectively. Once again, the averaged RAARER solution still seems to retain some grainy artifacts that are not present in the CGRAAR solution. The grainy artifacts in the RAARER solution lead to a slightly better resolution estimate which is however spurious in our opinion. CGRAAR solution however seems to have features consistent with the resolution estimate provided by the PRTF curve.
It is worth noting from our results that the CGRAAR solution is artifactfree despite the fact that the number of trial solutions used for the averaging process in CGRAAR case is much less than half the number of trial solutions used for RAARER case. This is expected since even the single run of CGRAAR solution has much reduced artifacts compared to that of the RAARER solution.
7. Discussion
In conclusion, we have examined the nature of phase retrieval solutions for noisy Fourier intensity data obtained from simulations as well as CXI experiments from a new perspective of solution complexity. The groundtruth complexity is an object domain constraint which provides a measure of fluctuations in the desired solution and can be calculated a priori from the raw Fourier intensity data. With increasing noise in the data, the complexity of RAAR solution stabilized to a higher level compared to the groundtruth complexity. When the concluding 100 ER steps were applied for the purpose of refining the RAAR solution, the resulting solution showed further undesirable increase in the complexity of the solution inside the support region. This was manifested in the form of severe grainy artifacts in the solution. In order to address this issue, we proposed and tested a complexityguided RAAR (CGRAAR) algorithm. The goodness of the algorithm and the recovered resolution were judged using the PRTF plot.
The traditional RAARER solution seems to retain some grainy artifacts (even after averaging over a number of trial solutions), whose feature size is smaller than the resolution estimated by the PRTF. On the other hand, the solution from the proposed CGRAAR algorithm has smallest features consistent with the resolution estimate provided by the PRTF. The main idea behind complexityguidance is to match the complexity of RAAR solution with the desired groundtruth complexity. The performance of CGRAAR algorithm is demonstrated for the experimental CXI data from Coherent Xray Imaging Data Bank (CXIDB). It is worth highlighting that the single run of CGRAAR produces solutions with much reduced artifacts, and as a result, the number of trial solutions required for the averaging process with this methodology is less than the half number that are needed for the traditional RAARER method. We believe that the complexityguidance methodology can benefit the field of Xray coherent diffraction imaging by providing reliable and selfconsistent phase retrieval solution estimates.
8. Limitations of the Present Study
The computational time taken by the 1100 RAARER iterations is ~15 seconds, while 1000 iterations of CGRAAR algorithm takes ~3 minutes due to additional complexity reduction subiterations in a nominal MATLAB implementation. Despite more computational efforts, the phase retrieval with complexityguidance provides much reliable and robust phase retrieval solution. The additional complexity reducing subiterations required within the traditional RAAR loop make the individual run of the algorithm computationally more expensive. It is up to a user to decide whether this additional computation provides sufficient benefit for a particular application. The work has noted a distinctly different behavior of the popular HIO and RAAR phase retrieval algorithms from the perspective of the complexity parameter. We are however not in a position at present to provide a reasoning behind this observation. The CGRAAR methodology also needs to be further tested for objects with more structural details and for variable relative object support sizes.
Data Availability
Data used in the paper is freely available from Coherent Xray Imaging Data Bank (CXIDB) [https://www.cxidb.org/, data ID:26]. The pseudocodes used in this work can be made available upon reasonable request to the corresponding author.
Conflicts of Interest
The authors declare that there is no conflict of interest regarding the publication of this article.
Authors’ Contributions
All authors contributed equally to the conceptual design, simulations, and writing of the manuscript.
Acknowledgments
MB and SR acknowledge PhD Fellowship provided by Indian Institute of Technology Delhi.
References
 C. Bostedt, S. Boutet, D. M. Fritz et al., “Linac coherent light source: the first five years,” Reviews of Modern Physics, vol. 88, no. 1, p. 015 007, 2016. View at: Publisher Site  Google Scholar
 H. N. Chapman, A. Barty, M. J. Bogan et al., “Femtosecond diffractive imaging with a softXray freeelectron laser,” Nature Physics, vol. 2, no. 12, pp. 839–843, 2006. View at: Publisher Site  Google Scholar
 H. N. Chapman and K. A. Nugent, “Coherent lensless Xray imaging,” Nature Photonics, vol. 4, no. 12, pp. 833–839, 2010. View at: Publisher Site  Google Scholar
 L. Strüder, S. Epp, D. Rolles et al., “Largeformat, highspeed, Xray pnCCDs combined with electron and ion imaging spectrometers in a multipurpose chamber for experiments at 4th generation light sources,” Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, vol. 614, no. 3, pp. 483–496, 2010. View at: Publisher Site  Google Scholar
 P. Emma, R. Akre, J. Arthur et al., “First lasing and operation of an angstromwavelength freeelectron laser,” Nature Photonics, vol. 4, no. 9, pp. 641–647, 2010. View at: Publisher Site  Google Scholar
 M. Liang, G. J. Williams, M. Messerschmidt et al., “The coherent xray imaging instrument at the Linac coherent light source,” Journal of Synchrotron Radiation, vol. 22, no. 3, pp. 514–519, 2015. View at: Publisher Site  Google Scholar
 J. R. Fienup, “Reconstruction of an object from the modulus of its Fourier transform,” Optics Letters, vol. 3, no. 1, pp. 27–29, 1978. View at: Publisher Site  Google Scholar
 J. R. Fienup, “Phase retrieval algorithms: a comparison,” Applied Optics, vol. 21, no. 15, pp. 2758–2769, 1982. View at: Publisher Site  Google Scholar
 V. Elser, “Phase retrieval by iterated projections,” JOSA A, vol. 20, no. 1, pp. 40–55, 2003. View at: Publisher Site  Google Scholar
 S. Marchesini, H. He, H. N. Chapman et al., “Xray image reconstruction from a diffraction pattern alone,” Physical Review B, vol. 68, no. 14, p. 140 101, 2003. View at: Publisher Site  Google Scholar
 D. R. Luke, “Relaxed averaged alternating reflections for diffraction imaging,” Inverse Problems, vol. 21, no. 1, p. 37, 2005. View at: Publisher Site  Google Scholar
 C. Guo, S. Liu, and J. T. Sheridan, “Iterative phase retrieval algorithms I: optimization,” Applied Optics, vol. 54, no. 15, pp. 4698–4708, 2015. View at: Publisher Site  Google Scholar
 D. Shapiro, P. Thibault, T. Beetz et al., “Biological imaging by soft xray diffraction microscopy,” Proceedings of the National Academy of Sciences, vol. 102, no. 43, pp. 15 343–15 346, 2005. View at: Publisher Site  Google Scholar
 M. Butola, S. Rajora, and K. Khare, “Phase retrieval with complexity guidance,” JOSA A, vol. 36, no. 2, pp. 202–211, 2019. View at: Publisher Site  Google Scholar
 M. Butola, S. Rajora, and K. Khare, “Complexityguided fourier phase retrieval from noisy data,” JOSA A, vol. 38, no. 4, pp. 488–497, 2021. View at: Publisher Site  Google Scholar
 G. Van Der Schot, M. Svenda, F. R. Maia et al., “Imaging single cells in a beam of live cyanobacteria with an Xray laser,” Nature Communications, vol. 6, no. 1, pp. 1–9, 2015. View at: Publisher Site  Google Scholar
 F. R. Maia, T. Ekeberg, D. Van Der Spoel, and J. Hajdu, “Hawk: the image reconstruction package for coherent xray diffractive imaging,” Journal of Applied Crystallography, vol. 43, no. 6, pp. 1535–1539, 2010. View at: Publisher Site  Google Scholar
 H. H. Bauschke, P. L. Combettes, and D. R. Luke, “Phase retrieval, error reduction algorithm, and Fienup variants: a view from convex optimization,” JOSA A, vol. 19, no. 7, pp. 1334–1345, 2002. View at: Publisher Site  Google Scholar
 R. W. Gerchberg, “A practical algorithm for the determination of phase from image and diffraction plane pictures,” Optik, vol. 35, pp. 237–246, 1972. View at: Google Scholar
 T. Ekeberg, M. Svenda, C. Abergel et al., “Threedimensional reconstruction of the giant mimivirus particle with an xray freeelectron laser,” Physical Review Letters, vol. 114, no. 9, p. 098 102, 2015. View at: Publisher Site  Google Scholar
 H. Stark, Y. Yang, and Y. Yang, Vector Space Projections: A Numerical Approach to Signal and Image Processing, Neural Nets, and Optics, John Wiley & Sons, Inc., 1998.
 V. Elser, “Random projections and the optimization of an algorithm for phase retrieval,” Journal of Physics A: Mathematical and General, vol. 36, no. 12, pp. 2995–3007, 2003. View at: Publisher Site  Google Scholar
 H. H. Bauschke, P. L. Combettes, and D. R. Luke, “Hybrid projection–reflection method for phase retrieval,” JOSA A, vol. 20, no. 6, pp. 1025–1034, 2003. View at: Publisher Site  Google Scholar
 A. V. Martin, F. Wang, N. T. Loh et al., “Noiserobust coherent diffractive imaging with a single diffraction pattern,” Optics Express, vol. 20, no. 15, pp. 16 650–16 661, 2012. View at: Publisher Site  Google Scholar
 J. A. Rodriguez, R. Xu, C.C. Chen, Y. Zou, and J. Miao, “Oversampling smoothness: an effective algorithm for phase retrieval of noisy diffraction intensities,” Journal of Applied Crystallography, vol. 46, no. 2, pp. 312–318, 2013. View at: Publisher Site  Google Scholar
 R. Trahan and D. Hyland, “Mitigating the effect of noise in the hybrid input–output method of phase retrieval,” Applied Optics, vol. 52, no. 13, pp. 3031–3037, 2013. View at: Publisher Site  Google Scholar
 H. N. Chapman, A. Barty, S. Marchesini et al., “Highresolution ab initio threedimensional xray diffraction microscopy,” JOSA A, vol. 23, no. 5, pp. 1179–1200, 2006. View at: Publisher Site  Google Scholar
 D. E. Adams, L. S. Martin, M. D. Seaberg, D. F. Gardner, H. C. Kapteyn, and M. M. Murnane, “A generalization for optimized phase retrieval algorithms,” Optics Express, vol. 20, no. 22, pp. 24 778–24 790, 2012. View at: Publisher Site  Google Scholar
 D. Brandwood, “A complex gradient operator and its application in adaptive array theory,” IEE Proceedings HMicrowaves, Optics and Antennas, IET, vol. 130, pp. 11–16, 1983. View at: Publisher Site  Google Scholar
 J. Fienup and C. Wackerman, “Phaseretrieval stagnation problems and solutions,” JOSA A, vol. 3, no. 11, pp. 1897–1907, 1986. View at: Publisher Site  Google Scholar
 C. Gaur, B. Mohan, and K. Khare, “Sparsityassisted solution to the twin image problem in phase retrieval,” JOSA A, vol. 32, no. 11, pp. 1922–1927, 2015. View at: Publisher Site  Google Scholar
 T. Latychevskaia, “Iterative phase retrieval in coherent diffractive imaging: practical issues,” Applied Optics, vol. 57, no. 25, pp. 7187–7197, 2018. View at: Publisher Site  Google Scholar
 J. R. Fienup, “Invariant error metrics for image reconstruction,” Applied Optics, vol. 36, no. 32, pp. 8352–8357, 1997. View at: Publisher Site  Google Scholar
 F. R. Maia, “The coherent Xray imaging data bank,” Nature Methods, vol. 9, no. 9, pp. 854855, 2012. View at: Publisher Site  Google Scholar
Copyright
Copyright © 2022 Mansi Butola et al. Exclusive Licensee Zhejiang Lab, China. Distributed under a Creative Commons Attribution License (CC BY 4.0).