research papers\(\def\hfill{\hskip 5em}\def\hfil{\hskip 3em}\def\eqno#1{\hfil {#1}}\)

Journal logoJOURNAL OF
APPLIED
CRYSTALLOGRAPHY
ISSN: 1600-5767

Ptychographic X-ray speckle tracking1

CROSSMARK_Color_square_no_text.svg

aARC Centre of Excellence in Advanced Molecular Imaging, School of Physics, University of Melbourne, Parkville, Victoria 3010, Australia, bCFEL, Deutsches Elektronen-Synchrotron DESY, Notkestrasse 85, 22607 Hamburg, Germany, cDESY, Notkestrasse 85, 22607 Hamburg, Germany, dThe Hamburg Centre for Ultrafast Imaging, Luruper Chaussee 149, 22761 Hamburg, Germany, and eDepartment of Physics, University of Hamburg, Luruper Chaussee 149, 22761 Hamburg, Germany
*Correspondence e-mail: morganaj@unimelb.edu.au

Edited by S. Marchesini, Lawrence Berkeley National Laboratory, USA (Received 22 November 2019; accepted 20 April 2020; online 29 May 2020)

A method is presented for the measurement of the phase gradient of a wavefront by tracking the relative motion of speckles in projection holograms as a sample is scanned across the wavefront. By removing the need to obtain an undistorted reference image of the sample, this method is suitable for the metrology of highly divergent wavefields. Such wavefields allow for large magnification factors that, according to current imaging capabilities, will allow for nanoradian angular sensitivity and nanoscale sample projection imaging. Both the reconstruction algorithm and the imaging geometry are nearly identical to that of ptychography, except that the sample is placed downstream of the beam focus and that no coherent propagation is explicitly accounted for. Like other X-ray speckle tracking methods, it is robust to low-coherence X-ray sources, making it suitable for laboratory-based X-ray sources. Likewise, it is robust to errors in the registered sample positions, making it suitable for X-ray free-electron laser facilities, where beam-pointing fluctuations can be problematic for wavefront metrology. A modified form of the speckle tracking approximation is also presented, based on a second-order local expansion of the Fresnel integral. This result extends the validity of the speckle tracking approximation and may be useful for similar approaches in the field.

1. Introduction

New facilities are providing ever more brilliant X-ray sources. To access the full potential of these sources we need X-ray optics that are capable of focusing light to meet the requirements of various imaging modalities. Thus there is an increasing need for at-wavelength and in situ wavefront metrology techniques that are capable of measuring the performance of these optics to the level of their desired performance. This is a challenging task, as current X-ray optics technologies are attaining focal spot sizes below 10 nm (Mimura et al., 2010[Mimura, H., Handa, S., Kimura, T., Yumoto, H., Yamakawa, D., Yokoyama, H., Matsuyama, S., Inagaki, K., Yamamura, K., Sano, Y., Tamasaku, K., Nishino, Y., Yabashi, M., Ishikawa, T. & Yamauchi, K. (2010). Nat. Phys. 6, 122-125.]; Huang et al., 2013[Huang, X., Yan, H., Nazaretski, E., Conley, R., Bouet, N., Zhou, J., Lauer, K., Li, L., Eom, D., Legnini, D., Harder, R., Robinson, I. K. & Chu, Y. S. (2013). Sci. Rep. 3, 3562.]; Morgan et al., 2015[Morgan, A. J., Prasciolu, M., Andrejczuk, A., Krzywinski, J., Meents, A., Pennicard, D., Graafsma, H., Barty, A., Bean, R. J., Barthelmess, M., Oberthuer, D., Yefanov, O. M., Aquila, A., Chapman, H. N. & Bajt, S. (2015). Sci. Rep. 5, 9892.]; Bajt et al., 2018[Bajt, S., Prasciolu, M., Fleckenstein, H., Domaracký, M., Chapman, H. N., Morgan, A. J., Yefanov, O., Messerschmidt, M., Du, Y., Murray, K. T., Mariani, V., Kuhn, M., Aplin, S., Pande, K., Villanueva-Perez, P., Stachnik, K., Chen, J. P. J., Andrejczuk, A., Meents, A., Burkhardt, A., Pennicard, D., Huang, X., Yan, H., Nazaretski, E., Chu, Y. S. & Hamm, C. E. (2018). Light Sci. Appl. 7, 17162.]; Murray et al., 2019[Murray, K. T., Pedersen, A. F., Mohacsi, I., Detlefs, C., Morgan, A. J., Prasciolu, M., Yildirim, C., Simons, H., Jakobsen, A. C., Chapman, H. N., Poulsen, H. F. & Bajt, S. (2019). Opt. Express, 27, 7120-7138.]). Furthermore, adaptive optics are being employed to correct for wavefront aberrations by altering the physical state of a lens system in response to real-time measurements of wavefront errors (Mercère et al., 2006[Mercère, P., Idir, M., Moreno, T., Cauchon, G., Dovillaire, G., Levecq, X., Couvet, L., Bucourt, S. & Zeitoun, P. (2006). Opt. Lett. 31, 199-201.]; Zhou et al., 2019[Zhou, T., Wang, H., Fox, O. J. & Sawhney, K. J. (2019). Rev. Sci. Instrum. 90, 021706.]). Such systems therefore benefit from fast and accurate wavefront metrology for rapid feedback.

Wavefront metrology techniques generally fall into one of three categories (Wilkins et al., 2014[Wilkins, S. W., Nesterets, Y. I., Gureyev, T. E., Mayo, S. C., Pogany, A. & Stevenson, A. W. (2014). Proc. R. Soc. A, 372, 20130021.]; Wang et al., 2015[Wang, H., Sutter, J. & Sawhney, K. (2015). Opt. Express, 23, 1605-1614.]): (i) direct phase measurements, such as interferometry using crystals (Bonse & Hart, 1965[Bonse, U. & Hart, M. (1965). Appl. Phys. Lett. 6, 155-156.]); (ii) phase gradient measurements, such as Hartmann sensors (Lane & Tallon, 1992[Lane, R. G. & Tallon, M. (1992). Appl. Opt. 31, 6902-6908.]), coded aperture methods (Olivo & Speller, 2007[Olivo, A. & Speller, R. (2007). Appl. Phys. Lett. 91, 074106.]) and grating-based interferometry (David et al., 2002[David, C., Nöhammer, B., Solak, H. H. & Ziegler, E. (2002). Appl. Phys. Lett. 81, 3287-3289.]); and (iii) propagation-based methods sensitive to the second derivative of the wavefront's phase (Wilkins et al., 1996[Wilkins, S. W., Gureyev, T. E., Gao, D., Pogany, A. & Stevenson, A. W. (1996). Nature, 384, 335-338.]; Wang et al., 2015[Wang, H., Sutter, J. & Sawhney, K. (2015). Opt. Express, 23, 1605-1614.]; Bérujon et al., 2014[Bérujon, S., Wang, H., Alcock, S. & Sawhney, K. (2014). Opt. Express, 22, 6438-6446.]).

One such method, falling into the second category above, was introduced by Bérujon, Ziegler et al. (2012[Bérujon, S., Ziegler, E., Cerbino, R. & Peverini, L. (2012). Phys. Rev. Lett. 108, 158102.]) and Morgan et al. (2012[Morgan, K. S., Paganin, D. M. & Siu, K. K. W. (2012). Appl. Phys. Lett. 100, 124102.]) (no relation to the current author). This method is a wavefront metrology technique based on near-field speckle-based imaging, which was termed the `X-ray speckle tracking' (XST) technique. In XST, the 2D phase gradient of a wavefield can be recovered by tracking the displacement of localized `speckles' between an image and a reference image produced in the projection hologram of an object with a random phase/absorption profile. Additionally, XST can be employed to measure the phase profile of an object's transmission function. Thanks to the simple experimental setup, high angular sensitivity and compatibility with low-coherence sources, this method has since been actively developed for use in synchrotron and laboratory light sources [see Zdora (2018[Zdora, M.-C. (2018). J. Imaging, 4, 60.]) for a recent review].

In ptychography, a sample is scanned across the beam wavefront (typically at or near the focal plane of a lens) while diffraction data are collected in the far field of the sample. An iterative algorithm is usually employed to update initial estimates for the complex wavefront of the illumination and the sample transmission functions. If illuminated regions of the sample overlap sufficiently, then it is possible for a unique solution for both of these functions to be obtained (Hüe et al., 2010[Hüe, F., Rodenburg, J. M., Maiden, A. M., Sweeney, F. & Midgley, P. A. (2010). Phys. Rev. B, 82, 121415. ]). Thus, ptychography is an imaging modality that performs both aberration-free sample imaging and wavefront metrology simultaneously. This is in contrast to XST where these two imaging modalities correspond to separate imaging geometries.

Ptychography can also be performed in the near-field diffraction regime, as reported for example by Nugent et al. (1996[Nugent, K. A., Gureyev, T. E., Cookson, D. F., Paganin, D. M. & Barnea, Z. (1996). Phys. Rev. Lett. 77, 2961-2964.]). Stockmar et al. (2013[Stockmar, M., Cloetens, P., Zanette, I., Enders, B., Dierolf, M., Pfeiffer, F. & Thibault, P. (2013). Sci. Rep. 3, 1927.]) found that the illumination must be sufficiently inhomogeneous to allow for a successful reconstruction, and those authors suggested the use of an additional diffuser as a means of achieving this. Consequently, this near-field ptychographic imaging approach closely resembles that of many XST-based approaches in its experimental configuration. The key distinction here is that, in ptychography, a fully coherent wave model is employed. This can lead to non-unique solutions in situations where an XST-based approach would yield a well defined solution, although typically this solution will contain less information at lower resolution than a successful ptychographic reconstruction.

We propose a combined approach, which we term ptychographic X-ray speckle tracking (PXST). In this approach, near-field in-line holograms are recorded as an unknown sample is scanned across an unknown wavefield. Estimates for the undistorted sample projection image and the wavefield are then updated on the basis of the observed speckle displacements. There is no reference image and no additional speckle-producing object is required. This imaging geometry allows for XST to be used for highly divergent X-ray beams, thus expanding the applicability of this simple and robust method to include next-generation high-numerical-aperture X-ray lenses.

Bérujon et al. (2014[Bérujon, S., Wang, H., Alcock, S. & Sawhney, K. (2014). Opt. Express, 22, 6438-6446.]) have proposed a similar method, also based on XST and compatible with highly divergent beams. In their approach, the second derivative of the wavefront phase is measured. Additionally, nanoradian angular sensitivity can be achieved with relatively small step sizes in the scan of the sample on a piezo-driven stage (discussed further in the next section). In contrast, PXST more closely aligns with current XST-based techniques, such as the `unified modulated pattern analysis' method of Zdora et al. (2017[Zdora, M. C., Thibault, P., Zhou, T., Koch, F. J., Romell, J., Sala, S., Last, A., Rau, C. & Zanette, I. (2017). Phys. Rev. Lett. 118, 203903.], 2018[Zdora, M.-C., Zanette, I., Zhou, T., Koch, F. J., Romell, J., Sala, S., Last, A., Ohishi, Y., Hirao, N., Rau, C. & Thibault, P. (2018). Opt. Express, 26, 4989-5004.]), that do not rely on small sample translations.

In Section 2[link], we briefly review the XST method and its extension to PXST. In Section 3[link] we present the governing equation, which is based on a second-order expansion of the Fresnel diffraction integral (presented in Appendix A[link]). The region of validity for the speckle tracking approximation determines the applicable imaging geometries, which are presented in Section 4[link] and Appendix B[link]. We present the iterative reconstruction algorithm and the target function, which is to be minimized by the algorithm, in Section 5[link]. Conditions for the uniqueness of the solution are discussed in Appendix C[link]. Finally, the theoretically achievable angular sensitivity of the wavefront reconstruction and the imaging resolution of the sample projection image are presented in Appendix D[link]. For reference, we define the principal mathematical symbols used throughout the paper in Table 1[link]. In Table 2[link], we summarize the main results of this article and refer the reader to the relevant sections.

Table 1
Symbols

In(x, z) nth recorded image
Iref(x, z) Reference projection image of the sample
Δxn Displacement of sample in transverse plane
T(x) Transmission function of the quasi-2D sample
z1 Source-to-sample distance
z Sample-to-detector distance
[{\overline z} = {{zz_{1}} /( {z_{1}+z})}] Effective propagation distance
M = (z1+z) /z1 Geometric magnification factor
λ Wavelength of radiation
σeff Smallest resolvable speckle displacement in the plane of the detector
i (−1)1/2
a · b Dot product between vectors a and b
p(x, 0) = w1/2(x)exp[iϕ(x)] Illumination wavefront in the sample plane; w and ϕ are the intensity and phase, respectively
p(x, z) = W1/2(x)exp[iΦ(x)] Illumination wavefront in the detector plane; W and Φ are the intensity and phase, respectively
x ≡ (x, y) Transverse coordinate
[\nabla\equiv({{\partial} / {\partial x}},{{\partial} / {\partial y}})] Transverse gradient operator

Table 2
The PXST method

Governing equation [I_{n}({\bf x},z)\simeq W({\bf x})I_{\rm {ref}}[{\bf u}({\bf x}) - \Delta{\bf x}_{n},{\overline z}]] See Section 3[link] and Appendix A[link]
  [w({\bf x}) ({{{\overline z}} /{z}} )^{2}I_{\rm {ref}}({\bf x},{\overline z}) \simeq I_{n}[{\bf u}^{{-1}}({\bf x} + \Delta{\bf x}_{n}),z]] Reciprocal form for the above equation; u−1 is the inverse of u
Target function [\varepsilon =\textstyle \sum _{n}\int\int {\rm d}{\bf x}\,[{{1} /{\sigma^{2}_{\rm I}({\bf x})}}] \{I_{n}({\bf x},z)][\quad-W({\bf x})I_{\rm {ref}}[{\bf u}({\bf x})-\Delta{\bf x}_{n},{\overline z}] \}^{2}] Equation (26)[link] in Section 5[link]; to be minimized with respect to Iref, ∇Φ and Δxn
Geometric mapping [{\bf u}({\bf x}) = {\bf x}-({{\lambda z} / {2\pi}})\nabla\Phi({\bf x})] See equation (54)[link] in Appendix A[link]
  [{\bf u}^{{-1}}({\bf x}) = {\bf x}+({{\lambda z} /{2\pi}})\nabla\phi({\bf x})] Reciprocal form for the above equation; see equation (37)[link] in Appendix A[link]
Imaging geometry See Fig. 3 Described in Section 2[link]
Iterative update algorithm See Fig. 6 Described in Section 3[link]
Angular sensitivity ΔΘϕ = σeff/z In the plane of the sample; see equation (123)[link]
ΔΘΦ = σeff/zM In the plane of the detector; see equation (126)[link]
Phase sensitivity [\Delta\phi = \Delta\Phi = ({{2\pi} / {\lambda}})({{\sigma _{\rm {eff}}^{2}}/{zM}})] Sample/detector plane; see equation (130)[link]

2. Background

The problem with wavefront metrology is that it is much more difficult to measure a wavefront's phase than its intensity; the intensity can be measured directly by placing a photon-counting device at any point in the wavefront's path, whereas the phase information is indirectly encoded in the wavefront's intensity profile as it propagates through space. For plane-wave illumination, no measurement of the wavefront's intensity alone will reveal its direction of propagation. One solution to this problem is to place an absorbing object at a known point in the path of the light, from which the direction of propagation can then be inferred from the relative displacement between the centre of the object and the shadow cast on a screen some distance away, just as the angle of the sun can be estimated by following the line from a shadow to its object.

This simple idea forms the basis of the Hartmann sensor (Daniel & Ghozeil, 1992[Daniel, M.-D. & Ghozeil, I. (1992). Optical Shop Testing, 2nd ed., ch. 10. New York: John Wiley & Sons.]), shown schematically in Fig. 1[link]. Originally designed to measure aberrations in telescopes and later for atmospheric distortions, the Hartmann sensor can be used as an X-ray wavefront metrology tool (Mayo & Sexton, 2004[Mayo, S. C. & Sexton, B. (2004). Opt. Lett. 29, 866-868.])2 by cutting a regular grid of small holes, spaced at known intervals (say xi where i is the hole index), in a mask and then recording the shadow image on a detector, which is placed a small distance downstream of the mask.

[Figure 1]
Figure 1
Illustration of the Hartmann sensing principle. Top: phase of the wavefront incident on the entrance surface of the mask. The phase has been scaled by λ/2π so that the normal to the tangent is parallel to the local direction of propagation of the wavefront. The arrows indicate the direction of propagation at the centre of each mask hole. Middle: intensity of the wavefront as it propagates from the mask (top) to the detector (bottom). The colour scale is shown on the right. Bottom: the one-dimensional intensity profile of the wavefront as measured by the detector.

Provided that each hole can be matched with each shadow image, the angle made between them, [\Theta(x_{i})] = [\arctan{[\Delta x(x_{i})/z]}] (in one dimension), is equal to the average direction of propagation of that part of the wavefront passing through each hole [\Theta(x_{i}) = ({{\lambda} /{2\pi d}})\textstyle\int _{{x_{i}-d/2}}^{{x_{i}+d/2}}[{{\partial\phi(x)} /{\partial x}}]\,{\rm d}x], where Δx(xi) is the observed displacement along x of the ith shadow, z is the distance between the mask and the detector, and d is the hole width.

With a suitable interpolation routine, Θ(x) can be estimated from the set of Θ(xi) and the phase profile can be obtained up to a constant with

[\displaystyle \phi(x) \simeq ({{2\pi} /{\lambda}})\textstyle\int\Theta(x)\, {\rm d}x. \eqno (1)]

One limitation of this technique is that the resolution obtained is limited by the spacing between each hole in the mask. For example, Mercère et al. (2006[Mercère, P., Idir, M., Moreno, T., Cauchon, G., Dovillaire, G., Levecq, X., Couvet, L., Bucourt, S. & Zeitoun, P. (2006). Opt. Lett. 31, 199-201.]) used a Hartmann sensor in an active optic system with a grid of 75 × 75 holes over a 10 × 10 mm area, whereas the CCD detector had a 1024 × 1024 grid of pixels over a 13 × 13 mm area. Thus the Hartman sensor had a resolution 10.5 times worse than the CCD detector.

The maximum density of the holes in the grid is limited. This is because the task of uniquely matching each shadow image with each hole becomes more difficult as the hole density is increased – a problem that is easier to appreciate in two dimensions. In 2012, Bérujon and co-workers realized a simple yet elegant solution to this problem, one that allowed for an arbitrarily fine grid of `masks' with a resolution and sensitivity limited only by the CCD pixel array and the signal-to-noise ratio (Bérujon, Ziegler et al., 2012[Bérujon, S., Ziegler, E., Cerbino, R. & Peverini, L. (2012). Phys. Rev. Lett. 108, 158102.]). Their solution, XST, is to replace the binary mask of identical holes with a thin random phase object, such as a diffuser, as shown in Fig. 2[link]. Because the diffuser is random (in the sense that the modulation of the beam by the diffuser is both detailed and non-repeating over the relevant spatial frequencies of the image), the shadow from each sub-region of the diffuser is unique – encoded by the speckle pattern seen on the detector – so that one can therefore consider any point in the diffuser to be the centre of a virtual Hartmann hole. In this sense, the random object serves as a high-density fiducial marker for each of the light rays that pass from the reference or mask plane to the detector. Note that this approach requires a greater degree of beam coherence than the Hartman sensor, to the extent necessary to provide sufficient visibility of the speckles, so that each speckle pattern can be distinguished from its neighbour.

[Figure 2]
Figure 2
Illustration of the X-ray speckle tracking (XST) principle. Top: as in Fig. 1[link]. Middle: as in Fig. 1[link], with the binary mask replaced by a random phase/absorption mask (dashed outline). Bottom: sub-regions of the measured shadow image (solid black line) are compared with the reference shadow image (dashed blue line) to determine displacements (black arrows).

In the Hartmann sensor, it is assumed that the mask is well characterized, so that the shadow positions can be compared with their ideal positions, which are known a priori. However, since the mask is no longer a simple geometric object (in the sense that it is difficult to know a priori the modulation function of the mask with a sufficient degree of precision), it is now necessary to record a reference image of the mask with which to compare the distorted image.

In addition to measurements of a wavefront's phase, the XST principle can be extended to incorporate phase imaging of samples. This can be achieved by recording an image of the wavefront with the diffuser (acting as a mask) in the beam path – this image is called the `reference' image. Then, another image is recorded with an additional sample (the one to be imaged) placed in the beam path, in addition to the diffuser – this is referred to simply as the `image'. Here the relative displacements between the `reference' and the `image' are due not to the phase profile of the wavefront, which affects both images equally, but to the phase profile of the sample transmission function.

The following two XST imaging configurations were suggested by Bérujon et al., one for imaging samples and the other for wavefront metrology:

(i) in the differential configuration a speckle image is recorded with and without the addition of a sample, and

(ii) in the absolute configuration a speckle image is recorded at two detector distances with respect to the mask.

In (i), the relative motion of speckles reveals the local phase gradient of the sample in the beam, whereas in (ii), the total wavefront phase is recovered and this is therefore useful for characterizing X-ray beamline optics (this is the configuration shown in Fig. 2[link]). Of course, it is still possible to characterize beamline optics in (i) (just not in situ) by placing the optical element in the sample position. This approach has been useful, for example, in measuring the phase profile of compound refractive lens systems (Bérujon, Wang & Sawhney, 2012[Bérujon, S., Wang, H. & Sawhney, K. (2012). Phys. Rev. A, 86, 063813.]) but is impractical for larger systems such as Kirkpatrick–Baez mirrors.

Since the proposal by Bérujon et al. there have been a number of substantial improvements: see for example the extensive review by Zdora (2018[Zdora, M.-C. (2018). J. Imaging, 4, 60.]). For example, Zanette et al. (2014[Zanette, I., Zhou, T., Burvall, A., Lundström, U., Larsson, D. H., Zdora, M., Thibault, P., Pfeiffer, F. & Hertz, H. M. (2014). Phys. Rev. Lett. 112, 253903.]) developed a method where a diffuser is scanned so as to obtain a number of reference/image pairs at different diffuser positions. This step can add a great deal of redundancy, which improves the angular sensitivity of the method and even allows for multi-modal imaging of the sample when employed in the differential configuration. In subsequent publications, this approach has been termed the unified modulated pattern analysis (UMPA) method (Zdora et al., 2017[Zdora, M. C., Thibault, P., Zhou, T., Koch, F. J., Romell, J., Sala, S., Last, A., Rau, C. & Zanette, I. (2017). Phys. Rev. Lett. 118, 203903.], 2018[Zdora, M.-C., Zanette, I., Zhou, T., Koch, F. J., Romell, J., Sala, S., Last, A., Ohishi, Y., Hirao, N., Rau, C. & Thibault, P. (2018). Opt. Express, 26, 4989-5004.]).

In the absolute configuration, where the reference and image have been recorded at two detector distances, the smallest resolvable angular displacement (the angular sensitivity) is given by the ratio of the effective pixel size, which is the smallest resolvable displacement of a speckle (including effects such as fringe visibility, finite pixel size, beam coherence and noise), to the distance between the reference and image planes: Δθ = d/Δz. Therefore, the best accuracy is obtained by maximizing the distance between the reference and image planes. However, for highly divergent wavefields, as would be produced (for example) by a high-numerical-aperture lens system, there arises an unavoidable trade-off between the wavefront sampling frequency and the angular sensitivity. In this situation the ideal location of the image plane is as far downstream of the lens focus as is required to fill the detector array with the beam, as this maximizes the wavefront sampling frequency. In order to minimize Δθ (maximize Δz) one should then place the reference plane as close as possible to the beam focus. But in this plane, the footprint of the beam on the detector may be much smaller than that in the image plane because of the beam divergence. This leads to a poorly sampled reference, as only a few pixels will span the wavefront's footprint. Therefore, the smallest resolvable speckle shift will be larger than that obtainable by plane-wave illumination, by a factor proportional to the beam divergence.

Realizing this, Bérujon et al. (2014[Bérujon, S., Wang, H., Alcock, S. & Sawhney, K. (2014). Opt. Express, 22, 6438-6446.]) devised an XST technique, X-ray speckle scanning (XSS), that relies on small displacements of the XST mask between acquired images. No reference is required and the diffraction data are recorded in a single plane. This enables the sampling frequency to be maximized by placing the detector such that the divergent beam fills the pixel array. Without a reference, however, the speckle locations in one image are instead compared with the locations observed in neighbouring images. As the speckle displacements in each image are proportional to the phase gradient, the differentials of the speckle locations between images are proportional to the second derivative of the phase; thus this approach can be viewed as a wavefront curvature measurement. The achievable angular sensitivity is now proportional to the step size of the mask, which can be substantially smaller than the effective pixel size. Interestingly, this approach is similar in principle to the Wigner-distribution deconvolution approach described by Chapman (1996[Chapman, H. N. (1996). Ultramicroscopy, 66, 153-172. ]).

In the following section, we describe an approach that is similar in principle to the one described above:

(iii) ptychographic XST: shadow images are recorded as the mask/object is translated across the wavefront.

In this method (see Fig. 3[link]) the unknown object acts as both the imaging target and the speckle mask simultaneously. There is no special reference image; rather each image serves as a reference for all other images. Both the wavefront phase (without the influence of the object) and the object image (without the influence of wavefront distortions) are determined in an iterative update procedure. At each iteration, speckles3 in the recorded images are compared with the current estimate of the reference (in contrast to the XSS method). Images are recorded at a fixed detector distance and there is no trade-off between phase sensitivity and the wavefront sampling frequency, making this method suitable for highly divergent beams. Because the speckle displacements are compared between the image and the estimated reference, large angular distortions can be accommodated. This is advantageous because it allows for the sample to be placed very near the beam focus, where the phase gradients across the sample surface are largest and where the magnification factor allows for high imaging resolution and angular sensitivity.

[Figure 3]
Figure 3
Illustration of the ptychographic XST method. The beamline illumination was focused (off-axis) in two dimensions by two linear focusing lenses, with numerical apertures of 0.015 (horizontal) and 0.014 (vertical). The Siemens star sample was placed 371 µm downstream of the focal plane. Images were recorded on a CCD pixel array detector 0.71 m downstream of the focus. The scan data consist of 49 shadow images, recorded as the sample was translated across the beam profile. The wavefront phase and reference maps were refined iteratively.

3. The speckle tracking approximation

In this section we describe the governing equation that relates the measured intensities in each image and the reference in terms of the wavefront phase. For monochromatic light, in the Fresnel diffraction regime the image formed on a detector placed a distance z downstream of an object is given by

[\displaystyle I_{\rm {ref}}({\bf x},z) = {{1} \over {(\lambda z)^{2}}}\bigg|\int\int T({\bf x}^{{\prime}})\exp\left({{i\pi{{|{\bf x}-{\bf x}^{{\prime}}|^{2}} \over {\lambda z}}}}\right)\,{\rm d}{\bf x}^{{\prime}}\bigg|^{2}, \eqno (2)]

where T(x) represents the exit-surface wave of the light in the plane z = 0. For plane-wave illumination, under the projection approximation [see equation 2.39 of Paganin (2006[Paganin, D. M. (2006). Coherent X-ray Optics. Oxford University Press.])], T(x) also represents the transmission function of the object.

Now let us suppose that, rather than plane-wave illumination, the object is illuminated by a wavefront with an arbitrary phase (ϕ) and amplitude (w1/2) profile given by p(x, 0) = w1/2(x)exp[iϕ(x)]. The observed intensity is now given by

[\displaystyle I({\bf x},z) = {{1} \over {(\lambda z)^{2}}}\bigg|\int T({\bf x}^{{\prime}})\,p({\bf x}^{{\prime}},0)\exp\left({{i\pi{{|{\bf x}-{\bf x}^{{\prime}}|^{2}} \over {\lambda z}}}}\right)\,{\rm d}{\bf x}^{{\prime}}\bigg|^{2}. \eqno (3)]

For XST-based techniques, the challenge is to relate the image (I) to the reference (Iref) via a geometric transformation. Here, the reference as defined in equation (3)[link] represents an image of the sample, a distance z downstream of the sample plane, that is neither distorted by wavefront aberrations nor magnified by beam divergence. For the purposes of this section, Iref could be a recorded image, but in subsequent sections we will see that this image can be estimated from a set of distorted images.

Note that at this point the mathematical description is rather general. For example, in the differential configuration of XST, T(x) would represent the wavefront generated by the diffuser in the plane of the object and p(x, 0) would represent the transmission function of the object. In what follows, however, we will continue to describe T(x) as the object or mask transmission function and p(x, z) as the X-ray beam profile (unmodulated by the object).

A common approach to this problem is outlined by Zanette et al. (2014[Zanette, I., Zhou, T., Burvall, A., Lundström, U., Larsson, D. H., Zdora, M., Thibault, P., Pfeiffer, F. & Hertz, H. M. (2014). Phys. Rev. Lett. 112, 253903.]). There, ϕ is expanded to first order, and w1/2 to zeroth order, in a Taylor series about the point x:

[\displaystyle \phi({\bf x}^{{\prime}}) = \phi({\bf x})+({\bf x}^{{\prime}}-{\bf x})\cdot\nabla\phi({\bf x})+\phi _{\rm H}({\bf x}^{{\prime}}), \eqno (4)]

[\displaystyle {w} ^{1/2}({\bf x}^{{\prime}}) = {w} ^{1/2}({\bf x})+{w} ^{1/2}_{\rm H}({\bf x}^{{\prime}}), \eqno (5)]

where ϕH(x′) and [ {w} ^{1/2}_{\rm H}({\bf x}^{{\prime}})] are the higher-order terms in the expansion. Now we have, for ϕH and [ {w} ^{1/2}_{\rm H}\simeq 0],

[\eqalignno { I({\bf x},z) & \simeq {{w({\bf x})} \over {\lambda z}}\bigg|\int\int T({\bf x}^{{\prime}})\exp[{{i({\bf x}^{{\prime}}-{\bf x})\cdot\nabla\phi({\bf x})}}]\cr & \quad \times\exp\left({{i\pi{{|{\bf x}-{\bf x}^{{\prime}}|^{2}} \over {\lambda z}}}}\right)\,{\rm d}{\bf x}^{{\prime}}\bigg|^{2} \cr & = {{w({\bf x})} \over {\lambda z}}\bigg|\int\int T({\bf x}^{{\prime}})\exp\left[{{{{i\pi} \over {\lambda z}}\left|{\bf x}-{\bf x}^{{\prime}}-{{\lambda z} \over {2\pi}}\nabla\phi({\bf x})\right|^{2}}}\right]\,{\rm d}{\bf x}^{{\prime}}\bigg|^{2} \cr & = w({\bf x})I_{\rm {ref}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\phi({\bf x}),z\right]. & (6)}]

This confirms the intuitive assumption that the local gradient of ϕ at each position along the sample is converted into a lateral displacement of the speckles observed in the reference. Equation (6)[link] serves well in the limit where ϕH and w 1/2H approach 0 and is employed in a number of XST-based techniques. For example, in the UMPA approach [see equation (9) of Zdora (2018[Zdora, M.-C. (2018). J. Imaging, 4, 60.])] the governing equation is given by

[\displaystyle I({\bf x},z) = w({\bf x})\left({\overline I}_{\rm r}+D({\bf x})\left\{I_{\rm {ref}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\phi({\bf x}),z\right]-{\overline I}_{\rm r}\right\}\right), \eqno (7)]

where [{\overline I}_{\rm r}] is the mean intensity of the reference pattern and D(x) is a term the authors refer to as the `dark-field signal'. This term is related to a reduction in fringe visibility due to fine features in w(x) and, in fact, serves as an alternative contrast mechanism when solved for in addition to the phase gradients. Putting this term aside by setting D = 1, one can see that equation (7)[link] reduces to equation (6)[link].

Given the restrictive nature of the approximations employed, however, it is not surprising that equation (6)[link] quickly fails to serve as a valid approximation for larger phase gradients. To see this, let us consider a well known analytical solution to I in terms of Iref called the `Fresnel scaling theorem', which is described in, for example, Appendix B of Paganin (2006[Paganin, D. M. (2006). Coherent X-ray Optics. Oxford University Press.]). Simply put, it states that

The projected image of a thin scattering object from a point source of monochromatic light is equivalent to a magnified defocused image of the object illuminated by a point source of light infinitely far away.

The derivation is rather simple and so we shall present it here using the current notation. Let us say that the image, I, is formed by the point source of illumination a distance z1 along the optical axis (the z axis) and that this distance is large enough that we can ignore intensity variations of the illumination across the sample surface, so that w1/2(x) = 1. The probing illumination in the plane of the sample is then given by [p({\bf x},0) = \exp({{i\pi{\bf x}^{2}/\lambda z_{1}}})]. Substituting this into equation (3)[link] and completing the square in the exponent, we have

[\eqalignno { I({\bf x},z) & = {{1} \over {(\lambda z)^{2}}} \biggl| \int\int T({\bf x}^{\prime}) \exp\left({{i\pi{\bf x}^{\prime\, 2}}\over{\lambda z_{1}}}\right) \exp\left({{i\pi{{|{\bf x}-{\bf x}^{{\prime}}|^{2}} \over {\lambda z}}}}\right)\,{\rm d}{\bf x}^{{\prime}}\biggr|^{2} \cr & = {{1} \over {(\lambda z)^{2}}}\biggl|\int\int T({\bf x}^{{\prime}})\exp\left({{{{i\pi} \over {\lambda}}{{z_{1}+z} \over {zz_{1}}}\left|{{z_{1}} \over {z_{1}+z}}{\bf x}-{\bf x}^{{\prime}}\right|^{2}}}\right)\,{\rm d}{\bf x}^{{\prime}}\biggr|^{2} \cr & = \biggl({{z_{1}} \over {z_{1}+z}}\biggr)^{2}I_{\rm {ref}}\left({{z_{1}} \over {z_{1}+z}}{\bf x},{{zz_{1}} \over {z_{1}+z}}\right) \cr & = M^{{-2}}I_{\rm {ref}}({\bf x}/M,z/M), & (8)}]

where the geometric magnification factor M = (z1+z) / z1 and z/M is the effective propagation distance ([{\overline z}]). But according to equation (6)[link] we would have

[\eqalignno{ I({\bf x},z) & = I_{\rm {ref}}\left({\bf x}-{{\lambda z} \over {2\pi}}{{2\pi{\bf x}} \over {\lambda z_{1}}},z\right) & (9)\cr & = I_{\rm {ref}}\left({{z_{1}-z} \over {z_{1}}}{\bf x},z\right), & (10)}]

with a geometric magnification factor [M^{{\prime}} = {{z_{1}} /( {z_{1}-z})}], in contradiction to the result from the Fresnel scaling theorem. As expected, the results agree in the limit z1 → ∞, i.e. in the limit where the phase gradient approaches 0. Current formulations for XST based on equation (6)[link] (in the absolute configuration) are expected to perform badly when the effective source distance, z1, approaches the propagation distance, z, or (in the differential configuration) when the sample transmission function departs significantly from the weak phase approximation.

In a notable departure from this approach, Paganin et al. (2018[Paganin, D. M., Labriet, H., Brun, E. & Bérujon, S. (2018). Phys. Rev. A, 98, 053813.]) have recently developed an alternative description of the speckle tracking approximation based on a `geometric flow' equation:

[\displaystyle I({\bf x},z) \simeq I_{\rm {ref}}({\bf x},z)-{{\lambda z} \over {2\pi}}\nabla\cdot\left[I_{\rm {ref}}({\bf x},z)\nabla\phi({\bf x})\right]. \eqno (11)]

This approximation, which closely resembles the transport of intensity equation (Teague, 1983[Teague, M. R. (1983). J. Opt. Soc. Am. 73, 1434.]), has the remarkable property that ϕ may be determined analytically from a reference–image pair, thus permitting the rapid and simple processing of large tomographic data sets. This approach also assumes small and local distortions of the reference and is, therefore, ill suited as an approximation for larger phase gradients. For example, substituting the quadratic phase for a diverging wavefield, [\phi = {{\pi{\bf x}^{2}} / {\lambda z_{1}}}], into equation (11)[link] yields

[\displaystyle I({\bf x},z) \simeq {{z_{1}-z} \over {z_{1}}}\left[I_{\rm {ref}}({\bf x},z)-{{z} \over {z_{1}-z}}{\bf x}\cdot\nabla I_{\rm {ref}}(x,z)\right] .\eqno (12)]

This corresponds to a geometric magnification factor of [M^{{\prime\prime}} = {({z_{1}-z}) / ({z_{1}-2z})}], once again in contradiction to the analytical result M = (z1+z) / z1.

To see this more clearly, let us examine the exact result of equation (8)[link] in the limit where M → 1. First, we set 1/M = 1 + m, so that m → 0 as M → 1. Then we expand Iref(x/M, z/M) to first order in a Taylor series about x:

[\eqalignno { I({\bf x},z) & = M^{{-2}}I_{\rm {ref}}({\bf x}+m{\bf x},z/M) \cr & \simeq M^{{-2}}\left[I_{\rm {ref}}({\bf x},z/M)+m{\bf x}\cdot\nabla I_{\rm {ref}}({\bf x},z/M)\right].&(8a)}]

Comparing the above equation with equation (12)[link], we have m = -z /(z1-z). Solving for the geometric magnification factor yields [M^{{\prime\prime}} = {({z_{1}-z)} / ({z_{1}-2z})}] as above.

Remarkably, with only a minor modification to the speckle tracking formula in equation (6)[link], a second-order expansion of the phase term can be accommodated in the Fresnel integral, leading to the `speckle tracking approximation':

[\displaystyle I({\bf x},z) \simeq W({\bf x})\,I_{\rm {ref}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi({\bf x}),{\overline z}\right], \eqno (13)]

[\displaystyle \left({{{\overline z}} \over {z}}\right)^{2}w({\bf x})\,I_{\rm {ref}}({\bf x},{\overline z}) \simeq I\left[{\bf x}+{{\lambda z} \over {2\pi}}\nabla\phi({\bf x}),z\right], \eqno (14)]

where ∇ϕ and ∇Φ are the transverse gradients of the illuminating wavefield phase in the sample and image planes, respectively (without the influence of the object), and w and W are the intensity profiles of the illuminating wavefield in the reference and image planes, respectively. In Fig. 4[link] we show a diagram for a hypothetical PXST imaging experiment. This diagram shows the lens, focal, sample, reference and image planes. The reference would have been measured by plane-wave illumination in the plane indicated. A point that is not illustrated in the diagram is that both the image and the reference exhibit propagation effects, such as Fresnel fringes. We note, once again, that the speckle tracking approximation above applies to more imaging geometries/modalities than that displayed in Fig. 4[link].

[Figure 4]
Figure 4
Schematic diagram for a hypothetical projection imaging experiment. The illuminating beam propagates from left to right and the solid black lines indicate the boundaries of the illumination wavefront. The sample is depicted as a small black filled circle in the sample plane and as a black circle in the reference and image planes. The red lines depict the illumination's wavefront in the sample and image planes, which are not merely related by transverse magnification. The distorted shape of the circle in the image plane represents possible distortions of the speckle produced by the sample and the transverse phase gradients of the illumination.

Equations (13[link]) and (14[link]) are reciprocal statements of the same approximation and choosing between them is a matter of convenience depending on the desired application. We note here that this approximation makes a distinction between the phase gradients in the sample and image planes, whereas it is common to assume that they are similar or related by a lateral scaling factor (magnification). This distinction is not important in cases where the separation between these two planes and the beam divergence is small, but becomes critical for highly magnified imaging geometries or long propagation distances. This approximation is not as strong as the `stationary phase approximation' (Fedoryuk, 1971[Fedoryuk, M. V. (1971). Russ. Math. Surv. 26, 65-115.]), which links coherent propagation theory with geometric optics, although the principles used to derive this result are similar. The derivation is straightforward and self-contained but lengthy, and may be found in Appendix A[link].

Equations (13[link]) and (14[link]) possess two beneficial properties for the current analysis: they relate the image and its reference via a geometric transformation and they are consistent with the Fresnel scaling theorem. In fact, the Fresnel scaling theorem is a special case of the above approximations when w(x) = 1 and [\phi({\bf x}) = \pi{{{\bf x}^{2}} /{\lambda z_{1}}}]. Evaluating equation (14[link]) for these values of w and ϕ and using [{\overline z} = zz_{1}/(z+z_{1})] we have

[\eqalign { \displaystyle I_{\rm {ref}}\left({\bf x},{{zz_{1}} \over {z+z_{1}}}\right) & = \left({{z_{1}+z} \over {z_{1}}}\right)^{2}I\left({\bf x}+{{\lambda z} \over {2\pi}}{{2\pi{\bf x}} \over {\lambda z_{1}}},z\right) \cr & = \left({{z_{1}+z} \over {z_{1}}}\right)^{2}I\left({\bf x}{{z_{1}+z} \over {z_{1}}},z\right) \cr{ \rm and \,\, so }\,\,I({\bf x},z) & = \left({{z_{1}+z} \over {z_{1}}}\right)^{{-2}}I_{\rm {ref}}\left({\bf x}{{z_{1}} \over {z_{1}+z}},{{zz_{1}} \over {z_{1}+z}}\right), }\eqno(15)]

which yield the correct magnification and scaling factors, in agreement with equation (8)[link]. Similarly, we can evaluate equation (13)[link] using

[\displaystyle W({\bf x}) = \left({{{\overline z}} \over {z}}\right)^{2} \quad{ \rm and}\quad\Phi({\bf x}) = {{\pi{\bf x}^{2}} \over {z_{1}+z}}, \eqno (16)]

where these values for the illumination's wavefront in the plane of the detector follow from the Fresnel approximation for a point source placed a distance z + z1 upstream and from flux conservation of the beam when w(x) = 1 in the sample plane.

Evaluating equation (13)[link] yields

[\eqalignno{ I({\bf x},z)& = \left({{z_{1}} \over {z+z_{1}}}\right)^{2}I_{\rm {ref}}\left({\bf x}-{{\lambda z} \over {2\pi}}{{2\pi{\bf x}} \over {z_{1}+z}},{{zz_{1}} \over {z+z_{1}}}\right)\cr & = \left({{z_{1}} \over {z+z_{1}}}\right)^{2}I_{\rm {ref}}\left({\bf x}{{z_{1}} \over {z_{1}+z}},{{zz_{1}} \over {z+z_{1}}}\right), & (17)}]

which is, once again, in agreement with equation (8)[link].

In general, for arbitrary ϕ, the phase curvature of the illumination may vary in direction, as is the case (for example) in an astigmatic lens system, and also with position in the image. Thus, the magnification is also position dependent and directional:

[\displaystyle M_{{\bf v}}({\bf x}) = \left[1-{{\lambda z} \over {2\pi}}\nabla^{2}_{{\bf v}}\Phi({\bf x})\right]^{{-1}}, \eqno (18)]

where ∇vΦ(x) is the directional derivative of Φ(x) along the unit normal vector v.

Given the extended validity of equation (13)[link], we suggest that the following modification to the UMPA equation [equation (7)[link]] will achieve better results:

[\displaystyle I\left[{\bf x}+{{\lambda z} \over {2\pi}}\nabla\phi({\bf x}),z\right]\simeq w({\bf x})\left\{{\overline I}_{\rm r}+D({\bf x})[I_{\rm {ref}}({\bf x},z)-{\overline I}_{\rm r}]\right\}, \eqno (19)]

where [{\overline I}_{\rm {ref}} = \langle I_{\rm {ref}}({\bf x})\rangle _{{\bf x}}], or, using the notation of Zdora (2018[Zdora, M.-C. (2018). J. Imaging, 4, 60.]),

[\displaystyle I(x-u_{x},y-u_{y}) \simeq T(x,y)\left\{{\overline I}_{0}+D(x,y)[I_{0}(x,y)-{\overline I}_{0}]\right\}. \eqno (20)]

We also note that, although Paganin et al.'s geometric flow algorithm [equation (11)[link]] is a poor approximation for larger distortion factors (large M), it may be a more general physical description in the limit M → 1. As the authors note, the term ∝ ∇Iref · ∇ϕ in the expansion of equation (11)[link] accounts for speckle translations that arise from strong intensity gradients of the reference, i.e. that are not generated from ∇ϕ alone.

4. Limits to the approximation

The second-order speckle tracking approximation of equations (13)[link] and (14)[link] is subject to the following approximations:

(1) [g({\bf x},{\bf x}^{{\prime}}) \simeq g[{\bf x},{\bf u}({\bf x})]+\textstyle{{1} \over {2}}\{\nabla^{2}\phi[{\bf u}({\bf x})]+{{2\pi} / {\lambda z}}\} |{\bf x}^{{\prime}}-{\bf u}({\bf x})|^{2}],

(2) [{w}^{1/2}({\bf x}^{{\prime}}) \simeq {w} ^{1/2}[{\bf u}({\bf x})]],

(3) [z({\bf x}) \simeq {\overline z}\equiv{{zz_{1}} /({z+z_{1}})}],

where these are additional to the approximations necessary for the paraxial approximation to hold, [{\bf u}({\bf x}) = {\bf x}-({{\lambda z} / {2\pi}})] ×[\nabla\Phi({\bf x})] and [g({\bf x},{\bf x}^{{\prime}})\equiv\pi{{|{\bf x}-{\bf x}^{{\prime}}|^{2}} /{\lambda z}}+\phi({\bf x}^{{\prime}})]. In general, these approximations hold best for smooth wavefront amplitudes w1/2, predominantly quadratic phase ϕ and large spatial frequencies of the object.

Here, we examine the speckle tracking approximation, in one dimension, for the imaging geometry depicted in Fig. 4[link] and with parameters corresponding to a typical experiment utilizing X-ray multilayer Laue lenses. For this example we choose that the illumination is formed by a lens with a hard-edged aperture and with the sample placed at two possible distances from the focal plane, z1 = 500 and 10 µm. The lens has a numerical aperture of NA = 0.01 and the detector is placed in the far field of the probe and the sample, with z1 + z = 1 m. This imaging geometry leads to an effective propagation for plane-wave illumination that is nearly identical to the distance from the focus to the sample ([{\overline z}\simeq z_{1}]). The wavelength is 10−9 m. The sample has a Gaussian profile so that [T(x) = 1-n\exp({{-x^{2}/2\sigma^{2}}})], where n = 1 − i was chosen arbitrarily and would be proportional to the sample thickness and the deviation from unity of the refractive index and σ is the sample width, set to one of 0.15 or 0.01 µm below. The Fresnel number is thus [F \simeq \sigma^{2}/\lambda{\overline z}].

The wavefronts in the sample and image planes were simulated using the discrete form of the Fresnel diffraction integral. The illumination's wavefront in the image plane is given by p(x, z) = cW1/2(x)exp[iΦ(x)], where c is a complex pre-factor that does not depend on x, W1/2(x) was calculated numerically and Φ is almost quadratic, with [\Phi(x)\simeq{\pi x^{2}} / ][[{\lambda(z_{1}+z)}]]. Note that ϕ(x), the phase profile of the illumination in the sample plane, is not given by [{{\pi x^{2}} / {\lambda z_{1}}}] as would be the case for a point source of light (i.e. for NA → ∞). This is because the hard edges of the aperture produce Fresnel fringes that progress from the edge of the wavefront to the focal point at x = 0 as one moves from the image to the focal plane.

To test the validity of the speckle tracking approximation, we compare these simulated Fresnel images with those formed by evaluating equation (3)[link]. In this case equation (13)[link] can be evaluated analytically with

[\displaystyle W(x)I_{\rm {ref}}\left[x-{{\lambda z} \over {2\pi}}\nabla\Phi(x),{\overline z}\right] = W(x)\biggl| 1+n{{\sigma} \over {\sigma^{{\prime}}}} \exp\left({-{{x^2}\over{2M^2\sigma^{\prime 2}}}}\right)\biggr|^{2}, \eqno (21)]

where

[\displaystyle \sigma^{\prime 2} = \sigma^{2}+i{{\lambda{\overline z}} \over {2\pi}} \eqno (22)]

and

[\displaystyle x-{{\lambda z} \over {2\pi}}\nabla\Phi(x) = x{{z_{1}} \over {z_{1}+z}} = {{x} \over {M}}. \eqno (23)]

In order to arrive at the above result, we have assumed that Φ is purely quadratic across the wavefront, but this approximation has not been used when simulating the image according to Fresnel diffraction theory.

In Appendix B[link], we suggest a suitable criterion for the speckle tracking approximation to hold for this imaging geometry based on the second criterion above,

[\displaystyle {{\left({\lambda{\overline z}} \right)^{1/2}+\lambda{\overline z}q_{ T}} \over {z_{1}\rm {NA}}} \ll 1, \eqno (24)]

where qT = 1/X is the spatial frequency corresponding to full period features of size X. This criterion holds for features within the plateau of the illumination profile.

In the first column of Fig. 5[link], we have placed the sample in the centre of the illumination profile. Here, the left-hand side of equation (24)[link] evaluates to 0.8 and one can see that the fractional differences between the image and the approximation are small compared with that of the middle column. There, the sample has been shifted to the edge of the illumination profile, where the slope of the illumination amplitude is large. This leads to a breakdown of the second condition {w1/2(x′) ≃ w1/2[u(x)]}, and indeed the discrepancy between the approximation and the image is largest near the edge of the pupil region and slowly reduces for features closer towards the central region.

[Figure 5]
Figure 5
Comparison between the images formed according to Frensel diffraction theory and the speckle tracking approximation. In the left and middle columns, the sample has a σ width of 0.15 µm and is placed 500 µm from the focus. In the left column the sample is centred in the beam profile, whilst in the middle it has been shifted to the edge. In the right column the sample has a σ width of 0.01 µm and is placed 10 µm from the focus. First row: the exit-surface-wave intensities formed by illuminating a small Gaussian object with divergent illumination (black line). The intensities have been scaled by the factor [z/{\overline z}]. The sample transmission amplitudes are shown in blue. The angles along the x axis are given by arctan(x/z1) and match those of the second row. Second row: the intensity of the wavefront in the image plane (black line) and the images formed by the speckle tracking approximation (blue line). The fractional differences are shown in red. The angles are given by arctan[x/(z1+z)].

In the right column of Fig. 5[link], the sample is smaller, with a σ value of 0.01 µm, and has been moved closer to the focal point. The left-hand side of equation (24)[link] now evaluates to 11.0. As expected, this increase from 0.8 in the first column to 11.0 in the right column corresponds to an increasing discrepancy between the speckle tracking approximation and the image. This image is in the transition region between the near-field and far-field diffraction regimes. Clearly, features in the diffraction outside of the holographic region, where W1/2 ≃ 0, are not represented at all by the approximation.

In both the second and third examples shown here, the errors in the speckle tracking approximation are dominated by the error in the approximation w1/2(x′) ≃ w1/2[u(x)]. This is not surprising given that the zeroth-order expansion of w1/2(x′) about u(x) is a much stronger approximation than the second-order expansion of ϕ(x′) about u(x) (both approximations are necessary to arrive at the speckle tracking formula).

The increased quality of projection images due to smoother illumination profiles was one of the principle motivations behind Salditt and collaborators' efforts to develop an X-ray single-mode waveguide, in order to improve their tomo-holographic imaging methods [see for example Krenkel et al. (2017[Krenkel, M., Toepperwien, M., Alves, F. & Salditt, T. (2017). Acta Cryst. A73, 282-292.])].

5. Reconstruction algorithm

In this section we describe the steps necessary to recover estimates for Φ(x) and Iref(x) from a series of N measurements of the kind depicted in Fig. 3[link], where each recorded image on the detector corresponds to a translation of the sample in the transverse plane by Δxn (here n is the image index). The refinement cycle is illustrated in Fig. 6[link]. According to the speckle tracking approximation of equation (13)[link], the geometric relationship between the recorded images In(x) and the unrecorded reference Iref(x) is given by

[\displaystyle I_{n}({\bf x}) = W({\bf x})\,I_{\rm {ref}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi({\bf x})-\Delta{\bf x}_{n},{\overline z}\right]. \eqno (25)]

Translating the sample by Δxn along the x axis leads to a corresponding translation of the reference, because the convolution integral in equation (2)[link] possesses translational equivariance.

[Figure 6]
Figure 6
Flow diagram for the PXST iterative refinement cycle. A left arrow (←) represents an update of the item on the left given the items to the right of the arrow. The dashed line arrows represent optional paths in the algorithm. Each step in the diagram corresponds to an equation in the main text: `update reference' to equation (27)[link], `update phase gradients' to equation (28)[link], `update sample translation' to equation (29)[link], `calculate error' to equation (26)[link], `regularize phase gradients' to equation (30)[link], and finally the `irrotational constraint' and `integrate phase gradients' steps to equation (31)[link].

To recover estimates for Φ(x) and Iref(x), we choose to minimize the target function

[\eqalignno { \varepsilon & = \textstyle\sum\limits _{n}\int\varepsilon(n,{\bf x})\,{\rm d}x \cr & = \sum\limits _{n}\int\int {\rm d}{\bf x} {{1} \over {\sigma^{2}_{\rm I}({\bf x})}}\cr & \quad\times\left\{I_{n}({\bf x})-W({\bf x})\,I_{\rm {ref}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi({\bf x})-\Delta{\bf x}_{n}, {\overline z}\right]\right\}^{2} & (26)}]

in an iterative update procedure with respect to ∇Φ(x) and (as needed) Δxn, subject to

[\eqalignno{ & I_{\rm {ref}}({\bf x},{\overline z}) \cr & \!\!= {{\sum _{n}w({\bf x}+\Delta{\bf x}_{n})\,I_{n}[{\bf x} + ({{\lambda z}/{2\pi}})\nabla\phi({\bf x}+\Delta{\bf x}_{n})+\Delta{\bf x}_{n},z]} \over {\sum _{n}w^{2}({\bf x}+\Delta{\bf x}_{n})}}, & (27)}]

where [\sigma^{2}_{\rm I}({\bf x})] is the variance of the recorded intensities at each detector pixel, such that [\sigma^{2}_{\rm I}({\bf x}) = \langle I^{2}_{n}({\bf x})-\langle I_{n}({\bf x})\rangle _{n}^{2}\rangle _{n}]. In fact equation (27)[link] is the analytical solution for the minimum of [\textstyle\sum _{n}\varepsilon(n,{\bf x})] with respect to Iref(x) but for [\sigma^{2}_{\rm I}({\bf x}) = 1]. The reason we have set [\sigma^{2}_{\rm I}({\bf x}) = 1] for the reference update is that, in this way, the reference is formed preferentially from parts of the image with larger intensities and thus will not be unduly affected by detector noise. This is also the update procedure that is often employed in single-mode ptychographic reconstructions [see for example equation (7) of Thibault et al. (2009[Thibault, P., Dierolf, M., Bunk, O., Menzel, A. & Pfeiffer, F. (2009). Ultramicroscopy, 109, 338-343.])].

The update for ∇Φ(x) is given by

[ \nabla\Phi({\bf x}) = {\rm argmin}_{{\nabla\Phi}}\left[\textstyle\sum\limits _{n}\varepsilon(n,x)\right], \eqno (28)]

while holding Iref(x) and Δxn constant. Here argminΦ means `the argument of the minimum' with respect to ∇Φ, which is to say, the ∇Φ that gives rise to the minimum of [\textstyle\sum _{n}\varepsilon(n,x)]. The minimization is performed by evaluating [\textstyle\sum _{n}\varepsilon(n,{\bf x})] for possible value of ∇Φ(x) within a pre-defined search window.

The update for Δxn is given by

[ \Delta{\bf x}_{n} = {\rm argmin}_{{\Delta{\bf x}}}\left[\textstyle\int\varepsilon(n,{\bf x})\,{\rm d}x\right], \eqno (29)]

while holding Iref(x) and ∇Φ(x) constant. Once again, the minimization is performed by evaluating the possible value of Δxn within a pre-defined search window.

Additionally, it is often desirable to regularize ∇Φ(x) during the update procedure (especially for the first few iterations), according to

[\displaystyle \nabla\Phi({\bf x}) = \left[{{1} \over {2\pi\sigma^{2}}}\exp\left({{-{{{\bf x}^{2}} \over {2\sigma^{2}}}}}\right)\right] \otimes \nabla\Phi({\bf x}), \eqno (30)]

where ⊗ is the convolution operator and σ is a regularization parameter that can be reduced as the iterations proceed.

Once the iterative procedure has converged, the phase profile of the illumination [Φ(x)] can be recovered from the gradients [∇Φ(x)] by numerical integration. For this we follow the method outlined in the supplementary section of Zanette et al. (2014[Zanette, I., Zhou, T., Burvall, A., Lundström, U., Larsson, D. H., Zdora, M., Thibault, P., Pfeiffer, F. & Hertz, H. M. (2014). Phys. Rev. Lett. 112, 253903.]). Let us label the final value of the phase gradients by δ(x) ≡ ∇Φ(x). The procedure is then given by

[\displaystyle \Phi({\bf x}) = {\rm argmin}_{\Phi}\left[\left|{{\bf \delta}}({\bf x})-\nabla\Phi({\bf x})\right|^{2}\right], \eqno (31)]

where ∇Φ(x) is evaluated numerically and the minimization is performed via the least-squares conjugate gradient method.

The fact that Φ is given by the numerical integration of ∇Φ suggests a further constraint that could be employed in the update procedure. As noted by Paganin et al. (2018[Paganin, D. M., Labriet, H., Brun, E. & Bérujon, S. (2018). Phys. Rev. A, 98, 053813.]), ∇Φ will be irrotational if Φ is continuous and single valued because ∇Φ is given by the gradient of a scalar field. This follows from the Helmholz theorem, which states that any field can be written as the sum of a gradient and a curl. Since we know that ∇Φ is, by definition, the gradient of Φ, then the curl must be zero: ∇ × ∇Φ = 0. In the work of Paganin et al., this condition is automatically satisfied by the solution. Here, however, we must incorporate this as a separate constraint. An irrotational field f is one that satisfies

[\displaystyle {{\partial{\bf f}_{y}({\bf x})} \over {\partial x}} = {{\partial{\bf f}_{x}({\bf x})} \over {\partial y}}, \eqno (32)]

where fx(x) and fy(x) are the x and y components of the vector field, respectively. To ensure that ∇Φ is irrotational, one need only apply the numerical integration in equation (32)[link] followed by numerical differentiation as needed during the update procedure. If this condition is not enforced, then the degree to which the recovered ∇Φ is irrotational can be used as a measure of the fidelity of the result.

Numerical considerations for the implementation of this iterative update procedure, in addition to the source code developed to implement the PXST algorithm, have been published online (see https://github.com/andyofmelbourne/speckle-tracking).

The algorithm presented here is by no means the only approach to solve for the phase gradients and the reference. Indeed, similar problems emerge in many areas of imaging such as computer vision (Demirci et al., 2006[Demirci, M. F., Shokoufandeh, A., Keselman, Y., Bretzner, L. & Dickinson, S. (2006). Int. J. Comput. Vis. 69, 203-222.]), medical imaging (Thirion, 1998[Thirion, J. P. (1998). Med. Image Anal. 2, 243-260.]) and military targeting applications (Kechagias-Stamatis et al., 2018[Kechagias-Stamatis, O., Aouf, N., Gray, G., Chermak, L., Richardson, M. & Oudyi, F. (2018). Aerosp. Sci. Technol. 73, 309-317.]). In magnetic resonance imaging, the process of identifying the distortions that relate an image to its reference is often termed the `image registration' problem and generating the reference from a set of distorted views is termed `atlas construction'. `Diffeomorphic image registration' algorithms are popular in that field, many of which are based on Thirion's demons and log-demons algorithm (Thirion, 1998[Thirion, J. P. (1998). Med. Image Anal. 2, 243-260.]; Lombaert et al., 2014[Lombaert, H., Grady, L., Pennec, X., Ayache, N. & Cheriet, F. (2014). Int. J. Comput. Vis. 107, 254-271.]). This approach has been employed in the context of XST by Berto et al. (2017[Berto, P., Rigneault, H. & Guillon, M. (2017). Opt. Lett. 42, 5117-5120.]) to recover the phase gradients from an image/reference pair. Others in the XST field use correlation-based approaches, where the geometric mapping between a small region of the distorted image and the reference is determined by the point which provides the greatest correlation coefficient (Zdora, 2018[Zdora, M.-C. (2018). J. Imaging, 4, 60.]). The approach outlined in this work was employed because of its simplicity and ease of implementation. However, it seems likely (in the authors' view) that one or more of the other approaches mentioned above could be adapted to the current problem in order to produce superior results.

5.1. Example reconstruction

Here we provide a brief example of a PXST reconstruction from a simulated 1D data set. This example is not intended as a realistic simulation of an actual experiment: see Morgan et al. (2020[Morgan, A. J., Murray, K. T., Prasciolu, M., Fleckenstein, H., Yefanov, O., Villanueva-Perez, P., Mariani, V., Domaracky, M., Kuhn, M., Aplin, S., Mohacsi, I., Messerschmidt, M., Stachnik, K., Du, Y., Burkhart, A., Meents, A., Nazaretski, E., Yan, H., Huang, X., Chu, Y., Andrejczuk, A., Chapman, H. N. & Bajt, S. (2020). J. Appl. Cryst. 53, https://doi.org/10.1107/S1600576720006925.]) for experimental results in two dimensions. Rather, it serves as a simple illustrative check on the basic principles of PXST.

The simulated sample is similar to that shown in Fig. 2[link]. It was constructed in Fourier space with a Gaussian intensity profile and random phases at each pixel. The real-space object is thus complex valued, so that rays passing through the sample will be both absorbed and deflected in angle. The intensity of the illumination profile, in the plane of the detector, was formed by setting W equal to a top hat function filtered with a Gaussian kernel. This filter produces a smooth tapered fall-off in the intensity near the edges of the beam that helps to avoid aliasing artefacts during numerical propagation of the wavefront. The phase profile, Φ, was constructed with the quadratic function πx2/[λ(z1 + z)], where λ = 1.2 nm (1 keV), z = 20 mm and z1 = 40 mm, so that the focal plane of the illumination is upstream of the sample in the top panel of Fig. 7[link] by a distance that is twice the sample-to-detector distance. This leads to an average magnification factor of 1.5. In addition to this, a sinusoidal phase profile was added to the phase in order to simulate the result of aberrations in the lens system; this can be seen as the dashed black line in the bottom panel of Fig. 7[link].

[Figure 7]
Figure 7
Top: intensity of the wavefront propagating from the sample (z = 0) to the detector plane (z = 20 mm). The linear colour scale ranges from 0 (white) to the maximum value (black). Middle: stack of the 1D images recorded as the sample is scanned across the wavefield (to the right). The colour scale is the same as in the top panel. Bottom: reconstructed and input phase aberrations in the detector plane. See text for further details.

The intensity of the wavefront, I(x, z), propagating from the exit surface of the sample to the detector plane is shown in the top panel. Upon close inspection, one can see that the intensities in the plane of the detector are non-trivially related to those in the exit surface of the sample. As such I(x, 0) cannot be constructed from I(x, z) by a scaling in x (magnification) or indeed by any geometric mapping. We make the point again that in PXST the `reference' is not the sample transmission profile; rather, it is the intensity profile one would have observed on a detector placed a distance [\bar{z} = zz_{1}/(z_{1}+z) =] 13.3 mm downstream of the sample illuminated by a plane wave. It is the geometric mapping between the reference (not the sample transmission) and the recorded images that is used to reconstruct the phase profile of the illumination.

The advantage of this 1D example is that one can visualize the entire data set in a single 2D image. In the middle panel of Fig. 7[link] the 1D images formed on the detector, as the sample is scanned across the wavefield, are displayed as an image stack. Along the vertical axis is the image number and the horizontal axis is in angle units, which are the angles made from the point source to each pixel in the image. It is seen that this image stack consists of a series of lines that appear to flow towards positive angles as the image number increases. These are the features in the image that can be obviously tracked through the stack. In this representation, the gradients of the lines at each diffraction angle are proportional the local wavefront curvature. For example, at a diffraction angle of ∼−0.75 mrad, the wavefront aberrations have a negative curvature and so features at this point in the wavefield are demagnified with respect to the mean. At a diffraction angle of ∼0.75 mrad, the opposite is true (with a greater magnification) and the line gradients are shallow with respect to those at ∼−0.75 mrad. In addition to variations in the geometric magnification, the wavefront aberrations also locally adjust the effective propagation distance of the speckles. This is a non-geometric effect and (unlike the local variations in the magnification) is not accounted for by the PXST reconstruction algorithm. For the current example, we have deliberately set the aberrations such that the local magnification and effective propagation distance vary by a significant fraction across the wavefield. This allows for their effect to be clearly observed in the simulated data, but also leads to some errors in the phases.

The reconstructed phase profile, after 30 iterations of the PXST algorithm, is shown as the blue line in the bottom panel of Fig. 7[link]. The constant, linear and quadratic components of the phase (or pedestal, tilt and defocus terms, respectively) have been removed prior to display, to allow the sinusoidal aberration profile to be clearly visualized. Near the edges of the illumination, W ≃ 0 and the phases could not be determined (as expected). Apart from this, the differences between the ground truth and reconstructed phase profile (0.1 rad r.m.s. error) are too small to see in this plot but are still much greater than the theoretical lower limit of ∼0.0001 (this limit is defined in Appendix D[link]) – owing to the strength of the aberrations (as described in the previous paragraph).

6. Discussion and conclusion

We have presented a modified form of the speckle tracking approximation, valid to second order in a local expansion of the phase term in the Fresnel integral. This result extends the validity of the speckle tracking approximation, thus allowing for greater variation of the unknown phase profile and for greater magnification factors when the wavefield has a high degree of divergence (such as that produced by a high-numerical-aperture lens system) or, when imaging a sample in the differential configuration of XST, allowing for greater phase variation across the transmission function of the sample (such as that produced by a thick specimen). We suggest that this approximation can be used, with little modification, in many of the existing XST applications and suggest such a modification for the UMPA approach.

We have also presented the PXST method, a wavefront metrology tool capable of dealing with highly divergent wavefields (like XSS), but unlike XSS, the resolution does not depend on the step size of the sample translations transverse to the beam. Coupled with a high-numerical-aperture lens, PXST provides access to nanoradian angular sensitivities as well as highly magnified views of the sample projection image. With a suitable scattering object, which in this case is the sample itself, a minimum of two images are required, although more images will improve robustness and resolution.

We must emphasize that it is only the projection image of the sample that is recovered. The phase and transmission profile of the sample must be inferred from the projection image via standard techniques (Wilkins et al., 2014[Wilkins, S. W., Nesterets, Y. I., Gureyev, T. E., Mayo, S. C., Pogany, A. & Stevenson, A. W. (2014). Proc. R. Soc. A, 372, 20130021.]). This is in contrast to other methods that provide multiple modes of imaging of the sample, such as the transmission, phase and `dark-field' profiles. What distinguishes PXST from these methods is that the sample image is obtained in addition to the wavefield phase in the absolute configuration of XST: that is, both can be obtained from a single scan series of the sample.

A further application of this method is to use it as an efficient prior step to Fourier ptychography, by recording images out of focus. The recovered illumination and sample profiles can be used as initial estimates for a Fourier ptychographic reconstruction. Experimentally, this additional step can be achieved simply by moving the sample towards the focal plane of the lens. In some cases, this additional step would not even be required, so that speckle tracking followed by ptychography could be performed on the same data set.

For experimental results utilizing the PXST method, see Morgan et al. (2020[Morgan, A. J., Murray, K. T., Prasciolu, M., Fleckenstein, H., Yefanov, O., Villanueva-Perez, P., Mariani, V., Domaracky, M., Kuhn, M., Aplin, S., Mohacsi, I., Messerschmidt, M., Stachnik, K., Du, Y., Burkhart, A., Meents, A., Nazaretski, E., Yan, H., Huang, X., Chu, Y., Andrejczuk, A., Chapman, H. N. & Bajt, S. (2020). J. Appl. Cryst. 53, https://doi.org/10.1107/S1600576720006925.]). These results are based on a campaign of measurements for the development of a high-numerical-aperture wedged multi-layer Laue lens systems.

APPENDIX A

Derivation of the speckle tracking approximation

The Fresnel integral of equation (2)[link] is often referred to as a point projection mapping. This is because, when the Fresnel number is ≫1, the dominant contributions to the integral typically arise from values of the sample transmission, T(x′), around the point x (i.e. for x′ ≃ x). At this point, the phase term π(xx′)2/λz has a spatial frequency qF = (xx′)/λz ≃ 0. For x′ far from x, the phase term causes the integrand to oscillate rapidly between ±T(x′). If T(x′) is bandwidth limited, with a maximum spatial frequency of (say) qmax, then, for a sufficiently large |xx′|, [q_{\rm {F}}\ge q_{{\max}}] and successive oscillations of the integrand, caused by the phase term, will occur at roughly the same values of T(x′) and will thus cancel each other in the integration.

However, in the Fresnel integral of equation (3)[link], the modulation of T(x′) by [p(x^{{\prime}},0) = {w} ^{1/2}(x^{{\prime}})\exp[{{i\phi(x^{{\prime}})}}]] has generated an additional phase term, and we would now expect the dominant contribution to I(x, z) from T(x′) to arise at values of x′ for which the integrand is smooth. To simplify the analysis, let us gather the phase terms of the Fresnel exponent and the incident illumination into a global phase factor

[\displaystyle g(x,x^{{\prime}}) = \phi(x^{{\prime}})+{{\pi} \over {\lambda z}}(x-x^{{\prime}})^{2}, \eqno (33)]

so that the complex amplitude of the Fresnel integral becomes4

[\eqalignno{ \psi(x,z) & = {{\exp({{2\pi iz/\lambda}})} \over {\left({-i\lambda z} \right)^{1/2}}}\int T(x^{{\prime}})\,p(x,x^{{\prime}})\exp\left[{{{{i\pi} \over {\lambda z}}(x-x^{{\prime}})^{2}}}\right]\,{\rm d}x^{{\prime}} \cr &&(34) \cr & = {{\exp({{2\pi iz/\lambda}})} \over {\left({-i\lambda z} \right)^{1/2}}}\int T(x^{{\prime}})\,{w} ^{1/2}(x^{{\prime}})\exp[{{ig(x,x^{{\prime}})}}] \,{\rm d}x^{{\prime}}. & (35)}]

Note that the global phase term g(x, x′), does not contain any contribution from the phase of the transmission function T(x′). Without any prior knowledge of this phase term, our smoothness condition becomes

[\displaystyle {{\partial g(x,x^{{\prime}})} \over {\partial x^{{\prime}}}} = \nabla\phi(x^{{\prime}})-{{2\pi} \over {\lambda z}}(x-x^{{\prime}}) = 0. \eqno (36)]

For now, we will define u−1 as the solution to this equation for x given x′, so that

[\displaystyle x = u^{{-1}}(x^{{\prime}}) = x^{{\prime}}+{{\lambda z} \over {2\pi}}\nabla\phi(x^{{\prime}}). \eqno (37)]

u−1 is the functional inverse of u, which is yet to be defined. So, equation (3)[link] now represents the point projection mapping x′ → u−1(x′), rather than x′ → x.

This point is illustrated in Fig. 8[link] with w1/2(x′) = 1 for three different values of ϕ(x′). On the vertical axis of each panel, we plot two real top-hat functions representing possible values for T(x′). In the two-dimensional domain of the integrand, T(x′) is constant along the x axis. The Fresnel integral is performed by extruding T(x′) along the horizontal axis, multiplying by [\exp[{{ig(x,x^{{\prime}})}}]] and then integrating along the vertical axis. The real part of this integral is illustrated along the horizontal axis of each panel. We can see that the centroids of the features, before and after the Fresnel integral, follow the point projection mapping delineated by the dashed line x′ = u(x), which is defined by the condition [{{\partial g} / {\partial x^{{\prime}}}} = 0]. In the top panel ϕ(x′) = 0, leading to x′ = u(x) = x. This corresponds to Fresnel propagation with plane-wave illumination. Therefore, the separation between the top-hat functions in the sample plane is equal to the separation between the `speckles' produced by each top-hat function. In the second panel ϕ(x′) = πx2/(2λz), corresponding to divergent illumination that would arise from a point source of illumination, or an ideal lens system with an infinite numerical aperture. Here x′ = u(x) = 2x/3 and, consistent with the Fresnel scaling theorem, this leads to both a geometric magnification (the speckles are separated by a greater distance than the top hats) and a change in the effective propagation distance (which can be observed in the more rapid oscillation of the exponential term). In the final panel, a sinusoidal phase term has been added to the phase from the middle panel. Here u(x) does not have a simple form and both the effective propagation distance and the magnification vary with position along the x axis.

[Figure 8]
Figure 8
Illustration of the Fresnel integral, with a modulating phase term, for two top-hat functions. The colour maps display the real part of the exponential term, [{\cal R} \exp[{{g(x,x^{{\prime}})}} ]], with the same colour scale as in Fig. 1[link]. The alpha channel of the colour scale has been increased in regions where the spatial frequency of the exponent approaches the pixel size, so as to make transparent pixels that would otherwise be aliased. Phase terms that are constant with respect to x have been subtracted before display. These terms would not affect the final intensity of the image and removing them more clearly shows the line x′ = u(x) where [{{\partial g} / {\partial x^{{\prime}}}} = 0]. See text for further details.

This suggests the following modification to the approach outlined by Zanette and co-workers: instead of expanding ϕ(x′) and w1/2(x′) about x in equation (3)[link], we should shift this expansion about the point x′ = u(x). In this way, the Taylor series expansion will be most accurate over the domain of the integrand that contributes most to the integral. The Nth-order Taylor series expansions of g(x, x′) and w1/2(x′) about x′ = u(x) are given by

[\displaystyle g_{N}(x,x^{{\prime}}) = \sum _{{n = 0}}^{{n = N}}\,\left.{{[x^{{\prime}}-u(x)]^{n}} \over {n!}}{{\partial^{n}g} \over {\partial x^{\prime n}}}\right| _{{x,x^{{\prime}} = u(x)}}, \eqno (38)]

[\displaystyle {w} ^{1/2}_{N}(x^{{\prime}}) = \sum _{{n = 0}}^{{n = N}}\,\left.{{[x^{{\prime}}-u(x)]^{n}} \over {n!}}{{\partial^{n}w} \over {\partial x^{\prime n}}}\right| _{{x^{{\prime}} = u(x)}}. \eqno (39)]

Evaluating equation (38)[link] for N = 1 and equation (39)[link] for N = 0, we have

[ g_{1}(x,x^{{\prime}}) = g[x,u(x)]+\left. {{\partial g} \over {\partial x^{{\prime}}}}\right| _{{x,x^{{\prime}} = u(x)}}[x-u(x)] = g[x,u(x)], \eqno(38a)]

[ {w} ^{1/2}_{0}(x^{{\prime}}) = {w}^{1/2}[u(x)],\eqno(39a)]

where the n = 1 term in the expansion of g is zero by construction. With gg1 and [ {w} ^{1/2}\simeq {w} ^{1/2}_{0}], equation (34)[link] becomes

[\displaystyle \psi(x,z) \simeq{{\exp({{2\pi iz/\lambda}})} \over {\left({-i\lambda z} \right)^{1/2}}}{w} ^{1/2}[u(x)]\exp\{{{ig[x,u(x)]}}\}\int T(x^{{\prime}})\,{\rm d}x^{{\prime}}.\eqno(34a)]

Unfortunately, the above expression completely fails to capture the physics upon which XST methods are based, i.e. the geometric mapping between I and Iref defined by ϕ. In our attempt to improve the accuracy of the speckle tracking approximation, the first-order expansion of g about x′ = u(x) no longer depends on x′. Thus the integral over x′ in equation (34)[link] has reduced to the term [\textstyle\int T(x^{{\prime}})\,{\rm d}x^{{\prime}}].

With the above result in mind, let us try the following approach:

Instead of expanding ϕ(x′) to first order and w1/2(x′) to zeroth order about the point x′ = x, expand g(x, x′) to second order and w1/2(x′) to zeroth order about the point x′ = u(x).

This approach leads to

[\displaystyle g_{2}(x,x^{{\prime}}) = g[x,u(x)]+{{1} \over {2}}\left\{\nabla^{2}\phi[u(x)]+{{2\pi} \over {\lambda z}}\right\}[x^{{\prime}}-u(x)]^{2}, \eqno (40)]

where, once again, the n = 1 term for g(x, x′) is zero by construction in equation (37)[link]. Substituting equations (40)[link] and w1/2(x′) ≃ w1/2[u(x)] into (35)[link] then completing the square in the exponent we can recast the Fresnel integral in the following form:

[\eqalignno{\psi(x,z) & \simeq{{\exp({{2\pi iz/\lambda}})} \over {\left({-i\lambda z} \right)^{1/2}}}w[u(x)]\exp\{{{ig[x,u(x)]}}\}\cr &\quad \times \int T(x^{{\prime}})\exp\left\{ {{{{i\pi} \over {\lambda z[u(x)]}}[x^{{\prime}}-u(x)]^{2}}}\right\}\,{\rm d}x^{{\prime}}, & (41)}]

where we have defined z(x) as

[\displaystyle z(x) \equiv\left[{{1} \over {z}}+{{\lambda} \over {2\pi}}\nabla^{2}\phi(x)\right]^{{-1}}.\eqno (42)]

One can interpret z(x) as the propagation distance required to locally reproduce the diffraction features in ψ(x, z) had the illumination been plane wave [i.e. ϕ(x′) = 1].

We remind the reader that the `ref' subscript refers to the wavefront that would have been formed with plane-wave illumination, with p(x, 0) = 1. Here we define ψref as the complex amplitudes corresponding to the Fresnel integral in equation (2)[link]:

[\displaystyle \psi _{\rm {ref}}(x,z) = {{\exp({{2\pi iz/\lambda}})} \over {\left({-i\lambda z} \right)^{1/2}}}\int T(x^{{\prime}})\exp\left[{{{{i\pi} \over {\lambda z}}(x-x^{{\prime}})^{2}}}\right]\,{\rm d}x^{{\prime}}. \eqno (43)]

Now ψ(x, z) can be related to ψref(x, z) (where Iref = |ψref|2) by the substitutions xu(x) and zz[u(x)], yielding

[\eqalignno { \displaystyle \psi(x,z) & \simeq \exp\left({{2\pi i\{z-z[u(x)]\}/\lambda}}\right) \{{{{z[u(x)]}/ {z}}} \}^{1/2}\cr &\quad\times w[u(x)]\exp\{{{ig[x,u(x)]}}\}\psi _{\rm {ref}}\{u(x),z[u(x)]\}, & (44)}]

[\displaystyle I(x,z) \simeq \{{{z[u(x)]} /{z}}\}w[u(x)]\,I_{\rm {ref}}\{u(x),z[u(x)]\}. \eqno (45)]

So far we have avoided a more explicit definition of the geometric mapping factor u(x); it is currently defined by its inverse in equation (37)[link]. A more meaningful definition can be obtained by the following consideration. Setting T(x′) = 1, equation (41)[link] represents the propagation of the incident beam through free space in the absence of the sample, so that

[\eqalignno { \displaystyle p(x,z) & \simeq {{\exp({{2\pi iz/\lambda}})} \over {\left({-i\lambda z} \right)^{1/2}}}w[u(x)]\exp\{{{ig[x,u(x)]}}\}\cr & \quad \times \int \exp\left\{{{{{i\pi} \over {\lambda z[u(x)]}}[x^{{\prime}}-u(x)]^{2}}}\right\} \,{\rm d}x^{{\prime}} \cr & = \exp({{2\pi iz/\lambda}})\left\{{{{z[u(x)]} / {z}}} \right\}^{1/2}{w} ^{1/2}[u(x)]\exp\{{ig[x,u(x)]}\} \cr & = \exp({2\pi iz/\lambda}){W} ^{1/2}(x)\exp[{i\Phi(x)}].&(46)}]

Here we have defined

[W(x) \equiv\{{{z[u(x)]} / {z}}\}w[u(x)]\quad {\rm and} \quad \Phi(x) \equiv g[x,u(x))]\eqno(47)]

and W(x) and Φ(x) are, respectively, the intensity and phase profiles of the undisturbed beam in the plane of the detector.

The benefit of this calculation is that it provides an interpretation of the mapping function u(x) in terms of the phase gradient of the illumination in the z plane. To see this, we first explicitly evaluate Φ(x) in terms of the incident phase profile ϕ(x). Substituting x′ = u(x) into equation (33)[link], we have

[\displaystyle \Phi(x) = \phi[u(x)]+{{\pi} \over {\lambda z}}[x-u(x)]^{2}. \eqno (48)]

Using the definition for u−1(x) in equation (37)[link], we can then evaluate

[\eqalignno { \displaystyle \Phi[u^{{-1}}(x)] & = \phi(x)+{{\pi} \over {\lambda z}}\left[x-x-{{\lambda z} \over {2\pi}}\nabla\phi(x)\right]^{2} \cr & = \phi(x)+{{\lambda z} \over {4\pi}}[\nabla\phi(x)]^{2}. & (49)}]

Taking the derivative of both sides of equation (49)[link] with respect to x yields

[ {{\partial u^{{-1}}(x)} \over {\partial x}}\nabla\Phi[u^{{-1}}(x)] = {{\partial} \over {\partial x}}\left\{\phi(x)+{{\lambda z} \over {4\pi}}[\nabla\phi(x)]^{2}\right\}, \eqno(50)]

[ \left[1+{{\lambda z} \over {2\pi}}\nabla^{2}\phi(x)\right]\nabla\Phi[u^{{-1}}(x)] = \left[1+{{\lambda z} \over {2\pi}}\nabla^{2}\phi(x)\right]\nabla\phi(x), \eqno(51)]

[ \nabla\Phi[u^{{-1}}(x)] = \nabla\phi(x).\eqno(52)]

With this equality and the definition for u−1(x) in equation (37)[link], one can now verify that the following equality holds:

[\displaystyle x = u^{{-1}}(x)-{{\lambda z} \over {2\pi}}\nabla\Phi[u^{{-1}}(x)]. \eqno (53)]

But since u[u−1(x)] = x we can identify u(x) with

[\displaystyle u(x) = x-{{\lambda z} \over {2\pi}}\nabla\Phi(x). \eqno (54)]

Furthermore, we can evaluate z[u(x)] in terms of Φ(x) by making use of the following relation:

[\displaystyle {{\partial} \over {\partial x}}u^{{-1}}(x) = \left[1+{{\lambda z} \over {2\pi}}\nabla^{2}\phi(x)\right] = {{z} \over {z(x)}},\eqno(55)]

where we have used the expression for z(x) in equation (42)[link]. Then, taking the derivative with respect to x of both sides of equation (53)[link],

[\eqalignno { \displaystyle {{\partial} \over {\partial x}}x = 1 & = {{\partial} \over {\partial x}}\left\{u^{{-1}}(x)-{{\lambda z} \over {2\pi}}\nabla\Phi[u^{{-1}}(x)]\right\} \cr & = {{z} \over {z(x)}}-{{z} \over {z(x)}}{{\lambda z} \over {2\pi}}\nabla^{2}\Phi[u^{{-1}}(x)], & (56)}]

and rearranging, we obtain

[\displaystyle z_{\Phi}(x) \equiv z[u(x)] = z\left[1-{{\lambda z} \over {2\pi}}\nabla^{2}\Phi(x)\right]. \eqno (57)]

Inserting equations (47)[link], (54)[link] and (57)[link] into equation (44)[link] we can then write

[\eqalignno { \displaystyle \psi(x,z) &\simeq \exp[{{-2\pi iz_{\Phi}(x)/\lambda}}]\cr & \quad \times p(x,z)\psi _{\rm {ref}}\left[x-{{\lambda z} \over {2\pi}}\nabla\Phi(x),z_{\Phi}(x)\right] & (58)}]

or, the inverse relationship,

[\eqalignno { \displaystyle p(x,0)\psi _{\rm {ref}}[x,z(x)]& \simeq \exp\{{{-2\pi i[z-z(x)]/\lambda}}\}\cr &\quad \times \left[{{{z}\over {z(x)}}} \right]^{1/2}\psi\left[x+{{\lambda z} \over {2\pi}}\nabla\phi(x),z\right]. &(59)}]

This formulation of the projected image separates the effects of the geometric and propagation-based distortions induced in the detected image by phase variations in the incident illumination. The geometric distortions are captured by the term (λz/2π)∇Φ(x) and the change in the fringe structure of a feature by the term zΦ(x).

For the purposes of the current work, we will ignore variations in the fringing terms z(x) and zΦ(x) across the wavefield and use instead the constants

[\displaystyle z_{\Phi}(x) \simeq {\overline z}_{\Phi}\equiv z\left[1-{{\lambda z} \over {2\pi}}\langle\nabla^{2}\Phi(x)\rangle _{{x}}\right], \eqno (60)]

[z(x) \simeq {\overline z} \equiv\left[{{1} \over {z}}-{{\lambda} \over {2\pi}}\langle\nabla^{2}\phi(x)\rangle _{{x}}\right]^{{-1}}. \eqno (61)]

〈∇2ϕ(x)〉x and 〈∇2Φ(x)〉x are the mean phase curvatures of the illumination in the plane of the sample and the detector, respectively. Under the Fresnel approximation, they can be defined in terms of the effective source distance from the sample or detector planes. If z1 is the distance between the entrance surface of the sample and the effective source point, then

[\displaystyle \langle\nabla^{2}\phi(x)\rangle _{{x}} = {{2\pi} \over {\lambda z_{1}}} \quad{\rm and}\quad\langle\nabla^{2}\Phi(x)\rangle _{{x}} = {{2\pi} \over {\lambda(z+z_{1})}}.\eqno(62)]

Using the above expressions, one can now verify that

[\displaystyle {\overline z} = {\overline z}_{\Phi} = {{zz_{1}} \over {z+z_{1}}}. \eqno (63)]

With the above approximations for z(x) and zΦ(x) and taking the mod square of equations (58)[link] and (59)[link], we arrive at the 1D speckle tracking approximation:

[\displaystyle I(x,z) \simeq W(x)\,I_{\rm {ref}}\left[x-{{\lambda z} \over {2\pi}}\nabla\Phi(x),{\overline z}\right], \eqno (64)]

[\displaystyle w(x)\,I_{\rm {ref}}(x,{\overline z}) \simeq{{z} \over {{\overline z}}}I\left[x+{{\lambda z} \over {2\pi}}\nabla\phi(x),z\right]. \eqno (65)]

In two dimensions, the constant prefactor to the Fresnel integral in equation (34)[link] is 1/(−iλz) [rather than 1/(−iλz)1/2 in one dimension]. This leads to an altered expression for W:

[\displaystyle W({\bf x}) \equiv\left({{{\overline z}} / {z}}\right)^{2}w({\bf x}). \eqno (66)]

Additionally, [\bar{z}] is now defined by the average wavefront curvature over the 2D transverse plane:

[\displaystyle {\overline z} \equiv z\left[ 1-{{\lambda z} \over {2\pi}}{{1} \over {2}}\langle\nabla^{2}\Phi({\bf x})\rangle _{{{\bf x}}}\right], \eqno(67)]

where the Laplacian operator is now also over the 2D plane, [\textstyle\nabla^{2}\equiv{{\partial^{2}} / {\partial x^{2}}}+{{\partial^{2}} / {\partial y^{2}}}]. If one accepts the approximation [z({\bf x}) \simeq {\overline z}] from the beginning, then the analysis presented here in one dimension can be repeated in two by following the above steps, first along the x axis and then along the y axis. The result of this procedure is

[\displaystyle I({\bf x},z) \simeq W({\bf x})\,I_{\rm {ref}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi({\bf x}),{\overline z}\right], \eqno (68)]

[\displaystyle w({\bf x})I_{\rm {ref}}({\bf x},{\overline z}) \simeq \left({{z} \over {{\overline z}}}\right)^{2}\,I\left[{\bf x}+{{\lambda z} \over {2\pi}}\nabla\phi({\bf x}),z\right]. \eqno (69)]

APPENDIX B

Derivation of the region of validity of the speckle tracking approximation

In Appendix A[link], it was shown that the Fresnel integral of T(x) modulated by p(x, 0),5

[\displaystyle \psi(x,z) = {{\exp({{2\pi iz/\lambda}})} \over {\left({-i\lambda z} \right)^{1/2}}}\int p(x^{{\prime}},0)\,T(x^{{\prime}})\exp\left[{{{{i\pi} \over {\lambda z}}(x-x^{{\prime}})^{2}}}\right]\,{\rm d}x^{{\prime}}, \eqno (70)]

can be approximated by

[\displaystyle \psi(x,z) \simeq{{p(x,z)} \over {\left({-i\lambda{\overline z}} \right)^{1/2}}}\int T(x^{{\prime}})\exp\left\{{{{{i\pi} \over {\lambda{\overline z}}}[x^{{\prime}}-u(x)]^{2}}}\right\}\,{\rm d}x^{{\prime}}, \eqno (71)]

subject to the approximations

(1) [g(x,x^{{\prime}}) \simeq g[x,u(x)]+\textstyle{{1} \over {2}}\{\nabla^{2}\phi[u(x)]+{{2\pi} / {\lambda z}}\}[x^{{\prime}}-u(x)]^{2}],

(2) [{w} ^{1/2}(x^{{\prime}}) \simeq{w} ^{1/2}[u(x)]],

(3) [z(x) \simeq {\overline z}\equiv{{zz_{1}} /({z+z_{1}})}],

where these are additional to the approximations necessary for the paraxial approximation to hold, p(x, 0) = w1/2(x) × exp[iϕ(x)], p(x, z) = exp(2πiz/λ)W1/2(x)exp[iΦ(x)], u(x) = x − [({{\lambda z} /{2\pi}})\nabla\Phi(x)], z1 is the effective distance between the light source and the sample plane, and [g(x,x^{{\prime}})\equiv\pi{{(x-x^{{\prime}})^{2}} / {\lambda z}}]+ [\phi(x^{{\prime}})].

B1. Requirements

In this section we shall determine the requirements for each of these three approximations to hold.

B1.1. The first approximation

Let us assume for the moment that approximations 2 and 3 are valid. In this case, it is sufficient to require that the Taylor series expansion of g(x, x′) is valid within the interval of convergence of the Fresnel integral in equation (71)[link].

In Appendix A[link], we have intuited that the expansion of g(x, x′) need only be valid for values of x′ satisfying qg(x, x′) < qT, where qg(x, x′) are the spatial frequencies of g and qT is the maximum spatial frequency of T. For values of x′ outside of this region, successive oscillations of the integrand will occur at roughly the same magnitude [±T(x′)] with a net zero contribution to the integral.

So, let us first examine the domain of x′ over which the expansion is valid. The Lagrange error bound for the Taylor series expansion of g(x, x′), about x′ = u(x), sets a limit on the magnitude of the residual:

[\eqalignno { \displaystyle |R_{N}(x^{{\prime}}\semi g)| & = |g(x,x^{{\prime}})-g_{N}(x,x^{{\prime}})| \cr & \le \left|{{M} \over {(N+1)!}}[x^{{\prime}}-u(x)]^{{N+1}}\right| , &(72)}]

where

[\left|{{\partial^{N+1}g} \over {\partial x^{\prime\,{N+1}}}}(x,x^{{\prime\prime}})\right| \le M \quad {\rm for }\quad |x^{{\prime\prime}}-u(x)|\,\lt \,|x^{{\prime}}-u(x)|. \eqno(73)]

With the above expression, we can identify the interval 2dϕ of x′ about u(x), such that x′ : u(x) − dϕu(x) + dϕ, for which the magnitude of the residual |RN| is below some threshold level of tolerance. So, for N = 2,

[\displaystyle {{\partial^3g} \over {\partial x^{\prime\, 3}}}(x,x^{\prime}) = \phi^{(3)}(x^{\prime}) \eqno (74)]

and

[\displaystyle \phi^{{(3)}}_{{\max}} \equiv M = {\max}\left[|\phi^{{(3)}}(x^{{\prime}})|:|x^{{\prime}}-u(x)|\le d_{\phi}\right], \eqno (75)]

we have

[ \textstyle E_{2} = {{1} \over {6}}\phi^{{(3)}}_{{\max}}d_{\phi}^{3} \,\lt\, {{1} \over {6}}E_{\rm {tol}}\quad {\rm or} \quad d_{\phi}\, \lt\, ({{E_{\rm {tol}}} / {\phi^{{(3)}}_{{\max}}}})^{{{1} /{3}}}, \eqno (76)]

where E2 is the Lagrange error bound for the second-order expansion of g and Etol is the maximum tolerable error (which has been implicitly defined so as to absorb the factor of 6).

Now we determine the minimum interval 2dqT required for the Fresnel integral in equation (71)[link] to converge near to its true value.

Let us expand T(x′) as a Fourier series, such that [T(x^{{\prime}}) = \textstyle\int\hat{T}(q)\exp({{2\pi ix^{{\prime}} q}})\,{\rm d}q], where [\hat{T}(q)] is the complex amplitude of the qth full-period spatial frequency of T(x′) corresponding to features of extent X = 1/q.

By the superposition principle, we can select the highest spatial frequency of T such that [\hat{T}(q) = 0] for |q| > qT and examine the radius of convergence of the integral in equation (71)[link] for [T(x^{{\prime}}) \rightarrow \exp({{2\pi ix^{{\prime}} q_{T}}})]:

[\eqalignno{ \psi(x,z\semi q_{T}) & \equiv p(x,z)\cr & \quad\times \!\!\!\!\!\!\int\limits _{{u(x)-d}}^{{u(x)+d}}\!\!\!\!\!\!\exp({{2\pi ix^{{\prime}} q_{T}}})\exp\left\{{{i\pi{{[x^{{\prime}}-u(x)]^{2}} \over {\lambda{\overline z}}}}}\right\}\,{\rm d}x^{{\prime}}, & (77)}]

where dqT is given by the value of d for which the above integral has converged within an acceptable error margin. This integral can reduced to the following form:

[\eqalignno { \psi(x,z\semi q_{T}) & = \cdots\!\!\!\!\!\!\!\!\!\int\limits _{{\left({{{2}/{\lambda{\overline z}}}} \right)^{1/2}(\lambda{\overline z}q_{T}-d)}}^{{\left({{{2} /{\lambda{\overline z}}}} \right)^{1/2}(\lambda{\overline z}q_{T}+d)}}\!\!\!\!\!\!\!\!\!\!\!\!\exp\left[{{i({{\pi} /{2}})v^{2}}}\right]\,{\rm d}v \cr & = \cdots\Bigl\{E\left[\left({{{2} / {\lambda{\overline z}}}} \right)^{1/2}(\lambda{\overline z}q_{T}+d)\right] \cr & \quad -E\left[\left({{{2} / {\lambda{\overline z}}}} \right)^{1/2}(\lambda{\overline z}q_{T}-d)\right]\Bigr\}, & (78)}]

where the function E is known as the Euler or Cornu spiral and the `⋯' represent terms that are constant with respect to the integration variable v. The Euler spiral can be constructed in the complex plane in terms of the Fresnel integrals C and S:

[\eqalignno{ E(x) & = C(x)+iS(x) & (79) \cr & = \textstyle\int\limits _{0}^{x}\cos[({{\pi}/2 })x^{2}]\,{\rm d}x+i\int\limits _{0}^{x}\sin[({{\pi}/2})x^{2}]\,{\rm d}x. & (80)}]

As both C and S approach their limit of [\textstyle{{1} \over {2}}] as x → ∞ with equal rapidity, we shall examine only the imaginary part of E for convenience.

In Fig. 9[link] we plot the imaginary part of the indefinite integral of equation (78)[link] (shown in green in the second row) as a function of d. We can see here that for d [\gtrsim] [\lambda{\overline z}q_{T}] the integral oscillates about 1 and that the amplitude of these oscillations is dominated by the [S[ ({2/\lambda{\overline z}} )^{1/2}(\lambda{\overline z}q_{T}-d)]] term (shown in orange).

[Figure 9]
Figure 9
First row: the Fresnel integral S. Second row: the terms ∝ ψ(x, z; qT) in equation (78)[link]. For these plots, [\lambda{\overline z} = 2] and the vertical black line is at [d = \lambda{\overline z}q_{\rm T}].

The extrema of S(x) are given by

[{{\partial S(x)} \over {\partial x}} = \sin[({{\pi}/2 })x^{2}] = 0 ,\eqno (81)]

and therefore

[x_{m} = \pm\left({2m} \right)^{1/2}. \eqno (82)]

The extrema of [S[ ({2/\lambda{\overline z}} )^{1/2}(\lambda{\overline z}q_{T}-d)]] are therefore located at

[\displaystyle d_{m} = \left({m\lambda{\overline z}} \right)^{1/2}\,+\,\lambda{\overline z}q_{T}\, \quad {\rm for }\quad m = 0,1,2,\ldots. \eqno (83)]

So, the residual for the integral in equation (78)[link] is proportional to 1/2 − S[(2m)1/2]. Therefore, the integer m will serve as a measure of convergence for the integral and we can require that [d_{{q_{T}}} \,\gt\, d_{m}]. Finally, combining equations (76)[link] and (83)[link] we have, for [d_{{q_{T}}}\, \lt \,d_{\phi}],

[\displaystyle \left({m\lambda{\overline z}} \right)^{1/2}\,+\,\lambda{\overline z}q_{T} \,\lt \,\left({{E_{\rm {tol}}} / {\phi^{{(3)}}_{\max}}}\right)^{{{1} / {3}}}. \eqno (84)]

The above inequality can be seen as a limit for the phase variation [\phi^{{(3)}}_{\max}] or, for a given [\phi^{{(3)}}_{\max}], as a limit on the smallest features that will be resolved (qT = 1/X) according to the approximation in equation (71)[link]. Setting, m1/2 = 1, multiplying both sides of equation (84)[link] by [\phi^{{(3)}}_{\max}] and raising both sides by the third power, we have the condition

[\displaystyle {{\left[\left({\lambda{\overline z}} \right)^{1/2}\,+\,\lambda{\overline z}q_{T}\right]^{3}} / {\phi^{{(3)}}_{\max}}} \ll 1. \eqno (85)]

B1.2. Approximation 2

Assuming for now that approximations 1 and 3 are valid, we require that w1/2(x′) ≃ w1/2[u(x)] is valid within the interval |x′ − u(x)| < dw, and that this interval is larger that dqT, which is the interval about x′ = u(x) over which the integral in equation (71)[link] will converge. Making use, once again, of the Lagrange error bound we have

[ d_{w} \,\lt \,{{E_{\rm {tol}}} \over {({w}^{1/2})^{{(1)}}_{{\max}}}}. \eqno (86)]

The requirement [d_{w}\, \gt\, d_{{q_{T}}}] leads to

[\displaystyle {{\left({\lambda{\overline z}} \right)^{1/2}\,+\,\lambda{\overline z}q_{T}} \over {\left({w} ^{1/2}\right)^{{(1)}}_{{\max}}}} \ll 1. \eqno (87)]

B1.3. Approximation 3

Assuming that approximations 1 and 2 are valid, the governing equation becomes

[\displaystyle \psi[u^{{-1}}(x),z] \simeq{{p\left[u^{{-1}}(x),z\right]} \over {\left({-i\lambda{\overline z}} \right)^{1/2}}}\int T(x^{{\prime}})\exp\left[{{{{i\pi} \over {\lambda z_{\Phi}(x)}}(x^{{\prime}}-x)^{2}}}\right]\,{\rm d}x^{{\prime}}, \eqno (88)]

where we have used [u^{{-1}}(x) = x+({{\lambda z} /{2\pi}})\nabla\phi(x)] and restored zΦ(x) in place of [{\overline z}] in equation (71)[link]. This approximation, that [z(x)\simeq z_{\Phi}(x)\simeq{\overline z}], is thus valid in the limit where the residual term

[\eqalignno{ R & = {{p[u^{{-1}}(x),z]} \over {\left({-i\lambda{\overline z}} \right)^{1/2}}} \int T(x^{{\prime}})\bigg\{\exp\left[{{{{i\pi} \over {\lambda{\overline z}}}(x^{{\prime}}-x)^{2}}}\right]\cr & \quad-\exp\left[{{{{i\pi} \over {\lambda z_{\Phi}(x)}}(x^{{\prime}}-x)^{2}}}\right]\bigg\}\,{\rm d}x^{{\prime}} & (89) \cr & = \psi[u^{{-1}}(x),{\overline z}]-\psi[u^{{-1}}(x),z_{\Phi}(x)] & (90) }]

approaches zero. The conditions under which ψ(x, z1) ≃ ψ(x, z2), in the Fresnel diffraction regime, are well known: the requirement is that the Fresnel number F = X2/λ|z2z1| ≫ 1. In this case, [|z_{1}-z_{2}| = |z_{\Phi}(x)-{\overline z}|], which depends on x. To generalize this requirement across the entire wavefront, we thus require that

[\displaystyle {{X^{2}} / {\lambda\sigma(z)}} \gg 1 \eqno (91)]

or

[ F \gg{{\sigma(z)} / {{\overline z}}}, \eqno (92)]

where σ(z) is the standard deviation of the effective propagation distance given by [\sigma(z)\equiv \{{\langle[z_{\Phi}(x)-{\overline z}]^{2}\rangle _{x}} \}^{1/2}] and [F = X^{2}/\lambda{\overline z}] is the Fresnel number for features of size X propagating a distance [{\overline z}]. Under this condition, features of size X (after correcting for the geometric distortions) will produce the same image on the detector regardless of their transverse position along the wavefront.

This condition can be expressed as a constraint on the phase profile of the beam. Using the definitions for zΦ(x) [equation (57)[link]] and [{\overline z}] [equation (61)[link]] we have

[\displaystyle z_{\Phi}(x)-{\overline z} = {{\lambda z^{2}} \over {2\pi}}\left[\nabla^{2}\Phi(x)-\langle\nabla^{2}\Phi(x)\rangle _{x}\right], \eqno (93)]

[\eqalignno{ \sigma(z) & = {{\lambda z^{2}} \over {2\pi}}\left\{{\left[\nabla^{2}\Phi(x)-\langle\nabla^{2}\Phi(x)\rangle _{x}\right]^{2}} \right\}^{1/2} & (94) \cr &= {{\lambda z^{2}} \over {2\pi}}\sigma(\Phi^{{(2)}}). & (95) }]

Using the above equation we have that approximation 3 is valid in the limit

[\displaystyle F\gg{{\lambda z^{2}} \over {2\pi{\overline z}}}\sigma(\Phi^{{(2)}}). \eqno (96)]

B2. Limit on the defocus for an ideal lens

The illumination formed by an ideal lens, with a hard-edged aperture, has a distinct form (see for example Fig. 4[link]). Within the plateau of the wavefront the intensity oscillates about a mean value, while the phase profile is approximately quadratic: ϕπx2/λz1. In this case, approximation 2, that w1/2(x′) ≃ w1/2[u(x)], is the most onerous of the three. In the above analysis, we had used the Lagrange error bound to estimate the maximum distance along the wavefront (|x′ − x|) for which this approximation will hold. But for the present case, this estimate is over-bounded given its general nature. Instead, we propose that an acceptable condition for this approximation is that w1/2(x′) ≃ w1/2[u(x)] will remain valid for |x′ − x| < z1NA, where NA is the numerical aperture of the lens and z1NA is approximately equal to the half-width of the plateau. Thus we replace dw = Etol/ (w 1/2)(1)max with dw = z1NA and equation (87)[link] becomes

[\displaystyle {{\left({m\lambda{\overline z}} \right)^{1/2}\,+\,\lambda{\overline z}q_{T}} \over {z_{1}\rm \,{\rm NA}}} \ll 1, \eqno (97)]

where this condition applies for features within the plateau of the illumination.

APPENDIX C

Uniqueness

C1. Pedestal and tilt terms are unconstrained in the illumination phase profile

In general, the solution to the target function in equation (26)[link] does not constrain terms proportional to 1, x and y in the recovered phase profile. These terms are sometimes referred to as the `pedestal' and `tilt' components of the pupil function. To see this, consider a phase profile Φ′ = c + d · x + Φ, where Φ corresponds to the true phase profile in the plane of the detector and where c and d are constants. This leads to the phase gradients ∇Φ′ = d + ∇Φ. Substitution into equation (25)[link] yields

[\eqalignno{ I^{{\prime}}_{n}({\bf x})& = W({\bf x})\,I_{\rm {ref}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi^{{\prime}}({\bf x})-\Delta{\bf x}_{n},{\overline z}\right] & (98) \cr & = W({\bf x})\,I^{{\prime}}_{\rm r}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi({\bf x})-\Delta{\bf x}_{n},{\overline z}\right]&(99) \cr & = I_{n}({\bf x})\quad {\rm for }\quad I^{{\prime}}_{\rm r}({\bf x},{\overline z}) = I_{\rm {ref}}\left({\bf x}-{{\lambda z} \over {2\pi}}{\bf d},{\overline z}\right),&(100)}]

