Ptychographic coherent diffractive imaging of weakly scattering specimens

Applying iterative phase retrieval schemes to ptychographic data, i.e. diffraction patterns collected with a localized illumination probe from overlapping regions of a specimen, has enabled the investigation of extended specimens previously inaccessible by other coherent x-ray diffractive imaging methods. While the technique had initially been limited by the requirement of precise knowledge of the illumination function, recent algorithmic developments allow now the simultaneous reconstruction of both the probe and the object. However, these new approaches suffer from an inherent ambiguity, which affects especially the case of weakly scattering specimens. We present new schemes to circumvent this problem and introduce new tools for obtaining information about the scattering behaviour of weak phase objects already during data collection. The new techniques are experimentally demonstrated for a data set taken on Magnetospirillum gryphiswaldense.


Introduction
X-ray microscopy, featuring high penetration power with the possibility to obtain elemental or magnetic contrast, has found various applications in life and materials science. The technique depends on the availability of high-quality, high-resolution x-ray focusing optics, which are, despite continuous progress [1]- [5], still very challenging to manufacture. To circumvent these limitations, lens-less x-ray microscopy schemes exploiting the coherence properties of modern synchrotrons or x-ray free electron lasers have been developed. In this case the image forming system is replaced by a-usually iterative-phase retrieval algorithm that reconstructs the specimen's complex transmission function from coherent diffraction patterns recorded with a two-dimensional pixelated detector. Generally referred to as coherent diffractive imaging (CDI), the technique has progressed significantly since its first experimental demonstration in 1999 [6] and has been successfully applied to cells [7,8], nano-crystals [9,10] or nano-particles [11] (see also the review [12]). For phase retrieval to be possible, the intensity patterns have to be sampled on a fine enough grid. For plane-wave illumination, the sampling condition requires an isolated, compact object in real space, which limits the technique to certain types of samples or requires specially adapted preparation protocols.
The compact specimen requirement, implemented as a 'support constraint' in the most widely used reconstruction schemes [13], can be overcome by creating a constrained illumination, either by an aperture or by focusing the beam. Yet treating such data with support constraint approaches is difficult or may even be impossible [14] since the illuminated region of the sample usually has smooth edges. In certain cases, where the incident illumination both has a significant wave front curvature [15] and can be well characterized, it is possible to robustly reconstruct images from individual diffraction patterns and combine them afterwards to cover portions of extended objects [16,17].
Another approach to image non-isolated specimens is based on the application of iterative phase retrieval to data sets recorded according to a scheme called 'ptychography'. First proposed for electron diffraction in the 1970s [18], ptychography creates redundancy in the data by taking diffraction patterns at multiple different, but overlapping illumination regions. While an analytic solution via Wigner distribution deconvolution is possible if the step size 3 corresponds to the imaging resolution [19,20], a new iterative algorithm for ptychographic data sets [21,22] marked a significant improvement by allowing for larger step sizes. The strength of the algorithm has been experimentally demonstrated with laser light [23] and x-rays [24]. The method does not require a special type or shape of the localized beam incident on the sample; however, a very accurate, independently obtained a priori knowledge of the illumination function (the probe) is mandatory in this early reconstruction scheme.
In an experiment with hard x-rays it has been recently demonstrated that both the probe and the specimen's transmission function can be reconstructed simultaneously from one ptychographic data set [25]. The reconstruction method employed in this case was based on a general algorithm called the 'difference map' [26], yet probe retrieval can also be achieved with other algorithms [27,28]. Probe retrieval has not only shown to significantly improve the reconstruction quality but also allows for new applications, e.g. in the field of wave front sensing.
While the first demonstrations featured strong scatterers, it remained unclear how weakly scattering specimens like biological material can be reliably treated within this new ptychographic scheme. Furthermore, it had been observed that reconstructions from weak signals are more prone to the previously reported 'raster grid pathology' [29], which is inherent to the problem and independent of the reconstruction method. Investigation of biological specimens with hard x-rays is of special relevance because the validity of the Born approximation for such weakly interacting objects opens a clear path to three-dimensional imaging.
In this paper, we address the possible threats to unique reconstructions and discuss ways to circumvent the difficulties inherent to weakly scattering samples. We demonstrate our new approach via ptychographic CDI (PCDI) of an extended biological specimen with hard x-rays. We also present a new way to disentangle the scattering signals of the probe and the object in cases where the probe's contribution is dominating the diffraction patterns. This allows direct and quantitative monitoring of the specimen's scattering contribution.

