Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Ptychographic overlap constraint errors and the limits of their numerical recovery using conjugate gradient descent methods

Open Access Open Access

Abstract

Ptychographic coherent x-ray diffractive imaging is a form of scanning microscopy that does not require optics to image a sample. A series of scanned coherent diffraction patterns recorded from multiple overlapping illuminated regions on the sample are inverted numerically to retrieve its image. The technique recovers the phase lost by detecting the diffraction patterns by using experimentally known constraints, in this case the measured diffraction intensities and the assumed scan positions on the sample. The spatial resolution of the recovered image of the sample is limited by the angular extent over which the diffraction patterns are recorded and how well these constraints are known. Here, we explore how reconstruction quality degrades with uncertainties in the scan positions. We show experimentally that large errors in the assumed scan positions on the sample can be numerically determined and corrected using conjugate gradient descent methods. We also explore in simulations the limits, based on the signal to noise of the diffraction patterns and amount of overlap between adjacent scan positions, of just how large these errors can be and still be rendered tractable by this method.

© 2014 Optical Society of America

1. Introduction

Coherent x-ray diffractive imaging (CXDI) is a form of microscopy that forms an image of a sample under investigation without optics. Rather, it recovers the exit wave leaving the sample from a measurement of its coherent diffraction pattern using phase retrieval techniques. This approach solves the “phase problem” [1], which arises due to the inability of x-ray detectors to measure complex valued wave fields. Retrieval of the missing phase starts with a guess of the sample exit wave field and iteratively corrects the guess using information known about the system. This information includes the measured diffraction intensities as well as constraints on the sample, e.g. a support constraint [2] or known positions of the illuminating wave field on the sample [3]. A solution is found when the initial guess is corrected to such a degree that it simultaneously satisfies all constraints. The recovered exit wave has been shown to be unique [4], and the achievable spatial resolution is theoretically diffraction limited. The first experimental demonstration of using iterative techniques to overcome the phase problem in x-ray microscopy was performed by Miao et al. [5]. This approach has since been expanded to many diverse samples and experimental regimes [610].

A typical coherent diffractive imaging experiment in the forward-scattering geometry is shown in Fig. 1 [11]. Here, we define a as the detector pixel size, λ as the x-ray wavelength, k = 2π/λ the x-ray wavenumber, as the sample to detector distance, and as the detector is placed in the far field, the array size in the sample to detector Fourier transformation as N × N. The field of view at the detector is LD = Na, while the field of view at the sample plane is LS = λℓN/LD. Thus the real space pixel size at the sample plane is ΔxS = LS/N = λℓ/Na, and the Fourier space pixel size at the detector plane is found using the relation ΔqΔxS = 2π/N, resulting in Δq = ka/ℓ. Samples larger than the incident x-ray beam can be imaged by a scanning variant of CXDI known as ptychography. In this scheme, the sample is illuminated with overlapping regions at multiple scan positions [12], as shown in Fig. 1 by the overlapping circles. Here, a simulated x-ray wave field p(r) is generated by computing the Fresnel diffraction integral for a plane wave incident on a circular pinhole aperture, with a propagation distance of a few millimeters from the pinhole to the sample. This p(r) is incident on the sample with transmission function T(r) at some location r1. The exit wave is defined using the projection approximation as ψ1(r) = p(r)T(rr1), and is propagated to the detector by taking its Fourier transform, giving the wavefield at the detector: [ψ1(r)], where is the spatial Fourier transform:

[ψ(r)]=Ψ(q)=1Nx,yψ(x,y)exp[2πi(xqx+yqyN)]1[Ψ(q)]=ψ(r)=1Nqx,qyΨ(qx,qy)exp[+2πi(xqx+yqyN)],
where N is the array size in the both the x and y directions. An area detector can only measure the intensity of the wavefield at the detector, and so we use I1(q) = |[ψ1(r)]|2 as a simulated diffraction intensity measurement. The sample is then moved to a new location r2 so that a neighboring but overlapping region with exit wave ψ2(r) = p(r)T(rr2) can be illuminated, and this can be repeated for further rj, j ∈ ℤ, so that we have some desired total field of view on the sample.

 figure: Fig. 1

Fig. 1 Schematic of an X-ray scanning CDI measurement in the forward-scattering geometry. X-rays, defined by an illumination function p(r) are incident on a sample with a transmission function T(r). A ptychographic data set is acquired by recording a series of diffraction patterns by an X-ray area detector while scanning the sample with overlapping illumination regions, depicted here by the overlapping circles.

Download Full Size | PDF

The purpose of collecting diffraction from overlapping regions is that it provides a very robust constraint on the reconstruction: we have multiple diffraction measurements constraining each region on the sample. This drastically reduces image artifacts resulting from imperfect measurements of the diffraction patterns; e.g. noisy diffraction or missing low spatial frequency information due to the use of a beam stop [13]. The enantiomorph ambiguity associated with single-view diffractive imaging is also removed, because scanning the sample removes the Fourier transform symmetries from which this problem arises, allowing for vastly improved algorithmic performance. Ptychographic imaging allows for an arbitrarily large field of view imaging of extended samples. It also allows for the simultaneous determination of the sample transmission function and the x-ray wave field illuminating the sample [14, 15]. Furthermore, by using a known test sample, the ptychographic approach is a powerful and robust method for determining the full complex valued wave field of the beam used to illuminate the test sample as well as the optics upstream of it [16].

The algorithms used in CXDI to extract the sample exit wave from an initial guess using experimental constraints can be formulated in terms of gradient descent of an error metric [1719] or as a “projections onto constraint sets” algorithm [20]. In gradient descent type algorithms, an error metric εj is defined:

εj=q{|Ψj,n(q)|Ij(q)}2,
where Ψj,n(q) = [ψj,n(r)] = [p(r)T(rrj)] is the nth iterate of the exit wave at position rj propagated to the detector, and the sum over q only includes pixels where the diffraction intensity measurement Ij(q) is defined (e.g. missing information behind a beam stop or due to damaged detector pixels is not included). The gradient of the error metric with respect to the sample transmission function T(rrj) or the x-ray illumination function p(r) is then performed analytically [19]. This will generate an “update function” [15] with which we modify T(rrj) and p(r) to iteratively travel to a location in error metric space that has minimum error. The measurement space constraints of diffraction from overlapping scan positions appear to be stringent enough to allow us to find the global minimum in error metric space. This is implied from the fact that, for diffraction not significantly degraded by Poisson shot noise or missing data regions, we always recover the same T(rrj) and p(r) even with very different initial guesses of these functions. That we are at a global minimum is further supported by the use of the Difference Map (DM) algorithm to recover T(rrj) and p(r) since the DM has well noted ability to escape local minima and find global minima [18, 20].

The ability to quickly and robustly converge to a solution for T(r) and p(r) is drastically degraded when errors in the assumed scan positions accumulate. Errors in the assumed scan positions rj can be caused by thermal drift, vibrations and other mechanical errors in the experimental equipment when undertaking experiments. If using a beam on the order of tens of nanometers in size, knowledge of the scan positions can be compromised significantly if vibrations are not damped adequately. The effect of scan position errors on ptychography due to vibration and drift and various schemes to correct for them have been addressed recently [2126]. The schemes devised in those references include the use of genetic algorithms, simulated annealing, transmission function correlation methods, and model-based drift correction. The common feature of these methods is to find some configuration of scan positions rj which minimize an error metric of a similar form to Eq. (2), and they explore various ways of accomplishing this. In this paper, we quantify the improvements that can be achieved using conjugate gradient (CG) descent methods to minimize Eq. (2) and so determine the scan positions rj. In contrast to reference [19], which uses CG methods to solve for T(r), p(r), and the scan positions rj simultaneously, we introduce a novel method showing how to combine existing and well-established ptychographic algorithms, the enhanced ptychographic iterative engine (ePIE) [15] and the difference map (DM) [14], with a CG approach to correct for insufficiently known scan positions. This is important as using only a gradient descent approach to ptychographically find T(r), p(r), and the rj simultaneously can become trapped in local minima easily; combining CG correction of the scan positions rj with ePIE and DM updates for T(r) and p(r) can overcome this. We also introduce the concept of a critical scan position error in ptychography and then determine it using the combination of established methods to recover T(r) and p(r) and a GC recovery of the scan positions rj.

We performed a simulated ptychography experiment to explore the effects of scan position errors on image quality. A series of diffraction patterns was generated by raster scanning a sample T(r) with an illumination function p(r), which had a diameter of ≃ 280ΔxS, in the forward scattering geometry shown in Fig. 1. The simulated sample T(r) is an image of several cells, and is represented in an HSV colorspace, with the hue as the phase (ranging from 0 to 2π) of the sample, the brightness as the magnitude (ranging from 0 to 1), and the saturation is set to 1. The illumination p(r) is generated by Fresnel propagating a simulated perfectly circular aperture over a small distance. The overlap between adjacent illumination regions is 75%, which corresponds to having the adjacent scan positions separated by a distance of 70ΔxS. In this way, 49 diffraction patterns are created by scanning a 7×7 square grid. A thin rectangular portion of each of these diffraction patterns is removed to simulate the effect of a beam stop, also as seen in Fig. 1. When no errors in the scan positions are present, we reconstruct p(r) and T(r) as shown in Fig. 2(a) and 2(b). When scan position errors are present, here random scan position errors of up to 10ΔxS added to the x and y components for each of the 49 scan positions, we see significant degradation of the reconstructions of p(r) and T(r), as seen in Fig. 2(c) and 2(d). The reconstructions shown in Fig. 2 illustrate how sensitive ptychography is to errors in the assumed scan positions.

 figure: Fig. 2

Fig. 2 (a–b) Reconstructions of p(r) and T(r) for when there is no error in scan position constraint. (c–d) Reconstructions of p(r) and T(r) for when random errors up to 10ΔxS are added to the x and y components of each of the scan locations. (e–f) Line cuts of T(r) along the red line in (b); (e) is the magnitude of T(r) along this line while (f) is the phase. (g–h) Line cuts of p(r) along the red line in (a); (g) is the magnitude of p(r) along this line while (h) is the phase. In Fig. 2(e) to 2(h), the solid green line is the true T(r) or p(r), the solid black line is the line cut from reconstructions for T(r) or p(r) assuming no scan position errors, while the dotted red line is the line cut from reconstructions for T(r) or p(r) with scan position errors. The white horizontal scale bars in frames (a) and (b) are both 100ΔxS.

Download Full Size | PDF

2. Iterative refinement of the overlap constraint

Ptychographic diffraction measurements are often information-rich enough to allow us to extract, in addition to the sample transmission function T(r) and the illumination function p(r), the scan positions rj. One conceptually simple way of doing this is to take the gradient of Eq. (2) with respect to the scan positions rj and use an iterative process to correct for scan position errors [19]. Just as we are able to take the gradient of Eq. (2) with respect to T(r) and p(r) and update our guesses of these quantities in an iterative fashion, we can use a gradient descent scheme to refine our initial guesses for the rj so that we iteratively find the true locations.

In this way, we have a very simple, and as will soon be seen, very effective method for incorporating iterative scan position correction into DM and ePIE, the standard ptychographic reconstruction algorithms [14, 15]. The steepest descent method for correcting scan positions using an analytical calculation of the gradient of Eq. (2) with respect to the scan positions rj is given by:

rj,n+1=rj,nαnrj,nεj.
For a little more computational effort but much better performance, we can update the scan positions along the CG descent directions:
Λj,0=rj,0εjΛj,n=βnΛj,n1rj,nεjrj,n+1=rj,n+αnΛj,n,
where rj,0 are the initial guesses for the scan positions, ∇rj,n is the gradient operator with respect to the scan positions rj,n, the αn is a step length taken along the steepest descent or conjugate gradient directions, and βn is calculated using the Polak-Ribière method [27]:
βnPR=Δj,nT(Δj,nΔj,n1)Δj,n1TΔj,n1,
where Δj,n = −∇rj,nεj, T denotes the transpose, and the CG direction reset βn=max{0,βnPR} is used. Explicit expressions for the analytical gradient computation ∇rj,nεj = ∂εj/∂xj,n + ŷ∂εj/∂yj,n are given by [19]:
εjxj,n=4πNq{(1Ij(q)|Ψj,n(q)|)Im[Ψj,n*(q)×(p(r)1{qxT^(q)exp[2πi(qxxj,n+qyyj,nN)]})]},
and
εjxj,n=4πNq{(1Ij(q)|Ψj,n(q)|)Im[Ψj,n*(q)×(p(r)1{qyT^(q)exp[2πi(qxxj,n+qyyj,nN)]})]},
where (q) = [T(r)], and * denotes the complex conjugate.

We integrate this CG correction of the scan positions into the standard ptychographic reconstruction algorithms by using the rj,0 positions initially, and update T(rrj) and p(r) using either the DM or ePIE for some tens of iterations. Once this is done, we use these newly obtained T(rrj) and p(r) in the gradient calculation of Eq. (2), and update the rj using Eq. (4). We choose the step length αn by rescaling Λj,n so that it is a unit vector, and either simply pick a value of αn (say 1 or 2 pixels along the Λj,n direction), or perform a line search along the Λj,n direction by evaluating the error metric Eq. (2) at a few trial values of αn:

εj(αn)=q{|[p(r)T(rrj,nαnΛj,n)]|Ij(q)}2.
Since Λj,n is a unit vector, some sensible trial values for αn are say 1 pixel, 5 pixels, and 10 pixels along the CG direction Λj,n. Once we have found a value for αn which gives us the smallest value of εj(αn), we use this αn to update rj,n+1 as in Eq. (4). Next, we run the DM or ePIE to again update T(rrj) and p(r) for another ten iterations or so using the just updated rj,n+1, and repeat the above CG scan position correction procedure again after this. For the results shown in the subsequent sections below, we use 100 iterations of DM and 50 iterations of ePIE to update T(r) and p(r), and update the rj,n every 10 iterations (regardless of whether DM or ePIE is being used). The recipe just given is then repeated for however many iterations it takes to get the error metric to converge to zero. By performing the scan position correction step only every ten iterations, the increased computing time is minimal, typically a ≃ 20% increase. Performing scan position correction more frequently appears to have little advantage as it is noticed that many times some scan positions can oscillate between two different locations, indicating algorithmic stagnation.

3. Experimental demonstration

Here we demonstrate experimentally that the scan position correction scheme given in the preceding section works robustly and allows us to recover T(r), p(r) and the scan positions rj even when large scan position errors are present. The experiment was performed at beamline 2-ID-B [28] at the Advanced Photon Source in the transmission geometry shown in Fig. 1. The pinhole aperture used to define p(r) was circular in shape, 10 μm in diameter and placed a few millimeters upstream of the sample. A 13×13 square grid was scanned, with scanning steps of 3 μm to give an overlap of 70%. The sample used was a magnetic multilayer which exhibits maze-like ordering of the magnetic domains [2932]. In these multilayer systems, depositing alternating layers of a transition metal and a rare-earth metal causes formation of an artificial ferrimagnet with perpendicular magnetic anisotropy. Previous experiments and measurements on multilayer samples similar to the one used here have shown that the ferrimagnetic domain widths range between 200 nm to 1 μm, with the Bloch domain walls ∼ 50 nm [8, 3336]. The magnetization of the domains in this type of sample is primarily out of plane. X-ray magnetic circular dichroism is the primary magnetic contrast mechanism in the sample transmission function T(r) at L and M resonances in the multilayer materials.

Due to scan stage misalignment, rather than scanning a set of positions on a square grid, a region on the sample can instead inadvertently be scanned on a parallelogram shaped grid. Because of this, the larger the field of view scanned, the more that scan position errors can accumulate. Horizontal and vertical scanning stage misalignments of as little as a few degrees can cause scan position errors of up to a few microns to accumulate in scans a few tens of μm in size. The effect this has on reconstructions is seen in Fig. 3(a) and 3(b). Here, the reconstructed T(r) (in Fig. 3(a)) and p(r) (in Fig. 3(b)) show significant artifacts. For this experimental geometry with the multilayer plane oriented normal to the incident x-ray beam as shown in Fig. 1, the domains are oriented parallel and antiparallel to the wavefield propagation direction [33, 37]. A reconstruction of T(r) should therefore be approximately a binary structure with values of only ±Ms, where Ms is the out of plane saturation magnetization value [8]. However in Fig. 3(a), there are many regions in the T(r) reconstruction which are intermediate to the ±Ms out of plane magnetizations, which is unphysical. Also the reconstruction of p(r) is far from what is expected of a wavefield a few millimeters downstream of a plane wavefield exiting a circular pinhole aperture. Fresnel fringes within the circular region should be evident but are absent; instead other numerical artifacts are shown.

 figure: Fig. 3

Fig. 3 (a) Reconstructed T(r) and (b) p(r) when incorrect scan positions are used from experimentally collected diffraction at the Advanced Photon Source. (c) Improved reconstructions for T(r) and (d) p(r) after application of the scan position correction method presented in Section 2. (e) The recovered scan positions rj (green dots) starting from the incorrect scan positions (black dots). The distance between the black dots on the square scanning grid is 3 μm.

Download Full Size | PDF

The effectiveness of the scan position scheme discussed in the previous section can be seen in Fig. 3(c) to 3(e), where it is shown that we can recover from quite severe errors in the scan positions. After its application, we have corrected the scan positions rj with the result that the reconstructions for T(r) and p(r) are of much higher quality with the magnetic moment directions predominantly having the expected values of only ±Ms. We also can see for the reconstruction of p(r) the expected clearly defined Fresnel fringing. The recovered scan positions rj, shown in Fig. 3(e), can be seen to be off from the incorrectly assumed scan positions by up to almost 3 μm in some locations, which is almost equal to the scanning step sizes and is about 30% of the diameter of the illumination function p(r).

