Noise-robust coherent diffractive imaging with a single diffraction pattern

The resolution of single-shot coherent diffractive imaging at X-ray free-electron laser facilities is limited by the low signal-to-noise level of diffraction data at high scattering angles. The iterative reconstruction methods, which phase a continuous diffraction pattern to produce an image, must be able to extract information from these weak signals to obtain the best quality images. Here we show how to modify iterative reconstruction methods to improve tolerance to noise. The method is demonstrated with the hybrid input-output method on both simulated data and single-shot diffraction patterns taken at the Linac Coherent Light Source. © 2012 Optical Society of America #164942 $15.00 USD Received 28 Mar 2012; revised 14 Jun 2012; accepted 19 Jun 2012; published 9 Jul 2012 (C) 2012 OSA 16 July 2012 / Vol. 20, No. 15 / OPTICS EXPRESS 16650 OCIS codes: (110.7440) X-ray imaging; (110.3010) Image reconstruction techniques. References and links 1. H. N. Chapman, A. Barty, S. Marchesini, A. Noy, S. P. Hau-Riege, C. Cui, M. R. Howells, R. Rosen, H. He, J. C. H. Spence, U. Weierstall, T. Beetz, C. Jacobsen, and D. Shapiro, “High-resolution ab initio threedimensional X-ray diffraction microscopy,” J. Opt. Soc. Am. A 23, 1179–1200 (2006). 2. H. N. Chapman, A. Barty, M. J. Bogan, S. Boutet, M. Frank, S. P. Hau-Riege, S. Marchesini, B. W. Woods, S. Bajt, W. H. Benner, R. A. London, E. Plönjes, M. Kuhlmann, R. Treusch, S. Düsterer, T. Tschentscher, J. R. Schneider, E. Spiller, T. Möller, C. Bostedt, M. Hoener, D. A. Shapiro, K. O. Hodgson, D. van der Spoel, F. Burmeister, M. Bergh, C. Caleman, G. Huldt, M. M. Seibert, F. R. N. C. Maia, R. W. Lee, A. Szöke, N. Timneanu, and J. Hajdu, “Femtosecond diffractive imaging with a soft-X-ray free-electron laser,” Nat. Phys. 2, 839– 843 (2006). 3. W. J. Huang, R. Sun, J. Tao, L. D. Menard, R. G. Nuzzo, and J. M. Zuo, “Coordination-dependent surface atomic contraction in nanocrystals revealed by coherent diffraction,” Nat. Mater. 7, 308–313 (2008). 4. G. J. Williams, M. A. Pfeifer, I. A. Vartanyants, and I. K. Robinson, “Three-dimensional imaging of microstructure in Au nanocrystals,” Phys. Rev. Lett. 90, 175501 (2003). 5. J. Miao, K. O. Hodgson, T. Ishikawa, C. A. Larabell, M. A. LeGros, and Y. Nishino, “Imaging whole Escherichia coli bacteria by using single-particle X-ray diffraction,” Proc. Natl. Acad. Sci. USA 100, 110–112 (2003). 6. D. Shapiro, P. Thibault, T. Beetz, V. Elser, M. Howells, C. Jacobsen, J. Kirz, E. Lima, H. Miao, A. M. Neiman, and D. Sayre, “Biological imaging by soft X-ray diffraction microscopy,” Proc. Nat. Acad. Sci. USA 102, 15343– 15346 (2005). 7. M. M. Seibert, T. Ekeberg, F. R. N. C. Maia, M. Svenda, J. Andreasson, O. Jonsson, D. Odic, B. Iwan, A. Rocker, D. Westphal, M. Hantke, D. P. DePonte, A. Barty, J. Schulz, L. Gumprecht, N. Coppola, A. Aquila, M. Liang, T. A. White, A. Martin, C. Caleman, S. Stern, C. Abergel, V. Seltzer, J.-M. Claverie, C. Bostedt, J. D. Bozek, S. Boutet, A. A. Miahnahri, M. Messerschmidt, J. Krzywinski, G. Williams, K. O. Hodgson, M. J. Bogan, C. Y. Hampton, R. G. Sierra, D. Starodub, I. Andersson, S. Bajt, M. Barthelmess, J. C. H. Spence, P. Fromme, U. Weierstall, R. Kirian, M. Hunter, R. B. Doak, S. Marchesini, S. P. Hau-Riege, M. Frank, R. L. Shoeman, L. Lomb, S. W. Epp, R. Hartmann, D. Rolles, A. Rudenko, C. Schmidt, L. Foucar, N. Kimmel, P. Holl, B. Rudek, B. Erk, A. Homke, C. Reich, D. Pietschner, G. Weidenspointner, L. Struder, G. Hauser, H. Gorke, J. Ullrich, I. Schlichting, S. Herrmann, G. Schaller, F. Schopper, H. Soltau, K.-U. Kuhnel, R. Andritschke, C.-D. Schroter, F. Krasniqi, M. Bott, S. Schorb, D. Rupp, M. Adolph, T. Gorkhover, H. Hirsemann, G. Potdevin, H. Graafsma, B. Nilsson, H. N. Chapman, and J. Hajdu, “Single mimivirus particles intercepted and imaged with an X-ray laser,” Nature 470, 79–81 (2011). 8. G. Williams, M. Pfeifer, I. Vartanyants, and I. Robinson, “Effectiveness of iterative algorithms in recovering phase in the presence of noise,” Acta Crystallogr. A 63, 36–42 (2007). 9. N. Loh, S. Eisebitt, S. Flewett, and V. Elser, “Recovering magnetization distributions from their noisy diffraction data,” Phys. Rev. E 82, 061128 (2010). 10. R. A. Dilanian, G. J. Williams, L. W. Whitehead, D. J. Vine, A. G. Peele, E. Balaur, I. McNulty, H. M. Quiney, and K. A. Nugent, “Coherent diffractive imaging: a new statistically regularized amplitude constraint,” New J. Phys. 12, 093042 (2010). 11. H. M. L. Faulkner and J. M. Rodenburg, “Movable aperture lensless transmission microscopy: A novel phase retrieval algorithm,” Phys. Rev. Lett. 93, 023903 (2004). 12. P. Thibault, M. Dierolf, A. Menzel, O. Bunk, C. David, and F. Pfeiffer, “High-resolution scanning X-ray diffraction microscopy,” Science 321, 379–382 (2008). 13. G. J. Williams, H. M. Quiney, B. B. Dahl, C. Q. Tran, A. G. Peele, K. A. Nugent, M. D. De Jonge, and D. Paterson, “Curved beam coherent diffractive imaging,” Thin Solid Films 515, 5553–5556 (2007). 14. N. D. Loh, C. Y. Hampton, A. V. Martin, D. Starodub, R. G. Sierra, A. Barty, A. Aquila, J. Schulz, L. Lomb, J. Steinbrener, S. Shoeman, R. L. and Kassemeyer, C. Bostedt, J. Bozek, S. W. Epp, B. Erk, R. Hartmann, D. Rolles, A. Rudenko, B. Rudek, L. Foucar, N. Kimmel, G. Weidenspointner, G. Hauser, P. Holl, E. Pedersoli, M. Liang, M. Hunter, L. Gumprecht, N. Coppola, C. Wunderer, H. Graafsma, F. R. N. C. Maia, T. Ekeberg, M. Hantke, H. Fleckenstein, H. Hirsemann, K. Nass, T. A. White, H. J. Tobias, G. R. Farquar, W. H. Benner, S. Hau-Riege, C. Reich, A. Hartmann, H. Soltau, S. Marchesini, S. Bajt, M. Barthelmess, P. Bucksbaum, K. O. Hodgson, L. Strüder, J. Ullrich, M. Frank, I. Schlichting, H. N. Chapman, and M. J. Bogan, “Fractal morphology, imaging and mass spectrometry of single aerosol particles in flight,” Nature (2012). (submitted). 15. J. R. Fienup, “Phase retrieval algorithms a comparison,” Appl. Opt. 21, 2758–2769 (1982). 16. V. Elser, “Phase retrieval by iterated projections,” J. Opt. Soc. Am. A 20, 40–55 (2003). 17. D. R. Luke, “Relaxed averaged alternating reflections for diffraction imaging,” Inv. Probl. 21, 37–50 (2005). 18. V. Elser, “Random projections and the optimization of an algorithm for phase retrieval,” J. Phys. A-Math Gen 36, 2995–3007 (2003). 19. S. Marchesini, “A unified evaluation of iterative projection algorithms for phase retrieval,” Rev. Sci. Instrum. 78, 011301 (2007). #164942 $15.00 USD Received 28 Mar 2012; revised 14 Jun 2012; accepted 19 Jun 2012; published 9 Jul 2012 (C) 2012 OSA 16 July 2012 / Vol. 20, No. 15 / OPTICS EXPRESS 16651 20. A. V. Martin, J. Andreassonn, A. Aquila, S. Bajt, T. R. Barends, M. Barthelmess, A. Barty, W. H. Benner, C. Bostedt, J. D. Bozek, P. Bucksbaum, C. Caleman, N. Coppola, D. P. DePonte, T. Ekeberg, S. W. Epp, B. Erk, G. R. Farquar, H. Fleckenstein, L. Foucar, M. Frank, L. Gumprecht, C. Y. Hampton, M. Hantke, A. Hartmann, E. Hartmann, R. Hartmann, S. P. Hau-Riege, G. Hauser, P. Holl, A. Hoemke, O. Jonssonn, S. Kassemeyer, N. Kimmel, M. Kiskinovak, F. Krasniqi, J. Krzywinski, M. Liang, N.-T. D. Loh, L. Lomb, F. R. Maia, S. Marchesini, M. Messerschmidt, K. Nass, D. Odic, E. Pedersoli, C. Reich, D. Rolles, B. Rudek, A. Rudenko, C. Schmidt, J. Schulz, M. M. Seibert, R. L. Shoeman, R. G. Sierra, H. Soltau, D. Starodub, J. Steinbrener, F. Stellato, L. Struder, M. Svenda, H. Tobias, J. Ullrich, G. Weidenspointner, D. Westphal, T. A. White, G. Williams, J. Hajdu, I. Schlichting, M. J. Bogan, and H. N. Chapman, “Single particle imaging with soft X-rays at the Linac Coherent Light Source,” Proc. SPIE 8078, 807809 (2011). 21. L. Strüder, S. Epp, D. Rolles, R. Hartmann, P. Holl, G. Lutz, H. Soltau, R. Eckart, C. Reich, K. Heinzinger, C. Thamm, A. Rudenko, F. Krasniqi, K.-U. Kühnel, C. Bauer, C.-D. Schröter, R. Moshammer, S. Techert, D. Miessner, M. Porro, O. Hälker, N. Meidinger, N. Kimmel, R. Andritschke, F. Schopper, G. Weidenspointner, A. Ziegler, D. Pietschner, S. Herrmann, U. Pietsch, A. Walenta, W. Leitenberger, C. Bostedt, T. Möller, D. Rupp, M. Adolph, H. Graafsma, H. Hirsemann, K. Gärtner, R. Richter, L. Foucar, R. L. Shoeman, I. Schlichting, and J. Ullrich, “Large-format, high-speed, X-ray pnccds combined with electron and ion imaging spectrometers in a multi purpose chamber for experiments at 4th generation light sources,” Nucl. Instrum. Meth. A 614, 483–496 (2009).


