Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Applying the Fokker–Planck equation to grating-based x-ray phase and dark-field imaging



X-ray imaging has conventionally relied upon attenuation to provide contrast. In recent years, two complementary modalities have been added; (a) phase contrast, which can capture low-density samples that are difficult to see using attenuation, and (b) dark-field x-ray imaging, which reveals the presence of sub-pixel sample structures. These three modalities can be accessed using a crystal analyser, a grating interferometer or by looking at a directly-resolved grid, grating or speckle pattern. Grating and grid-based methods extract a differential phase signal by measuring how far a feature in the illumination has been shifted transversely due to the presence of a sample. The dark-field signal is extracted by measuring how the visibility of the structured illumination is decreased, typically due to the presence of sub-pixel structures in a sample. The strength of the dark-field signal may depend on the grating period, the pixel size and the set-up distances, and additional dark-field signal contributions may be seen as a result of strong phase effects or other factors. In this paper we show that the finite-difference form of the Fokker–Planck equation can be applied to describe the drift (phase signal) and diffusion (dark-field signal) of the periodic or structured illumination used in phase contrast x-ray imaging with gratings, in order to better understand any cross-talk between attenuation, phase and dark-field x-ray signals. In future work, this mathematical description could be used as a basis for new approaches to the inverse problem of recovering both phase and dark-field information.


X-ray imaging has been widely adopted in medicine and security, providing non-invasive visualisation of internal structure at high spatial and temporal resolution. The conventional mechanism for x-ray contrast is attenuation, where dense and/or thick objects reduce the intensity of the illuminating x-ray wavefield. More recently, the capabilities of x-ray imaging have been extended in research laboratories and synchrotrons, capturing weakly-attenuating features like soft biological tissue1 through measurements of the wavefield phase, and revealing sub-pixel structures like dentinal tubules2 via a ‘dark-field’ signal that originates from unresolved scattering. Because an x-ray detector is typically only sensitive to wavefield intensity, specialised optical set-ups are required to convert variations in wavefield phase and dark-field into measurable variations in intensity. A mathematical model of the behaviour can then be used to retrieve the phase and dark-field information, typically from several exposures taken with different optical settings. There are a number of set-ups that have demonstrated the ability to do this, beginning with crystal interferometry3 in the 1960s. The advent of highly coherent synchrotron x-ray sources several decades later led to propagation-based phase contrast x-ray imaging, where the coherent wavefield self-interferes during propagation to reveal phase information in addition to attenuation effects4,5. More recently a number of techniques have been developed that utilise high-frequency gratings to measure attenuation, phase and dark-field information. These techniques include grating interferometry6,7,8,9,10, edge-illumination11 and single-grating imaging12,13. A generalisation of single-grating imaging is speckle-tracking14,15, where the grating is substituted with a object, typically a sheet of sandpaper, that creates a reference pattern that need not be periodic, and is typically random.

This manuscript focuses on the grating and speckle-based phase contrast x-ray imaging set-ups. These set-ups can extract an attenuation image, a differential phase contrast image (or, in some cases, two complementary directions of differential phase contrast), and a dark-field image (or directional dark-field images in some cases, when applied to a sample with aligned elongated sub-pixel features). These image modalities can be understood by considering a pencil beam, or beamlet, passing through the sample. This beamlet will decrease in total intensity if the sample is attenuating. Variations in the thickness or refractive index of the sample can alter the phase of the x-ray wave, and result in a change in the direction of beamlet propagation, as seen in Fig. 1a. Therefore, the phase signal can be extracted by looking at some kind of transverse shift in the intensity profile at a distance downstream (e.g. z = Δ, where z is the optic axis). If the beamlet is symmetrically increased in width, as a result of sub-resolution sample structures (Fig. 1b)16, this is described as a scatter, visibility or dark-field signal, measured by looking at a reduction in the visibility of the illumination17. Visibility can be defined using Michelson’s definition \(V=({I}_{max}-{I}_{min})/({I}_{max}+{I}_{min})\), where Imax is the local maximum intensity and Imin is the local minimum intensity18, so that high visibility indicates that Imax is much larger than Imin. A strong dark-field signal will be seen as a significant decrease in illumination visibility. The dark-field signal measured by a grating-based system originates largely from small angle x-ray scattering (SAXS) or incoherent scattering that is below the resolution of the imaging system, but can also result from edges19 or focusing20, beam hardening21,22 and other effects. In most imaging applications, the sample will introduce both a transverse shift and broadening of the beamlet at a distance z = Δ, as seen in Fig. 1c. The complementary transverse directions (e.g. x, y) of phase contrast and directional dark-field would be measured by looking at transverse shifts and broadening in the direction shown in the diagram and the direction perpendicular to the page.

Figure 1
figure 1

A photon or x-ray beamlet may encounter: (a) a phase gradient in the sample, transversely shifting the position of the detected light at a downstream detector, (b) small angle scattering from the sample, spreading out the beamlet, reducing the visibility, and broadening the probability distribution that describes where the photon will land at a downstream detector, or (c) both effects.

The intensity profiles shown on the right of each panel in Fig. 1 are reminiscent of a probability density function that experiences changes in mean (Fig. 1a) and standard deviation (Fig. 1b). The sum of x-ray photons within each pixel, measured as intensity, can be modelled as a probability density function since the integrated intensity from sample exit plane to downstream plane is constant for a beam propagating in vacuum. This paper therefore studies the Fokker–Planck equation, an equation typically used to describe the time-evolution of a probability density function, and applies it to describe the propagation-evolution of a beamlet in x-ray phase/dark-field imaging23. In a companion paper24, we show how the Fokker–Planck equation is an extension to the transport of intensity equation25 used in coherent x-ray optics and also provide a derivation from first principles. Here, we begin with a short probability-based introduction to the Fokker–Planck equation, then show that it can be applied to better understand how the x-ray dark-field and differential phase signals can interact, looking at additional effects seen near edges and as a result of focusing. These sections look specifically at imaging using patterned illumination that is directly resolved (e.g. single-grid imaging with an attenuating12,26 or phase-shifting grating27,28, or speckle-tracking14,15,29). Given that attenuation is a simple scaling of the intensity signal, hence a multiplicative factor at the front of the Fokker–Planck equation, we leave out this effect for simplicity. The final section demonstrates that the results and approach described in the earlier sections can be extended to the cases where the illumination is analysed via a second grating or mask (e.g. grating interferometry or edge-illumination imaging).

The X-ray Fokker–Planck equation

The Fokker–Planck equation, shown below, describes the evolution of a probability density function p with time t. Changes can include a time-dependent drift in both mean (D1, a transport-type energy flow) and/or standard deviation (D2, a diffusive-type energy flow)30,

$$\frac{\partial }{\partial t}p(x,t)=-\,\frac{\partial }{\partial x}({D}_{1}(x,t)p(x,t))+\frac{{\partial }^{2}}{\partial {x}^{2}}({D}_{2}(x,t)p(x,t)),$$

as shown in Fig. 2a after a given time interval t = Δ.

Figure 2
figure 2

(a) The Kramers–Moyal equation and its truncated equivalent, the Fokker–Planck equation, describe the diffusion and shift in a probability function. (b) This same equation can be applied to study the x-ray dark-field and phase shift measured using periodic x-ray illumination.

Since the path taken by an ensemble of photons will follow a probability density function and be seen as such when those locations are registered as intensity on the detector, we can use the Fokker–Planck equation to model changes in the measured x-ray intensity. The Fokker–Planck equation can also be seen as the transport of intensity equation (TIE) with the addition of a diffusive term24. In the grating-based phase contrast x-ray imaging methods mentioned above, a grating will typically split the beam into an array of ‘beamlets’, each of which will pass through the sample and propagate through free space to a detector. We can begin by looking at the one-dimensional intensity distribution measured downstream of a sample that is illuminated by an array of beamlets, with a transverse shift of each beamlet seen at z = Δ when the beamlet passes through a phase-shifting sample (Fig. 1a), and a reduction in visibility of each beamlet seen at z = Δ when the beamlet scatters at small angles from sub-pixel features in the sample (Fig. 1b).

To move from the time-evolution of a probability function (Fig. 2a, Eq. (1)) to the case of spatial drift and diffusion of an array of x-ray beamlets in the presence of a sample (Fig. 2b, Eq. (2), where I(x) is a sinusoid), we should replace:

  • Time t with propagation distance z

  • Probability density function p with x-ray intensity I

    (In the case shown in Fig. 2, the centred probability density function p is replaced by an array of x-ray intensity beamlets I, described by a sinusoid)

  • Drift velocity D1 with the change in angle of x-ray wavefield propagation, determined by the sample-induced phase shift \(\frac{1}{k}\frac{\partial \varphi }{\partial x}\)

  • Diffusion coefficient D2 with a value D(z) that characterises the length scale of unresolved x-ray scattering at distance z.