4. Maximum recoverable scan position error

Here we address in simulated experiments the limits to our ability to solve for T(r), p(r) and the scan positions rj using the methods of Section 2 when the diffraction signal is degraded in an experimentally realistic way. The primary cause of signal degradation encountered in coherent imaging experiments at synchrotron light sources is the limited dynamic range of the detectors typically used, resulting in information loss at high spatial frequencies due to Poisson noise. Also, it may be necessary to use a beam stop to prevent damage to the detector. As a result, low spatial frequency information may be altogether missing (the rectangular black region in Fig. 4(a)). Another experimental parameter that greatly affects the performance of ptychographic reconstruction algorithms and scan position recovery is the overlap of the scan positions. For example, in Fig. 4(b) and 4(c) a 2×2 square grid is scanned; the overlap in Fig. 4(b) is significantly lower than in Fig. 4(c), which means that the four diffraction patterns one would obtain in Fig. 4(b) contain less spatial information redundancy than the four diffraction patterns one would obtain in Fig. 4(c). As it is this redundant information content in the diverse diffraction that allows us to solve for T(r), p(r) and the scan positions rj, we expect to be able to tolerate larger scan position errors with greater overlap. As will be seen, the overlap plays a crucial role in the maximum recoverable scan position error ej,max. For example with the loosely scanned region, it might not be possible to recover the true scan positions (shown as the black circles with centers at the black dots) from the incorrect scan positions (the white dots). If we use a higher overlap like that shown on the right, it becomes much more likely that we are able to recover the true scan positions.

 figure: Fig. 4

Fig. 4 To explore the limits of recoverable scan position error we look at two parameters: the photon fluence, and correspondingly the SNR of a diffraction pattern, and the amount of overlap, which determines the degree to which regions on the sample are overdetermined by information in the diffraction. (a) A simulated diffraction pattern. A beamstop, used in experiments to prevent damage to the area detector, is also assumed to be present in all cases. (b) A relatively low amount of overlap, and (c) a relatively high amount of overlap. (d) The different average diffraction intensities I(q) integrated azimuthally versus spatial frequency used for the simulations in this letter, and (e) the SNR of the diffraction intensities in (d). Here, SNR=10log10(I(q)/I(q)).

Download Full Size | PDF

We present simulation results exploring the performance of the CG scan position correction method versus varying the diffraction signal to noise as a function of spatial frequency as well as the overlap of the scanned region on the sample. We look at different values of diffraction integrated intensities; in Fig. 4(d) the integrated intensity I(q) is varied between 105 and 1013 (arbitrary units) in steps of 102, and to show the intensity versus spatial frequency decay, is then integrated azimuthally at each spatial frequency. The SNR, defined as SNR=10log10(I(q)/I(q)), for these different integrated intensities is shown in Fig. 4(e). In all cases, a portion of the diffraction intensity is next removed (as in Fig. 4(a)) to simulate the effects of a beamstop. We also vary the overlap of the scan positions. We scan a simulated sample on a square 7 × 7 grid with ptychographic overlap of 65%, 75%, and 85%, and add random errors ej to each scan position so that the actual (and assumed unknown) scan positions used to generate diffraction are rj + ej. The procedure given in Sec. 2 is then performed with the aim of determining just how large of maximum random errors ej,max we can tolerate, and still recover the positions rj.

The results of varying SNR and overlap versus average scan position error are shown in Fig. 5. Remarkably, there appears to be a point at which increasing the SNR versus spatial frequency of a diffraction pattern has no further effect on the maximum recoverable scan position error. For the 85% overlap square 7 × 7 grid (corresponding to Fig. 5(a)), integrated intensities of 107, 109, 1011, and 1013 (which correspond to the black, blue, green, and magenta curves respectively in Fig. 4(d) and 4(e)) all have a maximum recoverable error of about ej,max902ΔxS, which we define as where the final average scan position error Δravgfinal ceases to be roughly flat with increasing Δravginitial and begins to increase with increasing Δravginitial. However when the integrated intensity is 105 (corresponding the the red curves in Fig. 4(d) and 4(e)), the maximum recoverable error is reduced to Δravginitial53.6ΔxS, corresponding to ej,max702ΔxS. What this indicates is that there is a strong SNR and overlap dependency on the maximum recoverable error for lower SNR diffraction, but at some point the SNR dependency is lost and the maximum recoverable error becomes fixed for a particular amount of overlap. Similar behavior is seen for the 75% and 65% overlap square 7 × 7 grids, as shown in Fig. 5(b) and 5(c). This means that we can recover errors up to 45% of the diameter of p(r) for 85% overlap, up to 30% for 75% overlap, and only 20% for 65% overlap at integrated intensities greater than 107 (the diameter of p(r) is ≃ 280ΔxS). For the integrated intensity of 105, Fig. 5 shows a decrease in ej,max of about 20ΔxS for all overlap cases when compared to the other intensities.

 figure: Fig. 5

Fig. 5 The dependence on the maximum recoverable scan position error ej,max (and corresponding average error over all scan positions Δravginitial) on the diffraction SNR and overlap. Here, we look at when a square 7 × 7 grid is scanned with 65%, 75%, and 85% overlap between adjacent scan positions, and then scan position errors ej, up to some maximum given by ej,max, are added to each of the j scan positions. The procedure given in Section 2 is performed and we determine final scan position configurations with average error Δravgfinal. The results shown here are those with the lowest final error metric value averaged over all j scan positions, as defined by Eq. (2), out of a total of twenty independent reconstruction trials. The maximum average scan position error Δravginitial the CG method is able to handle is determined by where Δravgfinal stops being roughly flat with increasing Δravginitial and begins to increase with increasing Δravginitial. For the 65% case, this cutoff is Δravginitial30.6ΔxS with ej,max402ΔxS, for the 75% case, this cutoff is Δravginitial45.9ΔxS with ej,max602ΔxS, while for the 85% case, this cutoff is Δravginitial68.9ΔxS with ej,max902ΔxS. Also included are results for perfect data when there is no simulated beamstop or Poisson noise, to establish a baseline for the performance of the method presented in Sec. 2. The primary differences for these perfect data baseline cases are greatly decreased total computation times (about a factor of 2–3), in addition to a modest increase in tolerable Δravginitial.

