An experimental approach to optimising refraction sensitivity for lab-based edge illumination phase contrast set-ups

Refraction sensitivity can be optimised for differential x-ray phase contrast (XPC) imaging methods by modifying the set-up. Often, modifications involve changing source/detector parameters, propagation distances, or the design of optical components, i.e. parameters that are not readily changed without non-trivial time investment, replacing components, or performing high-precision recalibrations. The edge illumination (EI) XPC method provides a method of optimising the refraction sensitivity, by exploiting micrometric translations of its periodic masks, that bypasses the constraints listed above. These translations can be performed on-the-fly and allow optimising the refraction signal for specific applications without making significant changes to the set-up. The method can prove advantageous for lab-based systems that make use of larger sources but with limited available set-up space. In this paper, we study how refraction sensitivity varies as a function of illuminated pixel fraction (IPF) under two commonly encountered experimental conditions: (1) at approximately constant detected counts, and (2) at equal exposure time. We compare the standard deviation in the background of reconstructed refraction images at different IPFs and find that refraction sensitivity is optimal at 25% IPF under both conditions. Finally, we demonstrate that refraction sensitivity affects the visibility of weakly refracting features on an insect leg. The results suggest that IPFs lower than 50% can actually be preferable, especially in the case where the statistics is kept constant, and provide experimental validation that phase sensitivity in EI is not fixed once the system parameters are defined.


Introduction
X-ray phase contrast (XPC) imaging systems are simultaneously sensitive to attenuation and phase effects. The interactions governing these two contrast mechanisms can be described by an object's complex refractive index, Original content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. n = 1−δ + iβ, where β, the imaginary part, is responsible for attenuation and δ, the real part decrement, is responsible for phase variations [1,2]. Recent developments in XPC imaging have been motivated by the observation that δ can be up to three orders of magnitude greater than β in parts of the x-ray regime. Under favourable conditions, δ can be used as a means of detecting weakly attenuating features, which are otherwise invisible to conventional set-ups. Thus, XPC setups can potentially target a wide range of applications such as security [3,4], non-destructive testing [5,6], and medical imaging [7,8].

