## research papers

## for single-nanoparticle from low-quality single-shot coherent diffraction data

**Toshiyuki Nishiyama,**

^{a,}^{b}‡ Akinobu Niozu,^{a,}^{b}‡ Christoph Bostedt,^{c,}^{d,}^{e,}^{f}Ken R. Ferguson,^{c}Yuhiro Sato,^{a}Christopher Hutchison,^{a}Kiyonobu Nagaya,^{a,}^{b}^{*}Hironobu Fukuzawa,^{b,}^{g}Koji Motomura,^{g}Shin-ichi Wada,^{b,}^{h}Tsukasa Sakai,^{a}Kenji Matsunami,^{a}Kazuhiro Matsuda,^{a}Tetsuya Tachibana,^{g}Yuta Ito,^{g}Weiqing Xu,^{g}Subhendu Mondal,^{g}Takayuki Umemoto,^{h}Christophe Nicolas,^{i}Catalin Miron,^{i,}^{j,}^{k}Takashi Kameshima,^{l}Yasumasa Joti,^{l}Kensuke Tono,^{l}Takaki Hatsui,^{b}Makina Yabashi^{b}and Kiyoshi Ueda^{b,}^{g}^{a}Division of Physics and Astronomy, Kyoto University, Kyoto 606-8501, Japan, ^{b}RIKEN SPring-8 Center, Sayo, Hyogo 679-5148, Japan, ^{c}Linac Coherent Light Source, SLAC National Accelerator Laboratory, Menlo Park, CA 94025, USA, ^{d}Chemical Sciences and Engineering Division, Argonne National Laboratory, 9700 S. Cass Avenue, Lemont IL 60439, USA, ^{e}Paul-Scherrer Institute, CH-5232 Villigen PSI, Switzerland, ^{f}LUXS Laboratory for Ultrafast X-ray Sciences, Institute of Chemical Sciences and Engineering, École Polytechnique Fédérale de Lausanne (EPFL), CH-1015 Lausanne, Switzerland, ^{g}Institute of Multidisciplinary Research for Advanced Materials, Tohoku University, Sendai 980-8577, Japan, ^{h}Department of Physical Science, Hiroshima University, Higashi-Hiroshima 739-8526, Japan, ^{i}Synchrotron SOLEIL, l'Orme des Merisiers, Saint-Aubin, BP 48, 91192 Gif-sur-Yvette Cedex, France, ^{j}Extreme Light Infrastructure - Nuclear Physics (ELI-NP), "Horia Hulubei" National Institute for Physics and Nuclear Engineering, 30 Reactorului Street, Măgurele RO-077125, Jud.Ilfov, Romania, ^{k}LIDYL, CEA, CNRS, Université Paris-Saclay, CEA Saclay, 91191 Gif-sur-Yvette, France, and ^{l}Japan Synchrotron Radiation Research Institute (JASRI), Sayo, Hyogo 679-5198, Japan^{*}Correspondence e-mail: nagaya@scphys.kyoto-u.ac.jp

With the emergence of X-ray free-electron lasers, it is possible to investigate the structure of nanoscale samples by employing coherent diffractive imaging in the X-ray spectral regime. In this work, we developed a

method for structure reconstruction applicable to low-quality coherent diffraction data. The method is based on the gradient search method and considers the missing region of a diffraction pattern and the small number of detected photons. We introduced an initial estimate of the structure in the method to improve the convergence. The present method is applied to an experimental diffraction pattern of an Xe cluster obtained in an X-ray scattering experiment at the SPring-8 Angstrom Compact free-electron LAser (SACLA) facility. It is found that the electron density is successfully reconstructed from the diffraction pattern with a large missing region, with a good initial estimate of the structure. The diffraction pattern calculated from the reconstructed electron density reproduced the observed diffraction pattern well, including the characteristic intensity modulation in each ring. Our method enables structure reconstruction from diffraction patterns under difficulties such as missing areas and low diffraction intensity, and it is potentially applicable to the of samples that have low scattering power.Keywords: coherent diffractive imaging; phase problem; single particles; XFELs; structure reconstruction; computation; clusters; electron density.

### 1. Introduction

The recent advent of X-ray free-electron lasers (XFELs) has offered new opportunities to investigate the structure of a single nanoscale sample by using a shot-by-shot X-ray diffraction method on the basis of the diffraction-before-destruction scheme (Neutze *et al.*, 2000). Pioneering works have demonstrated the advantage of XFELs for determining the structure of biomolecules (Chapman *et al.*, 2011; Seibert *et al.*, 2011; Kimura *et al.*, 2014; van der Schot *et al.*, 2015) and non-biological and fragile objects (Bogan *et al.*, 2008; Bostedt *et al.*, 2010; Xu *et al.*, 2014; Gomez *et al.*, 2014).

For fundamental questions on ultrafast X-ray scattering, atomic clusters have been widely used as model systems because of their simple electronic and geometric structure. Their geometric structure can be well characterized with X-ray imaging (Bostedt *et al.*, 2010; Rupp *et al.*, 2012, 2014; Gomez *et al.*, 2014; Barke *et al.*, 2015), and the interaction of intense light pulses with clusters has been characterized from the optical (Ditmire *et al.*, 1996, 1997) to the vacuum ultraviolet (Wabnitz *et al.*, 2002; Bostedt *et al.*, 2008) and X-ray spectral regime (Bostedt *et al.*, 2012; Gorkhover *et al.*, 2012; Ferguson *et al.*, 2016). The first applications of coincident X-ray imaging and spectroscopy showed great advantages in obtaining geometric and electronic structure at the same time. With this approach it was possible to eliminate the effects of the cluster size distribution as well as the focal volume intensity distribution on the physical processes, and a size-structural-selective evaluation of the processes was realized (Gorkhover *et al.*, 2012, 2016).