This gives the ‘X-ray Fokker–Planck equation’24,

$$\frac{{\rm{\partial }}}{{\rm{\partial }}z}I(x)=-\frac{1}{k}\frac{{\rm{\partial }}}{{\rm{\partial }}x}(I\frac{{\rm{\partial }}\varphi (x)}{{\rm{\partial }}x})+\frac{{{\rm{\partial }}}^{2}}{{\rm{\partial }}{x}^{2}}(D(x,z)I(x)).$$

Note that the conventional Fokker–Planck model will describe a diffusion that increases the spread of light in a non-linear manner with propagation. This is not consistent with the linear increase in spread with propagation distance seen when a scattered wave-field propagates through free space. For this reason, \(D(x,z)\) is set as a function of z, so that the diffusion width can increase linearly with propagation distance z (see Paganin & Morgan for further justification24).

In order to fully describe directional, three-dimensional or more complex behaviour, we would need an equation that includes more spatial dimensions and terms. This is a good time to note that the Fokker–Planck equation is the truncated form of the more general Kramers–Moyal equation23,30. This more general equation includes third-order and higher-order terms, and describes changes in n spatial dimensions, with \({\bf{x}}=({x}_{1},{x}_{2},{x}_{3}...)\) as Cartesian coordinates, as below (utilising the Einstein summation convention),

$$\frac{{\rm{\partial }}}{{\rm{\partial }}t}p({\bf{x}},t)=-\frac{{\rm{\partial }}}{{\rm{\partial }}{x}_{i}}[{D}_{i}({\bf{x}},t)p({\bf{x}},t)]+\frac{1}{2!}\frac{{{\rm{\partial }}}^{2}}{{\rm{\partial }}{x}_{i}{\rm{\partial }}{x}_{j}}[{D}_{ij}({\bf{x}},t)p({\bf{x}},t)]-\cdots $$

For the case of two dimensions and truncation immediately before the ‘—…’ shown above, we have the anisotropic-diffusion Fokker-Planck equation, which well-describes a two-dimensional x-ray beamlet landing on a two-dimensional detector,

$$\frac{{\rm{\partial }}}{{\rm{\partial }}z}I({\bf{x}},z)=-\frac{{\rm{\partial }}}{{\rm{\partial }}x}(\frac{1}{k}\frac{{\rm{\partial }}\varphi }{{\rm{\partial }}x}I({\bf{x}},z))-\frac{{\rm{\partial }}}{{\rm{\partial }}y}(\frac{1}{k}\frac{{\rm{\partial }}\varphi }{{\rm{\partial }}y}I({\bf{x}},z))+\frac{{{\rm{\partial }}}^{2}}{{\rm{\partial }}{x}^{2}}({D}_{x}I({\bf{x}},z))+\frac{{{\rm{\partial }}}^{2}}{{\rm{\partial }}{y}^{2}}({D}_{y}I({\bf{x}},z))+\frac{{{\rm{\partial }}}^{2}}{{\rm{\partial }}x{\rm{\partial }}y}({D}_{xy}I({\bf{x}},z))$$

(absorbing any multiplying fractions into Dx, Dy and Dxy). This kind of diffusion in multiple directions is ideal for modelling a directional and/or irregularly shaped x-ray dark-field signal31, and is an avenue for future work. The parameters Dx, Dy and Dxy describe a diffusion profile that has the shape of an ellipse, and hence requires three parameters to describe it fully. These three parameters may be mapped one-to-one to the semi-major axis, the semi-minor axis, and the angular orientation of the elliptical diffusion profile. Note also, that if the infinitely-many terms in the Kramers–Moyal equation are truncated to no higher than second-order spatial derivatives, the result is the Fokker–Planck equation. As shown by Pawula, one should either truncate to second-order or not at all, since ‘if one assumes that terms above a given order are zero in the Kramers–Moyal expansion, this assumption implies that all terms above second order are zero’32.

Application of the Fokker–Planck model to describe phase and dark-field effects

To model x-ray grating-based phase and dark-field imaging, the key method considered in the present paper, we can set the intensity that illuminates the sample to a sinusoid. This can describe the intensity that would be seen downstream of a grating or grid, and can be specified for period p, amplitude a and mean intensity b,

$$I=a\,\sin (\frac{x}{p})+b.$$

Note that we have omitted the factor of 2π inside the sinusoid that would be required to describe a period of exactly p. This choice was made to keep the equations as simple as possible without neglecting any effects. The general expression given in Eq. (5) means the illumination without any sample in the beam would have a mean intensity of b and visibility of a/b (e.g. the grey curve in Fig. 3a). Given that a Fourier series could be used to form any other illumination (e.g. periodic ‘square’ illumination sampled an order of magnitude more finely than the grid period26 or a speckle pattern generated by a piece of sandpaper14,15,29), the choice of a sinusoidal illumination is generally useful. In the illustrations given in Figs 36, we have sketched a sinusoidal illumination that is likely seen at a detector downstream of an absorption or phase grid, effectively a normalised intensity (reaching from 0 to 1) that has been smoothed to a more realistic visibility of 0.5 so that the sinusoid is described by \(a\approx \frac{1}{4}\) and \(b\approx \frac{1}{2}\). A visibility that is less than 1 is typically seen due to limited coherence, some penumbral blur and/or sampling of relatively fine grids (e.g. 7 pixels per grid period) that are chosen to maximise the resolution of the retrieved images12.

Figure 3
figure 3

(a) A diffusion of the illumination is the basis for a dark-field signal, shown here for the simple case where the diffusion D is constant. The reduction in the visibility of the periodic illumination is described by Eq. (8). (b) When the diffusion D is not constant, any sudden spatial change in the scattering properties (i.e. \({\partial }^{2}D/\partial {x}^{2}\) is significant) results in an effect that would be interpreted as variations in dark-field, phase and attenuation, as described in Eq. (12).

Figure 4
figure 4

(a) We can examine the effects seen where the diffusion or dark-field/scattering property D changes spatially. The test sample here is weakly scattering on the left and strongly scattering on the right, as modelled by Eq. (13), meaning that \({\partial }^{2}D/\partial {x}^{2}\) is non-zero during the transition between the two regions. The resulting intensity can be described by Eq. (14) or, if the area on which the scattered light falls (\(\sqrt{(}D\Delta )\)) is wider than the illumination period p, by Eq. (16). The area indicated as ‘Additional scattered light’ in the sample collects light that is scattered from the right, so collects more scattered light than the rest of the area behind the weakly scattering volume. This means that, relative to the rest of the weakly scattering area on the left, the mean intensity is increased here, and, depending on the period of the illumination relative to the spread of the area, the local visibility of the periodic illumination is increased, since \({\partial }^{2}D/\partial {x}^{2}\) is positive. The area indicated as ‘Less scattered light’ experiences less scattered light than the rest of the strongly scattering area on the right, since the scatterers in the adjacent weakly scattering area do not scatter as broadly. This means that, relative to the rest of the area behind the strongly scattering part of the sample, the mean intensity is decreased here, and the visibility of the periodic illumination is decreased, since \({\partial }^{2}D/\partial {x}^{2}\) is negative. Panel (b) shows the effect of changing the illumination period, while the diffusion/dark-field property D is fixed, which helps to reveal the shape of the scattering edge signature. Note also that the reduction in visibility is much more significant when the period of oscillation approaches and becomes smaller than the length scale associated with the diffusion/scattering.

Figure 5
figure 5

(a) A shift of the illumination is the basis for a phase shift signal, shown here for the simple case where the second derivative of the phase gradient is not significant. The shift in the transverse position of the periodic illumination is described by Eq. (22). (b) When the second derivative of the phase gradient is significant, and the phase can be locally described as \(\varphi =A{x}^{2}+Bx+C\), we can see a transverse shift, squeezing and a local increase/decrease of the periodic illumination, described by Eqs (21)/(23).

Figure 6
figure 6

Phase variations incurred by the sample result in changes to the sinusoidal illumination in a number of ways, shown here (left to right) for a linear projected phase (Fig. 5a), which shifts the illumination transversely, a quadratic projected phase (Fig. 5b), which focuses the illumination, locally increasing the mean intensity and a phase edge, which introduces an additional bright/dark variation to the illumination.

