Supplementary Materials for: X-ray coherent diffractive imaging by immersion in nanodroplets Authors: Rico Mayro P. Tanyag, Charles Bernando, Curtis F. Jones, Camila Bacellar, Ken R. Ferguson, Denis Anielski, Rebecca Boll, Sebastian Carron, James P. Cryan, Lars Englert, Sascha W. Epp, Benjamin Erk, Lutz Foucar, Luis F. Gomez, Robert Hartmann, Daniel M. Neumark, Daniel Rolles, Benedikt Rudek, Artem Rudenko, Katrin R. Siefermann, Joachim Ullrich, Fabian Weise, Christoph Bostedt, Oliver Gessner, Andrey F. Vilesov 1 1. Data Preparation The detector array consists of two pnCCD panels, each having 512×1024 pixels1. Before analyzing the matrix of diffraction intensities, the relative positions of the panels with respect to each other must be determined since they are not known a priori with sufficient accuracy. For this purpose, the diffraction patterns of the two panels were shifted relative to each other by integer numbers of pixels in both vertical and horizontal directions, until the center-symmetric Airy pattern in the diffraction of a pure He droplet with about 20 diffraction rings was accurately reproduced. The resulting data retrieved from both panels were truncated to avoid boundary effects and were stored as a centered 981×981 matrix for use in the DCDI calculations. Diffraction from a spherical He droplet with radius, R, is described by2 I q S q,R A R sin q R cosq R , 2 q qR 2 2 (S1) in which q is the change of the wave vector upon scattering and A is an amplitude parameter. To evaluate the accuracy of the relative positions of the detector panels and the shot-to-shot reproducibility of the position of the diffraction center, the intensity distribution in the diffraction images of 60 pure He droplets were fitted with a parameterized variant of eq. (S1) I q x q x , q y q y . Here, q x and q y are shifts of the diffraction center, which were determined independently for the upper and lower panels with an accuracy of about 0.1 pixels. The results show that the relative position of each panel is accurate to within about ± 0.5 pixels and remains constant throughout different experiments. On the other hand, the fits indicate that the diffraction center fluctuated from shot to shot by ±2 pixels in both vertical and horizontal directions. Consequently, this position was adjusted by integer pixel steps to within half a pixel accuracy before applying any reconstruction. In addition, a mask matrix was defined to account for the central semicircular cuts in the detector, the gap region between the detector plates, damaged detector pixels, and the shadow of the front detector at large q . The latter effect is not readily discernible in the diffraction images shown in the main text due to the limited number of detected photons. Read-out noise below a single photon event was also removed before applying the DCDI algorithm. As an example, for a pnCCD detector gain of 1/256, such as in Fig. 2(a1) of the main text, any intensity below 5 Analog-to-Digital pixel units (ADU) was rejected. This noise removal does not affect single photon events which have an average intensity of about 8 ADU for the said 2 detector gain. The intensities (and densities) referred to in this work, which are proportional to the number of detected photons are related to the ADU units of the pnCCD detector, which in turn depend on the applied amplification factor. 2. Determination of the DCDI Parameters In order to determine the radius of the droplet, R , and the scaled droplet density factor, C , (see eq. (1) in the main text) the central parts of diffraction patterns that exhibit clear rings (usually within 150 pixels from the detector center) were fitted to Eq. (S1). Inverse Fourier transform of the droplet scattering amplitude S q, R at 0,0 gives the approximate maximum value of the droplet density, C 0 . However, this value is an overestimate because the diffraction image from a doped droplet contains the sum of intensities originating from the He droplet, the Xe clusters, and the interference terms. Multiple DCDI reconstructions were performed in order to determine a more accurate value of C . In each reconstruction, C 0 was modified with a scaling coefficient, , ranging from 0.60 to 1.00. As an example, we demonstrate the determination of DCDI parameters using the diffraction in Fig. 2(a1) of the main text. Equation (S2) defines the normalized root mean square deviation of the diffraction intensity, NRMSD I I Measured x,y Calculated I x,y Measured 2 x,y 2 , (S2) calculated over available data points, as shown in Fig. S1(a) for different values of with a constant value of 5000. The NRMSD shows a well-defined minimum at 0.84, which was also used to calculate the density in Fig. 2(a2) of the main article. Panels (a)-(c) in Fig. S2 show the densities of Xe clusters obtained at 0.60, 0.84 and 1.0, respectively, and panels (d)-(f) show the phases of the Xe clusters at the corresponding values. While the shapes of the Xe aggregates are similar for the reconstruction at different values, the density at 0.84 exhibits the highest contrast. For 0.60 (panel (a)) a semi-circular structure appears at the boundary of the droplet, which is likely unphysical. Variations of the average phase of the complex Xe densities and the number of Xe atoms in the droplet, N Xe , at different values are shown in panels (c) and (e) of Fig. S1, respectively. The total Xe density is approximately inversely proportional to ; therefore, the absolute precision of determining the number of 3 encapsulated Xe atoms is directly related to the accuracy of determining the value of , which is about 10% for intense images. 4 Figure S1. Variations of NRMSD, modulus of phase of the total Xe density, and NXe using different input densities. The left column shows the results of calculations for various values with =5000. The plots on the right show the results of calculations for various values with 0.84, which corresponds to the lowest NRMSD in panel (a). The hollow points were obtained from a DCDI without a phase constraint, while the filled points are from a DCDI with a phase constraint, -0.50 rad. The square points represent an input density consisting of the He droplet density with randomized additive density. The circular points represent an input density comprised of the He droplet density and a ramp additive. The triangular points represent a bare He droplet density input. See text for details. 5 Figure S2. Densities and phases calculated for fixed δ = 5000 and various values of α. Panels (a)-(c) show the reconstructed densities of the Xe clusters for the corresponding values. The Xe clusters are represented in a linear intensity scale and the outline of the droplet is represented by a black circle enclosing the clusters. The phases (panels (d)-(f)) are given in a linear color scale. 6 The DCDI parameter is kept constant in the DCDI algorithm and determines the threshold above which the density is assigned to Xe rather than the He droplet. The numeric value of is dependent on the shot noise in the interferograms and establishes the smallest dopant density that can be obtained in DCDI. We found that the algorithm is stable for different diffraction images if 5 , where is the shot noise criterion as defined by Martin et al.3. For the discussed diffraction image (Fig. 2(a1) of the main text) 5000 was obtained. Figs. S1(b), (d) and (f) show the variations of NRMSD, average phase of the complex Xe density, and N Xe , respectively, for various values of and a fixed value of 0.84. Panels (a)-(e) in Fig. S3 show densities obtained at 0, 2500, 5000, 7500, and 10000, and panels (f)-(j) show the phases at the corresponding values. There is an inflection point in the -dependent trend of NRMSD (Fig. S1(b)) as it sharply increases from 0 to about 2500 followed by a slower increase for >3000. At 10000 (Fig. S3(e)), weak segments of the filaments in panel (c) disappear; while at 2500 (panel (b)), some weak features, which are believed to be computational artifacts, are scattered throughout the droplet. Finally, at 0 (panel (a)), numerous intense artifacts are very prominent and the contrast of the filaments is markedly decreased. While 2500 may appear to be the best threshold value, since it also signifies the inflection point in the changes in phase (Fig. S1(d)) and N Xe (Fig. S1(f)) at different values, the calculations for all of the processed diffraction images in the main paper were performed with 5000 as this gives the best visual quality of the reconstructed images. However, this choice of can lead to some underestimation of N Xe . For example, Xe amounts of N Xe 1.5 106 and 2.0 106 are derived for values of 5000 and 2500, respectively. Thus, the uncertainty in leads to a corresponding uncertainty in N Xe determined by DCDI. 7 Figure S3. Densities and phases obtained using different threshold values, δ, and a fixed scaling value α = 0.84. Panels (a)-(e) show densities of Xe clusters with indicated values of obtained from DCDI. The phases for the densities in panels (a)-(e) are shown in panels (f)-(j), respectively. The Xe clusters are represented in a linear intensity scale and the outline of the droplet is represented by a black circle enclosing the clusters. The phases are also given in a linear color scale. 8 An important characteristic of the DCDI algorithm is the small number of iterations required for convergence. As shown in the upper panel of Fig S4, the NRMSD converges within less than 20 iterations. The value remains constant within <0.1% after 100 iterations. Compared to traditional CDI algorithms4-7 , which sometimes require thousands of iterations to reach an asymptotic NRMSD value, DCDI only requires tens of iterations to converge. Fig. S4 demonstrates the evolution of the density (panels (a)-(e)) and the phase (panels (f)-(j)) of the embedded Xe clusters versus the number of iterations. As can be seen in panel (a), the Xe cluster filaments are visible following the very first iteration, which is based only on the scattering phase of the droplet itself. However, these density filaments constitute two nearly center-symmetric complex conjugate images as can be seen in Fig. S4(f), wherein the orange and blue colors represent the positive and negative phases, respectively. After about 10 iterations, the algorithm shows a preference towards the positive . This solution is then refined over the next 30 iterations and remains nearly the same up to the 100th iteration. The final density has positive phase as determined by an explicit bias in the DCDI algorithm (as discussed in the main text). Some small negative phase region is evident in the lower right region of Fig 4(j), which accounts for less than 1% of the total Xe density. This is likely a reconstruction error arising from the complex conjugate image of the very intense upper left filament. 9 Figure S4. DCDI convergence and evolution of densities and phases within a 100 iteration run. Panels (a)-(e) show the calculated density modulus in a linear intensity scale. The black circle in panels (a)-(e) represent the outline of the droplet enclosing the clusters. Panels (f)-(j) correspond to complex density phases in the same iteration as the droplets above it. Initially, DCDI finds a center-symmetric cluster configuration, but as the number of iterations increases, the enantiomer having positive imaginary density becomes dominant. 10 Three different density inputs, input , for the DCDI algorithm were tested including: a) 4 the analytical He density with an additional randomized density scaled by 10 relative to the maximum He density (squares in Fig. S1); b) the analytical He density with an additional density 4 determined as a linear ramp having a magnitude of 10 from the maximum He density on opposite sides of the droplet (circles in Fig. S1); and c) the analytical He density alone (triangles in Fig. S1). Each of these inputs was subjected to a DCDI algorithm with a phase constraint of 0.50 rad and without the phase constraint, as depicted in Fig. S1 by filled and open symbols, respectively. Generally, the two variants of DCDI gave very similar results. However, all runs converged upon the introduction of the phase constraint, whereas without it about 10% of the runs become trapped in center-symmetric configurations as signified by spurious points in the plots of NRMSD and phase with respect to and , see panels (a)-(d) in Fig. S1. Thus, we conclude that the DCDI calculations with the phase constraint of 0.50 rad are more reliable than those without it. This phase threshold was chosen to be significantly less than the expected phase of the complex conjugate image, which is 0.39 rad, in order to minimize possible errors in the obtained phase. Introduction of the phase constraint accelerated convergence of the DCDI algorithm and prevented it from getting trapped in local minima with center-symmetric densities. All the initial density inputs used for DCDI with a phase constraint consistently give the same optimized values of and . However, the simplest input is with the He density alone. Consequently, we have chosen this as the initial input in the algorithm, which further averts the need to average the final density. 3. Additional Discussion of the DCDI Results Several additional parameters obtained for diffraction images in Fig. 2 of the main text are included in Table SI. The phases of the filaments in panels (a3) and (b3) in Fig. 2 of the main text (see also Fig. S4(j)) suggest some depth in the image and may arise from the relative displacement of the filaments along the direction of the x-ray beam, z . The scattering amplitude acquires an additional phase, ,z 2 k z 2 , where is the scattering angle and k 2 . The appearance of this phase difference is consistent with a threedimensional hexagonal arrangement of “C-shaped” vortices surrounding a rotational axis that is 11 at some angle with respect to the direction of the x-ray beam. This effect may be used to estimate the displacement of the filaments along the z-axis. Some phase gradient, however, may also be imprinted on the reconstructed object density due to imprecise centering of the diffraction image. The diffraction images in this work each result from the detection of a rather small number of scattered photons ( 5 10 ). In spite of the strong concomitant shot noise in the 5 diffraction, the DCDI algorithm exhibits robust convergence. In contrast, application of traditional ER or HIO algorithms4, 8 with the droplet's outline as a support were unable to resolve the filaments. Instead, they converged to a solution having a large non-physical amplitude variation of the helium droplet density. Furthermore, reconstructions from these algorithms often show sharp discontinuities in regions where experimental intensities were unavailable. The advantage of DCDI is likely related to the presence of a strong reference signal from the droplet making it more resilient to shot noise. In Fig. 2(a2), with 5000, the reconstruction gives a 5 5 maximum He droplet density of 2.2 10 and a modulus of the Xe density of 1.1 10 . Thus, the highest observed density of Xe is 22 times larger than the noise level defined by . So far, the DCDI algorithm implies plane wave scattering, which is justified by the ~5µm focus of the XFEL beam. However, with tighter XFEL foci the x-ray intensity will vary substantially across the object. We found by modeling that DCDI does not exhibit any noticeable deterioration of the reconstructed images even when the x-ray intensity varies by up to 40% across the droplet diameter. 12 Table SI. Parameters obtained for diffraction images in Fig. 2 of the main text. The droplets' radii, R, were obtained by least-square fitting procedure2. The relative depletion of the droplet upon Xe pickup and the number of captured Xe atoms, NXe, pick-up kinetics, were obtained as described at the bottom of the table. The scaling factor, , the total droplet and cluster densities, the number of the embedded Xe atoms, NXe, DCDI, and phase of the total Xe density were all obtained from the DCDI algorithm. Experimental Diffraction from Figure 2 of Main Text (a1) No of detected photons R , nm % depletion, AT * Scaling factor, N He, final * N Xe, pick-up kinetics (±20%) * Total droplet density, He Total cluster density, Xe N Xe, DCDI Average cluster phase NRMSD (b1) (c1) 4.81 10 5 4.36 10 5 3.11 10 5 299 267 257 16 20 19 0.84 0.94 0.80 2.51 10 9 1.80 10 9 1.59 10 9 2.0 10 6 1.7 106 1.5 10 6 1.38 10 9 1.25 10 9 8.07 10 8 1.87 107 7.70 106 i 1.72 107 6.40 106 i 1.66 107 6.08 106 i 1.5 10 6 1.0 106 1.4 106 0.39 0.36 0.35 0.218 0.217 0.342 *Using the measured number of He atoms in the doped droplet, N He, final 94 Rnm3 ,9 as the starting point, the initial number of He atoms, N He,initial , and the number of captured Xe atoms were calculated through reverse pick-up kinetics by considering the cross-section of the droplet, the known number density of Xe in the pickup region, and the velocities of the He droplet and of the Xe atoms at room temperature. “% depletion, AT” is N He,initial N He, final calculated as AT 100 . Here, we use the estimate that the capture of one Xe atom by the N He,initial droplet results in the evaporation of 250 He atoms. The number of captured Xe atoms was obtained as N Xe, pick up kinetics N He, final AT 250 100 AT . Similar calculations are described previously9. 13 References 1. 2. 3. 4. 5. 6. 7. 8. 9. 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. Kuhnel, C. Bauer, C. D. Schroter, R. Moshammer, S. Techert, D. Miessner, M. Porro, O. Halker, 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. Moller, D. Rupp, M. Adolph, H. Graafsma, H. Hirsemann, K. Gartner, R. Richter, L. Foucar, R. L. Shoeman, I. Schlichting and J. Ullrich, Nucl. Instrum. Meth. A 614, 483 (2010). L. F. Gomez, K. R. Ferguson, J. P. Cryan, C. Bacellar, R. M. P. Tanyag, C. Jones, S. Schorb, D. Anielski, A. Belkacem, C. Bernando, R. Boll, J. Bozek, S. Carron, G. Chen, T. Delmas, L. Englert, S. W. Epp, B. Erk, L. Foucar, R. Hartmann, A. Hexemer, M. Huth, J. Kwok, S. R. Leone, J. H. S. Ma, F. R. N. C. Maia, E. Malmerberg, S. Marchesini, D. M. Neumark, B. Poon, J. Prell, D. Rolles, B. Rudek, A. Rudenko, M. Seifrid, K. R. Siefermann, F. P. Sturm, M. Swiggers, J. Ullrich, F. Weise, P. Zwart, C. Bostedt, O. Gessner and A. F. Vilesov, Science 345, 906 (2014). A. V. Martin, F. Wang, N. D. Loh, T. Ekeberg, F. R. N. C. Maia, M. Hantke, G. van der Schot, C. Y. Hampton, R. G. Sierra, A. Aquila, S. Bajt, M. Barthelmess, C. Bostedt, J. D. Bozek, N. Coppola, S. W. Epp, B. Erk, H. Fleckenstein, L. Foucar, M. Frank, H. Graafsma, L. Gumprecht, A. Hartmann, R. Hartmann, G. Hauser, H. Hirsemann, P. Holl, S. Kassemeyer, N. Kimmel, M. Liang, L. Lomb, S. Marchesini, K. Nass, E. Pedersoli, C. Reich, D. Rolles, B. Rudek, A. Rudenko, J. Schulz, R. L. Shoeman, H. Soltau, D. Starodub, J. Steinbrener, F. Stellato, L. Struder, J. Ullrich, G. Weidenspointner, T. A. White, C. B. Wunderer, A. Barty, I. Schlichting, M. J. Bogan and H. N. Chapman, Opt Express 20, 16650 (2012). J. R. Fienup, Appl. Opt. 21, 2758 (1982). M. F. Hantke, D. Hasse, F. R. N. C. Maia, T. Ekeberg, K. John, M. Svenda, N. D. Loh, A. V. Martin, N. Timneanu, D. S. D. Larsson, G. van der Schot, G. H. Carlsson, M. Ingelman, J. Andreasson, D. Westphal, M. N. Liang, F. Stellato, D. P. DePonte, R. Hartmann, N. Kimmel, R. A. Kirian, M. M. Seibert, K. Muhlig, S. Schorb, K. Ferguson, C. Bostedt, S. Carron, J. D. Bozek, D. Rolles, A. Rudenko, S. Epp, H. N. Chapman, A. Barty, J. Hajdu and I. Andersson, Nat Photonics 8, 943 (2014). T. Kimura, Y. Joti, A. Shibuya, C. Y. Song, S. Kim, K. Tono, M. Yabashi, M. Tamakoshi, T. Moriya, T. Oshima, T. Ishikawa, Y. Bessho and Y. Nishino, Nat Commun 5, 3052 (2014). G. van der Schot, M. Svenda, F. R. N. C. Maia, M. Hantke, D. P. DePonte, M. M. Seibert, A. Aquila, J. Schulz, R. Kirian, M. Liang, F. Stellato, B. Iwan, J. Andreasson, N. Timneanu, D. Westphal, N. F. Almeida, D. Odic, D. Hasse, G. H. Carlsson, D. S. D. Larsson, A. Barty, A. V. Martin, S. Schorb, C. Bostedt, J. D. Bozek, D. Rolles, A. Rudenko, S. Epp, L. Foucar, B. Rudek, R. Hartmann, N. Kimmel, P. Holl, L. Englert, N. T. D. Loh, H. N. Chapman, I. Andersson, J. Hajdu and T. Ekeberg, Nat Commun 6, 5704 (2015). J. R. Fienup, Opt. Lett. 3, 27 (1978). L. F. Gomez, E. Loginov, R. Sliter and A. F. Vilesov, J. Chem. Phys. 135, 154201 (2011). 14