Reconstruction method
In earlier publications, details of the theory of ptychography in general [19,30] and also the details of the algorithm used here [29] have been reported. A ptychographic data set is recorded with a setup as shown in figure 1 by scanning the probe and the specimen relative to each other with known displacements. The wave exiting the specimen propagates to the far-field where the intensity is recorded with a pixelated array detector. At the jth scan point, one measures the diffraction pattern where F is the Fourier transform operation with the two-dimensional reciprocal space coordinate q, P is the probe function, r j the scan position and O the specimen's complex transmission function (the object). The validity of the factorization of the specimen's exit wave as the probe and the object has been discussed in detail in [19] and the Supporting Online Material of [25]. Reconstruction entails numerically finding a function O that satisfies (1) for all j. The problem can be trivially reformulated by introducing the exit waves (or 'views') ψ j , which allows us to define the two constraints of the phase retrieval problem: the Fourier 4 constraint enforces consistency with the measured intensities while the overlap constraint states that each view can be factorized as the probe and object function The new problem of finding the ψ j that satisfies both constraints at all positions j can be addressed with different methods. While we use the difference map [26], gradient-based approaches have been shown to give good results as well [27]. For experimental data, the two constraint sets will never be perfectly compatible due to the effects of noise. In this case, most iterative algorithms such as the difference map and the hybrid input-output algorithm [13] will not converge to a single solution but only reach a steadystate regime quasi-ergodically covering the space of allowed solutions. Although some simpler algorithms like e.g. error reduction [31] will converge to an arbitrary one of these allowed solutions, this is generally not a sign of uniqueness since it ignores the inherent experimental uncertainties. A unique reconstruction is therefore usually obtained by averaging the allowed solutions from the steady-state regime of the more advanced algorithms.
Another threat to uniqueness, which is independent of the reconstruction method, is the existence of unconstrained degrees of freedom like those coming from missing regions in the diffraction data. One such additional degree of freedom is inherent in the ptychographic phase retrieval problem with probe retrieval: if P and O are solutions to the problem, so are the two This system of equations has only the trivial solution f = constant unless the positions r j lie in a regular two-dimensional lattice. This special case is very common in practice, where raster scans are frequently used-this is the earlier mentioned raster grid pathology. The problem is, of course, not present if either the probe or the object are fixed to a predefined function, as it was the case in the first iterative scheme for ptychographic data [22]. While the raster grid pathology is hardly ever observed if the diffraction patterns are dominated by scattering from the sample, it constitutes a serious problem in cases of weakly scattering specimens, which only slightly modify the probe wave field and its diffraction pattern. One approach to suppress the grid artefacts is to keep fixed certain regions of the reconstructed object, such as flat areas in the sample. To circumvent the need to provide or obtain this additional information, or especially in cases where the imaged object does not contain any flat regions, an additional empty area can be created artificially. For this region only the diffraction pattern of the probe alone is used as input data. So, the resulting reconstruction should show no absorption and no phase shift. By enforcing these conditions in a reconstruction together with the actual data, raster grid artefacts are suppressed globally.
This additional constraint of flat or otherwise known object areas is useful in cases where one is bound to scan on regular grids due to experimental constraints. However, it is more convenient to directly address the underlying problem by breaking the symmetry of the scan pattern. If a rectangular grid is required, this can be to some extent achieved by using incommensurate grid spacing for the two scan directions.
In our experiment, we have abandoned the rectangular scanning geometry in favour of a pattern based on concentric circles, which does not show translation symmetry but is still easy X P S D Figure 1. Schematic of a setup for PCDI: A coherent portion of the x-ray beam (X), preconditioned by slits, is selected with the pinhole (P). The sample (S), consisting of a biological specimen and a nano-structured object used for characterization of the incident beam, is placed directly behind the pinhole and is scanned in the plane perpendicular to the optical axis. The diffraction patterns are collected with a pixel-array detector (D) placed in the far field.
to describe analytically (see figure 2). Since the central and usually most interesting part of a scan is measured first, it is also less subject to drift effects than in a usual raster scan. We will refer to this kind of scan as 'round scan'. The round scan is determined by three parameters: radial step size r , number of shells N r and number of points in the first shell N θ (to ensure uniform density of scan points, the number of points in the kth shell is fixed to k · N θ ). For the mth point in the kth shell, one obtains for the Cartesian coordinates (relative to the centre of the scan):