Introduction
Coherent diffractive imaging (CDI) is a lenless imaging technique which has the potential to achieve resolutions that are not limited by a lens or other focusing optics. There has been steady development of the technique over the last decade with X-rays [1,2] and electrons [3], including applications in both materials science [4] and biology [5][6][7]. Resolutions that are typically achieved with X-rays are of the order of tens of nanometers [2,7]. The success of these experiments depends critically on the performance of phase retrieval methods, which determine the phases that correspond to the measured far-field diffraction intensities. The robustness of iterative phasing methods to noise has also been identified as a key issue that determines the success of CDI experiments [8][9][10]. To overcome the limitations of the standard CDI experiment, more elaborate experiments have been developed including ptychography [11,12] and CDI with a curved incident wave front [13]. Without detracting from the successes of these more elaborate phasing experiments, the standard CDI experiment with an incident plane wave is experimentally the simplest and, for some applications, still the preferable way to implement CDI.
One example is CDI with X-ray free electron lasers (XFELs). A lens-based microscopy is yet to be demonstrated with an XFEL due to the high intensity of the X-ray pulses. Since the sample is destroyed by a single pulse, single-measurement CDI is the primary imaging technique currently used [2,7,14]. XFELs also provide unique applications for CDI imaging, like complex, heterogeneous samples in their native state. Airborne particles, like particulate matter, can be imaged in flight avoiding the need to attach them to a substrate [14]. Complex biological samples like cells and bacteria can be imaged without freezing, staining or sectioning. For reproducible samples, it is possible to combine multiple measurements of single particle in unknown orientations to study the 3D structure. For irreproducible samples, such as particulate matter or cellular biological samples, 2D imaging is currently the only available imaging technique with XFELs. The reliability and performance of single-shot CDI is of key importance for realizing the potential advantages of imaging experiments with XFELs.
Iterative phasing methods require as input the intensity of the coherent X-ray wave in the plane of the detector. Any deviation of the measured intensity from the true intensity of the X-ray wave can cause errors in the reconstructed image. Hence, any such deviation of the measured intensity from the intensity of the X-ray wave can be defined as a measurement error for a CDI experiment, and when this error has the form of a random fluctuation we will refer to it as noise. Sources of noise can include shot noise, any X-ray signal from sources besides the sample and noise associated with the dark current of the detector.
Many iterative methods have been developed to phase a continuous diffraction pattern [15][16][17]. Rapid convergence in noise-free simulations shows that these methods can efficiently use errors from the incorrect diffraction-plane phase to update the image for the next iteration. They also avoid the local minima which cause the error-reduction method and steepest-descent methods to stagnate [15]. Unfortunately, the most efficient methods for phase retrieval also appear to show a sensitivity to experimental noise and, in practice, they are combined with error-reduction methods [4] or modified to include additional constraints [9]. Another attempt to improve noise tolerance was based on a modification of the diffraction-plane constraint, such that the diffraction-plane amplitude of the current iterate was not changed wherever it lies within the assumed error bound [1]. This modification of the constraint may in fact weaken the constraint, reducing its effectiveness, and this approach to handling noise has not yet been generally adopted.
In this paper, we show how to improve the performance of reconstruction methods in the presence of measurement noise. Pixels in the object plane outside of the object (outside the support) are categorized by whether their intensity is caused by phase errors or amplitude errors in the diffraction plane. The iterative update is modified to retain the information about diffraction-plane phase errors, so that they can be corrected, while suppressing information due to noise. The improvement can be potentially added to any of the existing reconstruction methods.