Download Full Size | PDF

We see the impact on the SNR versus spatial frequency for integrated intensities between 105 and 107: no photons are detected near the spatial frequency limit of the detector, defined here as qmax = NΔq = Nka/ℓ (we used an array size N = 512). For example, the average intensity for the 105 integrated intensity case in Fig. 4(d) is less than unity for spatial frequencies greater than ≈ 35Δq. This corresponds to a SNR of ≈ 2 dB, about where the signal becomes lost in the noise. Because of this, some dependence of Δravginitial on the integrated intensity is both expected and observed. Combined with the effects of the missing spatial frequencies due to the beamstop, the diffraction data for integrated intensities between 105 and 107 appear to have insufficient information content for position error recovery comparable to the higher integrated intensities. For an integrated intensity of 107 the signal becomes lost in the noise at ≈ 102Δq, still far from qmax = NΔq/2, yet we are able to solve for approximately the same ej for the higher integrated intensity cases, indicating these data have sufficient information content. Starting above an integrated intensity of 107, the SNR is greater than ≈ 2 dB for all spatial frequencies. From these simulations we find that the recoverable position errors ej,max becomes independent of the integrated intensity when the SNR approaches this value for pixels at the spatial frequency limit of the detector.

Some representative recovered scan positions rj as well as the recovered T(r) and p(r) are shown in Fig. 6. As the maximum scan position error ej,max becomes large, corresponding to when Δravgfinal begins to increase with increasing Δravginitial, the scan positions at the periphery of the scanned region become more and more difficult to solve for, as seen in Fig. 6(a). The reason for this is that these peripheral regions have fewer independent diffraction patterns constraining possible solutions for T(r), p(r), and rj while scan positions in the center of the scanned region have relatively many diffraction patterns. What this means is that there is not enough information content in the ptychographic diffraction data at these peripheral regions to allow us to effectively converge to simultaneous solutions for T(r), p(r), and rj. As Δravginitial becomes even larger, even some central scan positions become intractable, as seen in Fig. 6(b), and at some point none of the scan positions are recoverable (Fig. 6(c)). This critical Δravginitial at which the peripheral scan positions become difficult to recover corresponds to when the average scan position error, defined as

Δravgfinal=j|rjtruerjfinal|/7×7,
reaches a value of approximately 20ΔxS, as seen in Fig. 5 for all overlap cases, and when Δravgfinal exceeds this, the recovered T(r), p(r), and rj begin to become too degraded to be of any use.

 figure: Fig. 6

Fig. 6 Recovered T(r), p(r), scan positions rj and reconstructions for three values of ej,max. (a) ej,max902ΔxS, (b) ej,max1102ΔxS, and (c) ej,max1202ΔxS. All reconstructions correspond to an integrated intensity of 109, corresponding to the blue curves in Fig. 4(d) and 4(e) and Fig. 5, and the 85% overlap square 7 × 7 grid (the black circles with distance between them of 40ΔxS), with the red dots corresponding to the true scan positions, and the green dots corresponding to the recovered scan positions.

Download Full Size | PDF

When we are in the vicinity of, but still below the critical Δravginitial, it is possible to further refine those scan positions at the periphery which have not been correctly solved for. Take for example the scan position configuration in Fig. 7(a). Here, the central scan positions are correctly solved for while some of those located at the periphery have not been. What can be done next is to use the recovered scan positions rj in Fig. 7(a) as well as the recovered illumination p(r), but start with a new initial transmission function T(r) consisting of complex valued random numbers. Running the method given in Section 2 again a number of times, here twenty, and at the end averaging the results for the recovered rj gives almost perfectly recovered scan positions, with a Δravgfinal0.1ΔxS, as seen in Fig. 7(b). It should be noted in Fig. 7(b) that we have recovered the scan positions only to integer pixel accuracy. If positioning errors exist on sub-pixel length scales, the recovered positions in Fig. 7(b) can be used as a starting point for a correlation method [21, 38] combined with sub-pixel registration methods [39].

 figure: Fig. 7

Fig. 7 When below the critical maximum scan position error ej,max, it is possible to further refine incorrectly recovered peripheral scan positions shown in (a). By keeping the previously recovered probe p(r) and scan positions rj but resetting T(r) to be initially consisting of complex valued random numbers, we perform the method given in Section 2 a number of subsequent times, here twenty, and average the results for all the recovered rj. This gives almost perfectly recovered scan positions, as seen in (b), with a Δravgfinal0.1ΔxS. All values for Δr are in units of ΔxS.

Download Full Size | PDF

We also note that the results shown in Fig. 5 are independent on the scan trajectory used. Spiral and concentric circular scan patterns are popular for avoiding the so-called “raster pathology” that can arise with scans performed on a periodic lattice [4042]. However, as long as the overlap between adjacent scan positions rj is the same to within a few percentage points, the critical initial average error Δravginitial is about the same for both raster and non-raster scans. The only significant difference between the two cases is that the starting probe position guesses are different. The CG method still determines the true scan positions from different guessed positions if Δravginitial is about the same. This situation is analogous to using different initial guesses for T(r): using DM or ePIE, we can still recover the sample transmission function from these different starts.

5. Conclusions

