## Abstract

We demonstrate a modal approach to simultaneous recovery of a sample transmission function and coherence properties of an illuminating X-ray beam that works from a single measurement. The approach based on coherence diffractive imaging, does not depend on a particular model for the coherence function. This single shot imaging method separates the effects of partial coherence in the illuminating beam from the sample, allowing the recovery of high quality sample information.

© 2017 Optical Society of America

## 1. Introduction

Coherent diffractive imaging (CDI) is a powerful method that can be used to recover the transmission function of aperiodic objects at high spatial resolution [1]. Original applications of CDI operated under an assumption of coherent illumination [1–3]. For many experiments the X-ray wavefield from a third- [4], or even fourth- [5–8] generation light source is better approximated using a partially coherent description. Methods have been developed to take spatial partial coherence into account based on an independent characterisation of the wavefield [9,10]. This has also been applied to temporal coherence, where information about the beam spectrum is applied [11]. Simultaneous recovery of the sample transmission function and the coherence length of the illuminating beam under an assumption that the wavefield was well described by a Gaussian-Schell model [12] has been demonstrated [13]. Such a recovery has also been demonstrated using multiple overlapping measurements of the sample using ptychography [14]. In this work we demonstrate that it is possible to recover reliable information about the coherence of the illuminating beam and the sample transmission function in a single shot measurement without the need to assume a particular model for the illuminating beam. Such an approach may be useful in experiments where multiple measurements or prior characterisation of the beam are difficult to make or where the beam is not well described by a particular model.

## 2. Method

We describe the mutual optical intensity (MOI) of the beam using a set of orthogonal modes, where the relative strength of the modes and free parameters describing each mode can be fitted as part of the reconstruction process. We also assume, for the purpose of this demonstration, that the MOI is separable into orthogonal components so that, under an assumption of vertical (*y*) coherence, only modes in the horizontal (*x*) direction need to be considered. Here we use the Hermite-Gaussian functions given in the plane of the sample as

*z*is the distance from the source to the sample plane and

*j*is the order of the mode. In the Gaussian-Schell model [5] these parameters are related to the coherence length and beam size.

We assume the exit wavefield from the sample for each coherent mode is described in the projection approximation so that

where $T$is the transmission function of the sample and ${\Phi}_{0}$ is the illuminating mode and where we have dropped the explicit functional dependence on*x*and

*z*for simplicity. The estimate for the intensity at the detector plane is then given by

The iterative process follows the standard approach [3,15,16] where successive iterations for the exit wavefield for each mode can be obtained from

where the support constraint is defined by*μ*, are updated by performing a Levenberg-Marquardt minimization [20] of

_{j}*m*variables represented by the free parameters. In practice we found that an oversampling ratio of 4 was sufficient to produce reliable results. Estimates for the intensity are produced from initial starting guesses for the free parameters for the modes and $T$, followed by repeated application of Eq. (4) and the use of Eq. (2). The iterative process is stopped when the difference between successive values of ${\chi}^{2}$falls below some predefined limit indicating no further significant change to the estimated wavefield. To deal with the fact that the convergence of the wavefield and the free parameters associated with the modes may be at different rates we impose an additional condition that successive values of the free parameters also differ by less than a predefined threshold.

When the process has converged the transmission function of the sample is obtained via Eq. (2). In order to maintain independence from any particular choice of modal function, we estimate the coherence by using the recovered modes to simulate the diffraction patterns from Young's double slits (YDS) and using a standard fitting approach [4] to calculate the coherence length.

## 3. Simulation

We tested our method using the arbitrary binary object, shown in Fig. 1(a). The maximum dimension of the object is approximately 21 μm. In the forward simulation the modes obeyed a Gaussian-Schell model (GSM) distribution [5] with a beam size and coherence length of 243 and 17.1 μm in the horizontal direction. The relationship between the beam size, the coherence length and the free parameters,${A}_{1}$,${A}_{2}$,$R$,$\phi $, and$\mu $given in section 2, is well described in [5]. For these large values of the beam size, the coherence and sample results are relatively insensitive to a wide range of values for the beam size. That is in this geometry we do not recover beam size, accordingly, we discuss the results in terms of coherence length only here. The number of modes was set by the definition that the occupancy of the largest order is 1% of the principal occupancy [5]. This gave a value of $m=66$modes. The distance from the sample to the detector was 0.9 m. The diffraction pattern was generated using Eqs. (2) and (3) and is shown in Fig. 1(b).