Reconstruction methods
Iterative reconstruction schemes recover the wave function in the exit surface plane, ψ. In CDI theory, ψ is typically written as where A is known as the amplitude of the complex wave, and φ is known as the phase. The recovery of the exit surface wave is equivalent to determining the phases in the diffraction plane that correspond to the measured intensity. These methods use the measured diffraction data as a constraint and enforce additional constraints in the object plane. These constraints are commonly expressed as projection operators. Defining ψ ≡ F [ψ], where F denotes the Fourier transform, the modulus constraint can be written as where I is the measured diffraction pattern. We define a projection of the wave-function onto the modulus constraint by The second constraint is that the object is located within a known region of finite extent called the support, denoted by S. The support projection is Using this notation, some of the popular reconstruction methods are as follows: ER [15] : ψ (n+1) = P sup P mod ψ (n) , HIO [15] : DM [16] : and RAAR [17] : where we have used the abbreviations error-reduction (ER), hybrid input-output (HIO), difference map (DM) and relaxed alternating averaged reflections (RAAR). The parameter β is real, I is the identity operator and for DM we assume the optimal convergence parameters, γ s = −1 β and γ m = 1 β , given in Ref. [18], . An important difference between iterative phasing methods is how the value of the iterate ψ outside the support is used to form an improved estimate for the next iteration. In the noisefree case, only errors in the diffraction-plane phase can cause ψ (n) mod to be non-zero outside the support. Hence, the value of ψ mod outside the support provides key information about the diffraction-plane phase errors, which HIO, DM or RAAR can efficiently use to improve the phase. However, when the diffraction pattern contains noise, ψ mod is non-zero outside the support even when the diffraction-plane phase is correct. In this case, HIO, DM and RAAR use the errors due to noise to change the diffraction-plane phase, which is not the ideal response to noise. On the other hand, ER sets the region outside the support to zero, simultaneously suppressing errors in the diffraction-plane intensity and phase. Unfortunately, the well-known stagnation issues with ER show this is not a viable approach to determining the correct diffractionplane phase. If we have both types of errors, from an incorrect diffraction-plane phase and noisy intensity data, what is the optimal compromise to make? How can we efficiently correct the diffraction-plane phase while simultaneously suppressing the effect of measurement noise?