independent of the pedestal term. Also, the tilt in the phase profile has produced a shift in the reference, which is generally not detectable unless the position of a feature in the object is known a priori with respect to the detector.

Alternatively, we could have absorbed the term [({{\lambda z} /{2\pi}}){\bf d}] as a constant offset in the sample translation vectors [\Delta{\bf x}_{n}^{{\prime}} = \Delta{\bf x}_{n}+({{\lambda z} / {2\pi}}){\bf d}]. We note that the tilt terms are typically unconstrained in speckle tracking techniques, since it is common to allow for an overall offset in the sample or detector positions.

C2. Speckle patterns of sufficient density are necessary, but not sufficient, for a unique solution to exist

Clearly, in the extreme case where no speckles are recorded the phase is completely unconstrained, so that

[\eqalignno{ I^{{\prime}}_{n}({\bf x}) & = W({\bf x})\,I_{\rm {ref}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi^{{\prime}}({\bf x})-\Delta{\bf x}_{n},{\overline z}\right] & (101)\cr & = I_{n}({\bf x}) \quad{ \rm for } \quad I_{\rm {ref}}({\bf x},{\overline z}) = 1 & (102)}]

and for any Φ′. This condition could also be reached in the limit where the fringe visibility of the speckle pattern approaches zero. The requirement for adequate fringe visibility is a point which is emphasized by Zanette et al. (2014[Zanette, I., Zhou, T., Burvall, A., Lundström, U., Larsson, D. H., Zdora, M., Thibault, P., Pfeiffer, F. & Hertz, H. M. (2014). Phys. Rev. Lett. 112, 253903.]) as well as many others in the field (Zdora, 2018[Zdora, M.-C. (2018). J. Imaging, 4, 60.]). Of course, the above condition could also be reached for any sub-domain of x. If, for example, In(x′) = W(x′) for all n, then the phase terms are unconstrained at the points x′. This suggests a more general (necessary) condition for a unique solution to exist: that a speckle of sufficient contrast must be observed at least once at each position in the image. As an example, the Hartmann sensor discussed in Section 2[link] does not satisfy this condition and, as such, it is necessary to interpolate values of Φ between the mask holes, rendering the method insensitive to high-order aberrations that lead to rapid variations in ΔΦ. Note that this is not always an issue, especially in cases where the low-order aberrations of the wavefront are of primary concern, such as when we wish to correct them by some means, or when the low-order aberrations are dominant and dominate the imaging performance of the optic.

