# X-ray multi-modal intrinsic-speckle-tracking

Konstantin Pavlov, David Paganin, Heyang (thomas) Li, Sebastien Berujon,
Hélène Rougé-Labriet, Emmanuel Brun

<figure><img src="image_1.png" /></figure>

► To cite this version:

Konstantin Pavlov, David Paganin, Heyang (thomas) Li, Sebastien Berujon, Hélène Rougé-Labriet, et al.. X-ray multi-modal intrinsic-speckle-tracking. Journal of Optics, 2020, 22 (12), pp.125604. 10.1088/2040-8986/abc313. hal-04738759

HAL Id: hal-04738759

https://hal.science/hal-04738759v1

Submitted on 17 Oct 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>
X-ray Multi-modal Intrinsic-Speckle-Tracking

Konstantin M. Pavlov*

School of Physical and Chemical Sciences, University of Canterbury, Christchurch, New Zealand
School of Physics and Astronomy, Monash University, Victoria 3800, Australia and
School of Science and Technology, University of New England, NSW 2351, Australia

David M. Paganin

School of Physics and Astronomy, Monash University, Victoria 3800, Australia

Heyang (Thomas) Li

School of Mathematics and Statistics, University of Canterbury, Christchurch, New Zealand and
School of Physics and Astronomy, Monash University, Victoria 3800, Australia

Sebastien Berujon

Instituto COPPEAD de Administração, Universidade Federal do Rio de Janeiro, Rio de Janeiro, Brazil

Hélène Rougé-Labriet

Novitom, 3 av doyen Louis Weil 38000 Grenoble, France and
Inserm UA7 STROBE, Université Grenoble Alpes, 38000 Grenoble, France

Emmanuel Brun

Inserm UA7 STROBE, Université Grenoble Alpes, 38000 Grenoble, France

(Dated: September 16, 2020)

We develop X-ray Multi-modal Intrinsic-Speckle-Tracking (MIST), a form of X-ray speckle-tracking that is able to recover both the position-dependent phase shift and the position-dependent small-angle X-ray scattering (SAXS) signal of a phase object. MIST is based on combining a Fokker-Planck description of paraxial X-ray optics, with an optical-flow formalism for X-ray speckle-tracking. Only two images need to be taken in the presence of the sample, corresponding to two different transverse positions of the speckle-generating membrane, in order to recover both the refractive and local-SAXS properties of the sample. Like the optical-flow X-ray phase-retrieval method which it generalises, the MIST method implicitly rather than explicitly tracks both the transverse motion and the diffusion of speckles that is induced by the presence of a sample. Application to X-ray synchrotron data shows the method to be efficient, rapid and stable.

# I. INTRODUCTION

In two recent papers [1, 2] a Fokker-Planck [3] formalism was developed for paraxial X-ray optics. The essence of this formalism is to use a two-current continuity equation, to describe paraxial X-ray energy flow downstream of illuminated samples containing both spatially-resolved phase-amplitude fluctuations and spatially-unresolved random micro-structure. The unresolved sample micro-structure bifurcates the X-ray energy transport, both within and downstream of the illuminated sample, into coherent and diffuse channels. The coherent energy-flow channel, downstream of the illuminated sample, is associated with the spatially resolved attenuation and refractive properties of the sample. The diffuse energy-flow channel is associated with “local roughness” [4] modelled by the spatially unresolved random micro-structure within the sample.

The paraxial-optics Fokker-Planck equation [1, 2] is an elliptic second-order partial differential equation

that may be viewed as a generalised form of Teague’s transport-of-intensity equation [5] for coherent paraxial optics. This generalisation simultaneously incorporates the additional effects of local incoherent scatter (small-angle X-ray scattering, SAXS [6]), source-size blurring and detector-induced blurring [1, 2]. Such a Fokker-Planck approach to paraxial X-ray optics in its final formulation is somewhat similar to statistical dynamical diffraction theory (SDDT), developed in the 1980s and 1990s by Kato [7, 8] and further developed by others [9–11], to describe dynamical and kinematical diffraction by deformed crystals having chaotically distributed defects. Later a similar statistical approach was applied by Nesterets [12] in the context of phase-contrast X-ray imaging (PCI) of non-crystalline objects. Further parallels include diffuse X-ray scattering from crystals [13], the frozen phonon model of electron diffraction [14], optical scattering from rough surfaces [15] and radiative transport in turbid media [16, 17].

The smallness (or high concentration) of either crystal defects (in SDDT) or object features (in PCI) (here “smallness” is in comparison with the resolution of the detection system) requires one to apply a statistical ap-

<footnote>* konstantin.pavlov@canterbury.ac.nz</footnote>
proach via averaging over a statistical ensemble to describe scattering by some “unresolvable” elements of such systems. Scattering by such “unresolvable” features transfers the propagating energy (intensity) from the coherent channel into the diffuse channel (see also Chap 7.4 in the book by Ishimaru [18]). In the context of PCI, the effect of the diffuse component is usually described in terms of broadening caused by SAXS [16, 19–25]. However, a division into coherent and diffuse components was also intrinsically used (see e.g., Eq. (1) in Oltulu et al. [26]). This transfer of X-ray energy from coherent intensity into diffuse intensity may be comparable with photoelectric absorption loss of this coherent component if the concentration of such defects (in SDDT) [27] or features (in PCI) [12] is high. The diffuse component of intensity can be further re-scattered if the object is thick enough. However, such typically small dynamical effects are neglected for diffuse intensity [28].

A separate but related thread of development is X-ray speckle-tracking [29, 30]. In this X-ray imaging method, speckles produced by a spatially random screen are recorded in the presence of a sample. Comparison of these speckles to those recorded in the absence of the sample, for one or more mask positions, then allows the refractive, attenuating and local-SAXS properties of the sample to be inferred. See the recent review by Zdora [31] together with references cited therein, as well as precedent work in a visible-light context [32–34]. Note also the evident similarities to X-ray Hartmann–Shack sensors [35] and single-grid phase-measurement methods [36, 37], both of which use specially-fabricated rather than random masks.

Multi-modal recovery of phase, intensity and SAXS is enjoying much attention in an X-ray speckle-tracking context, e.g. using the “X-ray Speckle-Vector Tracking” (XSVT) formalism [38], and the formalism of “Unified Modulated Pattern Analysis” (UMPA) [39]. XSVT and UMPA both employ multiple images for multi-modal recovery, although single-image multi-modal X-ray speckle tracking is also possible, using correlation-based approaches [40, 41]. There is an evident trade-off here, as, broadly speaking, measuring more images (e.g. in XSVT and UMPA) gives the benefit of improved spatial resolution at the cost of increased dose to the sample, relative to single-shot approaches. Another formalism requiring only a single speckle image to be taken in the presence of the sample, termed “Optical Flow” (OF) [42], has very recently been developed for X-ray speckle tracking, however this last-mentioned approach has not been applied to multi-modal analyses [43]. As mentioned earlier, XSVT and UMPA are multi-modal (as are the single-shot methods published in e.g. Refs. [40, 41]); the present paper makes OF multi-modal by augmenting it from a method able to recover wave-field phase, into a method able to recover both wave-field phase and local-SAXS properties.

OF is here made multi-modal via a Fokker–Planck-type generalisation that incorporates local SAXS, not unlike passing from non-statistical to statistical diffrac-

<figure><img src="image_3.png" /><figcaption>FIG. 1. Experimental setup for X-ray Multi-modal Intrinsic-Speckle-Tracking.</figcaption></figure>

tion theory. An attractive feature of the OF formalism is that it implicitly rather than explicitly tracks speckles, making it computationally much more rapid than more-general methods that rely on correlation analyses and/or error-metric minimisation. Another attractive feature is the complementary approach that the Fokker–Planck extension to OF takes to speckle tracking, being based on a non-iterative closed-form solution of a specified partial differential equation, as distinct from approaches that are based on iteratively minimising an error-metric integral.

We close this introduction with a brief outline of the remainder of the paper. In Sec. II we outline the theory underpinning our technique, which we term “X-ray Multi-modal Intrinsic-Speckle-Tracking (MIST)”. We then apply this formalism, in Sec. III, to experimental hard X-ray data obtained at the European Synchrotron Radiation Facility (ESRF). We briefly discuss some of the broader implications of our results in Sec. IV, and offer some concluding remarks in Sec. V.

## II. THEORY

Assume that a pure-phase-object sample is placed in a spatially-well-resolved reference speckle field, such as that sketched in Fig. 1. The reference speckle field may be created by passing an X-ray beam through a spatially random membrane. The registered speckle images obey the following Fokker–Planck [3] generalisation of the OF formalism for speckle-tracking [42]. This gives Eq. (55) in the theoretical paper by Paganin and Morgan [2], which was proposed but neither solved nor applied in that previous publication, and which which forms the Fokker–Planck-type starting-point for the present paper:

$$ I_R(x, y) - I_S(x, y) = \frac{\Delta}{k} \nabla_{\perp} \cdot [I_R(x, y) \nabla_{\perp} \phi(x, y)] - \Delta \nabla_{\perp}^2 [D_{\text{eff}}(x, y; \Delta) I_R(x, y)]. \quad (1) $$

Here, $I_R(x, y)$ is a reference speckle image obtained in the absence of a sample, $I_S(x, y)$ is the corresponding speckle image obtained in the presence of a sample that is by assumption a pure-phase object, $(x, y)$ denote transverse coordinates in planes perpendicular to the optical axis $z$, $\Delta$ is the sample-to-detector distance, $k$ is the X-ray
wave number, $\phi$ is the phase shift caused by the sample, $\nabla_{\perp} \equiv (\partial/\partial x, \partial/\partial y)$ is the transverse gradient and $D_{\text{eff}}$ is the effective diffusion coefficient describing local sample-induced SAXS [1, 2].

The first term, on the right side of Eq. (1), represents a coherent flow that deforms $I_R(x, y)$ into $I_S(x, y)$, with this deformation being induced by the refractive properties of the sample. This coherent flow has two distinct components [42], associated with the two terms in the expansion:

$$ \nabla_{\perp} \cdot [I_R(x, y)\nabla_{\perp}\phi(x, y)] = I_R(x, y)\nabla_{\perp}^2\phi(x, y) + \nabla_{\perp}I_R(x, y) \cdot \nabla_{\perp}\phi(x, y). \quad (2) $$

Here, the term $(\Delta/k)I_R(x, y)\nabla_{\perp}^2\phi(x, y)$ describes a lensing contribution in which speckles may be locally magnified or demagnified on account of the curvature $\nabla_{\perp}^2\phi(x, y)$ of the object-induced X-ray phase shift. This term will also describe the propagation-based phase contrast (Laplacian of the phase) induced by edges in the sample [44], which will be 'imprinted' on top of the speckle (see e.g. Ref. [45]). Conversely, the term $(\Delta/k)\nabla_{\perp}I_R(x, y)\nabla_{\perp}\phi(x, y)$ describes the transverse motion of the speckles that is induced by the sample. Turning to the diffusive channel of the energy flow, we have the second term on the right-hand side of Eq. (1), which describes the diffusion (visibility reduction) of the speckles that is induced by the unresolved micro-structure within the sample. This sample-induced diffusion is quantified by the position-dependent effective diffusion coefficient $D_{\text{eff}}(x, y; \Delta)$. Thus, Eq. (1) is a partial differential equation embodying three separate physical mechanisms for the sample-induced deformation ("flow") that maps speckles of the reference image $I_R(x, y)$ to corresponding speckles $I_S(x, y)$ measured in the presence of the sample: (i) lensing of speckles; (ii) transverse motion of speckles; (iii) diffusion of speckles.

The Laplacian operator, applied to the second term on the right side of Eq. (1), yields the following three components for the diffusive component of the sample-induced speckle deformation:

$$ \nabla_{\perp}^2 [D_{\text{eff}}(x, y; \Delta) I_R(x, y)] = D_{\text{eff}}(x, y; \Delta) \nabla_{\perp}^2 I_R(x, y) + I_R(x, y) \nabla_{\perp}^2 D_{\text{eff}}(x, y; \Delta) + 2 \nabla_{\perp} D_{\text{eff}}(x, y; \Delta) \cdot \nabla_{\perp} I_R(x, y). \quad (3) $$

We can neglect the second and third terms on the right-hand side of Eq. (3) on account of the assumption that the position-dependent effective diffusion coefficient $D_{\text{eff}}(x, y; \Delta)$ is a slowly-varying function of transverse coordinates. We can therefore simplify Eq. (1) as follows:

$$ I_R(x, y) - I_S(x, y) = \frac{\Delta}{k} I_R(x, y) \nabla_{\perp}^2 \phi(x, y) - \Delta D_{\text{eff}}(x, y; \Delta) \nabla_{\perp}^2 I_R(x, y), \quad (4) $$

where we have also used the approximation previously employed in Pavlov et al. [46], namely

$$ \nabla_{\perp} I_R(x, y) \cdot \nabla_{\perp} \phi(x, y) \approx 0. \quad (5) $$

We now explain this last-mentioned approximation in a little more detail. The intensity $I_R(x, y)$ of the reference speckle image, acquired in the absence of a sample, is produced by a spatially random mask. Therefore, the gradient of such an intensity field will be a vector field that is rapidly changing in both direction and magnitude, as a function of transverse coordinates. Thus, the scalar product of such a random vector field with a more slowly changing gradient of the phase can be neglected. The same approximation can also be explained in geometric terms, by calculating the expectation of the dot product of a pair of two-dimensional vector fields: (i) a random vector field $\mathbf{r}(x, y)$ and (ii) a slowly varying vector field $\mathbf{s}(x, y)$. The expectation (averaged over position coordinates) of such a scalar product $\mathbf{r}(x, y) \cdot \mathbf{s}(x, y)$ is a sum of the expectations of the appropriate products of the projections of these two vectors. The expectation of a product of projections of two vectors is equal to the product of the expectations of each of these projections, as the vector fields $\mathbf{r}(x, y)$ and $\mathbf{s}(x, y)$ are statistically independent. Hence we have a product of zero, which is an expectation of the projection of a random vector field, and the expectation of the projection of the slowly varying vector field.

So far in this section, we have considered the "forward problem" of how the sample deforms the reference speckle image $I_R(x, y)$ into the speckle image $I_S(x, y)$ that is measured when the sample is present. This physical model for the forward problem enables us to next consider the associated "inverse problem" [47] of inverting the measured intensity data so as to infer information regarding the sample. To this end, observe that Eq. (4) contains two unknown functions, namely $\nabla_{\perp}^2\phi(x, y)$ and $D_{\text{eff}}(x, y; \Delta)$, which can be recovered using measured intensity data corresponding to two different transverse positions ("#1" and "#2") of the mask. Thus we can write a system of simultaneous equations for mask positions #1 and #2, based on Eq. (4):