To examine measurements at a given detector position, we can take the x-ray Fokker–Planck equation (Eq. (2)) with the finite-difference approximation for propagation to z = Δ (functional dependencies, where obvious, have been dropped for simplicity and clarity),

$$I(x,z=\Delta )\approx I(x,z=0)+\Delta (-\frac{1}{k}\frac{{\rm{\partial }}}{{\rm{\partial }}x}(I\frac{{\rm{\partial }}\varphi }{{\rm{\partial }}x})+\frac{{{\rm{\partial }}}^{2}}{{\rm{\partial }}{x}^{2}}(DI)).$$

In the following sections we will consider how these two steps (Eqs (5) and (6)) can be applied to the dark-field/diffusion term and the phase/drift term to show how the Fokker–Planck equation is relevant to grating-based x-ray imaging and to understand how spatial variations in the phase and dark-field may introduce signal variations that could be ‘falsely’ interpreted as attenuation, phase or dark-field signals. The Supplementary material includes python code for interactive visualisation of the less-intuitive mathematical expressions below, which can be used to more intuitively understand the effects described herein.

Dark-field/Scattering effects

We look first at an object with scattering properties, but no phase-shifting properties (\(\partial \varphi /\partial x=0\)), which will leave only the second term on the right side of the x-ray Fokker–Planck equation (Eq. (2)). We can insert the sinusoidal illumination I(x, z) (Eq. (5)) and take the finite-difference approximation for Eq. (6) to leave,

$$I(x,z=\Delta )\approx (a\,\sin (\frac{x}{p})+b)+\Delta \frac{{{\rm{\partial }}}^{2}}{{\rm{\partial }}{x}^{2}}(D(a\,\sin (\frac{x}{p})+b)).$$

Uniform scattering

If we consider an area where the diffusion properties do not vary quickly with x (so that D can be moved outside of \(\frac{{\partial }^{2}}{\partial {x}^{2}}\)), we can easily differentiate the sinusoid twice with respect to x, and are left with

$$I(x,z=\Delta )=(1-\frac{D\Delta }{{p}^{2}})a\,\sin (\frac{x}{p})+b.$$

Equation (8) describes a decrease in the amplitude of the sinusoid, and hence the visibility of the sinusoid, as seen in Fig. 3a, which is indeed the signal which is collected in dark-field imaging. A more significant effect will be seen for a larger diffusion coefficient D, larger propagation distance Δ or a smaller grid period p, as expected.

Evaluating a direct solution like this can encounter problems if the amplitude of the sinusoidal illumination becomes negative. The problem arises because a linear approximation has been made with propagation distance Δ (Eq. (6)), and the linearisation eventually reaches zero and then becomes negative. Equation (8) will therefore be valid only when \(D\Delta < {p}^{2}\). The case when the intensity sinusoid will reach an amplitude of zero is at \(D\Delta /{p}^{2}=1\), when the dark-field blurring is over a length scale at the detector L that is equal to the period of the sinusoid p. This naturally provides a definition for the ‘blur width’ L, \(L=\sqrt{D\Delta }\), matching the definition found in the companion paper24. Note that if we incorporate \(D(z)={D}_{0}\Delta \), then \(L=\sqrt{{D}_{0}}\Delta \).

To avoid the limited applicability in any numerical simulations, an alternative solution to the diffusion equation is via a linear integral transform (which can loosely be considered as convolution with a position-dependent point spread function, where the point spread function in our case is a Gaussian where the standard deviation grows with \(\sqrt{D\Delta }\))

$$I(z=\Delta )={\int }_{-{\rm{\infty }}}^{{\rm{\infty }}}I({x}^{{\rm{^{\prime} }}},z=0)\frac{{e}^{-\frac{{(x-{x}^{{\rm{^{\prime} }}})}^{2}}{2D({x}^{{\rm{^{\prime} }}})\Delta }}}{\sqrt{2\pi D({x}^{{\rm{^{\prime} }}})\Delta }}d{x}^{{\rm{^{\prime} }}}.$$

For sinusoidal illumination, this gives,

$$I(z=\Delta )=a{e}^{-\frac{D\Delta }{2{p}^{2}}}\,\sin (\frac{x}{p})+b.$$

Note the standard deviation of \(\sqrt{D\Delta }\) used in Eq. (9) could be scaled with a factor of \(\sqrt{2}\) to better match the blurring width used in the finite-difference approximation so that Eqs (8) and (10) match at low propagation distance z = Δ, but the approach here is sufficient for the order of magnitude effects in modelling the diffusive behaviour.

Scattering edge effects

If the diffusion property D does change quickly with x, such that D cannot be moved outside \(\frac{{\partial }^{2}}{\partial {x}^{2}}\) in Eq. (7), then we start to see more interesting behaviour. This case is most likely to correspond to an edge of a strongly-scattering region. We can expand the brackets from Eq. (7) to get

$$I(x,z=\Delta )=a\,\sin (\frac{x}{p})+b+\Delta [\frac{{{\rm{\partial }}}^{2}D}{{\rm{\partial }}{x}^{2}}(a\,\sin (\frac{x}{p})+b)-\frac{D}{{p}^{2}}a\,\sin (\frac{x}{p})+\frac{2}{p}\frac{{\rm{\partial }}D}{{\rm{\partial }}x}a\,\cos (\frac{x}{p})].$$

We can better understand the effects by using a trigonometric identity to express Eq. (11) as a single sinusoid (i.e. \(A\,\sin (x)+B\,\cos (x)=\sqrt{{A}^{2}+{B}^{2}}\,\sin (x+\arctan (B/A))\), noting that here we also take a small angle approximation for arctan):

$$I(x,z=\Delta )=a\sqrt{{(1+\Delta {\textstyle \tfrac{{{\rm{\partial }}}^{2}D}{{\rm{\partial }}{x}^{2}}}-{\textstyle \tfrac{D\Delta }{{p}^{2}}})}^{2}+{({\textstyle \tfrac{2\Delta }{p}}{\textstyle \tfrac{{\rm{\partial }}D}{{\rm{\partial }}x}})}^{2}}\,\sin ({\textstyle \tfrac{x}{p}}+\frac{2\Delta p{\textstyle \tfrac{{\rm{\partial }}D}{{\rm{\partial }}x}}}{{p}^{2}+\Delta {p}^{2}{\textstyle \tfrac{{{\rm{\partial }}}^{2}D}{{\rm{\partial }}{x}^{2}}}-D\Delta })+b(1+\Delta {\textstyle \tfrac{{{\rm{\partial }}}^{2}D}{{\rm{\partial }}{x}^{2}}}).$$

This is the diffusion effect we saw in Eq. (8), with some additional effects near an edge, where \(\frac{{\partial }^{2}D}{\partial {x}^{2}}\) is significant, as shown in Fig. 3b. In any edge regions, we see that the amplitude of oscillations in the periodic illumination can now be increased or decreased and that the local mean intensity (b) can be increased or decreased, since it is multiplied by \((1+\Delta \frac{{\partial }^{2}D}{\partial {x}^{2}})\). Because the local first and second spatial derivatives can change quickly (e.g. on the edge of a scattering object), this is a local effect that can result in an illumination that is no longer well-described by a simple sinusoid.

This can be explored further by looking at two neighbouring regions with differing scattering properties, setting


so that \(D={D}_{right}\) far to the right of the origin, and \(D={D}_{left}\) to the left of the origin, with some smooth transition between, described by the Erf function (i.e. the special function known as the ‘error function’).

This gives:

$$\begin{array}{ccc}I(x,z=\Delta ) & = & a\sqrt{{(1-{\textstyle \tfrac{\Delta ({\textstyle \tfrac{1}{2}}{\rm{E}}{\rm{r}}{\rm{f}}(x)({D}_{right}-{D}_{left})+{\textstyle \tfrac{{D}_{left}+{D}_{right}}{2}})}{{p}^{2}}}-{\textstyle \tfrac{\Delta (2{e}^{-{x}^{2}}x({D}_{right}-{D}_{left}))}{\sqrt{\pi }}})}^{2}+{({\textstyle \tfrac{\Delta ({e}^{-{x}^{2}}({D}_{right}-{D}_{left}))}{\sqrt{\pi }p}})}^{2}}\\ & & \times \sin (\frac{x}{p}-{\textstyle \tfrac{\Delta p({e}^{-{x}^{2}}({D}_{right}-{D}_{left}))}{\sqrt{\pi }(-\varDelta ({\textstyle \tfrac{1}{2}}{\rm{E}}{\rm{r}}{\rm{f}}(x)({D}_{right}-{D}_{left})+{\textstyle \tfrac{{D}_{left}+{D}_{right}}{2}})-{\textstyle \tfrac{\Delta p(2{e}^{-{x}^{2}}x({D}_{right}-{D}_{left}))}{\sqrt{\pi }}}+{p}^{2})}})\\ & & +b(1-{\textstyle \tfrac{\Delta (2{e}^{-{x}^{2}}x({D}_{right}-{D}_{left}))}{\sqrt{\pi }}}).\end{array}$$