For the reconstruction a random value between 0 and 1 was initially generated for the magnitude and phase in each pixel of the transmission function. We first performed the reconstructions for different numbers of modes using the GSM for the modal distribution, which meant that the relative modal occupancies were fixed and the relationship between${A}_{1}$, ${A}_{2}$, $\phi $, and $R$in Eq. (1) is such that there were effectively only two free parameters – the beam size and the coherence length, which can then be recovered directly. A starting guess of 430 μm and 14.8 μm for the free parameters of beam size and coherence length respectively was used. We also used the method described in section 2 above for the modal distribution, which we here call the floating mode method (FMM), with a starting guess for each free parameter also corresponding to a beam size and coherence length of 430 μm and 14.8 μm, respectively.

We used 5 iterations of ER followed by 10 of HIO, following each of which shrinkwrap was used to further refine the region of support [22]. The predefined thresholds for convergence were 1% for the free parameters and for${\chi}^{2}$.

Figure 1 shows the sample, the diffraction pattern, the GSM recovered sample magnitude for 10 modes and 66 modes, the FMM recovered sample magnitude for 3 modes and 10 modes and lineouts showing the deviation of each recovery from the original. Qualitatively it can be seen that the FMM recovers the features of the sample even when only 3 modes are used. By comparing the horizontal profiles of the reconstructed magnitudes, as shown in Fig. 1(g), improvements can be seen when more modes are used. For the FMM with 10 modes the reconstructed object magnitudes is within 10% of the original at almost all points, while the GSM with 66 modes fully recovers the input as expected in this zero noise simulation. In an experimental situation a 10% accurate recovery is reasonable, as we show in the next section. Accordingly, we have not increased the number of FMM modes tested here.

The recovered occupancies for different numbers of modes are plotted in Fig. 2(a) and compared with the GSM eigenvalues. Figure 2(a) indicates that, when using a small number of modes, the MOI is different from the expected GSM model. However, when increasing the number of modes used in the reconstruction, it can be seen that the MOI approaches the Gaussian distribution.

In simulation the fidelity,

The recovered coherence lengths obtained using the FMM and the GSM are shown in Fig. 2(c). They demonstrate that, within 3%, the FMM recovered coherence lengths are in agreement with the input value.

The FMM reconstructs the sample properties and the coherence length to a reasonable level with as few as 3 modes and is accurate (generally better than 10%) when 10 modes are used. This is a higher number of modes than has been used in some other works [10] and suggests that there is a convergence test that could be applied on the number of modes used in a recovery. We leave an elucidation of such an approach for further work. We see that the FMM reliably recovers the coherence length and the sample properties simultaneously. In an experiment it may therefore be possible to assume, if the beam coherence properties are known and well recovered, that the (unknown) sample properties are also well recovered.

## 4. Experiment

In a synchrotron experiment there are circumstances when the beam may be expected to be well approximated by the GSM [12]. However, optical elements, such as mirrors or apertures may cause the beam to deviate from the GSM [23]. Accordingly, we undertook an experiment at the soft X-ray imaging endstation at the Australian Synchrotron [24] where an aperture with different widths was introduced. For large widths and for our geometry the beam is expected to behave according to the GSM and for smaller widths some deviation is expected.

Our experiment was organised following the schematic shown in Fig. 3. The photon energy used was 1 keV. The sample was mounted at the sample stage, 9.8 m downstream from the exit slit and 0.9 m upstream from the detector. Placed in the far field of the sample is a charge coupled device (CCD) detector with 2048 × 2048 13.5 μm pixels, which was used to record the diffracted intensity. The horizontal exit slit width was set to value of 50 μm or 600 μm while the vertical exit slit was kept at 16 μm. This vertical slit setting gives us a reasonable approximation to full coherence in the vertical direction [9], which allows us to concentrate on the horizontal coherence results. For the 600 μm exit slit we expect the beam to be reasonably well described by the GSM [12]. For the 50 μm slit setting our simulations show that the beam is expected to be less well described by the GSM.

A series of YDS diffraction measurements with different slit separations was performed to characterise the horizontal coherence of the beam using a standard fitting approach [4] and the criterion that the coherence length is determined at the slit separation where the visibility drops to 0.6. As a result, the coherence length at an energy of 1 keV for the 600 μm and 50 μm exit slit settings is measured to be 13.2 μm and 21.3 μm respectively.

We tested our algorithm using a more arbitrary sample than the YDS sample. In all other respects the experiment was unchanged from the YDS measurement. The sample used was the test pattern shown in Fig. 4(a). The partially coherent diffraction pattern for the 600 μm exit slit setting is shown in Fig. 4(b). We used the same recipe and starting guesses as for the simulation. The reconstructed object magnitude using the FMM with 10 modes is shown in Fig. 4(c) and for the GSM, shown in Fig. 4(d), where 135 modes (determined using the 1% criterion discussed above) were used. It can be seen that the object magnitude is successfully reconstructed compared to the GSM approach.