Coherent diffractive imaging (CDI) in the X-ray spectral regime (Miao *et al.*, 1999, 2015 Chapman *et al.*, 2006) is a promising method to explore the structure of single particles by recording diffraction patterns with single exposures to XFEL pulses. CDI methods enable us to obtain the information for an electron-density map of the samples with high spatial resolution because of short-wavelength X-ray pulses.

In CDI, reconstruction of a structure from diffraction patterns is achieved with suitable phase retrieval (PR) algorithms. In PR algorithms, the phase is recovered iteratively by applying constraints in the Fourier space and the real space. The error reduction (ER) algorithm (Fienup, 1982) is one of the well known algorithms but suffers from stagnation issue at local minima. More advanced algorithms such as the hybrid input-output (HIO) algorithm (Fienup, 1982) and the relaxed averaged alternating reflections (RAAR) algorithm (Luke, 2005) have been proposed. These advanced algorithms converge faster than the ER algorithm in many cases and also present the advantage that they can efficiently escape from local optima. Several studies (Takahashi *et al.*, 2013; Kimura *et al.*, 2014; van der Schot *et al.*, 2015; Tanyag *et al.*, 2015) have employed iterative PR algorithms to coherent diffraction patterns and demonstrated the feasibility of structure reconstruction of single particles. Much effort has been devoted to obtaining high-quality diffraction patterns.

However, in practice it is often challenging to obtain high-quality diffraction patterns that can be successfully phased with the existing algorithms as there are some problems applying the PR algorithms to experimental diffraction patterns. One of the problems is the missing area of the detector in the small-angle region (Martin *et al.*, 2012*a*; Kobayashi *et al.*, 2014). In CDI measurements, the central part of the diffraction patterns is usually not recorded because of a direct beamstop which protects the detector. The small-angle region contains information about the overall shape of the object and previous studies (Li *et al.*, 2017) show that the loss of the central part is sometimes critical for PR. It is also reported by Thibault *et al.* (Thibault *et al.*, 2006) that missing data cause very weakly constrained called unconstrained modes, which are not restricted by the available information in the real and Fourier space. These modes give rise to the ambiguity of reconstruction and some studies show that removal of this ambiguity leads to a better convergence to structural reconstruction using PR (Thibault *et al.*, 2006; Seibert *et al.*, 2011).

Another problem is the limited number of diffracted photons from single particles. This is especially true for biomolecules as the diffracted intensity from biomolecules is usually much smaller than that from heavier atom metal or semiconductor nanoparticles. Diffraction patterns with a small number of photons contain noise because of photon-counting statistics, which limits the resolution of the reconstructed structure (Martin *et al.*, 2012*b*). As an alternative analysis to iterative PR, one can directly discuss the diffraction patterns quantitatively (Li *et al.*, 2017) or construct structural models that reproduce the diffraction patterns (Langbehn *et al.*, 2018). However, these analyses cannot eliminate the arbitrariness in structure modeling, and significant structural information in the diffraction patterns might be overlooked.

### 2. Experiment

The experiment was carried out at experimental hutch 3 of beamline 3 at SACLA (Tono *et al.*, 2013). The schematic of the experimental setup has been described elsewhere (Fukuzawa *et al.*, 2018). The wavelength of the XFEL was set to 2.2 Å (corresponding to a photon energy of 5.5 keV). The XFEL pulses were focused with a Kirkpatrick–Baez (KB) mirror system to a focus size of 1.5 × 1.3 µm (full width at half-maximum), resulting in a typical peak fluence of ∼16 µJ µm^{−2}. The stray light from the edge of the KB mirrors was reduced using an aperture made of a 0.5 mm thick tungsten plate, equipped with a 0.3 × 0.3 mm square aperture and installed 200 mm upstream of the interaction region. Xe clusters were prepared by expanding Xe gas adiabatically through a pulsed valve attached to a convergent–divergent nozzle with a diameter of 200 µm and a half angle of 4°. The stagnation pressure and temperature were 21 bar and 300 K, respectively. In the experiments, the timing of valve opening was adjusted so that the after-pulse region of the gas jet where extremely large clusters were generated, which had been observed in a preceding study (Rupp *et al.*, 2014), arrived at the interaction point at the X-ray pulse arrival time.

The shot-by-shot scattering signals were recorded with a multiport charge-coupled device (MPCCD) octal sensor (Kameshima *et al.*, 2014). The detector covered a scattering angle range of 0.10–2.8°, which corresponds to a momentum transfer of *q* = 0.049–1.4 nm^{−1}.

Figs. 1(*a*)–1(*d*) show diffraction patterns of Xe clusters recorded with the octal MPCCD sensor. The central region of the diffraction patterns is missing because of the intense stray light signal from upstream X-ray optics. Most of the obtained diffraction patterns consist of concentric rings corresponding to spherical clusters [Fig. 1(*a*)]. In addition, there were a few patterns suggesting spheroidal clusters and interference patterns associated to two particles being present in the focus, as reported in earlier works (Bostedt *et al.*, 2010; Rupp *et al.*, 2012; Gorkhover *et al.*, 2018).

In the following sections, we focus on the brightest pattern obtained in the present experiment [Fig. 1(*c*)], which is still scarce in photon count compared with most other studies at longer wavelength or with larger structures. The diffraction pattern shows characteristic concentric rings with aperiodic intensity modulation in the circumferential direction of each ring, which indicates that the cluster has some structure on its surface (Bostedt *et al.*, 2012; Rupp *et al.*, 2014). The 1D scattering intensity deduced from circumferential integration of this image was fitted using the scattering intensity of a uniform dense sphere, as shown in Fig. 1(*d*), giving a cluster radius of 129 nm.