In another extreme, the phase is also unconstrained for N = 1, when only a single image has been recorded. This is because the unknown Iref can be adjusted to accommodate any Φ′:

[\eqalignno{ I^{{\prime}}_{0}({\bf x}) & = W({\bf x})\,I_{\rm {ref}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi^{{\prime}}({\bf x})-\Delta{\bf x}_{0},{\overline z}\right] & (103) \cr & = I_{0}({\bf x})\,\, {\rm for } \,\,I_{\rm {ref}}({\bf x},{\overline z}) = \left({{I^{{\prime}}_{0}}\over{W}}\right)\!\left[{\bf x}+{{\lambda z} \over {2\pi}}\nabla\phi^{{\prime}}({\bf x})+\Delta{\bf x}_{0}\!\right] &(104)}]

and for any Φ′. This situation has arisen because the observed speckles are modelled as a function of ∇Φ and Iref, both of which are refined in the PXST method. So if a given speckle is observed only once, at a location x′, and the phase gradient at x′ is not otherwise constrained, then multiple solutions for ∇Φ and Iref exist. The above two considerations suggest the more general (necessary) conditions for a unique solution to exist:

A speckle of sufficient contrast must be observed at least once at each position in the image, and this speckle must be observed at least twice and at different positions in the image.

Note that the above constraint does not require that every speckle must be observed more than once.

This is the `speckle density condition' alluded to in the title of this section. The easiest way to satisfy this condition is to use a sample that produces a dense high-contrast array of speckles on the detector, such as a diffuser. With such a sample, the above constraint may be satisfied with just two images (i.e. for N ≥ 2), provided that the sample step size is not greater than half the illuminated region of the sample along the direction of the step.

However, it is possible for a unique solution to exist even when the sample produces only a single observable speckle in each image. In this case, the above condition can be satisfied by scanning the sample such that this speckle is observed at each point in the image. This is a far less efficient means for wavefront sensing than using a diffuser. But this generality allows for nearly any object, such as the Siemens star in Fig. 3[link] or a Hartmann mask, to be used as a wavefront sensing device.

C3. Ambiguities can arise from unknown sample positions

If the sample translation vectors (Δxn) are unknown, then there exists a family of solutions to equation (25)[link], with each solution corresponding to a set of translation vectors related by an affine transformation. Consider a set of translation vectors Δ[{\bf x}_n'] = x0 + A · Δxn, where x0 is an overall offset and the dot product is between the 2 × 2 linear transformation matrix A and the true sample translation vectors. As described previously, any overall offset in the translation vectors generates a corresponding offset in the reference and a tilt term in the recovered phases. So, neglecting the offset term, we generate this family of solutions by the substitution Δxn = A−1 · Δ[{\bf x}_n'] into equation (25)[link]:

[\eqalignno { I_{n}({\bf x}) & = W({\bf x})\,I_{\rm {ref}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi({\bf x})-{\bf A}^{{-1}}\cdot\Delta{\bf x}_{n}^{{\prime}},{\overline z})\right] & (105) \cr & = W({\bf x})\,I_{\rm {ref}}\left({\bf A}^{{-1}}\!\cdot\!\left\{{\bf A}\!\cdot\!\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi({\bf x})\right]-\Delta{\bf x}_{n}^{{\prime}}\right\},{\overline z}\right) & (106)\cr & = W({\bf x})\,I_{\rm {ref}}^{{\prime}}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi^{{\prime}}({\bf x})-\Delta{\bf x}_{n}^{{\prime}},{\overline z}\right],&(107)}]

where

[\Delta{\bf x}^{{\prime}}_{n} = {\bf A}\cdot\Delta{\bf x}_{n}, \eqno(108)]

[I_{\rm {ref}}^{{\prime}}({\bf x},{\overline z}) = I_{\rm {ref}}({\bf A}^{{-1}}\cdot{\bf x},{\overline z}) \eqno(109)]

and

[ \nabla\Phi^{{\prime}}({\bf x}) = {\bf A}\cdot\nabla\Phi({\bf x})+{{2\pi} \over {\lambda z}}\left({\bf x}-{\bf A}\cdot{\bf x}\right). \eqno (110)]

If, on the other hand, the true sample translation vectors are given by the input values of Δxn, but with small random offsets of mean 0, then the true solution for the phase and reference can be recovered from the retrieved values by removing the effect of any affine transformation that may have arisen during the reconstruction. This can be accomplished by minimizing [\textstyle\sum _{n}|\Delta{\bf x}^{\rm {out}}_{n}-{\bf A}\cdot\Delta{\bf x}^{\rm {in}}_{n}|^{2}] with respect to A, where [\Delta{\bf x}^{\rm {in}}_{n}] and [\Delta{\bf x}^{\rm {out}}_{n}] are the input and output values of Δxn, respectively, then generating the corresponding solutions for ∇Φ′ and [I_{\rm r}'] from the above equations. This situation can arise, for example, from small relative errors in the translation of a stepper motor or from the pointing jitter of an X-ray free-electron laser pulse.

C4. An unknown rotation of the sample stage axes with respect to the detector axes can be corrected

A common systematic error for the input sample positions is an overall rotation of the axes of the sample translation stages with respect to the pixel axes of the detector. In this case the linear transformation matrix reduces to the rotation matrix:

[ {\bf A}\rightarrow{\bf R}(\theta) = \left(\matrix { \cos\theta&-\sin\theta \cr \sin\theta&\cos\theta}\right). \eqno (111)]

Here, we can make use of the fact that in general ∇Φ′ of equation (110)[link] is not irrotational for θ ≠ 0 and A = R(θ). If (u, v) ≡ ∇Φout then we can require that the vector field R−1 · (u, v) be irrotational. With R−1 = R(−θ) and equation (32)[link], we have

[ \eqalignno{\theta & = {\rm argmin}_{\theta}\biggl \{\biggl[{{\partial} \over {\partial y}}(u\cos{\theta} + v\sin{\theta}) \cr & \quad -{{\partial} \over {\partial x}}(-u\sin{\theta}+v\cos{\theta})\biggr]^{2}\biggr\}, &(112)}]

where the derivatives with respect to x and y are evaluated numerically. However, if the irrotational constraint was enforced during the reconstruction, then the recovered [\Delta{\bf x}^{\rm {out}}_{n}] is free of the erroneous rotation and no further analysis is required.

C5. The raster grid pathology produces artefacts for lattice-like sample translations

A common problem encountered in ptychography is the `raster grid pathology' (Thibault et al., 2009[Thibault, P., Dierolf, M., Bunk, O., Menzel, A. & Pfeiffer, F. (2009). Ultramicroscopy, 109, 338-343.]). The raster grid pathology arises when reconstructing both the illumination and sample profiles from diffraction data acquired while the sample is scanned along a regular grid. In that case, the recovered illumination and sample transmission functions may be modulated by any function, so long as it is periodic on a lattice of points upon which all of the sample positions lie.

In many cases, the governing equation for a ptychographic reconstruction is given by

[\displaystyle I_{n}({\bf q}) = \left|{\cal F}\left[T({\bf x}-\Delta{\bf x}_{n})p({\bf x},0)\right]\right|^{2}, \eqno (113)]

where [{\cal F} [\cdot ]] is the Fourier transformation operator over the transverse plane and represents the propagation of the exit-surface wavefront ψn(x) ≡ T(xΔxn)p(x, 0) to the detector (in the far field of the sample). If the sample is translated along a regular grid, for example, with step size d, then Δxn = n · d, where the vector n = (in, jn) is the 2D lattice index corresponding to the nth image (for integer in and jn). If we make the substitution p′(x, 0) = f(x)p(x, 0) into the above equation, then we have

[ \psi _{n}({\bf x}) = T^{{\prime}}({\bf x}-{\bf n}\cdot{\bf d})\,f({\bf x})\,p({\bf x},0), \eqno(114)]

and hence

[ T^{{\prime}}({\bf x}) = {{\psi^{{\prime}}_{n}({\bf x}+{\bf n}\cdot{\bf d})} \over {p({\bf x}+{\bf n}\cdot{\bf d},0)\,f({\bf x}+{\bf n}\cdot{\bf d})}} = {{T({\bf x})} \over {f({\bf x})}} \eqno(115)]

if [f({\bf x}\pm{\bf n}\cdot{\bf d}) = f({\bf x})] for all n. The raster grid pathology can be avoided by ensuring that the sample scan positions lack any translational symmetry, i.e. by scanning the sample in non-regular patterns, for example in a spiral grid, or by adding a random offset to every grid position (Fannjiang, 2019[Fannjiang, A. (2019). Multiscale Model. Simul. 17, 973-995.]). Given that equation (113)[link] is just a special case of the Fresnel integral in equation (2)[link] (from which the speckle tracking approximation is derived) it is natural to consider whether or not the same pathology applies here.

One can show that a similar pathology does indeed arise in the present case. Here, the illumination's intensity is constrained during the reconstruction, so instead we make the substitution p′(x, z) = p(x, z)exp[ig(x)], which is equivalent to Φ′(x) = Φ(x) + g(x), into equation (25)[link]:

[\eqalignno{ I_{n}({\bf x}) & = W({\bf x})\,I^{{\prime}}_{\rm r}\left[{\bf x}-{{\lambda z} \over {2\pi}}\nabla\Phi^{{\prime}}({\bf x})-{\bf n}\cdot{\bf d},{\overline z}\right] & (116)\cr & = W({\bf x})\,I^{{\prime}}_{\rm r}\left\{{\bf x}-{{\lambda z} \over {2\pi}}\left[\nabla\Phi({\bf x})+\nabla g({\bf x})\right]-{\bf n}\cdot{\bf d},{\overline z}\right\} & (117)\cr & = W({\bf x})\,I^{{\prime}}_{\rm r}\left\{\left[{\bf x}-\nabla g({\bf x}-{\bf n}\!\cdot\!{\bf d})\right]-{{\lambda z} \over {2\pi}}\nabla\Phi({\bf x})-{\bf n}\!\cdot\!{\bf d},{\overline z}\right\} & (118)}]

and hence

[I^{{\prime}}_{\rm r}({\bf x}) = I_{\rm {ref}}\left[{\bf x}+{{\lambda z} \over {2\pi}}\nabla g({\bf x})\right] \eqno(119)]

if [\nabla g({\bf x}) = \nabla g({\bf x}\pm{\bf n}\cdot{\bf d})] for all n. So, rather than modulating the reference with a periodic function, the pathology here creates a periodic geometric distortion of the reference.

APPENDIX D

Angular sensitivity and imaging resolution

D1. The resolution of the reference is given by the demagnified effective pixel size

As discussed in Section 3[link], the Fresnel scaling theorem states that the projection image of a thin sample formed by a point-like source of coherent light produces a magnified and defocused image of the sample. Similarly, in PXST, the `reference' is an idealized image that would have been formed if the illumination were plane wave (i.e. with a flat phase profile), the detector were placed a distance [{\overline z}] from the plane of the sample, the detector extended over the entire illuminated region of the sample and the physical pixel size (σdet) were reduced by the magnification factor M. Assuming that the speckle tracking approximation holds, and that the aggregate signal-to-noise level is high, then the resolution of such an image is given by the demagnified effective pixel size of the detector (σref).

The effective pixel size (σeff) can be much smaller than σdet owing to sub-pixel interpolation, which is employed when registering a speckle across many images. We have found, as others have noted (Bérujon, Ziegler et al., 2012[Bérujon, S., Ziegler, E., Cerbino, R. & Peverini, L. (2012). Phys. Rev. Lett. 108, 158102.]), that sub-pixel interpolation can lead to a reduction in the effective pixel size by a factor of 10 or more depending on the point-spread function of the detector, the contrast of the speckles, the signal-to-noise ratio per image and the total number of images. On the other hand, effects such as the finite source size of the X-rays will tend to blur-out speckles and increase the effective pixel size.

Consider the imaging geometry depicted in Fig. 4[link], for an incoherent source of X-rays with a Gaussian angular distribution given by [\exp{(-\theta^{2}/2\sigma _{\rm s}^{2})}], where θ is the angle made by a ray pointing from the incoherent source point to the lens aperture. Then the image recorded in the detector plane will be given by

[\displaystyle I({\bf x},z\semi \sigma _{\rm s}) \simeq\left\{{{1} \over {2\pi}}\left({{z_{1}} \over {z\,f\sigma _{s}}}\right)^{2}\exp\left[{{-{{{\bf x}^{2}} \over {2}}\left({{z_{1}} \over {z\,f\sigma _{s}}}\right)^{2}}}\right]\right\}\otimes I({\bf x},z),\eqno(120)]

where ⊗ is the convolution operator, f is the focal length of the lens and I(x, z) is the intensity of the wavefront in the plane of the detector for an on-axis point source of light. Therefore, the observed speckles will be broadened by a factor σszf/z1. In this regime, the effective pixel size is given by

[\displaystyle \sigma _{\rm {eff}} = \delta _{\rm {pix}}\left(\sigma _{\rm {det}}+\sigma _{\rm s}\,{{z\,f} / {z_{1}}}\right), \eqno (121)]

[\displaystyle \sigma _{\rm {ref}} = {{\sigma _{\rm {eff}}} / {M}}, \eqno (122)]

where we have used the symbol δpix to represent the fractional reduction in the effective pixel size due to numerical interpolation. For example, with a physical pixel size of σeff = 50 µm, a fully coherent wavefield and δpix = 1, the demagnified pixel size for the example shown in Fig. 5[link] (left and middle columns) would be σref = 25 nm and for the right column (with the sample 10 µm from the focus) σref = 5 Å.

D2. The sample position that maximizes the angular sensitivity of the wavefront, in the plane of the sample, depends on the source coherence width

The smallest resolvable angular deviation of the wavefront, in the plane of the sample, is given by the arctangent of the smallest resolvable displacement of a speckle over the distance between the sample and the detector pixel array:

[\displaystyle \Delta\Theta _{\phi} = \arctan({{{\sigma _{\rm {eff}}} / {z}}})\simeq{{\sigma _{\rm {eff}}} / {z}}, \eqno (123)]

where we have employed the small-angle approximation in the last equality. The smallest resolvable increment in the phase gradient is thus [\Delta(\nabla\phi) = ({{2\pi} / {\lambda}})\Delta\Theta _{\phi}]. We note that ΔΘϕ is a lower bound on the angular sensitivity, since the achieved value will generally be larger than σeff/z because of detector noise and/or photon counting statistics.

For the imaging geometry depicted in Fig. 4[link], the optimal position for the detector will be given by the furthest distance from the focus such that the footprint of the illumination is contained within the pixel array, as this maximizes the sampling frequency of the wavefield. This raises the question, how far should one place the sample from the focus in order to maximize the angular resolution (minimize ΔΘ)? To answer this, let us keep the focus-to-detector distance (zt) fixed, so that zt = z1 + z, and minimize ΔΘϕ with respect to z1. Inserting M = zt/z1 and equation (122)[link] into equation (123)[link] and minimizing yields

[ \Delta\Theta _{\phi} = {{\sigma _{{\rm det}}} \over {z_{\rm t}}}\left[1+\left({{{f\sigma _{\rm s}} \over {\sigma _{\rm {det}}}}} \right)^{1/2}\right]^{2} \eqno(124)]

for

[z_{1} = {{z_{\rm t}}\over{1+\left({\sigma _{{\rm det}}}/{f\sigma _{\rm s}} \right)^{1/2}}}.\eqno(125)]

As the focus-to-sample distance is reduced, the magnification factor increases (improving the angular sensitivity), while at the same time the deleterious effects of the finite source size increase (deteriorating the angular sensitivity). The above value for z1 represents the optimal compromise between these two effects.

D3. The sample position that maximizes the angular sensitivity of the wavefront, in the plane of the detector, is in the focal plane where the magnification is greatest

The angular resolution for the wavefield in the plane of the detector (ΔΘΦ) is not, in general, the same as the angular resolution in the plane of the sample. This is because of the difference in extent between the effective pixel size and the demagnified effective pixel size due to divergent illuminating wavefields. ΔΘΦ is given by

[\displaystyle \Delta\Theta _{\Phi} = {{\sigma _{\rm {ref}}} /{z}}. \eqno (126)]

For a fixed focus-to-detector distance, once again z = ztz1, and we have

[\displaystyle \Delta\Theta _{\Phi} = \delta _{\rm {pix}}\left[({{z_{1}} /{z_{\rm t}^2}})\sigma _{\rm {det}}+(f/z_{\rm t})\sigma _{\rm s}\right]. \eqno (127)]

An interesting feature of the above equation is that the effect of the source incoherence δpixfσs/zt does not vary with z1; as z1 is decreased the increase in the magnification factor leads to a corresponding decrease in the effective pixel size due to the finite source size, but this is exactly balanced by the reduction in the angle subtended by the demagnified effective pixel size. Therefore, the optimal position for the sample, in order to minimize ΔΘΦ, is as close to the focal plane as possible. However, this can be a dangerous limit to approach, as the speckle tracking approximation will begin to break down as a result of the rapidly varying illuminating wavefield – at this point, it would be necessary to employ a fully coherent model for the wavefront propagation, for example, by switching to far-field ptychography. Additionally, it can be beneficial to increase the focus-to-sample distance for practical reasons; for example, increasing z1 provides a larger field of view of the sample in each image which aids in positioning the region of interest of the sample with respect to the illuminating beam and, typically, increases the speckle visibility. For these reasons, it can be beneficial to approach the limit where

[\displaystyle {{\sigma _{\rm {det}}} / {M}} \simeq\sigma _{\rm s}\quad{\rm or }\quad z_{1}\simeq z_{\rm t}{{\sigma _{\rm s}} / {\sigma _{\rm {det}}}}. \eqno (128)]

Here z1 has been increased until the demagnified pixel size is approximately equal to the demagnified feature size one would observe from a point-like object owing to incoherence alone. This represents the transition between modes where ΔΘΦ is dominated by the detector pixel size (larger z1) and by the finite source size (smaller z1).

D4. Although the angular sensitivities of the wavefields in the sample and detector planes differ, the phase sensitivities are equal and are both minimized by maximizing the magnification

The difference between ΔΘϕ and ΔΘΦ may at first appear to be a curious asymmetry. However, the phase sensitivities in the planes of the sample and the detector are in fact equal for a given sample position. For divergent illumination, the angular distribution of the wavefield in the sample plane is larger than that of the wavefield in the detector plane by a factor of M. On the other hand, the sampling frequency of the wavefield in the sample plane is also larger by the factor M. So, when propagating uncertainties in the angular distributions to the integrated phase profiles, these two effects cancel.

Recall the relationship between the integrated phase profile and the angular distribution of the wavefield in equation (1)[link]. Uncertainties in the angular distribution are thus scaled by the step size in x after integration, so that

[\displaystyle \Delta\phi \simeq\sigma _{\rm {ref}}{{2\pi} \over {\lambda}}\Delta\Theta _{\phi} = \sigma _{\rm {ref}}{{2\pi} \over {\lambda}}{{\sigma _{\rm {eff}}} \over {z}}, \eqno (129)]

[\displaystyle \Delta\Phi \simeq\sigma _{\rm {eff}}{{2\pi} \over {\lambda}}\Delta\Theta _{\Phi} = \sigma _{\rm {eff}}{{2\pi} \over {\lambda}}{{\sigma _{\rm {ref}}} \over {z}}. \eqno (130)]

Therefore, with σref = σeff/M, we have that [\Delta\phi =\Delta\Phi\simeq] [({{2\pi}/{\lambda}})\sigma _{\rm {eff}}^{2}/M] and both are minimized by placing the sample as close as possible to the focal plane, as described in the previous subsection.

Footnotes

1This article will form part of a virtual special issue of the journal on ptychography software and technical developments.

2In this work, an array of refractive elements was used rather than a grid of mask holes.

3In this article we use the word `speckle' loosely, to mean any localized diffraction feature recorded by the detector. Indeed, our method could just as well have been referred to as `ptychographic X-ray feature tracking'.

4For simplicity, the following analysis will be presented in one dimension. The difference between one and two dimensions is mostly in the normalization constants. At the end of this section we will generalize the result to two dimensions.

5For simplicity, the following analysis will be carried out in one dimension. Generalization to two dimensions is not required to support the results of this section.

Acknowledgements

We would like to acknowledge Timur E. Gureyev, for proof reading the manuscript and for fruitful discussion on the theory of X-ray wave propagation. We also acknowledge Chufeng Li for additional proof reading, as well as the two anonymous referees of this article, whose critiques and suggestions have improved the quality of this work.

Funding information

Funding for this project was provided by the Australian Research Council Centre of Excellence in Advanced Mol­ecular Imaging (AMI), the Gottfried Wilhelm Leibniz Programme of the Deutsche Forschungsgemeinschaft (DFG), and the Cluster of Excellence `CUI: Advanced Imaging of Matter' of the DFG – EXC 2056 – project ID 390715994.

References

First citationBajt, S., Prasciolu, M., Fleckenstein, H., Domaracký, M., Chapman, H. N., Morgan, A. J., Yefanov, O., Messerschmidt, M., Du, Y., Murray, K. T., Mariani, V., Kuhn, M., Aplin, S., Pande, K., Villanueva-Perez, P., Stachnik, K., Chen, J. P. J., Andrejczuk, A., Meents, A., Burkhardt, A., Pennicard, D., Huang, X., Yan, H., Nazaretski, E., Chu, Y. S. & Hamm, C. E. (2018). Light Sci. Appl. 7, 17162.  Google Scholar
First citationBerto, P., Rigneault, H. & Guillon, M. (2017). Opt. Lett. 42, 5117–5120.  Web of Science CrossRef PubMed Google Scholar
First citationBérujon, S., Wang, H., Alcock, S. & Sawhney, K. (2014). Opt. Express, 22, 6438–6446.  Google Scholar
First citationBérujon, S., Wang, H. & Sawhney, K. (2012). Phys. Rev. A, 86, 063813.  Google Scholar
First citationBérujon, S., Ziegler, E., Cerbino, R. & Peverini, L. (2012). Phys. Rev. Lett. 108, 158102.  Web of Science PubMed Google Scholar
First citationBonse, U. & Hart, M. (1965). Appl. Phys. Lett. 6, 155–156.  CrossRef Web of Science Google Scholar
First citationChapman, H. N. (1996). Ultramicroscopy, 66, 153–172.   Google Scholar
First citationDaniel, M.-D. & Ghozeil, I. (1992). Optical Shop Testing, 2nd ed., ch. 10. New York: John Wiley & Sons.  Google Scholar
First citationDavid, C., Nöhammer, B., Solak, H. H. & Ziegler, E. (2002). Appl. Phys. Lett. 81, 3287–3289.  Web of Science CrossRef CAS Google Scholar
First citationDemirci, M. F., Shokoufandeh, A., Keselman, Y., Bretzner, L. & Dickinson, S. (2006). Int. J. Comput. Vis. 69, 203–222.  Google Scholar
First citationFannjiang, A. (2019). Multiscale Model. Simul. 17, 973–995.  Google Scholar
First citationFedoryuk, M. V. (1971). Russ. Math. Surv. 26, 65–115.  Google Scholar
First citationHuang, X., Yan, H., Nazaretski, E., Conley, R., Bouet, N., Zhou, J., Lauer, K., Li, L., Eom, D., Legnini, D., Harder, R., Robinson, I. K. & Chu, Y. S. (2013). Sci. Rep. 3, 3562.  Web of Science CrossRef PubMed Google Scholar
First citationHüe, F., Rodenburg, J. M., Maiden, A. M., Sweeney, F. & Midgley, P. A. (2010). Phys. Rev. B, 82, 121415.   Google Scholar
First citationKechagias-Stamatis, O., Aouf, N., Gray, G., Chermak, L., Richardson, M. & Oudyi, F. (2018). Aerosp. Sci. Technol. 73, 309–317.  Google Scholar
First citationKrenkel, M., Toepperwien, M., Alves, F. & Salditt, T. (2017). Acta Cryst. A73, 282–292.  Web of Science CrossRef IUCr Journals Google Scholar
First citationLane, R. G. & Tallon, M. (1992). Appl. Opt. 31, 6902–6908.  Google Scholar
First citationLombaert, H., Grady, L., Pennec, X., Ayache, N. & Cheriet, F. (2014). Int. J. Comput. Vis. 107, 254–271.  Google Scholar
First citationMayo, S. C. & Sexton, B. (2004). Opt. Lett. 29, 866–868.  CrossRef PubMed Google Scholar
First citationMercère, P., Idir, M., Moreno, T., Cauchon, G., Dovillaire, G., Levecq, X., Couvet, L., Bucourt, S. & Zeitoun, P. (2006). Opt. Lett. 31, 199–201.  Web of Science PubMed Google Scholar
First citationMimura, H., Handa, S., Kimura, T., Yumoto, H., Yamakawa, D., Yokoyama, H., Matsuyama, S., Inagaki, K., Yamamura, K., Sano, Y., Tamasaku, K., Nishino, Y., Yabashi, M., Ishikawa, T. & Yamauchi, K. (2010). Nat. Phys. 6, 122–125.  Web of Science CrossRef CAS Google Scholar
First citationMorgan, A. J., Murray, K. T., Prasciolu, M., Fleckenstein, H., Yefanov, O., Villanueva-Perez, P., Mariani, V., Domaracky, M., Kuhn, M., Aplin, S., Mohacsi, I., Messerschmidt, M., Stachnik, K., Du, Y., Burkhart, A., Meents, A., Nazaretski, E., Yan, H., Huang, X., Chu, Y., Andrejczuk, A., Chapman, H. N. & Bajt, S. (2020). J. Appl. Cryst. 53, https://doi.org/10.1107/S1600576720006925.  Google Scholar
First citationMorgan, A. J., Prasciolu, M., Andrejczuk, A., Krzywinski, J., Meents, A., Pennicard, D., Graafsma, H., Barty, A., Bean, R. J., Barthelmess, M., Oberthuer, D., Yefanov, O. M., Aquila, A., Chapman, H. N. & Bajt, S. (2015). Sci. Rep. 5, 9892.  Google Scholar
First citationMorgan, K. S., Paganin, D. M. & Siu, K. K. W. (2012). Appl. Phys. Lett. 100, 124102.  Web of Science CrossRef Google Scholar
First citationMurray, K. T., Pedersen, A. F., Mohacsi, I., Detlefs, C., Morgan, A. J., Prasciolu, M., Yildirim, C., Simons, H., Jakobsen, A. C., Chapman, H. N., Poulsen, H. F. & Bajt, S. (2019). Opt. Express, 27, 7120–7138.  Google Scholar
First citationNugent, K. A., Gureyev, T. E., Cookson, D. F., Paganin, D. M. & Barnea, Z. (1996). Phys. Rev. Lett. 77, 2961–2964.  Google Scholar
First citationOlivo, A. & Speller, R. (2007). Appl. Phys. Lett. 91, 074106.  Web of Science CrossRef Google Scholar
First citationPaganin, D. M. (2006). Coherent X-ray Optics. Oxford University Press.  Google Scholar
First citationPaganin, D. M., Labriet, H., Brun, E. & Bérujon, S. (2018). Phys. Rev. A, 98, 053813.  Google Scholar
First citationStockmar, M., Cloetens, P., Zanette, I., Enders, B., Dierolf, M., Pfeiffer, F. & Thibault, P. (2013). Sci. Rep. 3, 1927.  Web of Science CrossRef PubMed Google Scholar
First citationTeague, M. R. (1983). J. Opt. Soc. Am. 73, 1434.  CrossRef Web of Science Google Scholar
First citationThibault, P., Dierolf, M., Bunk, O., Menzel, A. & Pfeiffer, F. (2009). Ultramicroscopy, 109, 338–343.  Web of Science CrossRef PubMed CAS Google Scholar
First citationThirion, J. P. (1998). Med. Image Anal. 2, 243–260.  Google Scholar
First citationWang, H., Sutter, J. & Sawhney, K. (2015). Opt. Express, 23, 1605–1614.  Web of Science CrossRef PubMed Google Scholar
First citationWilkins, S. W., Gureyev, T. E., Gao, D., Pogany, A. & Stevenson, A. W. (1996). Nature, 384, 335–338.  CrossRef CAS Web of Science Google Scholar
First citationWilkins, S. W., Nesterets, Y. I., Gureyev, T. E., Mayo, S. C., Pogany, A. & Stevenson, A. W. (2014). Proc. R. Soc. A, 372, 20130021.  Web of Science CrossRef Google Scholar
First citationZanette, I., Zhou, T., Burvall, A., Lundström, U., Larsson, D. H., Zdora, M., Thibault, P., Pfeiffer, F. & Hertz, H. M. (2014). Phys. Rev. Lett. 112, 253903.  Web of Science CrossRef PubMed Google Scholar
First citationZdora, M.-C. (2018). J. Imaging, 4, 60.  Google Scholar
First citationZdora, M. C., Thibault, P., Zhou, T., Koch, F. J., Romell, J., Sala, S., Last, A., Rau, C. & Zanette, I. (2017). Phys. Rev. Lett. 118, 203903.  CrossRef PubMed Google Scholar
First citationZdora, M.-C., Zanette, I., Zhou, T., Koch, F. J., Romell, J., Sala, S., Last, A., Ohishi, Y., Hirao, N., Rau, C. & Thibault, P. (2018). Opt. Express, 26, 4989–5004.  Google Scholar
First citationZhou, T., Wang, H., Fox, O. J. & Sawhney, K. J. (2019). Rev. Sci. Instrum. 90, 021706.  Google Scholar

This is an open-access article distributed under the terms of the Creative Commons Attribution (CC-BY) Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original authors and source are cited.

Journal logoJOURNAL OF
APPLIED
CRYSTALLOGRAPHY
ISSN: 1600-5767
Follow J. Appl. Cryst.
Sign up for e-alerts
Follow J. Appl. Cryst. on Twitter
Follow us on facebook
Sign up for RSS feeds