As mentioned earliar, the applicability of a solution found using a Taylor Series (Eq. (6)) is limited to the case where the area of diffusion is smaller than the period of the illumination pattern. Using the alternative approach given in Eq. (9), we can evaluate first the diffusion on the left of the origin, and then the diffusion effect on the right, with the intensity given by Eq. (5) (\(I({x}^{{\rm{^{\prime} }}})=a\sin (\frac{{x}^{{\rm{^{\prime} }}}}{p})+b\)):

$$I(z=\Delta )={\int }_{-{\rm{\infty }}}^{0}(a\sin (\frac{{x}^{{\rm{^{\prime} }}}}{p})+b)\frac{{e}^{-\frac{{(x-{x}^{{\rm{^{\prime} }}})}^{2}}{2{D}_{left}\Delta }}}{\sqrt{2\pi {D}_{left}\Delta }}d{x}^{{\rm{^{\prime} }}}+{\int }_{0}^{{\rm{\infty }}}(a\sin (\frac{{x}^{{\rm{^{\prime} }}}}{p})+b)\frac{{e}^{-\frac{{(x-{x}^{{\rm{^{\prime} }}})}^{2}}{2{D}_{right}\Delta }}}{\sqrt{2\pi {D}_{right}\Delta }}d{x}^{{\rm{^{\prime} }}}.$$

This evaluates to:

$$\begin{array}{ccc}I(z=\Delta ) & = & {\textstyle \tfrac{ia}{4}}{{\rm{e}}}^{-\frac{2ipx+({D}_{left}+{D}_{right})\Delta }{2{p}^{2}}}[-{{\rm{e}}}^{\frac{{D}_{left}\Delta }{2{p}^{2}}}(-1-{\rm{E}}{\rm{r}}{\rm{f}}(\frac{px-i{D}_{right}\Delta }{p\sqrt{2{D}_{right}\Delta }})+{{\rm{e}}}^{\frac{2ix}{p}}(1+{\rm{E}}{\rm{r}}{\rm{f}}(\frac{px+i{D}_{right}\Delta }{p\sqrt{2{D}_{right}\Delta }})))\\ & & +{{\rm{e}}}^{\frac{{D}_{right}\varDelta }{2{p}^{2}}}(1-{\rm{E}}{\rm{r}}{\rm{f}}(\frac{px-i{D}_{left}\Delta }{p\sqrt{2{D}_{left}\Delta }})-{{\rm{e}}}^{\frac{2ix}{p}}(1-{\rm{E}}{\rm{r}}{\rm{f}}(\frac{px+i{D}_{left}\Delta }{p\sqrt{2{D}_{left}\Delta }})))]\\ & & +2b{{\rm{e}}}^{\frac{2ipx+({D}_{left}+{D}_{right})\Delta }{2{p}^{2}}}(2-{\rm{E}}{\rm{r}}{\rm{f}}(\frac{x}{\sqrt{2{D}_{left}\Delta }})+{\rm{E}}{\rm{r}}{\rm{f}}(\frac{x}{\sqrt{2{D}_{right}\Delta }})).\end{array}$$

Equation (16) can correctly describe effects seen at an edge without the problems associated with the potential for a ‘negative’ sinusoidal solution given in Eq. (14). This means that the diffusion effect can be modelled when it extends over several periods of the illumination. Several cases are shown in Fig. 4b, varying the illumination period \(p\) only, and these cases help to develop an understanding for the ‘diffusion edge effect’. The python code in the Supplementary Material implements Eq. (16), providing a GUI to explore this effect. These results indicate that the strongest effect is the variations in the mean value (the last term in Eq. (14)), resulting in a signal, shaped like the second derivative of the diffusion coefficient, that sits ‘on top’ of the sinusoidal illumination. This origin of this intensity variation can be described by considering the areas where ‘additional scattered light’ and ‘less scattered light’ are observed, as shown in Fig. 4 and described in the caption.

Note, however, that with this solution (Eq. (16)) the dark-field signal (Dleft, Dright) cannot be set to zero as this will cause problems associated with dividing by zero, but can be set to a very small number when required.

Modelling scattering using a dark-field coefficient

It is of interest to have a way to characterise the diffusion characteristic that is consistent with the Fokker–Planck model. To reach this, we can look at the original differential equation (Eq. (2)) without phase effects, φ = 0. This gives the diffusion equation:

$$\frac{\partial }{\partial z}I=\frac{{\partial }^{2}}{\partial {x}^{2}}(DI).$$

If we have any periodic illumination (Eq. (5)), and we consider an area over which the diffusion/scattering is not changing significantly with x (so that D can be moved outside of \(\frac{{\partial }^{2}}{\partial {x}^{2}}\)), then Eq. (17) must satisfy:

$$\frac{\partial }{\partial z}I=-\,\frac{D}{{p}^{2}}I.$$

This differential equation can be solved as


which agrees with the ‘linear dark-field co-efficient’ of \(D/{p}^{2}\) seen in Lynch et al.33, and used in dark-field computed tomography34.

Phase effects

Looking at a sample with phase properties, φ ≠ 0, independently of dark-field effects (setting D = 0), from Eq. (2), we can approximate the intensity observed at distance z = Δ by the finite-difference approximation (Eq. (6)), insert sinusoidal illumination (Eq. (5)) and evaluate the derivative with respect to x to give

$$I(x,z=\Delta )=a\sin (\frac{x}{p})+b-\frac{\Delta }{k}[(a\sin (\frac{x}{p})+b)\frac{{{\rm{\partial }}}^{2}\varphi }{{\rm{\partial }}{x}^{2}}+\frac{1}{p}a\cos (\frac{x}{p})\frac{{\rm{\partial }}\varphi }{{\rm{\partial }}x}].$$

Using the trigonometric identity for the addition of two sinusoidal signals of the same argument (provided immediately before Eq. (12)), and leaving out terms of higher order Δ (since we linearised with Δ in Eq. (6)), Eq. (20) simplifies to:

$$I(x,z=\Delta )=(1-\frac{\Delta }{k}\frac{{{\rm{\partial }}}^{2}\varphi }{{\rm{\partial }}{x}^{2}})[a\sin (\frac{x}{p}-{\tan }^{-1}(\frac{\frac{{\rm{\partial }}\varphi }{{\rm{\partial }}x}}{p(\frac{k}{\Delta }-\frac{{{\rm{\partial }}}^{2}\varphi }{{\rm{\partial }}{x}^{2}})}))+b].$$

Prism effect, seen for uniform phase gradient \(\frac{\partial \varphi }{\partial x}\)

If we are in the slowly-changing bulk of the sample, where \(\frac{\partial \varphi }{\partial x}\) is significant, but \(\frac{{\partial }^{2}\varphi }{\partial {x}^{2}}\) is small and can be neglected, Eq. (21) simplifies to:

$$I(x,z=\Delta )=a\,\sin (\frac{x}{p}-{\tan }^{-1}(\frac{\Delta }{pk}\frac{{\rm{\partial }}\varphi }{{\rm{\partial }}x}))+b.$$

This means that if the phase shift is linear (so \(\frac{{\partial }^{2}\varphi }{\partial {x}^{2}}\) is zero), then we see only the prism effect, where the grid pattern shifts transversely. The shift in the relative position is what we would expect (see Morgan et al.13), namely \(\frac{\Delta }{k}\frac{\partial \varphi }{\partial x}\)), and there is no change in the mean or visibility of the signal. This is the ‘well-behaved’ case, where phase effects are not introducing any signals that look like attenuation or dark-field.

Focusing effect, seen for \(\frac{{\partial }^{2}\varphi }{\partial {x}^{2}}\ne 0\)