Experiment description
It has been demonstrated in [25] that PCDI can be very naturally implemented with a scanning transmission x-ray microscopy (STXM) instrument by using coherent illumination and a twodimensional detector. To emphasize the strong relation to STXM, the term 'scanning diffraction x-ray microscopy' (SXDM) was introduced for this type of ptychographic experiment. Since the resolution is no longer limited by the size of the focus of the x-ray optical system, larger probes can be used. A very inexpensive and robust alternative to create a localized illumination is the use of a simple opaque mask [24,29], like in the pinhole-based setup shown in figure 1.
The maximum size of the illumination is given by the conditions for sufficient sampling of 6 the diffraction intensities. The experiment was performed at the coherent small angle x-ray scattering (cSAXS) beamline at the Swiss Light Source (Paul Scherrer Institute, Villigen, Switzerland). Figure 1 shows a schematic view of the setup. The beamline's double-crystal monochromator (Si 111) together with a mirror (SiO 2 , to reject higher harmonics) was used to set the energy of the incident beam to 6.2 keV, corresponding to a wavelength of about 2 Å. The pinhole, which was used to both select a coherent portion of the beam and define the probe incident on the specimen, had been milled into a 20 µm thick tungsten foil by focused ion beam and had a diameter of 2 µm. The sample consisted of a biological specimen (Magnetospirillum gryphiswaldense, see visible light micrograph in figure 2(a)) and a nano-fabricated Fresnel zone plate structure mounted on the same holder to allow for some pre-characterization of the incident probe. For the biological specimen, liquid cultures (50 ml) of wild-type Magnetospirillum gryphiswaldense MSR-1 (DSM6361) were grown microaerobically (FSM medium in 250 ml flasks), as described previously [32]. The cells were pelleted by centrifugation and stored as glycerol stocks at −80 • C. Prior to deposition on the silicon nitride membranes (Silson Ltd, 1.5 × 1.5 mm 2 window size with 1 µm thickness), the cells were washed several times in 25 mM ammonium acetate, pH 7.5. The sample was mounted on a two-dimensional piezoelectric scanning stage (0.3 nm nominal resolution, <2 nm reproducibility, 100 × 100 µm 2 scan range), which allowed precise positioning perpendicular to the beam. The diffraction patterns were collected with a PILATUS 2M detector placed 7.18 m behind the sample plane. The PILATUS is a single-photon counting hybrid pixel-array detector, with 1475 × 1679 pixels of 172 × 172 µm 2 size, 20 bit dynamic range and an adjustable counting threshold, resulting in no readout noise [33]- [35]. An He-flushed tube was inserted in the path between the sample and the detector to reduce air scattering and absorption. The scan positions used for collecting data from the biological specimen are schematically depicted in figure 2(a): a round scan with a diameter of 10 µm was done with N r = 11 shells (not counting the single point in the centre, which was left out because the overlapping illuminations provided enough data for this region), resulting in a radial step size r = 500 nm. The number of points in the first shell was set to N θ = 5. At each of the 330 scan points, two exposures of 0.7 and 7 s duration were combined to increase the dynamic range of the diffraction data.