Behaviour of iterative methods near local minima
It is well-known that the stagnation issues of ER arise because it converges to local minima with respect to common error metrics [19]. When such a stagnation occurs, the following approximations apply: ψ and ψ (n+1) Other iterative methods do not exhibit the same stagnation issues and they behave differently to ER when Eqs. (9) and (10) apply. Assuming that Eqs. (9) and (10) hold for k iterations, then outside the support the wave function has the following scaling: The scaling for HIO and DM is linear with the number of iterations and after a finite number iterations the approximations, Eqs. (9) and (10), no longer apply. When the approximations are no longer valid, the diffraction-plane phases for iteration n + k are significantly different from iteration n. The linear scaling ensures that DM and HIO do not stagnate in the same way as ER, a property already identified when DM was introduced [16]. For RAAR the intensity outside the support does not increase linearly but is given by a geometric series that is bounded if β is less than 1. Since the scaling is bounded it is still possible for RAAR to stagnate, although as β approaches 1 the likelihood of stagnation reduces.
The scaling behaviours given in Eq. (11) also indicate the sensitivity of these methods to noise. If the diffraction-plane phases are correct at iteration n and the diffraction-plane amplitudes contain noise, then the part of ψ (n) mod that is outside the support is caused only by errors from noise. If we assume that this error is small enough that Eq. (9) and (10) hold, then Eq. (11) shows how each method increases the error due to noise. Since the scaling for HIO and DM is unbounded, it must continue until the diffraction-plane phases change. This is clearly not the ideal response to noise, because we have already assumed that at iteration n the phases were correct.
RAAR shows an increased robustness to noise as β is reduced because the scaling is bounded. However, reducing the parameter β increases the likelihood that RAAR stagnates. This suggests that with RAAR the adjustment of β allows a compromise to be set between noise-robustness and the likelihood of stagnation. Often with RAAR the value of β is set to a little less than 1, e.g. 0.9, and the gain in noise-tolerance has produced good results in several experimental applications [2,7,20].