Edge illumination set-up
XPC imaging set-ups rely on physical mechanisms to convert phase variations into intensity modulations, which often impose constraints on the set-up, such as using only high spatial/temporal coherence sources, precision-cut crystals etc [9,10]. In most cases, ideal conditions can be met at synchrotron facilities where a combination of high-flux monochromatic x-ray beams and large propagation distances are available. However, it is also important to optimise XPC set-ups for the non-ideal conditions typically encountered in laboratories where, e.g. large focal spots, relatively low-flux, polychromatic sources, and commercially available detectors are used [11]. Under these conditions, some advantages of XPC methods over conventional, attenuation-based imaging tend to disappear or, at best, are only partially preserved.
Hence, studying and optimising laboratory set-ups are an important step in defining and circumventing extensive setup limitations. For both lab-based grating interferometry (GI) [12,13] and edge illumination (EI) [14], successive implementations with larger, low brilliance sources have been shown to overcome the abovementioned limitations, at least in part. EI is a non-interferometric XPC method. Among its known advantages are that the refraction signal peaks are well-preserved even with larger sources [15,16], its achromatic nature [17] and the possibility to scan large objects [18,19]. Although several EI configurations have been developed [20][21][22][23][24][25], we will only focus on the double-mask lab-based set-up. This paper proposes a simple experimental method, based on an existing theoretical framework, to optimise refraction sensitivity that is applicable to any EI XPC imaging set-up [26]. Figure 1(a) shows the typical, double-mask EI set-up. It uses two periodic masks with alternating absorbing and transmitting lines. The first (sample) mask, M1, creates many noninterfering beamlets and the second (detector) mask, M2, is placed before the detector to partially intercept them. An illumination curve (IC) can be obtained by scanning M1, along the x-axis (in figure 1(a)), while M2 remains still. The presence of M2 helps preserve the IC shape and decouples it from the intrinsic detector response function. In principle M2 could be scanned instead of M1, but leaving M2 fixed has two advantages, namely: (1) the IC is not affected by the fact that different parts of the pixel can respond differently to the same radiation input, and (2) only the centre of the detector pixel is used, where the pixel response tends to be flattest; moreover, hitting the pixel in its centre can reduce signal spillout onto its neighbours.
The IC records the illuminated pixel fraction (IPF) as a function of the relative, transverse displacement between the two masks over the span of one sample mask period, p 1 . Insets in figure 1(b) show the IPFs at which the sample images were acquired. The relationship between IPF and the lateral mask displacement is such that the IPF is defined to be maximal (100%) when the apertures are perfectly aligned with each other, i.e. when the beamlet created by a 1 fully illuminates the entire active surface of the pixel. The insets further demonstrate that IPF decreases with increasing misalignment, where the beamlet is partially absorbed by the detector mask septum. The IC incorporates experimental parameters, e.g. the source focal spot size and the dimensions of the mask apertures, and is therefore characteristic of a given set-up. Thus, the relationship between IPF and lateral mask displacement for a given set-up can be exploited to recover the differential phase shifts and the absorption signals induced by a sample.
At a given mask displacement, a sample placed immediately after M1 will modulate the beamlets falling on the detector. Modulated beamlets contain a mixture of attenuation and refraction information, which can be disentangled by taking a pair of images at symmetric IPFs on opposite IC slopes. The images acquired can be expressed as in [26]: where I 0 is the reference beamlet, i.e. the detected counts in the absence of a sample when M1 and M2 are perfectly aligned. C (x e± ) represents either the rising or falling slopes of the IC as a function of x e± , the position of the sample mask edges. The positive (negative) subscript indicates that the signal was recorded by illuminating the bottom (top) edge of the detector mask. T eff and ∆θ eff represent the attenuation and refraction induced by the sample at the effective energy of the spectrum, respectively [27]. For two images, I + and I − , which can be described by equation (1), acquired at symmetric IPFs on opposite IC slopes (i.e. |x e,− | = |x e,+ |), the attenuation signal can be eliminated by calculating their quotient, where R (Z od ∆θ eff ) is a monotonically increasing and invertible function that enables reconstruction of ∆θ eff because it directly relates sample induced refraction to the intensity variations in the 'quotient image'. Under the symmetric IC slope condition (C (x e+ ) = C (x e− ), and C ′ (x e+ ) = −C ′ (x e− )), an analytic expression for the error on the retrieved angle can be expressed as follows: where k is a constant that depends on T eff , I 0 , and Z od , and the other terms in the numerator, C (x e+ ), and denominator, C ′ (x e+ ), represent the photon statistics and the IC slope gradient at a given IPF, respectively [26]. Equation (3) calculates the error on the retrieved angle at ∆θ eff = 0, and thus, the random noise in the background of the retrieved refraction image for an EI set-up. The sensitivity to refraction can thus be defined as 1/σ ∆θeff , such that a smaller σ ∆θeff corresponds to greater sensitivity. Equation (3) also implies that refraction sensitivity varies over the span of the IC, which only involves small lateral mask displacements. This provides an accessible means of optimising the refraction sensitivity for a given experimental setup. Note that the variation of refraction sensitivity described here is not a unique advantage to EI, but is equally applicable to any XPC methods that use characterising curves [28][29][30]. However, when combined with other reported advantages of EI, particularly its ability to retrieve large refraction angles without compromising the minimum retrievable angle, and its implementation with large focus polychromatic sources, it leads to a powerful tool that broadens the applicability of the EI.
Ultimately, refraction sensitivity is determined by the interplay between the IC slope and the number of counts, which makes calculating its optimal position non-trivial. In this paper, we aim to find the optimal working point under conditions of constant detected statistics (under a detector limited case) and constant exposure time (i.e. the dose/flux limited case) and explore the trade-offs between sensitivity and dose. Moreover, this work casts light on the different mechanisms that determine EI's sensitivity compared to other XPC methods. It shows that the minimum detectible angle cannot be calculated by simply dividing the aperture width or period by the sample-detector distance [31,32], but that it ultimately depends on the relative position of M1 and M2, both along the beam axis and orthogonal to it. While the theoretical framework underpinning this work has been studied [26], it was experimentally tested only at IPF = 50%. The option of varying the system phase sensitivity by changing the IPF was not quantitatively studied before, nor was it optimised.