Scattering power evaluation
The reconstruction of data from weakly scattering specimens is known to be more difficult because of the obvious reduction of the signal-to-noise ratio. In traditional CDI, lower count rates at larger scattering angles require longer exposure times, which in turn increase the sensitivity to all systematic sources of error that scale with time, e.g. dark current noise in charge-coupled devices (CCD). The problem persists if local probes are used, like in PCDI. The signal from the specimen is not only just as weak, but the data are also dominated by the diffraction of the probe. The specimen's scattering contribution can be evaluated quantitatively from measured diffraction patterns as follows: In the weak phase object approximation, the exit waves can be written as ψ(r) ≈ P(r)(1 + i (r)) =: P(r) + iQ(r), where Q contains the small effects of the object's phase shift on the probe wave field. Since the relations presented here are independent of the scan point, the position index j has been (e) Number N s of photons scattered by the sample and ratio of N s versus N 0 (the total number of photons incident upon the sample) calculated for each diffraction pattern of the ptychographic scan using equation (12). This image can also be used for STXM-like low-resolution inspection of the data, giving an immediate online feedback on the location and scattering behaviour of the specimen.

omitted. The far-field intensity is obtained by Fourier transformation
whereP andQ are the Fourier transforms of P and Q and a third term, quadratic in , can be neglected. Including the Poisson noise, the deviation from the probe diffraction intensity becomes Because there is no limit due to radiation damage, the intensity pattern of the probe I 0 = |P(q)| 2 can be measured with much higher precision than I (q). We therefore consider that δ I (q) represents only the measurement error in I (q). A 'local resolution' for each scan position can be defined from the value q max such that I − I 0 is larger than the expected noise level. Since one obtains for the variance of the intensity var I (q) = I (q) ≈ I 0 (q), the condition is just (q) > 1, with the 'signal distribution' Figure 2(d) shows the result of this calculation for one particular diffraction pattern (figure 2(c)), using the (averaged) probe diffraction pattern in figure 2(b) as I 0 . Since the condition (q) > 1 implies that the excess of variance in I (relative to Poisson noise) is attributed to the scattering from the object, an expression for calculating the number of photons scattered by the sample can be derived: by inserting (9) into the definition (10) and summation over all q, one obtains (see appendix for details) where N pix is the number of pixels of the investigated diffraction pattern. This can be rewritten as i.e. from the data only, one can evaluate the total number N s of photons scattered by the specimen. Since the calculations presented here are not computationally demanding, they can also be done online during data collection. This allows us to obtain a scattering map as shown in figure 2(e), which provides a direct feedback on large features of the specimen and the scattering signal produced by it. A comparison with the total number of photons incident on the specimen N 0 gives information about the local scattering cross-section (the second axis on the colour bar). If one additionally uses the local resolution from the condition (q) > 1 for |q| < q max , it is possible to estimate the potential resolution and thus to adapt scan parameters such as exposure times accordingly. However, the local resolution determined this way does not consider dose fractionation effects in PCDI, where the resolution of the final reconstruction can be higher than that derived from a single diffraction pattern due to the presence of data from the regions illuminated by overlapping probes in different data sets.