We have shown in numerical simulations that the conjugate gradient method can be used to correct scan position errors in ptychography robustly and quickly when used with established phase retrieval algorithms, even when the diffraction patterns have been degraded in ways similar to those we see in experiments. Using this method we found in simulation that we can recover errors of up to approximately 45% of the illumination function diameter and up to almost 300% of the scan step size when the initial overlap of the illumination function between adjacent ptychographic scan steps is 85%. We show experimentally that this method can recover errors of approximately 30% of the illumination function diameter and almost 100% of the scan step size. We further observe that the integrated intensity of the diffraction data (and thus the signal-to-noise ratio versus spatial frequency), if increased past some cutoff, ceases to play a role in the ability of the method to recover severe scan position errors compared to lower integrated intensities, and that the degree of overlap plays the dominant role in the ability to recover large scan position errors at larger integrated intensities. From these simulations we obtain an upper bound on the recoverable random errors at each scan location - a critical scan position error - as a function of overlap and diffraction integrated intensity. This critical scan position error is specific to the use of the conjugate gradient method used to solve for scan position errors in combination with the DM and ePIE methods. This work shows that both the signal-to-noise ratios of the diffraction patterns, and the overlap between adjacent scan positions, play crucial roles in determining the magnitude of scan position errors can be recovered before the conjugate gradient method fails. We anticipate that these results can be extended to experiments to set quantitative limits on tolerable scan errors and the source brightness or measurement time required for weakly scattering samples.

Acknowledgments

The authors acknowledge the support of the Australian Research Council Centre of Excellence for Coherent X-ray Science and the U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences, under Contract DE-SC0001805 and Contract DE-AC02-06CH11357.

References and links

1. D. Sayre, “Some implications of a theorem due to Shannon,” Acta Cryst. 5, 843 (1952). [CrossRef]  

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

3. J.M. Rodenburg and H.M.L. Faulkner, “A phase retrieval algorithm for shifting illumination,” Appl. Phys. Lett. 85, 4795–4797 (2004). [CrossRef]  

4. R. H. T. Bates, “Fourier phase problems are uniquely solvable in more than one dimension. I. Underlying theory,” Optik 61, 247–262 (1982).

5. J. Miao, P. Charalambous, J. Kirz, and D. Sayre, “An extension of the methods of x-ray crystallography to allow imaging of micron-size non-crystalline specimens,” Nature 400, 342–344 (1999). [CrossRef]  

6. P. Godard, G. Carbone, M. Allain, F. Mastropietro, G. Chen, L. Capello, A. Diaz, T. H. Metzger, J. Stangl, and V. Chamard, “Three-dimensional high-resolution quantitative microscopy of extended crystals,” Nat. Communications 2, 568 (2011). [CrossRef]  

7. K. Giewekemeyer, P. Thibault, S. Kalbfleisch, A. Beerlink, C.M. Kewish, M. Dierolf, F. Pfeiffer, and T. Salditt, “Quantitative biological imaging by ptychographic X-ray diffraction microscopy,” Proc. Natl. Acad. Sci. USA 107, 529–534 (2010). [CrossRef]  

8. A. Tripathi, J. Mohanty, S.H. Dietze, O.G. Shpyrko, E. Shipton, E.E. Fullerton, S.S. Kim, and I. McNulty, “Dichroic coherent diffractive imaging,” Proc. Natl. Acad. Sci. USA 108, 13393–13398 (2011). [CrossRef]   [PubMed]  

9. B. Abbey, K.A. Nugent, G.J. Williams, J.N. Clark, A.G. Peele, M.A. Pfeifer, M. de Jonge, and I. McNulty, “Keyhole coherent diffractive imaging,” Nat. Physics 4, 394–398 (2008). [CrossRef]  

10. M. Dierolf, A. Menzel, P. Thibault, P. Schneider, C.M. Kewish, R. Wepf, O. Bunk, and F. Pfeiffer, “Ptychographic X-ray computed tomography at the nanoscale,” Nature 467, 436–439 (2010). [CrossRef]   [PubMed]  

11. Image of sample modified from an original courtesy of Invitrogen: http://www.biovis.com/carv-ii.htm.

12. 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 108481–487 (2008). [CrossRef]  

13. H.N. Chapman, A. Barty, S. Marchesini, A. Noy, S.P. Hau-Riege, C. Cui, M.R. Howells, R. Rosen, H. He, J.C.H. Spence, U. Weierstall, T. Beetz, C. Jacobsen, and D. Shapiro, “High-resolution ab initio three-dimensional x-ray diffraction microscopy,” J. Opt. Soc. Am. A 23, 1179–1200 (2006). [CrossRef]  

14. 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). [CrossRef]   [PubMed]  

15. A.M. Maiden and J.M. Rodenburg, “An improved ptychographical phase retrieval algorithm for diffractive imaging,” Ultramicroscopy 109, 1256–1262 (2009). [CrossRef]   [PubMed]  

16. C.M. Kewish, M. Guizar-Sicairos, C. Liu, J. Qian, B. Shi, C. Benson, A.M. Khounsary, J. Vila-Comamala, O. Bunk, J.R. Fienup, A.T. Macrander, and L. Assoufid, “Reconstruction of an astigmatic hard X-ray beam and alignment of K-B mirrors from ptychographic coherent diffraction data,” Opt. Express 18, 23420–23427 (2010). [CrossRef]   [PubMed]  

17. J. R. Fienup, “Phase retrieval algorithms: a comparison,” App. Opt. 21, 2758–2769 (1982). [CrossRef]  

18. S. Marchesini, “A unified evaluation of iterative projection algorithms for phase retrieval,” Rev. Sci. Instrum. 78, 011301 (2007). [CrossRef]  

19. M. Guizar-Sicairos and J.R. Fienup, “Phase retrieval with transverse translation diversity: a nonlinear optimization approach,” Opt. Express 16, 7264–7278 (2008). [CrossRef]   [PubMed]  

20. V. Elser, I. Rankenburg, and P. Thibault, “Searching with iterated maps,” Proc. Natl. Acad. Sci. USA 104, 418–423 (2007). [CrossRef]   [PubMed]  