Methods
The work presented here has been divided into two parts. The first part validates the accuracy of the phase reconstruction algorithm at various IPFs using a test sample. The second part compares the experimentally measured refraction sensitivity of the set-up: (1) at approximately constant detected statistics, and (2) at constant exposure time, and demonstrates how this quantity affects the visibility of fine features. Figure 2 shows a diagram of the table-top system used in this work, which consisted of a Rigaku MM007 x-ray generator with a rotating molybdenum target, operated at 35 kVp and 25 mA. The masks, M1 and M2, were manufactured by Creatv Microtech (Maryland, US) by electroplating~150 µm thick layers of gold, arranged in periodic columns, on a~500 µm thick graphite substrate. M1 and M2 were designed with periods, p 1 = 79 µm and p 2 = 98 µm, aperture widths, a 1 = 10 µm and a 2 = 17 µm, and were placed 1.57 m and 1.94 m away from the source, respectively. The PixiRad-2 (Pixie-III ASIC) single photon counting detector was placed 2.45 m away from the source, at the end of the system. It has been designed with a 750 µm thick CdTe sensor and 62 µm square pixels [33]. The detector was cooled to −20 • C and the lower threshold was set to 3 kV, which was sufficient to eliminate dark current and electronic noise contributions to the signal; with the beam off, no counts were observed in a majority of pixels.

Table-top set-up
The table-top set-up in figure 2 contains two atypical features that are not present in the schematic for a standard labbased EI set-up shown in figure 1(a). Firstly, in standard setups, M2 and the detector are placed as close to each other as physically possible while in figure 2 a third distance is introduced between M2 and the detector. Secondly, line-skipped masks are usually only employed to mitigate the effects of large pixel cross-talk [34]. Both features have been adopted here to enable constructing a workable EI set-up that compensated for the mismatch between the periods of the available set of masks and the detector pixel size. The distances were thus selected to ensure that the projected periods of both masks matched twice the detector pixel pitch (124 µm), where alternating pixel columns are illuminated. The masks used in this work have been repurposed from a previous experiment that used a different detector; it should be noted that future systems using this PixiRad detector will be built using appropriately designed non-line-skipped masks, which would double the object sampling. In general, these atypical design features do not detract from the results presented here; since the experimentally measured IC and the sample images were acquired under the same conditions, and the IC slopes are explicitly used for phase reconstruction, the theoretical framework used remains valid. Moreover, the beamlets are physically intercepted at the M2 plane, which means that the phase detection mechanism is equivalent to a typical EI set-up (without a significant post-M2 propagation distance). Thus, any post-M2 propagation distance has no effect on the detected signal and the 'equivalence condition' remains valid as long as the analysed beamlets do not begin to overlap. A set-up with nonzero post-M2 distance has been used previously [17], although, in that case, z 3 was significantly smaller than the one used here, and so was not explicitly reported.

Samples and image acquisition parameters
To demonstrate the accuracy of the refraction reconstruction algorithm at the various IPFs, we used a sapphire wire (nominal diameter = 280 µm) as a test object. The wire is a geometrically simple object whose differential phase profile can be calculated analytically. In addition to this test object, images of an insect leg were also acquired. This latter sample was used to demonstrate how the visibility of weakly refracting features, and therefore of refraction sensitivity, varies as a function of the IPF.
In total, seven frames were acquired at each IPF with an exposure time of 3.5 s each. In addition, ten flat field frames (reference images without the sample) were acquired before and after each sequence, with an exposure time of 20 s per frame. Flat fields were averaged and used to correct for nonuniform illumination of the detector and imperfections in the mask structures. Greater statistics have been used when obtaining flat fields in order to minimise their random noise contributions in the corrected sample images. While reducing the noise in the flat fields used for image correction can improve the image quality, it does not contribute to the sample dose.
The spatial resolution of the reconstructed images was enhanced by displacing the sample with sub-pixel steps (dithering) over one sample mask period. For the wire, eight dithering steps were used, with step size = 9.9 µm, and for the insect leg, 16 dithering steps were used, with step size = 4.9 µm. Note that sample dithering does not improve the image statistics per image pixel, but only increases the object sampling rate.