Similar results are seen when the 50 μm slit experiment is performed.

Figure 5(a) shows the${\chi}^{2}$for the estimated vs measured diffracted intensity for the FMM and the GSM for both the 600 μm and 50 μm exit slit data. It can be seen that, while the FMM gives slightly better values, both the FMM and the GSM performed reasonably well.

Figure 5(b) shows the coherence length for the FMM and the GSM for both the 600 μm and 50 μm exit slit data. It can be seen that for the 600 μm exit slit the FMM gives a result very close (6.1%) to the YDS result. The GSM, as expected, also performs reasonably well with a recovered coherence length within 11.4% of the YDS result. However, for the 50 μm exit slit data the GSM deviates significantly from the YDS result while the FMM result still gives an accurate (within 1.9%) result. We have tested the recovery process for non-binary objects (different phases or thickness) in simulation and were also able to demonstrate good recovery of the object and coherence properties. We leave the experimental demonstration for further work and expect that signal to noise will become increasingly important as a limiting factor in the quality of the reconstruction.

This supports our contention that the FMM is able to produce more accurate results and do so in a less computationally intensive way than an assumption that the beam is well described by the GSM.

## 5. Conclusions

We have demonstrated coherence length results that compare well with YDS measurements can be simultaneously recovered from a partially coherent diffractive imaging experiment. We showed in both simulation and experiment that our floating mode method can reliably reconstruct sample and coherence length information even in circumstances when an assumption that the beam is approximated by the GSM fails.

In our approach we do not need to know the MOI *a priori,* which allows sample properties to be reconstructed even when the beam is unknown or when the beam may change over time as is possible with an X-ray free electron laser [6,8,25].

## Acknowledgments

This work was performed in part at the Melbourne Centre for Nanofabrication (MCN) in the Victorian Node of the Australian National Fabrication Facility (ANFF).

The authors thank Dr. Eugeniu Balaur and Dr. William Rickard for the fabrication of the sample and slits used in this work.

Part of this research was undertaken at the Soft X-ray Imaging (SXRi) branchline, Australian Synchrotron, Victoria, Australia.

This work is also supported by the Multi-modal Australian ScienceS Imaging and Visualisation Environment (MASSIVE).

Part of the code used in this work was reproduced from the NADIA software library (NADIA Software Project http://cxscode.ph.unimelb.edu.au).

## References and links

**1. **J. Miao, P. Charalambous, J. Kirz, and D. Sayre, “Extending the methodology of x-ray crystallography to allow imaging of micrometre-sized non-crystalline spicemens,” Nature **400**(6742), 342–344 (1999). [CrossRef]

**2. **S. Marchesini, H. Chapman, S. Hau-Riege, R. London, A. Szoke, H. He, M. Howells, H. Padmore, R. Rosen, J. Spence, and U. Weierstall, “Coherent x-ray diffractive imaging: applications and limitations,” Opt. Express **11**(19), 2344–2353 (2003). [CrossRef] [PubMed]

**3. **K. A. Nugent, “Coherent methods in X-ray sciences,” Adv. Phys. **59**(1), 1–99 (2010). [CrossRef]

**4. **D. Paterson, B. E. Allman, P. J. McMahon, J. Lin, N. Moldovan, K. A. Nugent, I. McNulty, C. T. Chantler, C. C. Retsch, T. H. K. Irving, and D. C. Mancini, “Spatial coherence measurement of x-ray undulator radiation,” Opt. Commun. **195**(1–4), 79–84 (2001). [CrossRef]

**5. **I. A. Vartanyants and A. Singer, “Coherence properties of hard x-ray synchrotron sources and x-ray free-electron lasers,” New J. Phys. **12**(3), 035004 (2010). [CrossRef]

**6. **A. Singer, I. A. Vartanyants, M. Kuhlmann, S. Duesterer, R. Treusch, and J. Feldhaus, “Transverse-Coherence Properties of the Free-Electron-Laser FLASH at DESY,” Phys. Rev. Lett. **101**(25), 254801 (2008). [CrossRef] [PubMed]

**7. **I. A. Vartanyants, A. Singer, A. P. Mancuso, O. M. Yefanov, A. Sakdinawat, Y. Liu, E. Bang, G. J. Williams, G. Cadenazzi, B. Abbey, H. Sinn, D. Attwood, K. A. Nugent, E. Weckert, T. Wang, D. Zhu, B. Wu, C. Graves, A. Scherz, J. J. Turner, W. F. Schlotter, M. Messerschmidt, J. Lüning, Y. Acremann, P. Heimann, D. C. Mancini, V. Joshi, J. Krzywinski, R. Soufli, M. Fernandez-Perea, S. Hau-Riege, A. G. Peele, Y. Feng, O. Krupin, S. Moeller, and W. Wurth, “Coherence Properties of Individual Femtosecond Pulses of an X-Ray Free-Electron Laser,” Phys. Rev. Lett. **107**(14), 144801 (2011). [CrossRef] [PubMed]

**8. **A. Singer, *Coherence properties of third and fourth generation x-ray sources. Theory and experiment*, PhD Thesis (University of Hamburg, 2012).

**9. **S. Flewett, H. M. Quiney, C. Q. Tran, and K. A. Nugent, “Extracting coherent modes from partially coherent wavefields,” Opt. Lett. **34**(14), 2198–2200 (2009). [CrossRef] [PubMed]

**10. **L. W. Whitehead, G. J. Williams, H. M. Quiney, D. J. Vine, R. A. Dilanian, S. Flewett, K. A. Nugent, A. G. Peele, E. Balaur, and I. McNulty, “Diffractive imaging using partially coherent x rays,” Phys. Rev. Lett. **103**(24), 243902 (2009). [CrossRef] [PubMed]

**11. **B. Abbey, L. W. Whitehead, H. M. Quiney, D. J. Vine, G. A. Cadenazzi, C. A. Henderson, K. A. Nugent, E. Balaur, C. T. Putkunz, A. G. Peele, G. J. Williams, and I. McNulty, “Lensless imaging using broadband X-ray sources,” Nat. Photonics **5**(7), 420–424 (2011). [CrossRef]

**12. **R. Coïsson and S. Marchesini, “Gauss-Schell Sources as Models for Synchrotron Radiation,” J. Synchrotron Radiat. **4**(5), 263–266 (1997). [CrossRef] [PubMed]

**13. **J. N. Clark and A. G. Peele, “Simultaneous sample and partial coherence characterisation using diffractive imaging,” Appl. Phys. Lett. **99**(15), 154103 (2011). [CrossRef]

**14. **P. Thibault and A. Menzel, “Reconstructing state mixtures from diffraction measurements,” Nature **494**(7435), 68–71 (2013). [CrossRef] [PubMed]

**15. **H. M. Quiney, “Coherent diffractive imaging using short wavelength light sources,” J. Mod. Opt. **57**(13), 1109–1149 (2010). [CrossRef]

**16. **H. H. Bauschke, P. L. Combettes, and D. R. Luke, “Phase retrieval, error reduction algorithm, and Fienup variants: a view from convex optimization,” J. Opt. Soc. Am. A **19**(7), 1334–1345 (2002). [CrossRef] [PubMed]

**17. **R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of phase from image and diffraction plane pictures,” Optik (Stuttg.) **35**(2), 237–246 (1971).

**18. **J. R. Fienup, “Reconstruction of an object from the modulus of its Fourier transform,” Opt. Lett. **3**(1), 27–29 (1978). [CrossRef] [PubMed]

**19. **J. R. Fienup, “Phase retrieval algorithms: a comparison,” Appl. Opt. **21**(15), 2758–2769 (1982). [CrossRef] [PubMed]

**20. **W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, *Numerical Recipes in C. The Art of scientific Computing*. Second Edition (Cambridge University Press, 2002).

**21. **J. Miao, D. Sayre, and H. N. Chapman, “Phase retrieval from the magnitude of the Fourier transforms of nonperiodic objects,” J. Opt. Soc. Am. **15**(6), 1662–1669 (1998). [CrossRef]

**22. **S. Marchesini, H. He, H. N. Chapman, S. P. Hau-Riege, A. Noy, M. R. Howells, U. Weierstall, and J. C. H. Spence, “X-ray image reconstruction from a diffraction pattern alone,” Phys. Rev. B **68**(14), 140101 (2003). [CrossRef]

**23. **G. Geloni, E. Saldin, E. Schneidmiller, and M. Yurkov, “Transverse coherence properties of X-ray beams in third-generation synchrotron radiation source,” Nucl. Instrum. Methods Phys. Res. A **588**(3), 463–493 (2008). [CrossRef]

**24. **G. van Riessen, M. Junker, N. W. Phillips, and A. G. Peele, “A soft x-ray beamline for quantitative nanotomography using ptychography,” Proc. SPIE **8851**, 885117 (2013). [CrossRef]

**25. **G. Cadenazzi, *Developments in X-ray diffraction microscopy with applications in biological imaging*, PhD Thesis (University of Melbourne, 2013).