As mentioned above, there are several difficulties for reconstructing the structure from a diffraction pattern with iterative PR algorithms. These are especially prominent for this pattern of a small structure in hard X-ray pulses. One of the problems is the large missing region around the center of the detector. In fact, the diffraction pattern loses as much as 99% of the diffracted photons. The total number of detected photons was only ∼73 000. Another issue is the statistical error of the intensity caused by *q* = 0.3 nm^{−1}. The Shannon pixel, defined by Ω_{s} = λ^{2}/(4*w*^{2}) (Huldt *et al.*, 2003; Ho *et al.*, 2016) where λ is the wavelength of the incident photons and *w* = 2*r*_{0} is the diameter of the observed cluster (*r*_{0} is the cluster radius), included ∼170 detector pixels, and the number of photons per Shannon pixel at *q* = 0.3 nm^{−1} was ∼3 . We attempted to apply ER and HIO algorithms to the diffraction pattern shown in Fig. 1(*c*) but no physically reasonable structure could be obtained using these algorithms. In order to overcome the limitations of the established approaches for weakly scattering samples we developed the following method.

### 3. Analysis

#### 3.1. method

In this study, we used the gradient search method (Fienup & Wackerman, 1986) and accounted for the missing region of the detector and the small number of photons, as described in previous work (Ikeda & Kono, 2012), and combined this method with an initial estimate of the structure.

We neglected absorption in light of the thin sample and high photon energies and considered a positive-valued 2D projected electron density . The discrete Fourier transform of the electron density **f** is defined as follows,

where (*u*, *v*) is the 2D index in the Fourier space and *L* × *L* is the dimension of the matrix. The intensity is proportional to the square of the Fourier modulus,

We denote the number of detected photons as . Basically, PR is an optimization problem in which an electron density that best reproduces the experimental data is searched, subject to a certain constraint. Widely used algorithms such as ER and HIO algorithms maximize the Gaussian likelihood (*i.e.* minimize the residual sum of squares),

However, the intensity recorded in CDI measurements largely suffers from Poisson noise because of photon-counting statistics. Hence, we decided to use the Poisson likelihood as the objective function for the optimization, which has also been used to refine the density map obtained from a PR algorithm (Thibault & Guizar-Sicairos, 2012),

We carried out optimization of the Poisson likelihood with a conventional gradient descent method. The gradient of the Poisson likelihood function is expressed as follows (Ikeda & Kono, 2012),

where and represent the element-wise multiplication and division of matrices, respectively. Using the gradient, the electron density is updated in each step of iteration as follows,

where η_{k} is the step size. The determination of the step size is important for rapid convergence of the optimization as well as for successful reconstruction of structures. In computation, we used the line-search function LINE_SEARCH built in the *SciPy* module for Python to search for the step size satisfying the strong Wolfe conditions (Wolfe, 1969) with its parameters *c*_{1} = 0.0001 and *c*_{2} = 0.9 by following Nocedal and Wright (Nocedal & Wright, 1999).

For diffraction data with missing regions, the Poisson likelihood function is modified as follows,

where is a mask that specifies the missing regions of the detector with a value of 1 where data are obtained and a value of 0 where data are missing. In the present analysis, we used a mask corresponding to the missing region around the center and the gaps in the assembled detector. The gradient of the modified Poisson likelihood is expressed as follows,

In general, when one solves a non-convex optimization problem with a gradient search method, the choice of the initial structure crucially affects the result of the optimization. Inappropriate choice of the initial structure leads to stagnation of the optimization at local optima. The present method cannot resolve this stagnation problem, which potentially leads to model-biased results strongly dependent on the initial estimate/model. Therefore, we need to construct a good initial estimate of the structure before starting the iteration, and from this point the present method can only be used for the

of the initial estimate.#### 3.2. Structure reconstruction from simulation data

To evaluate the effectiveness of the structure (*a*)], similar to previous experimental studies (Rupp *et al.*, 2012). Three different incident XFEL fluences and three different levels of the missing region of the detector were respectively assumed. The calculated diffraction patterns are shown in Fig. 3. We started the structure with a uniform dense sphere [Fig. 2(*b*)] and the electron density was updated iteratively according to the equations (8) and (10).

Fig. 4 shows the electron densities reconstructed from the simulated diffraction patterns. To emphasize the changes after the iteration, we subtracted the electron density of the initial structure [*i.e.* the uniform sphere in Fig. 2(*b*)] from the reconstructed electron density (Fig. 5). In most of the reconstruction results, we can see the two small spheres that we assumed in the original structure [Figs. 2(*a*) and 2(*c*)]. However, the reconstructed structure has two additional spheres at its centrosymmetric positions. Furthermore, the 3D density of each small sphere was equal to or less than half of the 3D densities of each corresponding sphere of the actual object.

The appearance of the twinned objects at centrosymmetric positions is a well known artifact observed in structure reconstruction. A similar problem in the HIO algorithm has also been reported (Fienup, 1982) and it is called image This problem stems from the fact that an electron density *f*(*x*, *y*) and its inverted electron density *f*(−*x*, − *y*) give identical diffraction patterns. In the present case, as the initial structure (a uniform dense sphere) has centrosymmetry, the gradient of the likelihood function is also centrosymmetric. As a result, both spheres are reconstructed simultaneously. This problem can be interpreted as a stagnation of the optimization at a saddle-point solution. The present method is unable to avoid the issue, its drawback being that it potentially leads to model-biased results. Therefore, we must note that the present method can be used as a structure method. Future work must focus on developing a better optimization algorithm that can escape from stagnation.

Aside from the problem of image

the method is tolerant to the large missing region of the detector as well as the noise due to the limited number of photons. Using the reconstruction results, we can discuss the qualitative effects on the reconstructed structure caused by the missing region and the limited number of photons. When the missing region of the detector becomes larger, the electron density of the reconstructed structure becomes less accurate. Moreover, the number of diffracted photons limits the spatial resolution of the reconstruction.Iterative PR problems require constraints, without which they are ill posed and unable to recover unique phases. The most common and powerful constraint is the support region of the object. Outside the support region the electron density is constrained to be zero. However, in our method the choice of the support region did not cause significant changes in the reconstructed structure. This was probably because the updated structure was successfully trapped around the initial structure. Therefore, during the

we did not impose an explicit support region in real space.To compare the present method with the existing PR algorithms, we applied the ER algorithm starting from the simulated density map shown in Fig. 2(*b*) (see the Supporting information for details). This combined algorithm successfully reconstructed density maps close to those from the present method. By comparing the density maps reconstructed by the present method and those by the ER algorithm with the initial estimate, we found that the present method is advantageous for the achievement of a better spatial resolution compared with the ER algorithm. If one supposes that the present method is used as a method, these differences in resolution between the two algorithms would not be negligible. We also applied the HIO + ER algorithm starting from a random phase map but could not retrieve any physically meaningful maps.

### 4. Results and discussion

We now turn to the experimental data. Fig. 6 shows the reconstruction result obtained using the experimental data presented in Fig. 1(*c*). We started the structure with a uniform dense sphere [Fig. 6(*a*)]. The diffraction pattern calculated from the reconstructed electron density [Fig. 6(*e*)] reproduced the observed diffraction pattern well, including the characteristic intensity modulation in each ring. The reconstructed electron density indicates a couple of small spheres attached on the surface of the large sphere (indicated by arrows). As discussed above, the twinned structure is probably an artifact of the reconstruction and the object only has one small sphere protruding from the large sphere. This supposition is supported by the fact that the 3D density of the two small spheres is less than half of the 3D density of the large sphere.

Here, we tried to avoid the problem of image (*a*)]. The radius and position of the small sphere were determined from the previous reconstruction result [Fig. 6(*c*)] and its 3D density was assumed to be the same as that of the large cluster. The optimization result is shown in Fig. 7. The optimized value of the Poisson likelihood was −0.131 photons pixel^{−1} and slightly better than that of the previous optimization (−0.138 photons pixel^{−1}), which also emphasizes the superiority of the one-small-sphere structure.

The reconstructed electron density is composed of one large sphere attached to a small sphere. The estimated radii of the large and small spheres are 130 nm and 20 nm, respectively. Although a structure similar to this one has been reported in earlier studies involving X-ray scattering experiments using soft XFELs (Rupp *et al.*, 2012, 2014), we succeeded in determining the size and shape of the nonspherical cluster using hard XFEL pulses.

### 5. Conclusion

We developed a

method for structure reconstruction that combines the optimization algorithm based on the gradient search method with an initial estimate of the electron-density map. The method was applied to an experimental diffraction pattern from a large Xe cluster. Using a good initial estimate of the electron density, we successfully retrieved the 2D electron-density map even from a low-intensity diffraction pattern without its central region. Our method will enable exploration of the structures of biomolecules and small nanoparticles that do not have high scattering power.The structure

method suggests that prior information on the structure considerably expands the possibilities for structure reconstruction. In fact, we can use many types of prior information to construct the initial structure. In this research, the initial structure was estimated from the diffraction pattern itself. This approach will work when the object closely resembles simple structures such as spheroids or polyhedrons. If physical/chemical constraints can be imposed on the structure, the method could be a powerful tool for The present method would be most effective when one is interested in studying small changes occurring in known structures. In this view, the present method is potentially applicable in the study of possible small dynamical structural changes in biomolecules induced by femtosecond optical lasers.### Supporting information

The results of applying the error reduction algorithm with an initial guess to the simulated diffraction patterns. DOI: https://doi.org//10.1107/S2052252519014222/cw5023sup1.pdf

### Footnotes

‡These authors contributed equally.

### Acknowledgements

We are grateful to the late Makoto Yao for his invaluable contributions to the present work.

### Funding information