Performing phase reconstruction and measuring refraction sensitivity at different IPFs
In equation (2) the intensity variations in the quotient image are exclusively due to sample refraction (assuming negligible scattering, which is reasonable for the thin samples considered here). For each IPF pair, R-function curves were used to translate the intensity variation into refraction angles (differential phase images). Finally, the standard deviation, σ ∆θ , was measured in a sufficiently large background region for the images retrieved at all IPF values. σ ∆θ represents the error on the retrieved refraction angle, hence, sample features that induce beamlet deviations below this threshold would be indistinguishable from the noise in the image.
We retrieved five (four) refraction images in total from five (four) pairs of mixed intensity images for the wire (insect leg) sample. To fulfill the conditions under investigation, we combined a various number of frames at each IPF. For example, to achieve 'constant detected statistics' at all IPFs, we summed an appropriate number of frames at lower IPFs to ensure that the mean background counts matched that of a single frame at the highest IPF. Thus, in this first case, images at lower IPFs were acquired with longer exposure times than the ones at higher IPFs. For retrieved images at 'constant exposure time', we used two frames at all IPFs, with a total exposure time of 14 s per IPF. Hence, at constant exposure time, images acquired at lower IPFs contained lower detected statistics.

Results
Figure 3(a) shows the normalised mixed intensity profiles of a sapphire wire at different IPFs (before phase reconstruction). In figure 3(a), the profiles were obtained by plotting across the sapphire wire (at different IPFs) and averaging over a number of rows, as shown in the inset. Differences between these profiles are noteworthy because, although the sample material is the same, the mixed-intensity signals at different IPFs have significantly different peak-to-peak contrasts. The experimental result reported here agrees with previous observations [35][36][37]. It shows that prior to phase reconstruction, lower IPF images exhibit higher contrasts, as well as a similarly increased noise level because a lower proportion of the pixel is illuminated by the incident beam. Figure 3(b) shows the corresponding R-function curves evaluated at these IPFs. The purpose of the R-function is to convert the intensity variations measured at the detector into refraction induced at the sample plane.
The y-axis of the plot in figure 3(b) shows the ratio of the two IC slopes (related to the ratio of mixed intensity images acquired on opposite sides of the IC), which are mapped unto the corresponding refraction angles reported on the x-axis. Furthermore, figure 3(b) makes it evident that, at lower IPFs, the gradient of the R-function curve increases. In general, these steeper curves imply higher sensitivity to small beam deviations. However, lower IPFs mean reduced fractions of the beamlets fall on the detector pixel and thus, fewer counted photons. As equation (3) suggests, refraction sensitivity is driven by both the noise and the gradient of IC slopes; hence both must be considered, and determining a position of maximum sensitivity requires identifying the optimal trade-off between the two. Figure 4 shows two comparisons using two sets of overlapped retrieved (refraction only) profiles. Figure 4(a) compares an experimentally calculated profile, extracted from a phase retrieved image at 50% IPF, against a theoretical profile for a sapphire wire calculated at the effective energy of the spectrum [27], considering only the object sampling and the material properties. Figure 4(b) compares the extracted experimental profiles from phase retrieved images at different IPFs against each other.