Reference reconstructions
The nature of the phase problem in two-dimensional CDI implies that low-order phase aberrations can be difficult to reconstruct faithfully [36]. The lowest problematic order, a quadratic phase factor in Fourier space, corresponds physically to the location of the reconstruction plane along the propagation axis. In traditional CDI this 'defocus ambiguity' is addressed with a tight support. Fortunately, PCDI is not subject to such aberrations because the multiplicative relation (3) is formally only valid in the sample plane. However, as a weakly scattering specimen modifies only slightly the probe diffraction pattern (as illustrated by figures 2(b) and (c)), stagnation at a wrong focal plane is more likely to occur. The convergence rate can be improved if one does not start with an arbitrary initial probe, but instead uses a very good starting guess. This results already during the first iterations in a retrieved object much closer to the real solution. Further refinement of the probe and thus the final defocus plane are then much easier performed by the algorithm due to the greatly reduced search space. In principle, an accurate estimate of the initial probe can be modelled from a few key experimental parameters [41]. More robust is a model-free approach, which reconstructs the probe at high resolution by imaging a strongly scattering structure that is placed at roughly the same defocus distance. Figure 3 shows the reference specimen used to obtain an initial probe for the reconstruction of the biological specimen. It is a gold (Au) Fresnel zone plate structure with two small irregularly shaped Au particles on the top. The ptychographic round scan (see reconstruction in figure 3(c)) covers only a small part of the total zone plate and thus once more demonstrates that arbitrary parts of an extended object can be imaged. A central area of 192 × 192 pixels was used from each of the 140 diffraction patterns, which were in each case combined from a short 0.7 s and a long 5 s exposure. Since the Fresnel zones are barely resolved for the resulting reconstruction pixel size of 43.5 × 43.5 nm 2 , it can be inferred that the main information on the probe (see figure 3(d)) is provided by the two strongly scattering Au particles visible in figure 3(c). The use of a reference therefore does not add substantial complications to the experiment, since almost any strongly scattering object situated in the sample plane can be used.