If the phase gradient is not uniform, and varies with position x, then we will have more interesting effects. We can consider each of the terms in Eq. (21) to understand the physical meaning. With soft x-rays and a propagation distance in the near field, \(\frac{\Delta }{k}\) will be very small (e.g. \({10}^{-11}\)). If the second phase derivative is large, i.e. approaching the order of \(\frac{k}{\Delta }\), then the multiplicative term at the front of the sinusoid in Eq. (21) can be slightly bigger or smaller than 1, describing either some amplification or deamplification of the entire illumination. Whether amplification or deamplification is seen will depend on the sign of the second derivative of the phase, which describes either defocusing or focusing of the illumination. We also see that if the second phase derivative approaches the order of \(\frac{k}{\Delta }\), then the denominator inside the tan−1 in Eq. (21) will become slightly bigger or smaller than \(\frac{k}{\Delta }\), describing either a squeezing or a spreading out of the intensity peaks, matching with the defocusing/focusing behaviour.

To untangle the effect of phase gradients on the period of the illumination, from the effects of phase gradients on the shift of the illumination (i.e. the x-dependent terms within the sinusoid), we can model the case of some ‘phase curvature’ using a Taylor polynomial of order two, \(\varphi =A{x}^{2}+Bx+C\), so that \(\frac{\partial \varphi }{\partial x}=2Ax+B\) and \(\frac{{\partial }^{2}\varphi }{\partial {x}^{2}}=2A\). The values for A, B and C could be chosen to describe the phase gradient and curvature of any local area of the sample. With this phase, Eq. (21) becomes:

$$I(x,z=\Delta )=(1-{\textstyle \tfrac{2A\Delta }{k}})[a\,\sin (\frac{1}{p}(x-{\tan }^{-1}({\textstyle \tfrac{2Ax+B}{p({\textstyle \tfrac{k}{\Delta }}-2A)}})))+b]\approx (1-{\textstyle \tfrac{2A\Delta }{k}})[a\,\sin ({\textstyle \tfrac{x}{p}}(1-{\textstyle \tfrac{2A\Delta /k}{1-2A\Delta /k}})+{\textstyle \tfrac{B\Delta }{pk(1-2A\Delta /k)}})+b],$$

with the simplification taken for small shifts in phase of the sinusoid, so that tan(x) ≈ x.

We see that a linear change in phase (modelled by A = 0, B ≠ 0) will shift the relative position of the peaks of the periodic illumination by \(\frac{B\Delta }{k}\), acting as a prism without changing the period of the illumination, as seen in Eq. (22), and on the left third of Fig. 6.

If the phase shift incurred by the sample is not just linear, but there is such curvature that a quadratic term is required to adequately describe the local phase, then we will see additional effects. This case corresponds to when A is significant, approaching \(\frac{k}{2\Delta }\), so that the term \(1-\frac{2A\Delta }{k}\) moves away from 1. Since this term appears in three places, a large A will (1) change the mean illumination, (2) alter the period and (3) introduce an additional shift in the position of the periodic illumination. If the phase curvature is positive (seen for A > 0 in our quadratic model) then the beamlets will spread out, seen by a decreased mean illumination and a period that is multiplied by a number slightly greater than 1 and so locally increased. The shift in the position of the illumination will also be slightly reduced towards the centre of the focus. If the phase curvature is negative (A < 0), the illumination will be focused, increasing the mean intensity and decreasing the period of the periodic illumination, as shown in Fig. 6. These observations are consistent with preservation of photons. While this kind of focusing will not introduce any visibility changes when the grid pattern is directly resolved, it can change the visibility measured in grating interferometry (e.g. Fig. 1 in35).

Phase edge, seen for \(\frac{{\partial }^{2}\varphi }{\partial {x}^{2}}\ne 0\)

A phase edge is also an interesting feature to study, particularly given the bright/dark contrast seen in propagation-based phase contrast imaging when a wave passes across an edge and self-interferes. If we model a phase edge in the same way as Eq. (13) models a scattering edge (replacing D with φ) and use this model in our expression for phase effects, Eq. (21), we get

$$I(x,z=\Delta )=(\frac{\Delta (2{e}^{-{x}^{2}}x({\varphi }_{right}-{\varphi }_{left}))}{\sqrt{\pi }k}+1)(a\,\sin (\frac{x}{p}-{\tan }^{-1}(\frac{{e}^{-{x}^{2}}({\varphi }_{right}-{\varphi }_{left})}{p\sqrt{\pi }(\frac{k}{\Delta }+\frac{2{e}^{-{x}^{2}}x({\varphi }_{right}-{\varphi }_{left})}{\sqrt{\pi }})}))+b).$$

When plotted, as expected, a bright/dark contrast fringe overlies the illumination, in a similar manner to the dark-field edge. The python code in the Supplementary Material implements Eq. (24), providing a GUI to explore this effect. This can result in local changes to the visibility, as seen in Fig. 6.

Combined effects

While the phase effects and dark-field effects are most easily understood in the previous two sections, where each is isolated, we can also write an equation to describe the combined effects. Since the shifting and diffusive terms in the finite-difference approximation for the Fokker–Planck equation (Eq. (6)) add together, we can describe the resulting intensity as the sum of Eqs (12) and (21), subtracting the illuminating intensity (Eq. (5)) since it is in both equations and hence repeated. This gives:

$$\begin{array}{ccc}I(x,z=\Delta ) & = & a\sqrt{{(1+\Delta {\textstyle \tfrac{{{\rm{\partial }}}^{2}D}{{\rm{\partial }}{x}^{2}}}-{\textstyle \tfrac{D\Delta }{{p}^{2}}})}^{2}+{({\textstyle \tfrac{\Delta }{p}}{\textstyle \tfrac{{\rm{\partial }}D}{{\rm{\partial }}x}})}^{2}}\,\sin ({\textstyle \tfrac{x}{p}}-\frac{\Delta p{\textstyle \tfrac{{\rm{\partial }}D}{{\rm{\partial }}x}}}{{p}^{2}+\Delta p{\textstyle \tfrac{{{\rm{\partial }}}^{2}D}{{\rm{\partial }}{x}^{2}}}-D\Delta })+b(1+\Delta {\textstyle \tfrac{{{\rm{\partial }}}^{2}D}{{\rm{\partial }}{x}^{2}}})\\ & & +(1-{\textstyle \tfrac{\Delta }{k}}{\textstyle \tfrac{{{\rm{\partial }}}^{2}\varphi }{{\rm{\partial }}{x}^{2}}})[a\,\sin ({\textstyle \tfrac{x}{p}}-{\tan }^{-1}(\frac{{\textstyle \tfrac{{\rm{\partial }}\varphi }{{\rm{\partial }}x}}}{p({\textstyle \tfrac{k}{\Delta }}-{\textstyle \tfrac{{{\rm{\partial }}}^{2}\varphi }{{\rm{\partial }}{x}^{2}}})}))+b]\\ & & -(a\,\sin ({\textstyle \tfrac{x}{p}})+b).\end{array}$$

Extension of the Fokker–Planck model to Grating Interferometry and Edge Illumination

The results presented in the preceding sections can be extended to include the effect of an analyser grating or detector mask, as would be used in a grating interferometer or edge illumination set-up respectively. The use of a second grating/mask has the advantage that larger pixels can be used, which is typically more efficient and allows the imaging of larger samples than imaging where the illumination pattern is directly resolved. To incorporate the second grating/mask, we can simulate a periodic absorption immediately before the detector to ‘analyse’ the illumination we have studied so far.

Here we show the implementation of this, using a general signal that describes any of the cases we have explored (Eqs (2224) etc.), where the sinusoidal illumination arriving at the periodic absorber has been modified by a factor of M in mean value, a factor of V in visibility, and has been shifted by s, so can be described as

$$I(x,z=\Delta )=MV\,\sin (\frac{2\pi (x-s)}{p})+M.$$

Note that we neglect a local change in period here, due to the increased complexity, but the same approach can be applied to study this effect. Also note that we have explicitly included a factor of 2π inside the sinusoid in Eq. 26 that is not included earlier, so that it is possible to integrate the unresolved intensity oscillations over the period of that intensity oscillation, which will now correspond exactly to p. We can model the absorption by the analyser grating or detector mask by multiplying the illumination (Eq. (26)) by a sinusoid that spatially oscillates between 0 (total absorption) and 1 (total transmission) (i.e. \(\frac{1}{2}\,\sin (\frac{2\pi (n-x)}{p})+\frac{1}{2}\)).

Grating interferometry

In grating interferometry, the intensity is recorded during a ‘stepping scan’, where an absorption grating steps transversely across the illumination. This can be implemented by convolving the ‘absorption’ sinusoid with the modified illumination sinusoid (Eq. (26)) over the period of the illumination, p, providing the infinitely sampled measured stepping curve as a function of absorption grating position n (which should be sampled from n = 0 to n = p),