Phase reconstruction at different IPFs
The agreement between the two sets of profiles in figure 4(a) validates the accuracy of the reconstruction algorithm at 50%. The mean square error calculated on the experimental profile in figure 4(a) was 4 × 10 −12 . The comparison has been done using a single profile to avoid cluttering the image. However, the agreement between the profiles at all IPF values in figure 4(b) demonstrates that the profiles are all equivalent. Moreover, comparisons between the profiles in figure 4(b) and all mixed intensity ones in figure 3(a) make it apparent that the reconstructed refraction angle does not vary with IPF, as expected.

Comparing refraction sensitivity at approximately constant detected counts
The profiles in figure 4 were extracted from the corresponding phase retrieved images (at various IPFs) shown below in figure 5. All images have been displayed with the same grayscale window.
The first comparison was done for approximately 'constant detected statistics'. Here, we matched the mean background counts observed at lower IPFs to the one recorded in a single mixed intensity frame at 80% IPF. Hence, at each IPF, images were obtained by summing the appropriate number of frames that most closely fulfilled this condition; 1, 1, 2, 3, and 7 frame(s) were used for images acquired at 80%, 70%, 50%, 25%, and 12.5% nominal IPF values, respectively. Note that summing multiple frames is equivalent to acquiring a single frame with a corresponding increase in exposure time since the detector is a photon counter.
The panels in figure 5 show that, when approximately the same statistics are used, image quality varies as a function of the IPF. An inspection of image backgrounds at 80% and 25% IPFs (constituting the worst and best measurements, respectively) is sufficient to show that the image texture is grainier in the former than the latter. These observations are confirmed by table 1, where the values for σ ∆θ are reported for all images. In the tables below, we estimated the uncertainty on σ ∆θ by measuring the variance of the standard deviations measured within several local regions in the image background.
The trend in table 1 suggests that, for approximately equal detected counts, the refraction sensitivity at 25% IPF is best, Figure 5. Refraction images retrieved of a sapphire wire (nominal diameter = 280 µm) at various illuminated pixel fractions (80%, 70%, 50%, 25%, and 12.5% for (a)-(e), respectively) using a varying number of frames (see table 1), such that the detected counts are approximately the same at all levels. The number of frames used at each IPF is displayed above the respective images. Table 1. From left to right, the columns show the illuminated pixel fractions (IPFs), σ ∆θ measured in a small region in the refraction image background, the mean background counts in a flat field image, and the number of frames combined at each IPF to approximately match the counts in 1 frame at 80% IPF. which can be difficult to appreciate by qualitative inspection alone. In fact, the images in figures 5(c)-(e) at 12.5% and 50% IPFs are practically comparable with the one at 25% IPF, which is reflected in the similarity between their sensitivities. The values suggest that for experiments using high-flux sources/detectors with low counting rates, with no dose/exposure time limitations, acquiring multiple frames at lower IPFs can be more convenient, as it would lead to a higher sensitivity for a given overall number of counts.

Comparing refraction sensitivity at 'equal exposure time'
The images acquired at the various IPFs at constant exposure time have also been presented in figure 6. An equal number of frames were summed at each IPF, which corresponds to a total exposure time of 7 s per dithering step per IPF position (i.e. summing 2 frames on each side). Values for σ ∆θ at constant exposure time have been reported in table 2. This trend shows that refraction sensitivity at 50% and 25% IPFs are practically comparable, while the sensitivities at lower and higher IPFs are much worse.
However, the strong refraction and simple geometry of the wire does not lead to a full appreciation of how small differences in σ ∆θ affect the visibility of fine sample features.  This relationship is best demonstrated with a more appropriate sample, e.g. a biological sample, since, in general, they are characterised by unknown and often complex geometries with fine, weakly refracting features. Figure 7 presents refraction images of an insect leg reconstructed under the approximately 'constant detected statistics' condition. For this sample, the highest IPF was increased from 80% to 90%, which means that the number of frames at 25% and 12.5% IPFs used to match one frame at the highest IPF changed compared to the values given for the wire sample. The number of frames used for each IPF is displayed beside the IPF value above the differential phase images in figure 7. The image presented in figure 7(d) at 12.5% IPF represents an underestimation of the 'constant detected statistics' condition. Finally, images of the same sample were combined also on the basis of 'constant exposure time'. In figure 8, we combined all seven frames at each IPF in order to facilitate the comparison, as the overall higher statistics makes it easier to appreciate the variation in refraction sensitivity for weakly refracting details. Thus, it is easier to appreciate the disappearance of various details on the insect leg, especially its hairs.  It should be noted that the noise in figures 7 and 8 appears more pronounced compared to figures 5 and 6 because a narrower widowing was selected for the display to better highlight how the loss in refraction sensitivity translates into a loss of fine features in the image. In general, figures 7 and 8 conform to the general trends reported in tables 1 and 2, respectively.