$$ \left\{ \begin{aligned} I_{R_1}(x, y) - I_{S_1}(x, y) &= \frac{\Delta}{k} I_{R_1}(x, y) \nabla_{\perp}^2 \phi(x, y) - \Delta D_{\text{eff}}(x, y; \Delta) \nabla_{\perp}^2 I_{R_1}(x, y), & (6) \\ I_{R_2}(x, y) - I_{S_2}(x, y) &= \frac{\Delta}{k} I_{R_2}(x, y) \nabla_{\perp}^2 \phi(x, y) - \Delta D_{\text{eff}}(x, y; \Delta) \nabla_{\perp}^2 I_{R_2}(x, y). \end{aligned} \right. $$

Here, $I_{R_{1,2}}(x, y)$ denotes the reference speckle images corresponding to random masks in positions #1 and #2, with $I_{S_{1,2}}(x, y)$ similarly defined. The above system of simultaneous linear equations can be solved algebraically, to obtain both the functions $\nabla_{\perp}^2\phi(x, y)$ and $D_{\text{eff}}(x, y; \Delta)$, with the latter quantity being given by:

$$ D_{\text{eff}}(x, y; \Delta) = \frac{1}{\Delta} \frac{I_{S_1}(x, y) I_{R_2}(x, y) - I_{S_2}(x, y) I_{R_1}(x, y)}{I_{R_2}(x, y) \nabla_{\perp}^2 I_{R_1}(x, y) - I_{R_1}(x, y) \nabla_{\perp}^2 I_{R_2}(x, y)}. \quad (7) $$

As $I_{R_1}(x, y)$ and $I_{R_2}(x, y)$ are the intensities of a reference speckle image with the random mask in two different transverse spatial positions, it is unlikely that the denominator in Eq. (7) will be close to zero. Therefore,
the solution given in Eq. (7) is well defined. One can easily recover the Laplacian of the phase shift using Eq. (6). Then the phase shift can be obtained by integrating the resulting expression for the phase Laplacian, using a fast Fourier transform approach (see e.g. Gureyev and Nugent [48]) to yield $\phi(x, y)$ up an arbitrary additive constant. A similar approach to the recovery of the phase shift $\phi(x, y)$ was used in our previously published OF-based intrinsic-speckle-tracking study [42]. However, in the present paper we are instead focused on reconstruction of the effective diffusion coefficient $D_{\text{eff}}(x, y; \Delta)$ using Eq. (1), since this extends intrinsic speckle-tracking from its present uni-modal capability [42], for which phase recovery has already been demonstrated, to a multi-modal technique that is also able to measure $D_{\text{eff}}(x, y; \Delta)$.

### III. EXPERIMENT

To illustrate the applicability of the method, experimental X-ray speckle tracking data were collected at ESRF beamline BM05, using a red currant sample. The setup corresponds to Fig. 1. The sample was placed on a dedicated stage located 55 m from the source where hard X-ray photons were produced by synchrotron radiation from a 0.85 T dipole bending the trajectory of the 6.02 GeV electrons circulating through the storage ring. The X-ray photon spectral bandwidth was further narrowed to $\Delta E/E \approx 10^{-4}$ and centred around energy $E = 17$ keV using a double crystal Si(111) monochromator located 27 m from the X-ray source. A piece of sandpaper with grit size P800 was fixed on piezo translation motors 0.5 m upstream of the sample. An imaging detector was placed at a distance $\Delta = 1$ m downstream. This detector consisted of a FReLoN (Fast Read-Out Low-Noise) e2V camera coupled to an optic imaging a thin scintillator [49, 50]. The effective pixel size of the optical system was 5.8 $\mu$m while also providing a high signal to noise ratio (> 500).

The reference-speckle images were collected, in the absence of the sample, by transversely moving the piece of sandpaper to defined positions of the speckle generator translation motors. Later the images with the sample inserted into the beam were acquired while replacing the sandpaper at precisely the same transverse locations, thanks to the piezo technology of the motors. The images were then processed by running a Python3 code on a simple desktop machine.

Figure 2(a) shows the positive part of the MIST dark-field signal, $D_{\text{eff}}(x, y; \Delta)$, obtained using Eq. (7) for the case where $N = 2$ pairs of images are used. To improve the dark-field signal quality and robustness to noise with the present technique and to compare it to UMPA and XSVT which require a larger number of speckle image pairs, we also calculated similar images using $N = 4$ and $N = 10$ pairs of speckle images. To do so, we built a system of equations similar to those in Eq. (6), but having $N$ equations corresponding to $N$ different transverse positions of the speckle-generating mask, rather

<table><caption>TABLE I. Contrast to Noise Ratio comparison for the different dark-field extraction methods</caption><thead><tr><th>CNR</th><th>MIST</th><th>UMPA</th><th>XSVT</th></tr></thead><tbody><tr><td>$N=2$</td><td>10.9</td><td>4.6</td><td>6.9</td></tr><tr><td>$N=4$</td><td>22.6</td><td>17.9</td><td>11.6</td></tr><tr><td>$N=10$</td><td>23.1</td><td>30.8</td><td>17.1</td></tr></tbody></table>

than only two equations (corresponding to two different transverse positions of the speckle-generating mask). We then solved the system of $N$ equations for $\nabla_{\perp}^2\phi(x, y)$ and $D_{\text{eff}}(x, y; \Delta)$, by matrix inversion for each pixel, i.e. in the least-squares sense [51] accounting for noise.

For comparison with the MIST dark-field reconstructions that are presented in Fig. 2(a), Figs. 2(b,c) show corresponding dark-field images obtained using the UMPA and XSVT methods, respectively. To facilitate further comparison, for dark-field reconstructions obtained using all three methods (MIST, UMPA, XSVT) the Contrast to Noise Ratio (CNR) has been calculated for each reconstruction, as:

$$ \text{CNR} = \frac{\mu_1 - \mu_2}{\sigma_1}. \qquad (8) $$

Here, $\mu_1$ and $\mu_2$ are average intensities measured in an homogeneous zone outside the sample and in the inset of Fig. 2 respectively. The parameter $\sigma_1$ refers to the standard deviation measured in the homogeneous zone. Note that higher values of CNR indicate better image quality. For a small number of image pairs ($N = 2$ and $N = 4$), MIST surpasses the two other methods as indicated by the CNR metric given in Table I.

In the interior of the sample there is broad agreement in the dark-field features that are evident in the reconstructions obtained using the three different methods. This consistency in the three rows of Fig. 2 is notable, since the three corresponding reconstruction formalisms (MIST, UMPA, XSVT)—while of course all ultimately based on the same underpinning optical physics—are conceptually and numerically rather different approaches. This consistency is also notable on account of the fact that the domain of applicability, of the UMPA and XSVT formalisms, is broader than the domain of validity of MIST. To counterpoint these consistencies, one can notice that the main difference between MIST and UMPA/XSVT dark-field reconstructions is the more highly contrasted edges of the features with the former technique.

### IV. DISCUSSION

These obtained results are, to our knowledge, the first experimental implementation of the multi-modal X-ray Fokker-Planck speckle-tracking approach due to Paganin and Morgan [2]. This variant of multi-modal speckle-based X-ray imaging reconstruction takes only a few seconds, which is significantly faster than the XSVT and
<figure><img src="image_4.png" /><figcaption>FIG. 2. (a-c) Recovered dark-field signal $D_{\text{eff}}(x, y; \Delta)$ obtained using the (a) MIST, (b) UMPA and (c) XSVT techniques, with $N = \{2, 4, 10\}$ pairs of images. The chosen window size in the UMPA and XSVT techniques was equal to 5 × 5 pixels.</figcaption></figure>

UMPA approaches. Nevertheless, the results shown in Fig. 2(a) appear to outperform the results obtained from the same experimental data using more sophisticated approaches (see e.g., Fig. 2(b,c) and Fig. 7 in the paper by Berujon and Ziegler [38]).

Taking into account that the MIST method, described in the present paper, is based on several strong assumptions, the obtained results may contain some artefacts. However, the results obtained by this fast deterministic approach can be used as a starting point for further refinement using more sophisticated (and general) correlation-based techniques, such as XSVT and UMPA. There is an evident trade-off here: (i) XSVT and UMPA

have the advantage of greater generality, which comes at the cost of requiring additional images and significantly longer computation times, while (ii) the MIST method of the present paper has the advantage of requiring fewer images and having much more rapid computation times, at the cost of a reduced degree of generality.

It is also worth pointing out that, as our new technique does not explicitly determine the transverse shift of the speckle grains due to phase contrast, we are not restricted by the grain size. The only requirement is that the chosen experimental parameters, namely, the energy, propagation distance and grain size of the mask, should produce a speckle (reference) image. Rather than the resolution
of the MIST method being determined by the size of the speckles, it is determined by the average characteristic length scale that is present in the reference speckle image. For smooth speckles in which there is only one characteristic transverse length scale, the size of the speckles will be equal to the average characteristic length scale that is present in the reference speckle images. However, more generally speaking, these length scales may be different, e.g. if (i) the speckles themselves have sharp edges (as can be the case when the speckles are generated via absorption from suitable powders or grains); or (ii) one has “speckled speckle” [52]. In general, the speckle size provides an upper limit on this characteristic transverse length scale.

Let us now return to a point raised at the end of the previous section. Notwithstanding the strong degree of similarity between the dark-field reconstructions in Fig. 2, one point of difference is in the stronger contrast that is observed at the edges of the berry, in the MIST dark-field reconstructions shown in Fig. 2(a), when compared to the UMPA and XSVT reconstructions shown in Figs. 2(b,c). We believe this difference to be related to the fact that in the Fokker-Planck formalism, upon which the approach of the present paper is predicted, the position-dependent effective diffusion coefficient has three separate contributions. The first contribution to the effective diffusion coefficient is the local SAXS induced by spatially-unresolved sample microstructure, with this contribution being treated in an ultimately-equivalent albeit conceptually-different manner in MIST, UMPA and XSVT. The second contribution to the Fokker-Planck effective diffusion coefficient [1, 2, 4] is the Young-Maggi-Rubinowicz boundary wave [53-57] associated with diffraction from sharp intensity gradients such as sample edges [58]. This second contribution may also be viewed in ray-optics language as being due to Keller-type “diffracted rays”, under the viewpoint of the geometrical theory of diffraction [59]. Yet another way of modelling this second contribution is via the asymptotic form of two-dimensional diffraction integrals, in which sharp scattering edges constitute a critical point of the second kind [60]. For a clear example of the diffusive effect of edge-scattered rays, see e.g. Fig. 2(b) in Groenendijk et al. [45], where the illuminating grid pattern has reduced visibility in the vicinity of a sharp sample edge [61]. Regardless of the adopted physical model, the key point regarding this second (edge-diffraction-based) contribution to the effective position-dependent Fokker-Planck diffusion coefficient, is that it provides a distinct mechanism for diffusive photon transport, which is different from the local-SAXS mechanism. While the local-SAXS mechanism is ultimately equivalently treated in the dark-field signal reconstructed by MIST, UMPA and XSVT, the methods treat the edge signal differently, an observation that is consistent with the fact that (i) all three methods give very similar contrast for the dark-field signal that is reconstructed within the interior of the berry, in all panels of Fig. 2, but (ii) MIST gives a re-

construction that differs from UMPA and XSVT, at the edges of the berry. Finally, we mention a third contribution to the effective diffusion coefficient in the Fokker-Planck formalism, namely that which is due to the effective point-spread function associated with the imaging system [1, 2]. This third contribution is listed for completeness, but is otherwise of marginal relevance here, since its contribution will be negligible in the present context of a Fokker-Planck optical-flow approach to X-ray speckle tracking.

It would be interesting to extend the Fokker-Planck speckle-tracking formalism, upon which the present work is based, to the case of “directional dark field” [62] in which the transverse cross section of the local SAXS fan is modelled as being elliptical rather than rotationally symmetric. In this case, the scalar effective diffusion coefficient may be replaced with a symmetric rank-two diffusion tensor [1, 2]:

$$D_{\text{eff}}(x, y; \Delta) \rightarrow \begin{bmatrix} D_{\text{eff}}^{(xx)}(x, y; \Delta) & D_{\text{eff}}^{(xy)}(x, y; \Delta) \\ D_{\text{eff}}^{(xy)}(x, y; \Delta) & D_{\text{eff}}^{(yy)}(x, y; \Delta) \end{bmatrix}. \quad (9)$$

Following Eq. (4) in Morgan and Paganin [1] and Eq. (51) in Paganin and Morgan [2], the above diffusion tensor enables us to write down the following directional-dark-field generalisation of Eq. (1):

$$\begin{aligned} I_R(x, y) - I_S(x, y) = & \frac{\Delta}{k} \nabla_{\perp} \cdot [I_R(x, y) \nabla_{\perp} \phi(x, y)] \\ & - \Delta \frac{\partial^2}{\partial x^2} [D_{\text{eff}}^{(xx)}(x, y; \Delta) I_R(x, y)] \\ & - \Delta \frac{\partial^2}{\partial y^2} [D_{\text{eff}}^{(yy)}(x, y; \Delta) I_R(x, y)] \\ & - \Delta \frac{\partial^2}{\partial x \partial y} [D_{\text{eff}}^{(xy)}(x, y; \Delta) I_R(x, y)]. \end{aligned} \quad (10)$$

The above equation could be readily solved, in an analogous manner to the method given in the present paper, thereby extending MIST into a method capable of measuring a directional dark-field signal, as quantified by the diffusion tensor in Eq. (9). Such an investigation would be an interesting avenue for future work.

## V. CONCLUSION

We have developed a fast deterministic variant of X-ray Multi-modal Intrinsic-Speckle-Tracking (MIST), which was validated using experimental data. The obtained reconstruction results are based on only two images of the sample acquired at different positions of the spatially random mask. These reconstructions are comparable in quality to those obtained by computationally slower (multiple-image) albeit significantly more general, explicit X-ray speckle tracking techniques.
ACKNOWLEDGEMENTS

We acknowledge the European Synchrotron Radiation
Facility for provision of synchrotron radiation facilities.

We acknowledge useful discussions with Scott Findlay,
Andrew Kingston, Marcus Kitchen, Thomas Leatham,
Kaye Morgan, Gary Ruben, Sameera Tadikonda and
Marie-Christine Zdora.

[1] K. S. Morgan and D. M. Paganin, Sci. Rep. **9**, 17465 (2019).

[2] D. M. Paganin and K. S. Morgan, Sci. Rep. **9**, 17537 (2019).

[3] H. Risken, *The Fokker-Planck Equation: Methods of Solution and Applications*, 2nd ed. (Springer Verlag, Berlin, 1989).

[4] T. E. Gureyev, D. M. Paganin, B. D. Arhatari, S. T. Taba, S. Lewis, P. C. Brennan, and H. M. Quiney, Phys. Med. Biol. (2020), in press.

[5] M. R. Teague, J. Opt. Soc. Am. **73**, 1434 (1983).

[6] O. Kratky and O. Glatter, eds., *Small Angle X-Ray Scattering* (Academic Press, London, 1982).

[7] N. Kato, Acta Cryst. **A** **36**, 763 (1980).

[8] N. Kato, Acta Cryst. **A** **36**, 770 (1980).

[9] K. M. Pavlov and V. I. Punegov, Acta Cryst. **A** **54**, 214 (1998).

[10] K. M. Pavlov and V. I. Punegov, Acta Cryst. **A** **56**, 227 (2000).

[11] Ya. I. Nesterets and V. I. Punegov, Acta Cryst. **A** **56**, 540 (2000).

[12] Ya. I. Nesterets, Opt. Commun. **281**, 533 (2008).

[13] B. E. Warren, *X-ray Diffraction* (Addison-Wesley, Reading, 1969).

[14] E. J. Kirkland, *Advanced Computing in Electron Microscopy*, 2nd ed. (Springer-Verlag, New York, 2010).

[15] A. G. Voronovich, *Wave Scattering from Rough Surfaces*, 2nd ed. (Springer, Berlin, 1999).

[16] G. Khelashvili, J. G. Brankov, D. Chapman, M. A. Anastasio, Y. Yang, Z. Zhong, and M. N. Wernick, Phys. Med. Biol. **51**, 221 (2005).

[17] E. Olbrant and M. Frank, Comput. Math. Methods Med. **11**, 313 (2010).

[18] A. Ishimaru, *Wave Propagation and Scattering in Random Media, Vol. 1* (Academic Press, New York, 1978).

[19] E. Pagot, P. Cloetens, S. Fiedler, A. Bravin, P. Coan, J. Baruchel, J. Härtwig, and W. Thomlinson, Appl. Phys. Lett. **82**, 3421 (2003).

[20] L. Rigon, H.-J. Besch, F. Arfelli, R.-H. Menk, G. Heitner, and H. Plothow-Besch, J. Phys. D: Appl. Phys. **36**, A107 (2003).

[21] M. N. Wernick, O. Wirjadi, D. Chapman, Z. Zhong, N. P. Galatsanos, Y. Yang, J. G. Brankov, O. Oltulu, M. A. Anastasio, and C. Muehleman, Phys. Med. Biol. **48**, 3875 (2003).

[22] F. Pfeiffer, M. Bech, O. Bunk, P. Kraft, E. F. Eikenberry, C. Broennimann, C. Gruenzweig, and C. David, Nat. Mater. **7**, 134 (2008).

[23] M. J. Kitchen, D. M. Paganin, K. Uesugi, B. J. Allison, R. A. Lewis, S. B. Hooper, and K. M. Pavlov, Opt. Express **18**, 19994 (2010).

[24] S. Berujon, H. Wang, and K. Sawhney, Phys. Rev. A **86**, 063813 (2012).

[25] M. Endrizzi, P. C. Diemoz, T. P. Millard, J. L. Jones, R. D. Speller, I. K. Robinson, and A. Olivo, Appl. Phys.

Lett. **104**, 024106 (2014).

[26] O. Oltulu, Z. Zhong, M. Hasnah, M. N. Wernick, and D. Chapman, J. Phys. D: Appl. Phys. **36**, 2152 (2003).

[27] U. Pietsch, V. Holý, and T. Baumbach, *High-Resolution X-ray Scattering: From Thin Films to Lateral Nanostructures*, 2nd ed. (Springer-Verlag, New York, 2004).

[28] V. A. Bushuev, Sov. Phys. Solid State **31**, 1877 (1989).

[29] S. Berujon, E. Ziegler, R. Cerbino, and L. Peverini, Phys. Rev. Lett. **108**, 158102 (2012).

[30] K. S. Morgan, D. M. Paganin, and K. K. W. Siu, Appl. Phys. Lett. **100**, 124102 (2012).

[31] M.-C. Zdora, J. Imaging **4**, 60 (2018).

[32] J. H. Massig, Appl. Opt. **38**, 4103 (1999).

[33] J. H. Massig, Opt. Eng. **40**, 2315 (2001).

[34] C. D. Perciante and J. A. Ferrari, Appl. Opt. **39**, 2081 (2000).

[35] S. C. Mayo and B. Sexton, Opt. Lett. **29**, 866 (2004).

[36] H. H. Wen, E. E. Bennett, R. Kopace, A. F. Stein, and V. Pai, Opt. Lett. **35**, 1932 (2010).

[37] K. S. Morgan, D. M. Paganin, and K. K. W. Siu, Opt. Express **19**, 19781 (2011).

[38] S. Berujon and E. Ziegler, Phys. Rev. Appl. **5**, 044014 (2016).

[39] M.-C. Zdora, P. Thibault, T. Zhou, F. J. Koch, J. Romell, S. Sala, A. Last, C. Rau, and I. Zanette, Phys. Rev. Lett. **118**, 203903 (2017).

[40] K. S. Morgan, P. Modregger, S. C. Irvine, S. Rutishauser, V. A. Guzenko, M. Stampanoni, and C. David, Opt. Lett. **38**, 4605 (2013).

[41] I. Zanette, T. Zhou, A. Burvall, U. Lundström, D. H. Larsson, M. Zdora, P. Thibault, F. Pfeiffer, and H. M. Hertz, Phys. Rev. Lett. **112**, 253903 (2014).

[42] D. M. Paganin, H. Labriet, E. Brun, and S. Berujon, Phys. Rev. A **98**, 053813 (2018).

[43] “Optical flow” has a well-established usage in the context of image processing, which is similar to that in the present paper, but does not use inbuilt local energy conservation. Indeed, our key assumption of local energy conservation—as described by the continuity equation—will not be valid in the more general context of image processing. See e.g. Horn and Schunck [63] and Atcheson et al. [64], together with references therein.

[44] S. W. Wilkins, T. E. Gureyev, D. Gao, A. Pogany, and A. W. Stevenson, Nature **384**, 335 (1996).

[45] C. F. Groenendijk, F. Schaff, L. C. P. Croton, M. J. Kitchen, and K. S. Morgan, Opt. Lett. **45**, 4076 (2020).

[46] K. M. Pavlov, H. T. Li, D. M. Paganin, S. Berujon, H. Rougé-Labriet, and E. Brun, Phys. Rev. Appl. **13**, 054023 (2020).

[47] P. C. Sabatier, J. Math. Phys. **41**, 4082 (2000).

[48] T. E. Gureyev and K. A. Nugent, Opt. Commun. **133**, 339 (1997).

[49] J.-C. Labiche, J. Segura-Puchades, D. Van Brussel, and J. P. Moy, ESRF Newsletter **25**, 41 (1996).
[50] P.-A. Douissard, A. Cecilia, X. Rochet, X. Chapel, T. Martin, T. van de Kamp, L. Helfen, T. Baumbach, L. Luquot, X. Xiao, et al., J. Instrum. 7, 09016 (2012).

[51] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, *Numerical Recipes in FORTRAN: The Art of Scientific Computing*, 2nd ed. (Cambridge University Press, 1996).

[52] I. Freund and D. A. Kessler, Opt. Commun. 281, 5954 (2008).

[53] T. Young, Phil. Trans. R. Soc. Lond. 92, 12 (1802).

[54] G. A. Maggi, Annali di Mat. II 16, 21 (1888).

[55] A. Rubinowicz, Ann. Physik 53, 257 (1917).

[56] K. Miyamoto and E. Wolf, J. Opt. Soc. Am. 52, 615 (1962).

[57] K. Miyamoto and E. Wolf, J. Opt. Soc. Am. 52, 626 (1962).

[58] Cf. the use of such an edge wave in the different phase-retrieval context of a deterministic approach to coherent diffractive imaging [65–67]. This may also be analogous to the different type of behaviour observed for diffuse scattering from dislocation ensembles having shorter and longer correlation lengths. The former (weak correlations, e.g., for a random distribution of deformation sources) produce a wider distribution of intensity in reciprocal space, while the latter (strong correlations, e.g., dislocation walls/nets) have narrower peaks, which is somewhat similar to the boundary effect mentioned in the main text of the paper. See e.g. Krivoglaz [68, 69] as well as Kaganer and Sabelfeld [70], together with references therein, for further information regarding this connection.

[59] J. B. Keller, J. Opt. Soc. Am. 52, 116 (1962).

[60] L. Mandel and E. Wolf, *Optical Coherence and Quantum Optics* (Cambridge University Press, Cambridge, 1995).

[61] The observation, made in this sentence, was pointed out to the authors in a private communication from K. S. Morgan to DMP, on September 9, 2020.

[62] T. H. Jensen, M. Bech, O. Bunk, T. Donath, C. David, R. Feidenhans, and F. Pfeiffer, Phys. Med. Biol. 55, 3317 (2010).

[63] B. K. P. Horn and B. G. Schunck, Artif. Intell. 17, 185 (1981).

[64] B. Atcheson, W. Heidrich, and I. Ihrke, Exp. Fluids. 46, 467 (2009).

[65] S. G. Podorov, K. M. Pavlov, and D. M. Paganin, Opt. Express 15, 9954 (2007).

[66] K. M. Pavlov, V. I. Punegov, K. S. Morgan, G. Schmalz, and D. M. Paganin, Sci. Rep. 7, 1132 (2017).

[67] K. M. Pavlov, K. S. Morgan, V. I. Punegov, and D. M. Paganin, J. Phys. Commun. 2, 085027 (2018).

[68] M. A. Krivoglaz, *X-Ray and Neutron Diffraction in Non-ideal Crystals* (Springer Verlag, Berlin, 1996).

[69] M. A. Krivoglaz, *Diffuse Scattering of X-Rays and Neutrons by Fluctuations* (Springer Verlag, Berlin, 1996).

[70] V. M. Kaganer and K. K. Sabelfeld, Acta Cryst. A 70, 457 (2014).