$${\rm{S}}{\rm{t}}{\rm{e}}{\rm{p}}{\rm{p}}{\rm{i}}{\rm{n}}{\rm{g}}\,{\rm{c}}{\rm{u}}{\rm{r}}{\rm{v}}{\rm{e}}\,(n)={\int }_{0}^{p}(\frac{1}{2}\,\sin (\frac{2\pi (n-x)}{p})+\frac{1}{2})(MV\,\sin (\frac{2\pi (x-s)}{p})+M)dx$$
$$=\,\frac{p}{4}MV\,\cos (\frac{2\pi (n-s)}{p})+\frac{p}{2}M.$$

This stepping curve has a mean value of Mp/2, a visibility of V/2 and is shifted by s. This means that the results shown above for a directly-resolved grid can also be applied in the case of an interferometer with just a simple multiplicative scaling of p/2 for the mean (attenuation), 1/2 for the visibility (dark-field) and no adjustment for the shift.

Note that if the period of oscillations is locally varying (seen when \(\frac{{\partial }^{2}\varphi }{\partial {x}^{2}}\ne 0\)), we would need to scale the period p by a factor of f in the general expression for a modified sinusoid, Eq. (26). Carrying this into Eq. (27) produces a non-trivial solution that depends on the nature of \(\frac{{\partial }^{2}\varphi }{\partial {x}^{2}}\), in a similar way to the results seen in earlier sections, where we had to consider specific cases of \(\frac{{\partial }^{2}\varphi }{\partial {x}^{2}}\). Including spatial variations in illumination period would be important when considering how a strong phase object measured using interferometry may produce a ‘pseudo’ dark-field (e.g. Fig. 1 in35).

Edge illumination

Edge illumination imaging has several variants, for example, depending on whether there is strong scattering expected from the sample11,17. With the aim only to illustrate the applicability of the Fokker–Planck approach, here we will consider just the simple case where scattering is weak. In this case, the absorption grating / detector mask, which has a period matching the illumination period, should be aligned so that the peak of the sinusoidal illumination first coincides with the left edge of the each absorption line (exposure 1, Ileft), then coincides with the right edge of the absorption line (exposure 2, Iright),

$$\begin{array}{ccc}{I}_{left} & = & {\int }_{0}^{p}(\frac{1}{2}\,\cos (\frac{2\pi x}{p})+\frac{1}{2})(MV\,\sin (\frac{2\pi (x-s)}{p})+M)dx\\ & = & -\frac{1}{4}MpV\,\sin (\frac{2\pi s}{p})+\frac{Mp}{2}\end{array}$$
$$\begin{array}{ccc}{I}_{right} & = & {\int }_{0}^{p}(-\frac{1}{2}\,\cos (\frac{2\pi x}{p})+\frac{1}{2})(MV\,\sin (\frac{2\pi (x-s)}{p})+M)dx\\ & = & \frac{1}{4}MpV\,\sin (\frac{2\pi s}{p})+\frac{Mp}{2}.\end{array}$$

The shift (s) and attenuation (M) signals could then be extracted by adding and subtracting Eqs (29) and (30), giving consistent results as in the scenario described above for grating interferometry.

Following these demonstrations of applicability, we leave further applications of the Fokker–Planck equation to grating interferometry and edge illumination to future work. Possibilities include integrating over a non-integer number of grating lines and investigating the effects of a locally-modified period.


This work serves as a starting point for future applications of the Fokker–Planck and Kramers–Moyal equations in x-ray imaging techniques that capture phase and dark-field effects. We begin the discussion by mentioning a number of possibilities for future work. A clear next step in any grating-based or speckle-based approach is to utilise this model as a starting point for phase/dark-field retrieval, or simply as a basis for lensing and edge-based ‘corrections’ to retrieved attenuation, phase and dark-field signals (perhaps as a second or iterative step after the initial extraction of the three signals by conventional retrieval methods). As noted earlier, the Fokker–Planck model could be applied to provide an analytical model for specific cases seen in grating interferometry where phase edge19 and lensing effects (simulated and measured in Wolf et al.20) result in an illumination period that is locally-varying, leading to a spatially-varying ‘mis-match’ between that illumination and the second/analyser grating35.

Corrections for dark-field-edge, phase-edge and lensing effects are particularly of interest when the size of the features within the sample are comparable to the period of the illumination, and the effects are typically more dominant. The Fokker–Planck model described in this paper could better shed light on the transition between two regimes, the regime where sample features are large enough to create a spatially-resolved phase signal (e.g. see differential phase images of individual air sacs in the lung in Morgan et al.36 or high-resolution lung CT in Fig. 5 of Koenig et al.35) and the regime where sample features are not spatially resolved and are instead seen as a dark-field signal (e.g. see dark-field images of the lungs37 or Fig. 2 of 35). The Fokker–Planck model naturally lends itself to a parameter-based definition for these regimes, differentiating between edge effects and bulk effects, as determined by the spatial resolution of the imaging set-up and the illumination period. This direction of future work also lends itself to an investigation into the optimum illumination pattern period to be sensitive to a given dark-field signal for a given wavelength with a given imaging set-up. This links to the correlation length, λΔ/p seen in grating interferometry38, which matches the expression seen when the ‘smear width’ L is set to the illumination period p, zeroing the visibility of the resulting illumination at the detector (also see Fig. 3c of the companion paper on the X-ray Fokker–Planck equation24).

There are also natural extensions to the Fokker–Planck model. The first extension would be to describe more detailed39 and size-related33,40 scattering functions. A dark-field signal from a non-uniform collection of overlaid and unresolved sample features could be modelled by the addition of extra diffusive terms (\({\partial }^{2}({D}_{m}I)/\partial {x}^{2}\), each with a different Dm) to the Fokker–Planck equation (Eq. (2)). Since the diffusion equation is energy-conserving, the addition of these terms would require no other adjustments. A dark-field signal from a collection of extended unresolved sample features (e.g. carbon fibres41,42 or bone microstructure31,43) could be modelled by a two-dimensional Fokker–Planck equation (a truncation of the Kramers–Moyal equation), which provides three parameters to describe the two-dimensional scattering ellipse utilised in directional dark-field imaging44 (which is sometimes modelled as scattering that oscillates in magnitude sinusoidally with angle31,45).

The Fokker–Planck model shown here could be extended to incorporate real-world effects seen at synchrotron and laboratory x-ray sources, including limited spatial resolution, extended sources, polychromatic illumination and magnification. The spatial resolution limit due to the detector characteristics, including pixel size, could be modelled by convolving the general expressions derived above (e.g. Eq. (25)) with a Gaussian of specified width. The spatial resolution associated with an x-ray imaging system will also be limited by the size of the x-ray source, with an extended source ‘blurring’ the observed image. In the Fokker–Planck model, an extended source could be modelled by summing the images created by an array of many point sources, produced by shifting the intensity measured at z = Δ slightly in order to model the grid projection seen from each point on the source. An alternative would be to replace D(x, y) with D(x, y) + d (or equivalently, add another diffusion term), where d models the extra blur that results from source-size blurring (see p. 14 of Paganin & Morgan24). The effect of an extended source is also of particular relevance in the measured x-ray dark-field signal35. In the direction of less blurring, a more finely-resolved structured illumination behind a rectangular (or some other-shaped46) grid could be modelled using a Fourier sum of the sinusoidal illumination model utilised in this paper.

Any x-ray source that is not a synchrotron will typically produce illumination that is sufficiently polychromatic and divergent that the associated effects must be included in modelling. A divergent source could be modelled according to the Fresnel scaling theorem47, by setting the propagation distance z to z/M, where M is the magnification, while adjusting the native pixel size accordingly. This is also key in x-ray dark-field imaging by interferometry48 [Section 4 of 35]. An image captured with polychromatic illumination could be modelled as the weighted sum of the images seen at each wavelength within the illuminating spectrum49. This can be implemented by integrating the Fokker–Planck equation (Eq. (6)) over wavelength, after multiplying Eq. (6) with a wavelength-dependent weighting factor that describes the x-ray spectrum and which could also incorporate detector sensitivity.