21. F. Zhang, I. Peterson, J. Vila-Comamala, A. Diaz, F. Berenguer, R. Bean, B. Chen, A. Menzel, I. K. Robinson, and J. M. Rodenburg, “Translation position determination in ptychographic coherent diffraction imaging,” Opt. Express 21, 13592–13606 (2013). [CrossRef]   [PubMed]  

22. A. Shenfield and J. M. Rodenburg, “Evolutionary determination of experimental parameters for ptychographical imaging,” J. Appl. Phys. 109, 124510 (2011). [CrossRef]  

23. M. Beckers, T. Senkbeil, T. Gorniak, K. Giewekemeyer, T. Salditt, and A. Rosenhahn, “Drift correction in ptychographic diffractive imaging,” Ultramicroscopy 126, 44–47 (2013). [CrossRef]   [PubMed]  

24. Y. Takahashi, A. Suzuki, N. Zettsu, Y. Kohmura, Y. Senba, H. Ohashi, K. Yamauchi, and T. Ishikawa, “Towards high-resolution ptychographic x-ray diffraction microscopy,” Phys. Rev. B 83, 214109 (2011). [CrossRef]  

25. A.M. Maiden, M.J. Humphry, M.C. Sarahan, B. Kraus, and J.M. Rodenburg, “An annealing algorithm to correct positioning errors in ptychography,” Ultramicroscopy 120, 164–172 (2012). [CrossRef]  

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

27. E. Polak and G. Ribière, “Note sur la convergence de méthodes de directions conjuguées,” Rev. Fr. Inform. Rech. Oper. 16, 35–43 (1969).

28. I. McNulty, A.M. Khounsary, Y.P. Feng, Y. Qian, J. Barraza, C. Benson, and D. Shu, “A beamline for 1–4 keV microscopy and coherence experiments at the Advanced Photon Source,” Rev. Sci. Instrum. 67, 3372 (1996). [CrossRef]  

29. C. Kittel, “Physical theory of ferromagnetic domains,” Rev. Mod. Phys. 21, 541–583 (1949). [CrossRef]  

30. C. Kooy and U. Enz, “Experimental and theoretical study of the domain configuration in thin layers of BaFe12O9,” Philips Res. Rep. 15, 7–29 (1960).

31. M. Seul and D. Andelman, “Domain shapes and patterns: The phenomenology of modulated phases,” Science 267, 476–483 (1995). [CrossRef]   [PubMed]  

32. M.T. Johnson, P.J.H. Bloemen, F.J.A. den Broeder, and J.J. de Vries, “Magnetic anisotropy in metallic multilayers,” Rep. Prog. Phys. 59, 1409–1458 (1996). [CrossRef]  

33. O. Hellwig, G. Denbeau, B. Kortright, and E.E. Fullerton, “X-ray studies of aligned magnetic stripe domains in perpendicular multilayers,” Physica B 336, 136–144 (2003). [CrossRef]  

34. D. Raasch, J. Reck, C. Mathieu, and B. Hillebrands, “Exchange stiffness constant and wall energy density of amorphous GdTb-FeCo thin films,” J. Appl. Phys. 76, 1145–1149 (1994). [CrossRef]  

35. Y. Mimura, N. Imamura, T. Kobayashi, A. Okada, and Y. Kushiro, “Magnetic properties of amorphous alloy films of Fe with Gd, Tb, Dy, Ho, or Er,” J. Appl. Phys. 49, 1208–1215 (1978). [CrossRef]  

36. C. Mathieu, B. Hillebrands, and D. Raasch, “Exchange stiffness constant and effective gyromagnetic factor of Gd, Tb, and Nd containing, amorphous rare earth-transition metal film,” IEEE Trans. Magn. 30, 4434–4436 (1994). [CrossRef]  

37. E. Dudzik, S. S. Dhesi, S. P. Collins, H. A. Dürr, G. van der Laan, K. Chesnel, M. Belakhovsky, A. Marty, Y. Samson, and J. B. Goedkoop, “X-ray resonant magnetic scattering from FePd thin films,” J. Appl. Phys. 87, 5469–5471 (2000). [CrossRef]  

38. A. C. Hurst, T. B. Edo, T. Walther, F. Sweeney, and J. M. Rodenburg, “Probe position recovery for ptychographical imaging,” J. Phys. Conf. Ser. 241, 012004 (2010). [CrossRef]  

39. M. Guizar-Sicairos, S. T. Thurman, and J. R. Fienup, “Efficient subpixel image registration algorithms,” Opt. Lett. 33, 156–158 (2008). [CrossRef]   [PubMed]  

40. M. Dierolf, A. Menzel, P. Thibault, P. Schneider, C. M. Kewish, R. Wepf, O. Bunk, and F. Pfeiffer, “Ptychographic X-ray computed tomography at the nanoscale,” Nature 467, 436–439 (2010). [CrossRef]   [PubMed]  

41. P. Thibault, M. Dierolf, O. Bunk, A. Menzel, and F. Pfeiffer, “Probe retrieval in ptychographic coherent diffractive imaging,” Ultramicroscopy 109, 338–343 (2009). [CrossRef]   [PubMed]  

42. M. Dierolf, P. Thibault, A. Menzel, C. M. Kewish, K. Jefimovs, I. Schlichting, K. von König, O. Bunk, and F. Pfeiffer, “Ptychographic coherent diffractive imaging of weakly scattering specimens,” New J. Phys. 12035017 (2010). [CrossRef]  

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (7)