Discussion
Firstly, since the theoretical profile is calculated without taking into account the specific set-up geometry used here, especially considering the additional distance z3, the agreement between the theoretical and experimental profiles validates the accuracy of the phase reconstruction algorithm. The results also conform to theoretical calculations that have demonstrated that the system's refraction sensitivity varies with the IC slope, the shape of which is determined by a combination of the focal spot size and widths of the respective mask apertures.
The values in table 1 suggest that for experiments using high-flux sources/detectors with low counting rates, acquiring multiple frames at lower IPFs would achieve a higher sensitivity for a given number of counts. However, it is worth noting that due to the proximity of the 70% and 50% IPF points to the point at 80% IPF, the images shown in figures 5 at these IPFs represent an under-and overestimation of this condition in terms of number of counts, respectively. In other words, only one frame was used to retrieve the images at 70% IPF and two were used at 50% IPF since these most closely fulfilled the 'constant detected counts' condition. Similarly, in figure 7(d), the image at 12.5% IPF, was underestimated. In this case, only seven frames were acquired and all were aggregated, whereas eight frames would have provided a better match.
For table 2, one might expect the position of optimal refraction sensitivity to be at 50% IPF, which would be accurate in the case of an ideal Gaussian IC. However, the experiment suggests that for this given set-up the optimal sensitivity is achieved at 25% IPF. The experimental IC, compared to an ideal Gaussian, is non-ideal. First, it was sparsely sampled at approximately the 11 nominal sample mask positions shown in figure 1(b), and typically only a few points along the IC slopes are used to perform the phase reconstruction. Finally, the IC has a non-zero offset. These factors make determining the position of optimum refraction sensitivity non-trivial, because the exact slope of the IC affects the signal and therefore the set-up sensitivity. A more finely sampled IC would lead to a more accurate interpolation/analytical fitting. Figure 8 makes it easier to appreciate the general trends reported in tables 1 and 2, respectively. The image at 90% IPF is acquired closer to the IC maximum, where the gradient is shallower, and therefore the sensitivity and dynamic range of the reconstruction is negatively affected. The hairs (arrow 3) on the leg completely disappear in this image. In this case, the low refraction sensitivity in the 90% IPF image causes the refraction induced by the insect leg hairs to fall below image noise. The images in figure 8 closely match the trend reported in table 2 since the hairs are most prominent in the retrieved images taken at 50% and 25% IPF, respectively, and are barely visible at other IPFs.

Conclusion
The work performed in this paper showed how the refraction sensitivity of an EI set-up varies as a function of IPF. The optimal refraction sensitivity was found to be at 25% IPF under the two investigated conditions. Furthermore, we propose a practical method for optimising the sensitivity of an XPC EI imaging set-up by exploiting its built-in capabilities. The proposed experimental procedure provides an alternative strategy to adapting EI set-ups and can also be adapted to other XPC methods that rely on characterising functions. Specifically, we demonstrate that images acquired at specific working points along any characterising curve can possess different sensitivities, and for the EI set-up, pairs of images acquired at any IPF can be used to correctly reconstruct the phase. For the most part, the study enables an evaluation of refraction sensitivity, which can inform hardware optimisations and upgrades. When combined with EI's high dynamic range, i.e. its ability to retrieve large refraction angles even at large misalignments, and its other reported advantages, it can broaden its applicability.