Ptychographic reconstruction of the biological specimen
For the biological sample, the scattering analysis (see figure 2) showed that the innermost 192 × 192 pixels of the diffraction pattern contained all signal from the specimen. The reconstruction was started with a probe guess obtained from the reference specimen. However, the probe was not kept fixed but further refined in the usual probe retrieval scheme to account for any difference compared to the reference scan, especially concerning the exact plane of the object. The final probe, retrieved together with the reconstruction of the biological specimen, is shown in figure 4(a). Since the full complex wave field is obtained, it can be numerically propagated along the beam direction, e.g. to the plane of the pinhole (see figure 4(b)). A cut through the propagated wave field parallel to the beam (figure 4(c)) reveals that the distance between the pinhole and the sample was around 1.5 mm. The reconstructed phase shift of the object is displayed in figure 4(d). The result was obtained after 200 iterations of the algorithm by averaging 20 reconstructions picked between the 100th and the 200th iteration from the earlier mentioned steady-state regime of the difference map, which had already been reached after about 75 iterations. The weak phase object assumption is verified by the fact that the bacteria cannot be seen in the reconstructed absorption image even though this property was not enforced in the PCDI reconstruction. The phase shift was converted into a map of the projected electron density n e (see the second scale on the colour bar in figure 4(d)) using the relations δ r = − · λ/(2π ) and n e = 2π/(r e · λ 2 δ r ) with δ r being the real part of the object's complex refractive index integrated over the sample thickness r along the beam path, λ the x-ray wavelength and r e the classical electron radius. The observed phase shift is up to two orders of magnitude smaller than that obtained for the reference object shown in figure 3.
Evaluating the resolution of the reconstruction is not a straightforward task. In diffraction microscopy, a method now commonly used compares the power spectrum of the average of  many reconstructions with the measured intensities [8,11]. The ratio of the two quantities typically decays as the spatial frequency increases, in a way reminding of a modulation transfer function in traditional microscopy. Often called the 'phase retrieval transfer function' (PRTF), it quantifies the contribution of the reconstruction algorithm to the resolution decrease. Its use is based on the tacit assumption that the algorithm is unbiased, implying for instance that measured intensities with signal-to-noise ratios much less than one should average out to zero. Artificially high PRTF values can result from various interventions on the mixing dynamics of the algorithm and on the ensemble average, e.g. strong real-space constraints or screening of initial conditions. However, in PCDI a PRTF probably does not provide the most reliable assessment of the reconstruction quality and resolution. The reconstruction algorithm based on the difference map still uses averaging of the object to enforce the uniqueness of the solution, but the construction of the PRTF from this average is not straightforward: the question remains whether the PRTF is actually describing the probe or the object. The case of weakly scattering samples, where the diffraction signal is overwhelmingly dominated by the probe contribution, is especially problematic. In this situation, a PRTF computed on one of the diffraction patterns is more likely to indicate the resolution of the probe rather than the object. As shown in figure 2(d), (q), the approximate distribution of photons scattered by the object only, can drop to negligible signalto-noise ratios much faster than the probe signal. A reasonable estimate of the object resolution can be done from the average of (q) over all the collected diffraction patterns. Following this procedure, we find q max 0.4 µm −1 , corresponding to a half-period real space resolution of around 200 nm, about 10 times smaller than the diameter of the probe.
A somewhat more robust evaluation of resolution can be obtained from the precise knowledge of the total number of incident photons in the experiment. If N is the number of incident photons within one pixel of the reconstructed area, then Poisson statistics gives a variance of N −1 on the contrast in this pixel. This real space picture can be shown to hold even if ptychographic measurements take place in Fourier space. Assuming that the imaged area is illuminated roughly uniformly, the expected variance on the reconstructed phase is given by where A pix is the reconstruction pixel size and N 0 /A is the number of incident photons divided by the illuminated area, called the fluence. This simple relation, whose left-hand side is akin to Selwyn's definition of photographic granularity [37,38], makes explicit the trade-off between spatial resolution and contrast resolution. Because it is derived from the fundamental photon counting statistics, (13) effectively provides a rigorous upper bound on the achievable resolution in an experiment. Numerical experimentation with the difference map suggests that averaging many object estimates cancels the fluctuations caused by the algorithm dynamics and converges to a unique solution that differs from the 'ground truth' solution only because of the noise. In this picture, the remaining fluctuations in the reconstructed object reveal the actual value of var , from which one obtains an 'effective pixel size', giving the resolution of the reconstruction. Evaluating var from the reconstruction can be difficult if the object is extended and has no known uniform regions. Fortunately, the situation is greatly simplified with a weakly scattering specimen, using the fact that the fluctuations of the complex-valued object are equally shared by its real and imaginary parts. It suffices then to compute the variance of the absorption part after normalizing to a mean 1. For the reconstruction presented in this paper, we find var 2.56 × 10 5 , which, with a fluence of 6.7 × 10 5 µm −2 , results in A pix 242 nm. Using an empirical protein model (see [39], chemical formula H 50 C 30 N 9 O 10 S 1 , density 1.35 g cm −3 , optical constants obtained from [40]), the dose D is estimated to be D 1.7 × 10 3 Gy, which is well below the feature-destroying limit.

Conclusion
In this report, we have presented an approach that enables PCDI of weakly scattering specimens in a routine and self-consistent way. We have introduced tools for the evaluation of coherent diffraction patterns that provide immediate feedback on the scattering behaviour of the specimen and quantitative results on the number of scattered photons, the potential resolution and the reconstruction error. We have proposed new schemes for avoiding difficulties with the raster grid ambiguity inherent to the ptychographic CDI problem with simultaneous probe reconstruction. The experimental demonstration has additionally displayed the usefulness of a pre-characterization step with a strong reference scatterer. A biological specimen with an up to two orders of magnitude smaller phase shift than the reference structure has been successfully reconstructed with the new methods.
The methods presented here constitute an important step towards three-dimensional PCDI, since they allow reliable reconstruction of weak objects from hard x-ray data, i.e. in the energy regime where the Born approximation is easily satisfied. Together with additional knowledge about the chemical composition, the quantitative determination of electron densities allows one to obtain information about the specimen's mass density distribution [41].