A sum of many slightly-different images into a single exposure can be used to describe a reduction in fringe or patterned illumination visibility for a number of cases. In addition to the cases of an extended source and a polychromatic source, reduced visibility is seen when using a diffuser. A diffuser is typically a sheet of highly-scattering material, like sandpaper, which is placed in the x-ray beam upstream of the sample and rotated at high speed, such that many positions are summed over the time of a typical x-ray exposure. This will reduce the visibility of propagation-based x-ray phase contrast fringes, as each diffuser position slightly distorts the fringes, and the sum over all diffuser positions results in a fringe that is ‘blurred’50. A diffuser will not change the spatially coherent width/area, but will reduce the magnitude of the second order degree of coherence51. In x-ray SAXS, the wavefield is locally distorted by scattering from sub-pixel structures in the sample, locally reducing the spatially coherent width/area, and resulting in a reduction in the visibility of fine features like the illuminating grid pattern. In the case of a diffuser, there is a temporal sum of many slightly distorted images. In the case of x-ray SAXS, there is a temporal sum of many photons, where some are slightly scattered.

Another aspect of dark-field is worth discussing. Several papers have reported on an enhancement of dark-field in the vicinity of the boundary of the geometric shadow of a paraxially-illuminated compact object19,52,53. Rather than being dark-field due solely to unresolved micro-structure, as is the case for points that lie inside the geometric shadow, the dark-field signal emanating from the edge of the object is augmented by the Young–Maggi–Rubinowicz boundary diffraction wave54. This phenomenon, whereby illuminated objects have their projected edges acting as a secondary source of (scattered) boundary waves, was first noted in a qualitative study by Young in 180255. Subsequent contributions to the underpinning wave theory are due to Maggi56, Rubinowicz57 and Miyamoto & Wolf58,59. The same phenomenon may also be understood from the perspective of complex-ray theory. This ray-based perspective underpins Keller’s geometric theory of diffraction60, in which Fresnel diffraction patterns may be understood as the interference between (i) the complex-ray disturbance transmitted by an object according to geometrical optics, and (ii) the complex-ray disturbance scattered from the edges of the object. A third means of understanding the dark-field-enhancement along the boundary of the geometric shadow of an illuminated object, is from the asymptotic expansion (short-wavelength limit) of the two-dimensional diffraction integral associated with a paraxially-illuminated compact object under the projection approximation47, obtained by applying the method of stationary phase for double integrals. Here, the boundary wave corresponds to critical points of the second kind: see e.g. Sec. 3.3.3 of the text by Mandel & Wolf30. For applications of the boundary-wave concept to coherent X-ray optics, see e.g. Morgan et al.26,61.