Fig. 1
Fig. 1 Schematic of an X-ray scanning CDI measurement in the forward-scattering geometry. X-rays, defined by an illumination function p(r) are incident on a sample with a transmission function T(r). A ptychographic data set is acquired by recording a series of diffraction patterns by an X-ray area detector while scanning the sample with overlapping illumination regions, depicted here by the overlapping circles.
Fig. 2
Fig. 2 (a–b) Reconstructions of p(r) and T(r) for when there is no error in scan position constraint. (c–d) Reconstructions of p(r) and T(r) for when random errors up to 10ΔxS are added to the x and y components of each of the scan locations. (e–f) Line cuts of T(r) along the red line in (b); (e) is the magnitude of T(r) along this line while (f) is the phase. (g–h) Line cuts of p(r) along the red line in (a); (g) is the magnitude of p(r) along this line while (h) is the phase. In Fig. 2(e) to 2(h), the solid green line is the true T(r) or p(r), the solid black line is the line cut from reconstructions for T(r) or p(r) assuming no scan position errors, while the dotted red line is the line cut from reconstructions for T(r) or p(r) with scan position errors. The white horizontal scale bars in frames (a) and (b) are both 100ΔxS.
Fig. 3
Fig. 3 (a) Reconstructed T(r) and (b) p(r) when incorrect scan positions are used from experimentally collected diffraction at the Advanced Photon Source. (c) Improved reconstructions for T(r) and (d) p(r) after application of the scan position correction method presented in Section 2. (e) The recovered scan positions rj (green dots) starting from the incorrect scan positions (black dots). The distance between the black dots on the square scanning grid is 3 μm.
Fig. 4
Fig. 4 To explore the limits of recoverable scan position error we look at two parameters: the photon fluence, and correspondingly the SNR of a diffraction pattern, and the amount of overlap, which determines the degree to which regions on the sample are overdetermined by information in the diffraction. (a) A simulated diffraction pattern. A beamstop, used in experiments to prevent damage to the area detector, is also assumed to be present in all cases. (b) A relatively low amount of overlap, and (c) a relatively high amount of overlap. (d) The different average diffraction intensities I(q) integrated azimuthally versus spatial frequency used for the simulations in this letter, and (e) the SNR of the diffraction intensities in (d). Here, SNR = 10 log 10 ( I ( q ) / I ( q ) ).
Fig. 5
Fig. 5 The dependence on the maximum recoverable scan position error ej,max (and corresponding average error over all scan positions Δ r avg initial) on the diffraction SNR and overlap. Here, we look at when a square 7 × 7 grid is scanned with 65%, 75%, and 85% overlap between adjacent scan positions, and then scan position errors ej, up to some maximum given by ej,max, are added to each of the j scan positions. The procedure given in Section 2 is performed and we determine final scan position configurations with average error Δ r avg final. The results shown here are those with the lowest final error metric value averaged over all j scan positions, as defined by Eq. (2), out of a total of twenty independent reconstruction trials. The maximum average scan position error Δ r avg initial the CG method is able to handle is determined by where Δ r avg final stops being roughly flat with increasing Δ r avg initial and begins to increase with increasing Δ r avg initial. For the 65% case, this cutoff is Δ r avg initial 30.6 Δ x S with e j , max 40 2 Δ x S, for the 75% case, this cutoff is Δ r avg initial 45.9 Δ x S with e j , max 60 2 Δ x S, while for the 85% case, this cutoff is Δ r avg initial 68.9 Δ x S with e j , max 90 2 Δ x S. Also included are results for perfect data when there is no simulated beamstop or Poisson noise, to establish a baseline for the performance of the method presented in Sec. 2. The primary differences for these perfect data baseline cases are greatly decreased total computation times (about a factor of 2–3), in addition to a modest increase in tolerable Δ r avg initial.
Fig. 6
Fig. 6 Recovered T(r), p(r), scan positions rj and reconstructions for three values of ej,max. (a) e j , max 90 2 Δ x S, (b) e j , max 110 2 Δ x S, and (c) e j , max 120 2 Δ x S. All reconstructions correspond to an integrated intensity of 109, corresponding to the blue curves in Fig. 4(d) and 4(e) and Fig. 5, and the 85% overlap square 7 × 7 grid (the black circles with distance between them of 40ΔxS), with the red dots corresponding to the true scan positions, and the green dots corresponding to the recovered scan positions.
Fig. 7
Fig. 7 When below the critical maximum scan position error ej,max, it is possible to further refine incorrectly recovered peripheral scan positions shown in (a). By keeping the previously recovered probe p(r) and scan positions rj but resetting T(r) to be initially consisting of complex valued random numbers, we perform the method given in Section 2 a number of subsequent times, here twenty, and average the results for all the recovered rj. This gives almost perfectly recovered scan positions, as seen in (b), with a Δ r avg final 0.1 Δ x S. All values for Δr are in units of ΔxS.

Equations (9)

Equations on this page are rendered with MathJax. Learn more.

[ ψ ( r ) ] = Ψ ( q ) = 1 N x , y ψ ( x , y ) exp [ 2 π i ( x q x + y q y N ) ] 1 [ Ψ ( q ) ] = ψ ( r ) = 1 N q x , q y Ψ ( q x , q y ) exp [ + 2 π i ( x q x + y q y N ) ] ,
ε j = q { | Ψ j , n ( q ) | I j ( q ) } 2 ,
r j , n + 1 = r j , n α n r j , n ε j .
Λ j , 0 = r j , 0 ε j Λ j , n = β n Λ j , n 1 r j , n ε j r j , n + 1 = r j , n + α n Λ j , n ,
β n P R = Δ j , n T ( Δ j , n Δ j , n 1 ) Δ j , n 1 T Δ j , n 1 ,
ε j x j , n = 4 π N q { ( 1 I j ( q ) | Ψ j , n ( q ) | ) Im [ Ψ j , n * ( q ) × ( p ( r ) 1 { q x T ^ ( q ) exp [ 2 π i ( q x x j , n + q y y j , n N ) ] } ) ] } ,
ε j x j , n = 4 π N q { ( 1 I j ( q ) | Ψ j , n ( q ) | ) Im [ Ψ j , n * ( q ) × ( p ( r ) 1 { q y T ^ ( q ) exp [ 2 π i ( q x x j , n + q y y j , n N ) ] } ) ] } ,
ε j ( α n ) = q { | [ p ( r ) T ( r r j , n α n Λ j , n ) ] | I j ( q ) } 2 .
Δ r avg final = j | r j true r j final | / 7 × 7 ,
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.