Estimation of the noise level in the object plane
Considering the scaling behavior in Eq. (11), the region outside the support appears to be a potentially profitable area to analyze. It is possible to estimate the standard deviation of ψ mod outside the support due to the amplitude errors in the detector plane. This is achieved by applying the central limit theorem to relate the standard deviation of the amplitude error on each pixel to the standard deviation of ψ mod outside the support. In this work we treat shot noise only. This is modeled by assigning the measured intensity at a pixel to a value drawn randomly from a Poisson distribution with a mean equal to the intensity of the coherent X-ray wavefront at that pixel.
We consider the case where the noise is uncorrelated between detector pixels. The amplitudes calculated from the measured intensities can be written as where I ideal denotes the noise-free diffraction pattern due to the scattering from the sample, and ε is the amplitude error introduced by the measurement of the diffraction pattern. Using Eq.
We can write out the noise error term more explicitly in a discrete form as We denote the value of the measured intensity on a pixel m by I m , and the value of the amplitude error on pixel m as ε m . If we assume Poisson statistics, then the standard deviation of the measured intensity on pixel m is The amplitudes are calculated by taking the square root of the measured intensities, and the numerically calculated standard deviation of the derived amplitudes is plotted as a function of mean intensity in Fig. 1. The plot shows that for a mean signal greater than 0.2 photons per pixel, the standard deviation of the measured amplitude can be approximated as follows When the mean intensity is in the range between 0.2 and 3 counts, this approximation is accurate to within 30% and improves as the mean intensity increases. When the mean intensity is less than 0.2 photons per pixel, the majority of pixels register either 0 or 1, which are unchanged by the square root operation and therefore we can approximate For pixels with mean intensities close to or less than 1, the approximation I ideal,m ≈ √ I m is not valid and Eq. (17) cannot be applied pixel by pixel. Instead the statistics of ψ m,n err can be estimated by using the radially-averaged intensity I m to determine whether Eq. (16) or Eq. (17) applies to pixel m, and I m can also be substituted for I ideal,m in Eq. (17). The accuracy of using the radially averaged intensities was confirmed by the simulation studies in Section 3.2. Now that we have a means to estimate the standard deviation of the measured amplitude at each pixel, we can apply the central limit theorem to Eq. (14) to estimate the standard deviation of ψ m,n err , which we denote by σ noise . In Eq. (14), ε m is a random sample from a distribution with a standard deviation of σ m ( √ I) and the phase factors on the right hand side of Eq. (14) do not affect the standard deviation of ψ m,n err . By the central limit theorem, the histogram of ψ (n) n err follows a Gaussian distribution and has a standard deviation (σ noise ) that is given by The normalisation of Eq. (18) depends on the particular implementation of the Fourier transform. The non-uniform diffraction pattern determines the length scale over which ψ (n) n err is correlated, but does not preferentially locate ψ (n) n err in a particular part of the object plane. This means over a large enough length scale, ψ (n) n err appears as a background noise distribution with a uniform mean and standard deviation. We can use σ noise to determine a bound that ψ (n) n err is very unlikely to exceed. By analogy with an experimental measurement, we can write ψ ph err ± σ noise and treat |ψ (n) ph err |/σ noise as an effective signal-to-noise ratio. It should be noted that Eq. (18) applies to other sources of error that contribute to σ m ( √ I). We have treated shot noise because it has well-defined statistical properties and has a significant effect on CDI data. If the contribution of other sources of noise to σ m ( √ I) can be estimated, then the corresponding effect on σ noise can also be determined.

The modification of a phase retrieval method to improve noise tolerance
The signal-to-noise level can be used to identify the regions outside the support where the calculation of ψ (n) mod is reliable, and regions which are dominated by the noise ψ (n) n err . Using this insight, it is possible to modify existing phase retrieval algorithms to improve their robustness to noise. A reliable measurement of ψ mod is considered to be 3σ noise . For example, a modified version of the HIO algorithm is as follows An ideal simulated diffraction pattern, Fig. 2(a), and the noisy diffraction pattern, Fig. 2(b), were simulated from the object shown in Fig. 2(c). The object was constructed from overlapping circles. Shot noise was modeled by assigning the intensity at each pixel to a random sample from the Poisson distribution with a mean equal to the predicted X-ray intensity, assuming a total of 10 5 photons in the entire pattern. When the correct diffraction-plane phases are combined with amplitudes from the noisy diffraction pattern, the image shown in Fig. 2(d) can be The object used to simulate the diffraction pattern was constructed from overlapping circles. (d) The image calculated using the noisy diffraction amplitudes and the correct phase, which represents the best possible image that could be reconstructed from noisy data. (e) The reconstruction using a standard HIO method from diffraction pattern with noise. (f) The reconstruction using the noise tolerant method from the noisy diffraction pattern. (g) A comparison of the errors as a function of iteration. The intrinsic noise error is calculated by comparing the noisy diffraction pattern with the noisefree diffraction pattern.
formed, which represents the image we aim to recover from the noisy data. The reconstruction from the noisy diffraction pattern using the standard HIO method is shown in Fig. 2(e) which was not successful and contains only low resolution features inside the support, as well as significant artifacts outside the support. The sharp outline of the object visible in Fig. 2(e) follows the edge of the support and does not indicate any partial success of the standard HIO method. When the modified HIO method, defined by Eq. (19), is used the reconstruction is greatly improved, as shown in Fig. 2(f). Fig. 2(g) shows plots of the error calculated with the estimate of the amplitudes in the diffraction plane and those calculated from the diffraction pattern [2]. The convergence of the noise-tolerant HIO confirms the improvement that can be seen visually. The comparison of the diffraction pattern with noise to the ideal diffraction pattern with the same metric gives a value of 0.07, which indicates the best value we can expect for a reconstruction with noise. It is particularly encouraging to see that the convergence of the noise-tolerant HIO follows the convergence of HIO from noise-free diffraction pattern until it reaches this intrinsic noise level.

Experiment
The noise-tolerant HIO was tested on single particle diffraction data taken at the Atomic, Molecular and Optical Science beamline at LCLS using the CFEL ASG Multi-Purpose (CAMP) instrument and the pnCCD detectors [21] . The incident energy of individual photons was set to either 780 eV (1.6 nm) or 1.24 keV (1.0 nm). The dynamic range of the detector as operated in this experiment was approximately 500 photons at 1.24 keV. The clusters of polystyrene spheres were injected into the XFEL beam using a differentially pumped aerodynamic focusing inlet. Individual particles were exposed to vacuum for 1 ms as they traveled at 100-200 m/s to the interaction region. The detector was approximately 724 mm from the interaction region. Further parameters and details of the LCLS experiment are given in Loh et al. [14].
Previous studies on similar LCLS data produced successful reconstructions with a combination of RAAR and shrinkwrap [7,14,20] and achieved resolutions between 20 − 50 nm. The diffraction patterns shown in Fig. 3(a) were taken from clusters of polystyrene spheres. For the left pattern the incident photon energy was 780 eV and for the right pattern it was 1.2 keV. The standard reconstruction using RAAR and shrinkwrap is shown in Fig. 3(b) and the reconstruction from the noise-tolerant HIO is shown in Fig. 3(c). In both RAAR and noise-tolerant HIO reconstructions, all parameters were kept at the same values. The feedback parameter β was set to 0.9. The support was updated every 50 iterations by the same implementation of shrinkwrap used in Ref. [2] with a threshold of 0.2. The kernel used to smooth the iterate before applying the threshold was initially set to 1.5 pixels full-width at half maximum and gradually reduced to a width of 1 pixel after 800 iterations. To estimate σ noise , the radial average of the pattern was taken and used with Eqs. (16) and (17). Each reconstruction is an average of 100 separate trials with random initial phases and 2000 iterations per trial. For each trial the wave function in the missing data region was intially set to the Fourier transform of the initial support as described in Martin et al. [20]. By visual inspection, both methods have successfully reconstructed the structure of the particle. The diameter of individual spheres in the reconstruction on the left is 80 nm and for the reconstruction on the right it is 140 nm. The phase retrieval transfer function (PRTF) [2] shown in Fig. 3(d) shows a modest improvement for the noise tolerant HIO method over the extent of the detector.
It should also be noted that the standard HIO method without noise-tolerance modifications was not successful at reconstructing these particles. With the standard HIO, the various trials produced reconstructions of different structures, and shrinkwrap did not converge to the same support in each case. The difficulty of achieving any success with the standard HIO further highlights the gains that can be achieved by making the noise-tolerant modifications.
In principle, the noise-tolerant modification is not restricted to HIO, but could be applied to other algorithms as well, including RAAR. In the pursuit of optimal phase-retrieval strategies, it will be fruitful to develop noise-tolerant versions of other phase retrieval algorithms, like RAAR, and compare their performance.
Filtering the diffraction pattern by applying a mask to the autocorrelation function is another successful method of reducing the effects of noise [20]. When there is a missing data region, it can be implemented in a two-pass approach, where an initial reconstruction is performed to low resolution to recover the missing data. Then the diffraction pattern is filtered with the missing data region filled in, and a second reconstruction can be performed to higher resolution. The noise-tolerant HIO is complementary to filtering because it can provide a better initial reconstruction to more accurately recover the missing data. Since filtering cannot remove all the effects of noise, noise-tolerant HIO can also be used in the second reconstruction after filtering to reduce the effect of any residual errors.

Conclusion
We have shown how to improve the noise tolerance of iterative phase retrieval methods by altering how they update the iterate outside the support. This was demonstrated by modifying the HIO method and improvements in performance were observed in applications to both simulated and experimentally-measured diffraction patterns. The modification is not limited to HIO and can also be applied to other popular iterative phasing methods. The successful application to single-shot diffraction patterns taken at LCLS is particularly encouraging, as it raises the prospect of achieving higher resolutions with 2D FEL imaging by extracting more information from noisy data at high scattering angles.