This work has shown that the Fokker–Planck equation can be applied to phase contrast and dark-field x-ray imaging captured using a single-grid set-up, a grating interferometer, an edge-illumination set-up or a speckle-based set-up. The Fokker–Planck model was applied to provide an analytic expression for the additional signals seen as a result of edges within the sample and lensing by the sample. The authors hope that this work will provide a basis for further applications of the Fokker–Planck model in x-ray phase and dark-field imaging.


  1. Momose, A., Takeda, T., Itai, Y. & Hirano, K. Phase–contrast x–ray computed tomography for observing biological soft tissues. Nat. Med. 2, 473–475 (1996).

    Article  CAS  PubMed  Google Scholar 

  2. Jud, C. et al. Dentinal tubules revealed with x-ray tensor tomography. Dent. Mater 32, 1189–1195 (2016).

    Article  PubMed  Google Scholar 

  3. Bonse, U. & Hart, M. An x-ray interferometer. Appl. Phys. Lett. 6, 155–156 (1965).

    Article  ADS  Google Scholar 

  4. Cloetens, P., Barrett, R., Baruchel, J., Guigay, J.-P. & Schlenker, M. Phase objects in synchrotron radiation hard x-ray imaging. J. Phys. D: Appl. Phys. 29, 133–146 (1996).

    Article  ADS  CAS  Google Scholar 

  5. Snigirev, A., Snigireva, I., Kohn, V., Kuznetsov, S. & Schelokov, I. On the possibilities of x-ray phase contrast microimaging by coherent high-energy synchrotron radiation. Rev. Sci. Instrum. 66, 5486–5492 (1995).

    Article  ADS  CAS  Google Scholar 

  6. Weitkamp, T. et al. X-ray phase imaging with a grating interferometer. Opt. Express 13, 6296–6304 (2005).

    Article  ADS  PubMed  Google Scholar 

  7. David, C., Nöhammer, B., Solak, H. & Ziegler, E. Differential x-ray phase contrast imaging using a shearing interferometer. Appl. Phys. Lett. 81, 3287–3289 (2002).

    Article  ADS  CAS  Google Scholar 

  8. Pfeiffer, F. et al. Hard-x-ray dark-field imaging using a grating interferometer. Nat. Mat. 7, 134–137 (2008).

    Article  CAS  Google Scholar 

  9. Momose, A. et al. Demonstration of x-ray Talbot interferometry. Jpn. J. Appl. Phys. 42, L866–L868 (2003).

    Article  ADS  CAS  Google Scholar 

  10. Miao, H. et al. A universal moiré effect and application in x-ray phase-contrast imaging. Nat. Phys. 830 12, 834 (2016).

    Google Scholar 

  11. Olivo, A. & Speller, R. A coded-aperture technique allowing x-ray phase contrast imaging with conventional sources. Appl. Phys. Lett. 91, 074106 (2007).

    Article  ADS  CAS  Google Scholar 

  12. Bennett, E. E., Kopace, R., Stein, A. F. & Wen, H. A grating-based single-shot x-ray phase contrast and diffraction method for in vivo imaging. Med. Phys. 37, 6047–6054 (2010).

    Article  PubMed  PubMed Central  Google Scholar 

  13. Morgan, K. S., Paganin, D. M. & Siu, K. K. W. Quantitative single-exposure x-ray phase contrast imaging using a single attenuation grid. Opt. Express 19, 19781–19789 (2011).

    Article  ADS  CAS  PubMed  Google Scholar 

  14. Morgan, K. S., Paganin, D. M. & Siu, K. K. W. X-ray phase imaging with a paper analyzer. Appl. Phys. Lett. 100, 124102 (2012).

    Article  ADS  CAS  Google Scholar 

  15. Bérujon, S., Ziegler, E., Cerbino, R. & Peverini, L. Two-dimensional x-ray beam phase sensing. Phys. Rev. Lett. 108, 158102 (2012).

    Article  ADS  CAS  PubMed  Google Scholar 

  16. Khelashvili, G. et al. A physical model of multiple-image radiography. Phys. Med. Biol. 51, 221–236 (2005).

    Article  PubMed  Google Scholar 

  17. Endrizzi, M. X-ray phase-contrast imaging. Nucl. Instr. Meth. Phys. Res. A 878, 88–98 (2018).

    Article  ADS  CAS  Google Scholar 

  18. Michelson, A. A. Studies in Optics (Chicago Press, reprinted by Dover Publications Inc., 1995).

  19. Yashiro, W. & Momose, A. Effects of unresolvable edges in grating-based x-ray differential phase imaging. Opt. Express 23, 9233–9251 (2015).

    Article  ADS  CAS  PubMed  Google Scholar 

  20. Wolf, J. et al. Lens-term-and edge-effect in x-ray grating interferometry. Biomed. Opt. Express 6, 4812–4824 (2015).

    Article  PubMed  PubMed Central  Google Scholar 

  21. Chabior, M. et al. Beam hardening effects in grating-based x-ray phase-contrast imaging. Med. Phys. 38, 1189–1195 (2011).

    Article  PubMed  Google Scholar 

  22. Zdora, M.-C., Thibault, P., Pfeiffer, F. & Zanette, I. Simulations of x-ray speckle-based dark-field and phase-contrast imaging with a polychromatic beam. J. Appl. Phys. 118, 113105 (2015).

    Article  ADS  CAS  Google Scholar 

  23. Risken, H. The Fokker-Planck Equation: Methods of Solution and Applications, 2nd edn (Springer Verlag, Berlin, 1989).

  24. Paganin, D. M. & Morgan, K. S. X-ray Fokker–Planck equation for paraxial imaging. Sci. Rep., in press (2019).

  25. Teague, M. R. Deterministic phase retrieval: a Green’s function solution. J. Opt. Soc. Am. 73, 1434–1441 (1983).

    Article  ADS  Google Scholar 

  26. Morgan, K. S., Siu, K. K. W. & Paganin, D. M. The projection approximation and edge contrast for x-ray propagation-based phase contrast imaging of a cylindrical edge. Opt. Express 18, 9865–9878 (2010).

    Article  ADS  CAS  PubMed  Google Scholar 

  27. Morgan, K. S. et al. A sensitive x-ray phase contrast technique for rapid imaging using a single phase grid analyzer. Opt. Lett. 38, 4605–4608 (2013).

    Article  ADS  PubMed  Google Scholar 

  28. Rizzi, J. et al. X-ray phase contrast imaging and noise evaluation using a single phase grating interferometer. Opt. Express 21, 17340–17351 (2013).

    Article  ADS  CAS  PubMed  Google Scholar 

  29. Zdora, M.-C. State of the art of x-ray speckle-based phase-contrast and dark-field imaging. J. Imaging 4, 60 (2018).

    Article  Google Scholar 

  30. Mandel, L. & Wolf, E. Optical Coherence and Quantum Optics (Cambridge University Press, Cambridge, 1995).

  31. Jensen, T. H. et al. Directional x-ray dark-field imaging. Phys. Med. Biol. 55, 3317–3323 (2010).

    Article  PubMed  Google Scholar 

  32. Pawula, R. F. Approximation of the linear Boltzmann equation by the Fokker–Planck equation. Phys. Rev. 162, 186–188 (1967).

    Article  ADS  CAS  Google Scholar 

  33. Lynch, S. K. et al. Interpretation of dark-field contrast and particle-size selectivity in grating interferometers. Appl. Opt. 50, 4310–4319 (2011).

    Article  ADS  PubMed  PubMed Central  Google Scholar 

  34. Bech, M. et al. Quantitative x-ray dark-field computed tomography. Phys. Med. Biol. 55, 5529–5539 (2010).

    Article  ADS  CAS  PubMed  Google Scholar 

  35. Koenig, T. et al. On the origin and nature of the grating interferometric dark-field contrast obtained with low-brilliance x-ray sources. Phys. Med. Biol. 61, 3427–3442 (2016).

    Article  CAS  PubMed  Google Scholar 

  36. Morgan, K. S. et al. Capturing and visualizing transient x-ray wavefront topological features by single-grid phase imaging. Opt. Express 24, 24435–24450 (2016).

    Article  ADS  PubMed  Google Scholar 

  37. Schleede, S. et al. Emphysema diagnosis using x-ray dark-field imaging at a laser-driven compact synchrotron light source. Proc. Natl. Acad. Sci. USA 109, 17880–17885 (2012).

    Article  ADS  PubMed  PubMed Central  Google Scholar 

  38. Prade, F., Yaroshenko, A., Herzen, J. & Pfeiffer, F. Short-range order in mesoscale systems probed by x-ray grating interferometry. EPL 112, 68002 (2016).

    Article  ADS  CAS  Google Scholar 

  39. Modregger, P. et al. Imaging the ultrasmall-angle x-ray scattering distribution with grating interferometry. Phys. Rev. Lett. 108, 048101 (2012).

    Article  ADS  CAS  PubMed  Google Scholar 

  40. Modregger, P. et al. Interpretation and utility of the moments of small-angle x-ray scattering distributions. Phys. Rev. Lett. 118, 265501 (2017).

    Article  ADS  PubMed  Google Scholar 

  41. Revol, V. et al. Laminate fibre structure characterisation of carbon fibre-reinforced polymers by x-ray scatter dark field imaging with a grating interferometer. NDT & E International 58, 64–71 (2013).

    Article  CAS  Google Scholar 

  42. Kagias, M., Wang, Z., Villanueva-Perez, P., Jefimovs, K. & Stampanoni, M. 2D-omnidirectional hard-x-ray scattering sensitivity in a single shot. Phys. Rev. Lett. 116, 093902 (2016).

    Article  ADS  CAS  PubMed  Google Scholar 

  43. Jud, C. et al. Trabecular bone anisotropy imaging with a compact laser-undulator synchrotron x-ray source. Sci. Rep. 7, 14477 (2017).

    Article  ADS  CAS  PubMed  PubMed Central  Google Scholar 

  44. Jensen, T. H. et al. Directional x-ray dark-field imaging of strongly ordered systems. Phys. Rev. B 82, 214103 (2010).

    Article  ADS  CAS  Google Scholar 

  45. Potdevin, G. et al. X-ray vector radiography for bone micro-architecture diagnostics. Phys. Med. Biol. 57, 3451–3461 (2012).

    Article  PubMed  Google Scholar 

  46. Yaroshenko, A. et al. Non-binary phase gratings for x-ray imaging with a compact talbot interferometer. Opt. Express 22, 547–556 (2014).

    Article  ADS  PubMed  Google Scholar 

  47. Paganin, D. M. Coherent X-Ray Optics (Oxford University Press, Oxford, 2006).

  48. Yashiro, W., Noda, D. & Kajiwara, K. Effect of insufficient temporal coherence on visibility contrast in x-ray grating interferometry. Opt. Express 26, 1012–1027 (2018).

    Article  ADS  CAS  PubMed  Google Scholar 

  49. Wilkins, S., Gureyev, T. E., Gao, D., Pogany, A. & Stevenson, A. Phase-contrast imaging using polychromatic hard x-rays. Nature 384, 335–338 (1996).

    Article  ADS  CAS  Google Scholar 

  50. Irvine, S. et al. Assessment of the use of a diffuser in propagation-based x-ray phase contrast imaging. Opt. Express 18, 13478–13491 (2010).

    Article  ADS  CAS  PubMed  Google Scholar 

  51. Morgan, K. S. et al. Measurement of hard x-ray coherence in the presence of a rotating random-phase-screen diffuser. Opt. Commun. 283, 216–225 (2010).

    Article  ADS  CAS  Google Scholar 

  52. Morrison, G. & Browne, M. Dark-field imaging with the scanning transmission x-ray microscope. Rev. Sci. Instrum. 63, 611–614 (1992).

    Article  ADS  Google Scholar 

  53. Suzuki, Y. & Uchida, F. Dark-field imaging in hard x-ray scanning microscopy. Rev. Sci. Instrum. 66, 1468–1470 (1995).

    Article  ADS  CAS  Google Scholar 

  54. Born, M. & Wolf, E. Principles of Optics 7th edn (Cambridge University Press, Cambridge, 1999).

  55. Young, T. The Bakerian lecture: On the theory of light and colours. Phil. Trans. R. Soc. Lond. 92, 12–48 (1802).

    Article  ADS  Google Scholar 

  56. Maggi, G. A. Sulla propagazione libera e perturbata delle onde luminose in un mezzo isotropo. Annali di Mat. II 16, 21–48 (1888).

    Article  MATH  Google Scholar 

  57. Rubinowicz, A. Die Beugungswelle in der Kirchhoffschen Theorie der Beugungserscheinungen. Ann. Physik 53, 257–278 (1917).

    Article  ADS  Google Scholar 

  58. Miyamoto, K. & Wolf, E. Generalization of the Maggi–Rubinowicz theory of the boundary diffraction wave–Part I. J. Opt. Soc. Am. 52, 615–625 (1962).

    Article  ADS  Google Scholar 

  59. Miyamoto, K. & Wolf, E. Generalization of the Maggi–Rubinowicz theory of the boundary diffraction wave–Part II. J. Opt. Soc. Am. 52, 626–637 (1962).

    Article  ADS  Google Scholar 

  60. Keller, J. B. Geometrical theory of diffraction. J. Opt. Soc. Am. 52, 116–130 (1962).

    Article  ADS  MathSciNet  CAS  PubMed  Google Scholar 

  61. Morgan, K. S., Siu, K. K. W. & Paganin, D. M. The projection approximation versus an exact solution for x-ray phase contrast imaging, with a plane wave scattered by a dielectric cylinder. Opt. Commun. 283, 4601–4608 (2010).

    Article  ADS  CAS  Google Scholar 

Download references


We acknowledge useful discussions with Florian Schaff, Mario Beltran, Carsten Detlefs, Timur Gureyev, Alexander Kozlov, Thomas Leatham and Tim Petersen. We acknowledge the following funding sources: ARC Future Fellowship FT180100374; Veski Victorian Postdoctoral Research Fellowship (VPRF); German Excellence Initiative and European Union Seventh Framework Program (291763). The python GUI is built on the slider demo from matplotlib, available at

Author information

Authors and Affiliations



K.S.M. and D.M.P. worked on this paper in close collaboration. K.S.M. prepared all figures and performed all mathematical calculations, arising from discussions between both authors. The paper was mainly written by K.S.M., with input from D.M.P.

Corresponding author

Correspondence to Kaye S. Morgan.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Morgan, K.S., Paganin, D.M. Applying the Fokker–Planck equation to grating-based x-ray phase and dark-field imaging. Sci Rep 9, 17465 (2019).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI:

Further reading


By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing