Divide and update : towards single-shot object and probe retrieval for near-field holography

We present a phase reconstruction scheme for X-ray near-field holographic imaging based on a separability constraint for probe and object. In order to achieve this, we have devised an algorithm which requires only two measurements – with and without an object in the beam. This scheme is advantageous if the standard flat-field correction fails and a full ptychographic dataset can not be acquired, since either object or probe are dynamic. The scheme is validated by numerical simulations and by a proof-of-concept experiment using highly focused undulator radiation of the beamline ID16a of the European Synchrotron Radiation Facility (ESRF). c © 2017 Optical Society of America OCIS codes: (340.7440) X-ray imaging; (100.5070) Phase retrieval; (180.7460) X-ray microscopy. References and links 1. D. Gabor, “Theory of communication,” J. Instn. Elect. Engrs. 93, 429–457 (1946). 2. A. Snigirev, I. Snigireva, V. Kohn, S. Kuznetsov, and I. Schelokov, “On the possibilities of x-ray phase contrast microimaging by coherent high-energy synchrotron radiation,” Rev. Sci. Instrum. 66, 5486–5492 (1995). 3. A. Rack, M. Scheel, L. Hardy, C. Curfs, A. Bonnin, and H. Reichert, “Exploiting coherence for real-time studies by single-bunch imaging,” J. Synchrotron Rad. 21, 815–818 (2014). 4. A. Schropp, R. Hoppe, V. Meier, J. Patommel, F. Seiboth, Y. Ping, D. G. Hicks, M. A. Beckwith, G. W. Collins, A. Higginbotham, J. S. Wark, H. J. Lee, B. Nagler, E. C. Galtier, B. Arnold, U. Zastrau, J. B. Hastings, and C. G. Schroer, “Imaging shock waves in diamond with both high temporal and spatial resolution at an xfel,” Sci. Rep. 5, 11089 (2015). 5. P. Kirkpatrick and A. V. Baez, “Formation of Optical Images by X-Rays,” J. Opt. Soc. Am. 38, 766–773 (1948). 6. J. Hagemann, A.-L. Robisch, M. Osterhoff, and T. Salditt, “Probe reconstruction for holographic X-ray imaging,” J. Synchrotron Rad. 24, 498–505 (2017). 7. R. Horisaki, Y. Ogura, M. Aino, and J. Tanida, “Single-shot phase imaging with a coded aperture,” Opt. Lett. 39, 6466 (2014). 8. P. Tafforeau, R. Boistel, E. Boller, A. Bravin, M. Brunet, Y. Chaimanee, P. Cloetens, M. Feist, J. Hoszowska, and J.-J. Jaeger, “Applications of x-ray synchrotron microtomography for non-destructive 3d studies of paleontological specimens,” Appl. Phys. A 83, 195–202 (2006). 9. B. D. Metscher, “Biological applications of x-ray microtomography: imaging microanatomy, molecular expression and organismal diversity,” Microsc Anal (Am Ed) 27 (2013). 10. T. van de Kamp, P. Vagovič, T. Baumbach, and A. Riedel, “A biological screw in a beetle’s leg,” Science 333, 52–52 (2011). 11. J. Moosmann, A. Ershov, V. Altapova, T. Baumbach, M. S. Prasad, C. LaBonne, X. Xiao, J. Kashef, and R. Hofmann, “X-ray phase-contrast in vivo microtomography probes new aspects of xenopus gastrulation,” Nature 497, 374–377 (2013). 12. C. Homann, T. Hohage, J. Hagemann, A.-L. Robisch, and T. Salditt, “Validity of the empty-beam correction in near-field imaging,” Phys. Rev. A 91, 013821 (2015). 13. J. Hagemann, A.-L. Robisch, D. R. Luke, C. Homann, T. Hohage, P. Cloetens, H. Suhonen, and T. Salditt, “Reconstruction of wave front and object for inline holography from a set of detection planes,” Opt. Express 22, 11552–11569 (2014). 14. S. Hoffmann-Urlaub, P. Höhne, M. Kanbach, and T. Salditt, “Advances in fabrication of x-ray waveguides,” Microelectron. Eng. 164, 135–138 (2016). 15. M. Osterhoff and T. Salditt, “Coherence filtering of x-ray waveguides: analytical and numerical approach,” New J. Phys. 13, 103026 (2011). 16. M. Krenkel, A. Markus, M. Bartels, C. Dullin, F. Alves, and T. Salditt, “Phase-contrast zoom tomography reveals precise locations of macrophages in mouse lungs,” Sci. Rep. 5, 09973 (2015). 17. M. Bartels, M. Krenkel, J. Haber, R. N. Wilke, and T. Salditt, “X-ray holographic imaging of hydrated biological cells in solution,” Phys. Rev. Lett. 114, 048103 (2015). Vol. 25, No. 18 | 4 Sep 2017 | OPTICS EXPRESS 20953 #296808 https://doi.org/10.1364/OE.25.020953 Journal © 2017 Received 26 May 2017; revised 28 Jul 2017; accepted 28 Jul 2017; published 21 Aug 2017 18. M. Töpperwien, M. Krenkel, K. Müller, and T. Salditt, “Phase-contrast tomography of neuronal tissues: from laboratory-to high resolution synchrotron ct,” Proc. SPIE 9967, 99670T (2016). 19. O. Bunk, M. Dierolf, S. Kynde, I. Johnson, O. Marti, and F. Pfeiffer, “Influence of the overlap parameter on the convergence of the ptychographical iterative engine,” Ultramicroscopy 108, 481–487 (2008). 20. 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). 21. J. Rodenburg, “Ptychography and Related Diffractive Imaging Methods,” Adv. Imaging Electron Phys. 150, 87–184 (2008). 22. A.-L. Robisch and T. Salditt, “Phase retrieval for object and probe using a series of defocus near-field images,” Opt. Express 21, 23345–23357 (2013). 23. M. Stockmar, I. Zanette, M. Dierolf, B. Enders, R. Clare, F. Pfeiffer, P. Cloetens, A. Bonnin, and P. Thibault, “X-ray near-field ptychography for optically thick specimens,” Phys. Rev. Applied 3, 014005 (2015). 24. P. Thibault and A. Menzel, “Reconstructing state mixtures from diffraction measurements,” Nature 494, 68–71 (2013). 25. J. Hagemann and T. Salditt, “Reconstructing mode mixtures in the optical near-field,” Opt. Express 25, 13973– 13989 (2017). 26. J. Hagemann and T. Salditt, “The fluence–resolution relationship in holographic and coherent diffractive imaging,” J. Appl. Crystallogr. 50, 531–538 (2017). 27. R. Neutze, R. Wouts, D. van der Spoel, E. Weckert, and J. Hajdu, “Potential for biomolecular imaging with femtosecond X-ray pulses,” Nature 406, 752–757 (2000). 28. 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. Plonjes, M. Kuhlmann, R. Treusch, S. Dusterer, T. Tschentscher, J. R. Schneider, E. Spiller, T. Moller, 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. Szoke, N. Timneanu, and J. Hajdu, “Femtosecond diffractive imaging with a soft-X-ray free-electron laser,” Nat. Phys. 2, 839–843 (2006). 29. H. N. Chapman, P. Fromme, A. Barty, T. A. White, R. A. Kirian, A. Aquila, M. S. Hunter, J. Schulz, D. P. DePonte, U. Weierstall, R. B. Doak, F. R. N. C. Maia, A. V. Martin, I. Schlichting, L. Lomb, N. Coppola, R. L. Shoeman, S. W. Epp, R. Hartmann, D. Rolles, A. Rudenko, L. Foucar, N. Kimmel, G. Weidenspointner, P. Holl, M. Liang, M. Barthelmess, C. Caleman, S. Boutet, M. J. Bogan, J. Krzywinski, C. Bostedt, S. Bajt, L. Gumprecht, B. Rudek, B. Erk, C. Schmidt, A. Homke, C. Reich, D. Pietschner, L. Struder, G. Hauser, H. Gorke, J. Ullrich, S. Herrmann, G. Schaller, F. Schopper, H. Soltau, K.-U. Kuhnel, M. Messerschmidt, J. D. Bozek, S. P. Hau-Riege, M. Frank, C. Y. Hampton, R. G. Sierra, D. Starodub, G. J. Williams, J. Hajdu, N. Timneanu, M. M. Seibert, J. Andreasson, A. Rocker, O. Jonsson, M. Svenda, S. Stern, K. Nass, R. Andritschke, C.-D. Schroter, F. Krasniqi, M. Bott, K. E. Schmidt, X. Wang, I. Grotjohann, J. M. Holton, T. R. M. Barends, R. Neutze, S. Marchesini, R. Fromme, S. Schorb, D. Rupp, M. Adolph, T. Gorkhover, I. Andersson, H. Hirsemann, G. Potdevin, H. Graafsma, B. Nilsson, and J. C. H. Spence, “Femtosecond X-ray protein nanocrystallography,” Nature 470, 73–77 (2011). 30. J. M. J. Madey, “Stimulated emission of bremsstrahlung in a periodic magnetic field,” J. Appl. Phys. 42, 1906–1913 (1971). 31. P. Thibault, M. Dierolf, A. Menzel, O. Bunk, C. David, and F. Pfeiffer, “High-Resolution Scanning X-ray Diffraction Microscopy: Supporting online material,” Science 321, 379–382 (2008). 32. T. Osaka, M. Yabashi, Y. Sano, K. Tono, Y. Inubushi, T. Sato, S. Matsuyama, T. Ishikawa, and K. Yamauchi, “A bragg beam splitter for hard x-ray free-electron lasers,” Opt. Express 21, 2823–2831 (2013). 33. W. Roseker, H. Franz, H. Schulte-Schrepping, A. Ehnes, O. Leupold, F. Zontone, S. Lee, A. Robert, and G. Grübel, “Development of a hard X-ray delay line for X-ray photon correlation spectroscopy and jitter-free pump–probe experiments at X-ray free-electron laser sources,” J. Synchrotron Rad. 18, 481–491 (2011). 34. J. Hagemann and T. Salditt, “Divide and update: Towards single-shot object and probe retrieval for near-field holography: Algorithm and simulation scripts,” https://doi.org/10.5281/zenodo.838005 (2017). 35. K. Giewekemeyer, S. P. Krüger, S. Kalbfleisch, M. Bartels, C. Beta, and T. Salditt, “X-ray propagation microscopy of biological cells using waveguides as a quasipoint source,” Phys. Rev. A 83, 023804 (2011). 36. D. R. Luke, “Relaxed Averaged Alternating Reflections for Diffraction Imaging,” Inverse Prob. 21, 37 (2005). 37. M. V. Heel, “Angular reconstitution: A posteriori assignment of projection directions for 3d reconstruction,” Ultramicroscopy 21, 111–123 (1987). 38. M. van Heel and M. Schatz, “Fourier shell correlation threshold criteria,” J. Struct. Biol. 151, 250–262 (2005). 39. A.-L. Robisch, J. Wallentin, A. Pacureanu, P. Cloetens, and T. Salditt, “Holographic imaging with a hard x-ray nanoprobe: ptychographic versus conventional phase retrieval,” Opt. Lett. 41, 5519–5522 (2016). 40. G. Kutyniok, W.-Q. Lim, and R. Reisenhofer, “Shearlab 3d: Faithful digital shearlet transforms based on compactly supported shearlets,” ACM Trans. Math. Softw. 42, 5:1–5:42 (2016). 41. S. Loock and G. Plonka, “Phase retrieval for fresnel measurements using a shearlet sparsity constraint,” Inverse Probl. 30, 055005 (2014). 42. A. Pein, S. Loock, G. Plonka, and T. Salditt, “Using sparsity information for iterative phase retrieval in x-ray propagation imaging,” Opt. Express 24, 8332–8343 (2016). 43. M. Stockmar, P. Cloetens, I. Zanette, B. Enders, M. Dierolf, F. Pfeiffer, and P. Thibault, “Near-field ptychography: phase retrieval for inline hologr


Introduction
X-ray near-field holographic imaging (NFH) enables single shot, full-field imaging of specimen with nanoscale spatial resolution [1,2].Sharing the characteristic advantages of high penetration and quantitative contrast with other x-ray imaging modalities, it can in addition exploit the advantage of high temporal resolution down to single pulse imaging with synchrotron (SR) and free electron laser (FEL) radiation [3,4].This is for the simple reason, that a full wavefield can be probed in a single shot without scanning.Figure 1 depicts the setup of NFH using highly focused SR or FEL radiation.By choice of the source to object distance z 1 and the object to detector distance z 2 , the geometric magnification M = (z 2 + z 1 )/z 1 and the field of view (FOV) can be tailored to the experimental need.
A major challenge in NFH is the fact that the validity of phase retrieval and hence image quality depends crucially on the quality of the illumination.Due to the finite source-size, a number of unwanted effects can arise, such as distortions in the wavefront or a partial coherent illumination, but also geometrical optical effects such as astigmatism.For example, focusing by elliptically shaped multilayer mirrors in Kirkpatrick-Baez geometry [5] is accompanied by unwanted phase distortions in the incoming X-ray probe induced by deviations from the ideal height profile of the mirrors [6].After free space propagation to the imaging or detection plane, the phase errors result in a measurable intensity pattern, which often appears as pronounced horizontal and vertical stripes due to the two orthogonal mirrors, see Fig. 2 for an example of an empty beam pattern.In other types of focusing similar distortions arise.Focusing is required to generate the diverging illumination for high magnification and resolution.Note that also for parallel beam propagation imaging it is extremely common to implicitly assume perfect plane wave illumination by performing the conventional flat-field correction [3,[7][8][9][10][11].In previous studies, we have shown that under these conditions the commonly used standard flat-field correction, i.e. the division of measured intensities with the specimen in the beam by measured intensities without specimen in the beam, induces artifacts [12,13], as illustrated in Fig. 2(c).To overcome these problems, the experimentalist can choose between two principal strategies: (i) corrections by a refined optical system (hardware), or (ii) corrections by enhanced algorithms (software).The hardware solution can consists in the simplest case by additional apertures to cut off typical intensity tails in the focal plane.A more sophisticated solution is the use of x-ray waveguides (WG) [14], which act as coherence and wavefront filters [15], providing improved illumination schemes for NFH [16][17][18].This advantage comes at the cost of a reduced photon flux, and increased acquisition time.The algorithmic approach by ptychography, on the other hand, solves the flat-field problem by a precise reconstruction of the complex-valued illumination.In the language of ptychography the illumination is called the probe P. To this end multiple exposures of the specimen, or in ptychographic terms of the object O, are acquired at different transveral positions in the beam.This position scanning is extensive, since an overlap between 60% to 85% is necessary for proper convergence of the ptychographic algorithm [19], depending on experimental modalities.This applies for the far-field [20,21] case of ptychography and its extensions to NFH [22,23].Ptychography can also account for other non ideal states (e.g.lack of coherence) of the probe or object [24,25].Associated with longer scanning time is also a larger data set, which has to be acquired by transversal and/or longitudinal (for the near-field) scans of O in order to generate sufficiently diverse input data for the simultaneous reconstruction of P and O.The scanning also imposes a higher dose on O, compared to NFH [26], which can induce radiation damage and lead to an inconsistent ptychographic dataset.Most importantly, the scanning scheme is incompatible with time-resolved studies and with ultra-fast (single shot) imaging.Note that some objects are deliberately destroyed by the first pulse, using the 'diffract-before-destroy' strategy used in some schemes of FEL imaging [27][28][29].A further problem for ptychography at FEL is the intrinsic shot-to-shot variation of P, resulting from pulse generation by the SASE process [30].
In this work we seek to make single shot NFH compatible with non-stationary probes and in particular FEL imaging.To this end, we propose a new algorithmic approach.The reconstruction of object and probe is based on two intensity recordings: (i, exit wave) of the object in the beam and (ii, probe) of the empty beam without object.The exit wave Ψ = P • O is written as separable product of P and O.This implies that the product approximation holds, this is in general true for thin and especially biological specimen [31].The proposed algorithm uses the separability constraint known from ptychography, and an intertwinded update scheme operating on both images, which we denote by divide&update (d&u), see Fig. 3.We show by simulation and experimentally that d&u yields an improved reconstruction quality of O compared to a reconstruction obtained from the same data using the standard flat-field correction as data preprocessor.The two images can be recorded either sequentially or simultaneously (parallel recording).As the probe stability was sufficiently high in the SR experiment serving as proof-of-concept in this work, we have used the sequential recording which is easier since no special detection scheme is necessary.In the case of parallel recording as required for single pulse FEL imaging, a semi-transparent detector screen in front of the object (denoted by detector 2 in Fig. 1) could be used, or a beam splitter in front of O to split the XFEL pulse before it interacts with O [32,33].For this purpose, a semi-transparent detection screen or beam splitter has to be placed in front of the object.There are two challenges to consider: Firstly, the sensor resolution has to sample the probe sufficiently well.Secondly, the heat load for the semi-transparent screen must be kept at a reasonable level.Both are difficult, if the detection screen is to close to the focal plane of a nano-focus optic.However, the 'probe detector' can equally well be placed in the convergent beam, e.g.directly behind the focusing device where the beam is extended, and where a field of view of several hundred micrometer could be probed with sufficient spatial sampling.In this case, the reconstruction requires additional propagation of the wavefields by Fresnel propagators, as also demonstrated in this work for simulated data in App. A.
The paper is structured as follows: Section 2 details the d&u scheme.Section 3 tests the algorithm on simulated data, before application to experimental data.The paper closes with summary and outlook in Sec. 4.

Algorithm
As in other ptychographic approaches, the d&u algorithm uses the separability constraint in the plane of O. Figure 3 shows a principle sketch of d&u and Algorithm 1 details the algorithmic approach.In conventional NFH, when dealing with distorted probes the approximative hologram of O [12] is recovered by flat-field correction and then used as input for a phase reconstruction algorithm.In contrast to this standard approach we make use of the two available measurements in an iterative reconstruction scheme, cf.Fig. 3. Following the separability idea of ptychography we use amplitude adapted version P n = Π P M (P n−1 ), Ψ analogously, to yield updates for P n and O n in a cross-over manner (middle) by use of constraints for O in the plane of the object.With the new P n and O n we generate the updated exit wave Ψ and start a new iteration.
The projection on the measurements Π X M (•), with X being either |D Fr (Ψ)| 2 or |D Fr (P)| 2 , i.e. the respectively measured near field pattern, is given by the standard magnitude projector applied to the respective iterate of P or Ψ.The propagation to the detection plane is performed by the Fresnel free space propagator where  Here the support S is assumed to be known, but additional refinements as shrink-wrap can be easily implemented to refine S. In practice, the support is easily generated from the conventional approach of empty beam correction, followed by holographic reconstruction.Note, that any other known constraint on O can be incorporated as well.
Next, P is updated using Π P S .The new O n is used to separate P n taking also P n into account (line 12).In a general setting, we can only use the information from P and the division of (Ψ) n /O n .However, in contrast to the general setting, one often has quite powerful constraints at hand on P, depending on the experimental situation, for example smoothness or small distance with respect to a temporal averaged probe, which would of course further improve convergence.The smoothness of P is generated by the blurring of free-space propagation.It can be estimated from the power spectral density to choose a suitable full width at half maximum (FWHM) value of a Gaussian filter.The filter is respectively applied on the phases and amplitudes of P. Afterwards the filtered amplitudes and phases are recombined.In the presence of strong fluctuations in P multiple recordings |D Fr (P)| 2 can be combined to an averaged P. By comparing the current iterate of P with the average P it is possible to discriminate variations larger than a given threshold and set these to the average value.These constraints can be additionally enforced as part of Π P on P n (line 13).The updated exit wave (Ψ) n is calculated by multiplying P n and O n (line 15).The Matlab implementation of the algorithm is provided in Code 1 (Ref.[34]).

Simulated data
Figure 4 shows the phantoms used for testing the algorithm.A sketch of two cells (a) [35] serves as pure phase phantom of the object.For the probe phantom, a mandrill test image (b), and Dürer's Melancholia I (c), serve to define phases and amplitudes, respectively.Both images are Gaussian low-pass filtered with a filter of FWHM of 5 px diameter to simulate the smoothing of a probe by propagation.To simulate the finite size of the illumination the amplitudes have been multiplied by a Gaussian window of a FWHM with 354 px.The images have size of 512 × 512 px 2  The measurements have been then used for two simulations: First we have used the approximated hologram as input for an alternating projection algorithm [35], here we have implemented Relaxed Averaged Alternating Reflections (RAAR) [36].The iterates of RAAR for the wavefield Ψ under reconstruction are given by where reflection by a given constraint set and n the iteration index.Π M and Π O are defined as above in Eq. ( 1) and Ep.(3), respectively.The parameter β n controls the relaxation.It follows the function where β 0 denotes the starting value, β max the final value of β n and β s the iteration number when the relaxation is switched.This relaxation strategy follows [36] Eq. ( 37).The parameters have been set to β 0 = 0.99, β m = 0.75, β s = 500 for the reconstructions using RAAR.
Second have we used the two simulated holograms as input for d&u.We used the same constraints on O as described in Sec. 2. P is constrained by the magnitude projection and the separability.Additionally a smoothness constraint has been applied in Π P .Amplitude and phase of P n are filtered with a Gaussian with FWHM of 1 px.Both algorithms were executed for 4000 iterations, starting from a amplitude 1, phase 0 initialization over the whole reconstruction area.Figure 6 summarizes the results.
By comparison of (a) and (b), the improved reconstruction quality of d&u is clearly evidenced.The background of (b) shows less distortions and small phase differences are reconstructed with better contrast, see for example the center region of the lower cell.The ringing artifacts at the edges of the object, which are observed in the standard flat-field correction scheme, disappear.
In addition to the object and in contrast to the standard scheme, d&u can recover P, at least to some extent, as shown in Fig. 6(c) and (d).The phases (c) show a good recovery of the edges compared to Fig. 4(b), but the low frequencies seem not recovered as well which is evidenced by the reduced contrast as compared to the original.Further, the amplitudes (d) are not as well recovered as the phases, some larger structures are recognizable as the cube left and the sitting angel on the right.Further below, we will discuss remedies which improve probe reconstruction, by slightly changing the setting.Since only one measurement for P is used and no additional constraints on phase or amplitude, the reconstruction suffers from twin image artifacts and missing spatial frequency information.Figure 7 shows the results for the Fourier ring correlation (FRC) [37,38] on the object reconstructions of Fig. 6(a) and (b) and the phantom Fig. 4(a).The flat field (blue) and d&u (red) reconstruction do not drop below the 1/2-bit threshold (yellow), this means both reconstructions have resolution down to the pixel level.The FRC yields more insight, it shows that the d&u reconstruction, while slightly lacking for frequencies in the range [0.02, 0.15] 1/px, has a superior recovery of frequencies beyond 0.25 1/px.The normalized Frobenius norm is for the flat-field reconstruction Δ = 4.58 • 10 −5 and for d&u Δ = 2.45 • 10 −5 .

Experimental data
In addition to the simulations, we present reconstructions obtained from experimental data, recorded at ESRF beamline ID16a using a photon energy of 17.05 keV, at instrumental settings described in [39].The object consisted of spheres of different diameters 595 nm (SiO 2 ), 3 and 7 µm (polysterene).It was placed at a defocus distance of z 1 = 13.79 mm.A FReLoN 2k (N x × N y = 2048 × 2048 px 2 ) detector was used for recording the data with a pixel size of 845 nm, placed at a defocus distance of z 2 = 435.56mm.The exposure time was 1 s, 2 exposures have been acquired, one with and one without object in the beam.The exposures have been corrected for dark current, lens distortions and scintillator impurities.The images have been then normalized by their corresponding mean intensity value.The resulting normalized intensity distributions have been used as input for the reconstruction algorithms.Figure 2 shows the preprocessed input for (a) the measurement |D Fr (Ψ)| 2 , (b) the measurement |D Fr (P)| 2 and (c) the flat-field correction obtained from (a) divided by (b).The effective object pixel size is 26.7 nm, given by the detector pixel size and the geometric magnification M = z 2 /z 1 ≈ 31.5.After transformation to a parallel beam (effective) geometry using the Fresnel scaling theorem, the (effective) Fresnel number is Fr = 7.3 • 10 −4 .
Figure 8 shows the reconstruction results after 20000 iterations for different reconstruction schemes applied on the same input data, as shown in Fig. 2. The reconstruction obtained by a standard iterative phase reconstruction algorithm scheme is shown in (a) and (b).As input the flat-field corrected single distance measurement was used, cf.Fig. 2(c).The reconstructions (c) and (d) obtained by d&u used the measurements shown in Fig. 2(a) and (b) as input.The phase retrieval for Fig. 8(a) and (b) was carried out with RAAR, using the same set of constraints (pure phase shifting sample as well as the support constraints) as in the numerical experiment.This is to be compared with the reconstructions of O using d&u, shown in (c) and (d), which both exhibit improved reconstruction quality compared to (a) and (b), in particular an improved suppression of the P induced artifacts stemming from the KB aberrations.Also the resolution is improved, as judged from inspection of the smallest spheres, see also (e) for a zoom on the left of the large spheres.All reconstructions shown impose the same constraints on O, i.e. combined support and pure-phase constraint (cf.Eq. 3).In addition for (c) and (d) the physically correct formulation of the separation of complex valued wavefields instead of the flawed flat-field division [12,13] is used.In the reconstruction of (b) and (d), an additional constraint in form of a shearlet suppression was applied in Π O S which for (d) further enhanced the reconstruction quality.For (b) the same set of shearlets has been suppressed as in (d) but with a negative effect on reconstruction quality.For this constraint, a shearlet decomposition [40][41][42] was used to identify components which appear both in P and the reconstructed O.These shared components are then removed from the object, as detailed in App.B. In (d) even the small spheres beneath the large sphere on the left become distinguishable.Still we note remaining structures which can be accounted to drift in P, i.e. inconsistency due to the fact that the object and empty beam recordings were not simultaneous, as proposed in the FEL illumination scheme sketched in Fig. 1.All reconstruction parameters are tabulated in Tab. 1.
The reconstructed phases and amplitudes of the probe are shown in Fig. 9 (a) and (b), respectively.The probe's phase does not show a visible imprint of the object, contrary to the object where we observe remains of the probe.The amplitudes show no imprint, but we observe a decay of intensity towards the edge of the field of view, as we expect from a finitely extended  illumination.Overall the separation of P and O works very well.The reconstruction was carried out as in the case for simulated data.However, a larger number of iterations is required, compared to simulated data.Inspection of the object reconstruction after 4000 iterations shows that the object has 'holes' which fill up with more iterations.Therefore a much higher number of iterations n max = 20000 was used.The convergence rate can further be quantified by the error metric Δ X as a function of iteration n, as shown in Fig. 10.Δ X calculates the per pixel error of the reconstructed intensity I X with respect to the measurements M X ,

Discussion and outlook
Both simulation and experiment validate the proposed approach for simultaneous probe and object reconstruction in the optical near field, using a miniumum of data, i.e. one recording with and one without the object (empty beam).In practice the two recordings can be acquired sequentially, as in the present experimental realisation, or simultaneously, if a second semi-transparent detector screen is used in front of the object, see Fig. 1.This is to be compared to established near-field ptychographic schemes, which are based on

Fig. 1 .
Fig. 1.Schematic of an experimental setup for near-field holography.Near-field holographic images are recorded with detector 1 at distance z 2 behind the object O, mounted on a motorized stage in defocus position z 1 behind the focal plane F of a Kirkpatrick-Baez mirror (KB) system with focal distance f.The dashed box shows the extension to a parallel acquisition setup.The two measurements |D Fr (Ψ)| 2 and |D Fr (P)| 2 can be acquired in single-shot by the use of a semi-transparent second detector.This Detector 2 is positioned front of O to record the illuminating probe.This experimental geometry is proposed for single-pulse FEL full field imaging scheme.For further discussions refer to the main text.

Fig. 4 .
Fig. 4. Phantoms used for the simulation.(a) Phases of the object (pure phase contrast) with φ ∈ [−0.2 0] rad.(b) Phases of the probe.(c) Amplitudes of the probe.The gray values of the input images are scaled to match phases φ ∈ [−0.4 0.4] rad and amplitudes A ∈ [0.8 1.2].Amplitude and phase phantom images have been frequency filtered by a Gaussian with FWHM of 5 px.In addition, the amplitudes are multiplied with a Gaussian of 354 px FWHM to simulate an intensity decay.The scale bar indicates 50 px.

Fig. 5 .
Figure4shows the phantoms used for testing the algorithm.A sketch of two cells (a)[35] serves as pure phase phantom of the object.For the probe phantom, a mandrill test image (b), and Dürer's Melancholia I (c), serve to define phases and amplitudes, respectively.Both images are Gaussian low-pass filtered with a filter of FWHM of 5 px diameter to simulate the smoothing of a probe by propagation.To simulate the finite size of the illumination the amplitudes have been multiplied by a Gaussian window of a FWHM with 354 px.The images have size of 512 × 512 px2 embedded in N x × N y = 2048 × 2048 px 2 for propagation.Only the central parts (512 × 512 px 2 ) of the images are shown in this and the following figures.The simulated measurements are depicted in Fig. 5 i.e.(a) |D Fr (Ψ)| 2 and (b) |D Fr (P)| 2 for a

Fig. 6 .Fig. 7 .
Fig. 6. Results obtained with divide&update for simulated noisy data with µ = 200 ph/px after 4000 iterations.(a) The reconstructed object phases, obtained from conventional flatfield corrected data using RAAR.(b) The reconstructed object obtained from d&u.(c) Phases and (d) amplitudes of the reconstructed probe.The scale bar indicates 50 px.

Fig. 8 .
Fig. 8. Object phase reconstructions obtained by different reconstruction schemes applied to the same input data, shown in Fig. 2. (a) Reconstruction obtained by RAAR using the flatfield corrected input data after 20000 iterations.(b) same as (a) with shearlet supression.(c) The d&u reconstruction shows significantly reduced artifacts.(d) same as (c) with shearlet supression.All reconstructions shown are after 20000 iterations and the color bar applies to all panels.The scale bar indicates 5 µm for (a) to (d).(e) Detail on the left large sphere for (a) to (d) from top to bottom, respectively.The scale bar indicates 1 µm.

Fig. 9 .
Fig. 9. Reconstructed probe P, obtained simultaneously with the object shown in Fig. 8(c).Phases and amplitudes are shown in (a) and (b), respectively.The scale bar indicates in all panels 5 µm.
Fig.3.Sketch of the algorithmic scheme of divide&update (d&u.The algorithm uses the two measurements |D Fr (Ψ)| 2 and |D Fr (P)| 2 as inputs.An iteration starts with the projection of the guesses for P and Ψ on the measured intensities using the projectors Π P N x,y /2 ... N x,y /2 , N x,y are the dimensions of the image, F the Fourier transformation and Fr is the Fresnel number with respect to one pixel (px).Divide and Update algorithm1: O 0 ← 1 N x × N y Initialization 2: P 0 ← 1 N x × N y 3: for n = 1 ... n max doThe details of the cross-over update are given in pseudo code in Algorithm 1 in lines 7-13, the corresponding projectors Π O S and Π P S are detailed below.The operator Π O S is used to update the iterate for O. First the fields are separated by division (line 8), enforcing separability.Next, the projector Π O is used to enforce the constraints on O, i.e. pure, negative phase and support constraint.
N x and k y = 2 n y /N y are spatial frequencies in Fourier space with n x,y ∈ next iteration M and Π Ψ M (left).After projection, the output fields P and Ψ are used in a cross-over manner to update P and O in Π O S and Π P S (middle), which are then multiplied to form the Ψ for the next iteration (right).−n ← (Ψ) n / P n Divide for O, i.e. enforce separability

Table 1 .
Summary of the parameters for the experiment.