The XFEL experiments were performed at beamline 3 of the SPring-8 Angstrom Compact Free-Electron Laser (SACLA) with the approval of the Japan Synchrotron Radiation Research Institute (JASRI) and the program review committee (2014A8038). This study was supported by the X-ray Free-Electron Laser Utilization Research Project and the X-ray Free-Electron Laser Priority Strategy Program of the Ministry of Education, Culture, Sports, Science and Technology of Japan (MEXT), by the Japan Society for the Promotion of Science (JSPS), by the Proposal Program of SACLA Experimental Instruments of RIKEN, by the IMRAM project, and by the Cooperative Research Program, the Research Program for Next Generation Young Scientists of `Network Joint Research Center for Materials and Devices: Dynamic Alliance for Open Innovation Bridging Human, Environment and Materials' and the National Nature Science Foundation of China (Grant No. 11604003). CB and KRF acknowledge support from the U.S. Department of Energy, Office of Basic Energy Sciences, Division of Chemical Sciences, Geosciences and Biosciences through SLAC National Accelerator Laboratory and Argonne National Laboratory.

### References

Barke, I., Hartmann, H., Rupp, D., Flückiger, L., Sauppe, M., Adolph, M., Schorb, S., Bostedt, C., Treusch, R., Peltz, C., Bartling, S., Fennel, T., Meiwes-Broer, K. H. & Möller, T. (2015). *Nat. Commun.* **6**, 6187. Web of Science CrossRef PubMed Google Scholar

Bogan, M. J., Benner, W. H., Boutet, S., Rohner, U., Frank, M., Barty, A., Seibert, M. M., Maia, F., Marchesini, S., Bajt, S., Woods, B., Riot, V., Hau-Riege, S. P., Svenda, M., Marklund, E., Spiller, E., Hajdu, J. & Chapman, H. N. (2008). *Nano Lett.* **8**, 310–316. Web of Science CrossRef PubMed CAS Google Scholar

Bostedt, C., Adolph, M., Eremina, E., Hoener, M., Rupp, D., Schorb, S., Thomas, H., de Castro, A. R. B. & Möller, T. (2010). *J. Phys. B At. Mol. Opt. Phys.* **43**, 194011. Web of Science CrossRef Google Scholar

Bostedt, C., Eremina, E., Rupp, D., Adolph, M., Thomas, H., Hoener, M., de Castro, A. R. B., Tiggesbäumker, J., Meiwes-Broer, K. H., Laarmann, T., Wabnitz, H., Plönjes, E., Treusch, R., Schneider, J. R. & Möller, T. (2012). *Phys. Rev. Lett.* **108**, 093401. Web of Science CrossRef PubMed Google Scholar

Bostedt, C., Thomas, H., Hoener, M., Eremina, E., Fennel, T., Meiwes-Broer, K. H., Wabnitz, H., Kuhlmann, M., Plönjes, E., Tiedtke, K., Treusch, R., Feldhaus, J., de Castro, A. R. B. & Möller, T. (2008). *Phys. Rev. Lett.* **100**, 133401. Web of Science CrossRef PubMed Google Scholar

Chapman, H. N., Barty, A., Bogan, M. J., Boutet, S., Frank, M., Hau-Riege, S. P., Marchesini, S., Woods, B. W., Bajt, S., Benner, W. H., London, R. A., Plönjes, E., Kuhlmann, M., Treusch, R., Düsterer, S., Tschentscher, T., Schneider, J. R., Spiller, E., Möller, T., Bostedt, C., Hoener, M., Shapiro, D. A., Hodgson, K. O., van der Spoel, D., Burmeister, F., Bergh, M., Caleman, C., Huldt, G., Seibert, M. M., Maia, F. R., Lee, R. W., Szöke, A., Timneanu, N. & Hajdu, J. (2006). *Nat. Phys.* **2**, 839–843. Web of Science CrossRef CAS Google Scholar

Chapman, H. N., Fromme, P., Barty, A., White, T. A., Kirian, R. A., Aquila, A., Hunter, M. S., Schulz, J., DePonte, D. P., Weierstall, U., Doak, R. B., Maia, F. R., Martin, A. V., Schlichting, I., Lomb, L., Coppola, N., Shoeman, R. L., Epp, S. W., Hartmann, R., Rolles, D., Rudenko, A., Foucar, L., Kimmel, N., Weidenspointner, G., Holl, P., Liang, M., Barthelmess, M., Caleman, C., Boutet, S., Bogan, M. J., Krzywinski, J., Bostedt, C., Bajt, S., Gumprecht, L., Rudek, B., Erk, B., Schmidt, C., Hömke, A., Reich, C., Pietschner, D., Strüder, L., Hauser, G., Gorke, H., Ullrich, J., Herrmann, S., Schaller, G., Schopper, F., Soltau, H., Kühnel, K. U., Messerschmidt, M., Bozek, J. D., Hau-Riege, S. P., Frank, M., Hampton, C. Y., Sierra, R. G., Starodub, D., Williams, G. J., Hajdu, J., Timneanu, N., Seibert, M. M., Andreasson, J., Rocker, A., Jönsson, O., Svenda, M., Stern, S., Nass, K., Andritschke, R., Schröter, C. D., Krasniqi, F., Bott, M., Schmidt, K. E., Wang, X., Grotjohann, I., Holton, J. M., Barends, T. R., Neutze, R., Marchesini, S., Fromme, R., Schorb, S., Rupp, D., Adolph, M., Gorkhover, T., Andersson, I., Hirsemann, H., Potdevin, G., Graafsma, H., Nilsson, B. & Spence, J. C. (2011). *Nature*, **470**, 73–77. Web of Science CrossRef CAS PubMed Google Scholar

Ditmire, T., Donnelly, T., Rubenchik, A. M., Falcone, R. W. & Perry, M. D. (1996). *Phys. Rev. A*, **53**, 3379–3402. CrossRef CAS PubMed Web of Science Google Scholar

Ditmire, T., Tisch, J. W., Springate, E., Mason, M. B., Hay, N., Smith, R. A., Marangos, J. & Hutchinson, M. H. (1997). *Nature*, **386**, 54–56. CrossRef CAS Web of Science Google Scholar

Ferguson, K. R., Bucher, M., Gorkhover, T., Boutet, S., Fukuzawa, H., Koglin, J. E., Kumagai, Y., Lutman, A., Marinelli, A., Messerschmidt, M., Nagaya, K., Turner, J., Ueda, K., Williams, G. J., Bucksbaum, P. H. & Bostedt, C. (2016). *Sci. Adv.* **2**, e1500837. Web of Science CrossRef PubMed Google Scholar

Fienup, J. R. (1982). *Appl. Opt.* **21**, 2758–2769. CrossRef CAS PubMed Web of Science Google Scholar

Fienup, J. R. & Wackerman, C. C. (1986). *J. Opt. Soc. Am. A*, **3**, 1897–1907. CrossRef Web of Science Google Scholar

Fukuzawa, H., Nagaya, K. & Ueda, K. (2018). *Nucl. Instrum. Methods Phys. Res. A*, **907**, 116–131. Web of Science CrossRef CAS Google Scholar

Gomez, L. F., Ferguson, K. R., Cryan, J. P., Bacellar, C., Tanyag, R. M. P., Jones, C., Schorb, S., Anielski, D., Belkacem, A., Bernando, C., Boll, R., Bozek, J., Carron, S., Chen, G., Delmas, T., Englert, L., Epp, S. W., Erk, B., Foucar, L., Hartmann, R., Hexemer, A., Huth, M., Kwok, J., Leone, S. R., Ma, J. H. S., Maia, F. R. N. C., Malmerberg, E., Marchesini, S., Neumark, D. M., Poon, B., Prell, J., Rolles, D., Rudek, B., Rudenko, A., Seifrid, M., Siefermann, K. R., Sturm, F. P., Swiggers, M., Ullrich, J., Weise, F., Zwart, P., Bostedt, C., Gessner, O. & Vilesov, A. F. (2014). *Science*, **345**, 906–909. Web of Science CrossRef CAS PubMed Google Scholar

Gorkhover, T., Adolph, M., Rupp, D., Schorb, S., Epp, S., Erk, B., Foucar, L., Hartmann, R., Kimmel, N., Kühnel, K. U., Rolles, D., Rudek, B., Rudenko, A., Andritschke, R., Aquila, A., Bozek, J. D., Coppola, N., Erke, T., Filsinger, F., Gorke, H., Graafsma, H., Gumprecht, L., Hauser, G., Herrmann, S., Hirsemann, H., Hömke, A., Holl, P., Kaiser, C., Krasniqi, F., Meyer, J. H., Matysek, M., Messerschmidt, M., Miessner, D., Nilsson, B., Pietschner, D., Potdevin, G., Reich, C., Schaller, G., Schmidt, C., Schopper, F., Schröter, C. D., Schulz, J., Soltau, H., Weidenspointner, G., Schlichting, I., Strüder, L., Ullrich, J., Möller, T. & Bostedt, C. (2012). *Phys. Rev. Lett.* **108**, 245005. Web of Science CrossRef PubMed Google Scholar

Gorkhover, T., Schorb, S., Coffee, R., Adolph, M., Foucar, L., Rupp, D., Aquila, A., Bozek, J. D., Epp, S. W., Erk, B., Gumprecht, L., Holmegaard, L., Hartmann, A., Hartmann, R., Hauser, G., Holl, P., Hömke, A., Johnsson, P., Kimmel, N., Kühnel, K. U., Messerschmidt, M., Reich, C., Rouzée, A., Rudek, B., Schmidt, C., Schulz, J., Soltau, H., Stern, S., Weidenspointner, G., White, B., Küpper, J., Strüder, L., Schlichting, I., Ullrich, U., Rolles, D., Rudenko, A., Möller, T. & Bostedt, C. (2016). *Nat. Photonics*, **10**, 93–97. Web of Science CrossRef CAS Google Scholar

Gorkhover, T., Ulmer, A., Ferguson, K., Bucher, M., Maia, F. R., Bielecki, J., Ekeberg, T., Hantke, M. F., Daurer, B. J., Nettelblad, C., Andreasson, J., Barty, A., Bruza, P., Carron, S., Hasse, D., Krzywinski, J., Larsson, D. S., Morgan, A., Mühlig, K., Müller, M., Okamoto, K., Pietrini, A., Rupp, D., Sauppe, M., Schot, G. van der, Seibert, M., Sellberg, J. A., Svenda, M., Swiggers, M., Timneanu, N., Westphal, D., Williams, G., Zani, A., Chapman, H. N., Faigel, G., Möller, T., Hajdu, J. & Bostedt, C. (2018). *Nat. Photonics*, **12**, 150–153. Web of Science CrossRef CAS Google Scholar

Ho, P. J., Knight, C., Tegze, M., Faigel, G., Bostedt, C. & Young, L. (2016). *Phys. Rev. A*, **94**, 063823. Web of Science CrossRef Google Scholar

Huldt, G., Szőke, A. & Hajdu, J. (2003). *J. Struct. Biol.* **144**, 219–227. Web of Science CrossRef PubMed CAS Google Scholar

Ikeda, S. & Kono, H. (2012). *Opt. Express*, **20**, 3375–3387. Web of Science CrossRef CAS PubMed Google Scholar

Ishikawa, T., Aoyagi, H., Asaka, T., Asano, Y., Azumi, N., Bizen, T., Ego, H., Fukami, K., Fukui, T., Furukawa, Y., Goto, S., Hanaki, H., Hara, T., Hasegawa, T., Hatsui, T., Higashiya, A., Hirono, T., Hosoda, N., Ishii, M., Inagaki, T., Inubushi, Y., Itoga, T., Joti, Y., Kago, M., Kameshima, T., Kimura, H., Kirihara, Y., Kiyomichi, A., Kobayashi, T., Kondo, C., Kudo, T., Maesaka, H., Maréchal, X. M., Masuda, T., Matsubara, S., Matsumoto, T., Matsushita, T., Matsui, S., Nagasono, M., Nariyama, N., Ohashi, H., Ohata, T., Ohshima, T., Ono, S., Otake, Y., Saji, C., Sakurai, T., Sato, T., Sawada, K., Seike, T., Shirasawa, K., Sugimoto, T., Suzuki, S., Takahashi, S., Takebe, H., Takeshita, K., Tamasaku, K., Tanaka, H., Tanaka, R., Tanaka, T., Togashi, T., Togawa, K., Tokuhisa, A., Tomizawa, H., Tono, K., Wu, S., Yabashi, M., Yamaga, M., Yamashita, A., Yanagida, K., Zhang, C., Shintake, T., Kitamura, H. & Kumagai, N. (2012). *Nat. Photonics*, **6**, 540–544. Web of Science CrossRef CAS Google Scholar

Kameshima, T., Ono, S., Kudo, T., Ozaki, K., Kirihara, Y., Kobayashi, K., Inubushi, Y., Yabashi, M., Horigome, T., Holland, A., Holland, K., Burt, D., Murao, H. & Hatsui, T. (2014). *Rev. Sci. Instrum.* **85**, 033110. Web of Science CrossRef PubMed Google Scholar

Kimura, T., Joti, Y., Shibuya, A., Song, C., Kim, S., Tono, K., Yabashi, M., Tamakoshi, M., Moriya, T., Oshima, T., Ishikawa, T., Bessho, Y. & Nishino, Y. (2014). *Nat. Commun.* **5**, 3052. Web of Science CrossRef PubMed Google Scholar

Kobayashi, A., Sekiguchi, Y., Takayama, Y., Oroguchi, T. & Nakasako, M. (2014). *Opt. Express*, **22**, 27892–27909. Web of Science CrossRef PubMed Google Scholar

Langbehn, B., Sander, K., Ovcharenko, Y., Peltz, C., Clark, A., Coreno, M., Cucini, R., Drabbels, M., Finetti, P., Di Fraia, M., Giannessi, L., Grazioli, C., Iablonskyi, D., LaForge, A. C., Nishiyama, T., Oliver Álvarez de Lara, V., Piseri, P., Plekan, O., Ueda, K., Zimmermann, J., Prince, K. C., Stienkemeier, F., Callegari, C., Fennel, T., Rupp, D. & Möller, T. (2018). *Phys. Rev. Lett.* **121**, 255301. Web of Science CrossRef PubMed Google Scholar

Li, X., Spence, J. C. H., Hogue, B. G. & Liu, H. (2017). *IUCrJ*, **4**, 741–750. Web of Science CrossRef CAS PubMed IUCr Journals Google Scholar

Luke, D. R. (2005). *Inverse Probl.* **21**, 37–50. Web of Science CrossRef Google Scholar

Martin, A., Loh, N., Hampton, C., Sierra, R., Wang, F., Aquila, A., Bajt, S., Barthelmess, M., Bostedt, C., Bozek, J., Coppola, N., Epp, S., Erk, B., Fleckenstein, H., Foucar, L., Frank, M., Graafsma, H., Gumprecht, L., Hartmann, A., Hartmann, R., Hauser, G., Hirsemann, H., Holl, P., Kassemeyer, S., Kimmel, N., Liang, M., Lomb, L., Maia, F., Marchesini, S., Nass, K., Pedersoli, E., Reich, C., Rolles, D., Rudek, B., Rudenko, A., Schulz, J., Shoeman, R., Soltau, H., Starodub, D., Steinbrener, J., Stellato, F., Strüder, L., Ullrich, J., Weidenspointner, G., White, T., Wunderer, C., Barty, A., Schlichting, I., Bogan, M. & Chapman, H. (2012*a*). *Opt. Express*, **20**, 13501–13512. Web of Science CrossRef CAS PubMed Google Scholar

Martin, A. V., Wang, F., Loh, N. D., Ekeberg, T., Maia, F. R. N. C., Hantke, M., van der Schot, G., Hampton, C. Y., Sierra, R. G., Aquila, A., Bajt, S., Barthelmess, M., Bostedt, C., Bozek, J. D., Coppola, N., Epp, S. W., Erk, B., Fleckenstein, H., Foucar, L., Frank, M., Graafsma, H., Gumprecht, L., Hartmann, A., Hartmann, R., Hauser, G., Hirsemann, H., Holl, P., Kassemeyer, S., Kimmel, N., Liang, M., Lomb, L., Marchesini, S., Nass, K., Pedersoli, E., Reich, C., Rolles, D., Rudek, B., Rudenko, A., Schulz, J., Shoeman, R. L., Soltau, H., Starodub, D., Steinbrener, J., Stellato, F., Strüder, L., Ullrich, J., Weidenspointner, G., White, T. A., Wunderer, C. B., Barty, A., Schlichting, I., Bogan, M. J. & Chapman, H. N. (2012*b*). *Opt. Express*, **20**, 16650–16661. Web of Science CrossRef Google Scholar

Miao, J., Charalambous, P., Kirz, J. & Sayre, D. (1999). *Nature*, **400**, 342–344. Web of Science CrossRef CAS Google Scholar

Miao, J., Ishikawa, T., Robinson, I. K. & Murnane, M. M. (2015). *Science*, **348**, 530–535. Web of Science CrossRef CAS PubMed Google Scholar

Neutze, R., Wouts, R., van der Spoel, D., Weckert, E. & Hajdu, J. (2000). *Nature*, **406**, 752–757. Web of Science CrossRef PubMed CAS Google Scholar

Nocedal, J. & Wright, S. J. (1999). *Numerical Optimization.* New York: Springer-Verlag. Google Scholar

Rupp, D., Adolph, M., Flückiger, L., Gorkhover, T., Müller, J. P., Müller, M., Sauppe, M., Wolter, D., Schorb, S., Treusch, R., Bostedt, C. & Möller, T. (2014). *J. Chem. Phys.* **141**, 044306. Web of Science CrossRef PubMed Google Scholar

Rupp, D., Adolph, M., Gorkhover, T., Schorb, S., Wolter, D., Hartmann, R., Kimmel, N., Reich, C., Feigl, T., de Castro, A. R. B., Treusch, R., Strüder, L., Möller, T. & Bostedt, C. (2012). *New J. Phys.* **14**, 055016. Web of Science CrossRef Google Scholar

Schot, G. van der, Svenda, M., Maia, F. R., Hantke, M., Deponte, D. P., Seibert, M. M., Aquila, A., Schulz, J., Kirian, R., Liang, M., Stellato, F., Iwan, B., Andreasson, J., Timneanu, N., Westphal, D., Almeida, F. N., Odic, D., Hasse, D., Carlsson, G. H., Larsson, D. S., Barty, A., Martin, A. V., Schorb, S., Bostedt, C., Bozek, J. D., Rolles, D., Rudenko, A., Epp, S., Foucar, L., Rudek, B., Hartmann, R., Kimmel, N., Holl, P., Englert, L., Duane Loh, N. T., Chapman, H. N., Andersson, I., Hajdu, J. & Ekeberg, T. (2015). *Nat. Commun.* **6**, 5704. Web of Science PubMed Google Scholar

Seibert, M. M., Ekeberg, T., Maia, F. R., Svenda, M., Andreasson, J., Jönsson, O., Odić, D., Iwan, B., Rocker, A., Westphal, D., Hantke, M., DePonte, D. P., Barty, A., Schulz, J., Gumprecht, L., Coppola, N., Aquila, A., Liang, M., White, T. A., Martin, A., Caleman, C., Stern, S., Abergel, C., Seltzer, V., Claverie, J. M., Bostedt, C., Bozek, J. D., Boutet, S., Miahnahri, A. A., Messerschmidt, M., Krzywinski, J., Williams, G., Hodgson, K. O., Bogan, M. J., Hampton, C. Y., Sierra, R. G., Starodub, D., Andersson, I., Bajt, S., Barthelmess, M., Spence, J. C., Fromme, P., Weierstall, U., Kirian, R., Hunter, M., Doak, R. B., Marchesini, S., Hau-Riege, S. P., Frank, M., Shoeman, R. L., Lomb, L., Epp, S. W., Hartmann, R., Rolles, D., Rudenko, A., Schmidt, C., Foucar, L., Kimmel, N., Holl, P., Rudek, B., Erk, B., Hömke, A., Reich, C., Pietschner, D., Weidenspointner, G., Strüder, L., Hauser, G., Gorke, H., Ullrich, J., Schlichting, I., Herrmann, S., Schaller, G., Schopper, F., Soltau, H., Kühnel, K. U., Andritschke, R., Schröter, C. D., Krasniqi, F., Bott, M., Schorb, S., Rupp, D., Adolph, M., Gorkhover, T., Hirsemann, H., Potdevin, G., Graafsma, H., Nilsson, B., Chapman, H. N. & Hajdu, J. (2011). *Nature*, **470**, 78–81. Web of Science CrossRef CAS PubMed Google Scholar

Takahashi, Y., Suzuki, A., Zettsu, N., Oroguchi, T., Takayama, Y., Sekiguchi, Y., Kobayashi, A., Yamamoto, M. & Nakasako, M. (2013). *Nano Lett.* **13**, 6028–6032. Web of Science CrossRef CAS PubMed Google Scholar

Tanyag, R. M. P., Bernando, C., Jones, C. F., Bacellar, C., Ferguson, K. R., Anielski, D., Boll, R., Carron, S., Cryan, J. P., Englert, L., Epp, S. W., Erk, B., Foucar, L., Gomez, L. F., Hartmann, R., Neumark, D. M., Rolles, D., Rudek, B., Rudenko, A., Siefermann, K. R., Ullrich, J., Weise, F., Bostedt, C., Gessner, O. & Vilesov, A. F. (2015). *Struct. Dyn.* **2**, 051102. Web of Science CrossRef PubMed Google Scholar

Thibault, P., Elser, V., Jacobsen, C., Shapiro, D. & Sayre, D. (2006). *Acta Cryst.* A**62**, 248–261. Web of Science CrossRef CAS IUCr Journals Google Scholar

Thibault, P. & Guizar-Sicairos, M. (2012). *New J. Phys.* **14**, 063004. Web of Science CrossRef Google Scholar

Tono, K., Togashi, T., Inubushi, Y., Sato, T., Katayama, T., Ogawa, K., Ohashi, H., Kimura, H., Takahashi, S., Takeshita, K., Tomizawa, H., Goto, S., Ishikawa, T. & Yabashi, M. (2013). *New J. Phys.* **15**, 083035. Web of Science CrossRef Google Scholar

Wabnitz, H., Bittner, L., de Castro, A. R. B., Döhrmann, R., Gürtler, P., Laarmann, T., Laasch, W., Schulz, J., Swiderski, A., von Haeften, K., Möller, T., Faatz, B., Fateev, A., Feldhaus, J., Gerth, C., Hahn, U., Saldin, E., Schneidmiller, E., Sytchev, K., Tiedtke, K., Treusch, R. & Yurkov, M. (2002). *Nature*, **420**, 482–485. Web of Science CrossRef PubMed CAS Google Scholar

Wolfe, P. (1969). *SIAM Rev.* **11**, 226–235. CrossRef Web of Science Google Scholar

Xu, R., Jiang, H., Song, C., Rodriguez, J. A., Huang, Z., Chen, C. C., Nam, D., Park, J., Gallagher-Jones, M., Kim, S., Kim, S., Suzuki, A., Takayama, Y., Oroguchi, T., Takahashi, Y., Fan, J., Zou, Y., Hatsui, T., Inubushi, Y., Kameshima, T., Yonekura, K., Tono, K., Togashi, T., Sato, T., Yamamoto, M., Nakasako, M., Yabashi, M., Ishikawa, T. & Miao, J. (2014). *Nat. Commun.* **5**, 4061. Web of Science CrossRef PubMed Google Scholar

This is an open-access article distributed under the terms of the Creative Commons Attribution (CC-BY) Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original authors and source are cited.