## Abstract

X-ray beams reflected from a single layer or multilayer coating are widely used for X-ray tomography, holography, and X-ray phase contrast imaging. However, the observed irregular stripe patterns from either unfocused or defocused beams often cause disturbing artifacts and seriously deteriorate the image quality. In this work, we investigate the origin of these irregular fine structures using the wave optics theory. The connection to similar results obtained by the geometric optics theory is also presented. The proposed relation between the second derivative of the wavefront and the irregular structures was then verified by conducting at-wavelength metrology with the speckle-based wavefront sensing technique. This work will not only help to understand the formation of these irregular structures but also provide the basis for manufacturing future ‘stripe-free’ refection optics.

© 2021 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

## 1. Introduction

Modern synchrotron and X-ray free electron laser facilities provide brilliant X-ray beams that enable X-ray imaging for a wide range of applications. For many X-ray imaging experiments, the requirement for energy resolution is relatively moderate, while the demand for high photon flux is always increasing. Therefore, multilayer mirrors or multilayer monochromators are often used for X-ray imaging to deliver high photon flux [1,2]. Besides, X-ray focusing mirrors with a single layer or multilayer coating are often used for X-ray full field microscopy thanks to their high efficiency and inherent achromaticity [3,4]. However, irregular stripe patterns can often be observed in the reflected beam [1–6]. In principle, these artifacts can be removed with standard flat field correction by normalizing the sample image with the flat beam image. Nevertheless, the irregular stripe pattern becomes a problematic issue when the beam is unstable, or the data acquisition time is long. Then these irregular structures in the flat field images will cause image artifacts during data processing and inevitably deteriorate the image quality [1,7,8]. Despite the various approaches developed [7–9] to remove the irregular stripes’ effect, it will be desirable to figure out the reason for the formation of these irregular structures and minimize such an effect during the experiment. A comparative study has been made to choose the optimum material combination for mirror coating to create a relatively smooth beam profile, but the stripe patterns always exist whatever the choice of material combination [5]. The surface imperfections of the mirror substrate are thought to be the main cause of the stripe patterns [2]. Even though the substrate was polished down to 1nm RMS [3] with state-of-the-art elastic emission machining (EEM), noticeable stripe patterns still appear [9]. Therefore, it is crucial to understand the cause of these stripes in order to improve the beam quality. A deeper understanding will also allow us to set suitable specifications of X-ray reflection optics and improve the surface quality during the polishing process.

Great efforts have been made to connect the reflected defocusing image structures and the second derivative of the wavefront [10–18]. This connection can be set either by wave optics theory, which considers the diffraction integral [10–14], or even by the simpler geometrical optics theory [15–18]. However, none of the present works, to the best of our knowledge, provides a satisfying explanation for this connection in terms of wave optics theory. Although different theoretical approaches were applied, no direct experimental validation has been made in the early works due to the lack of appropriate characterization methods. Recently, a possible connection of the measured second derivative of the wavefront to the fine structures of the reflected image has been pointed out [19], but the related theory was not explained thoroughly.

In this paper, we will give a thorough explanation of the origin of the irregular flat field image structures usually observed from the beam reflected by monochromators, plane mirrors, or by the focusing mirrors while the detector is placed out of focus on purpose. We use the Kirchhoff-Fresnel diffraction integral from the beginning. By using the stationary phase approximation [20], we point out that for these situations the results obtained from wave optics theory are equivalent to that obtained from geometric optics theory. At the end of the theoretical part, we have successfully derived that the irregular fine structures in the flat field image are caused by the second derivative of the wavefront, and further, by the second derivative of the surface error of the optical elements. Importantly, this correlation has been verified experimentally by using the speckle-based wavefront sensing technique. Several cases including both multilayer and single layer coating optics have been studied to demonstrate the validation of the derived theoretical explanation.

This paper is organized as follows. Section 2 gives a theoretical treatment for the case when the beam is not focused on the detector. A brief introduction of the principle of the speckle-based technique is given in section 3. Section 4 shows various experimental results for the verification of the theory proposed in section 2.

## 2. Theory

We restrict ourselves to the plane mirror at first. The conclusions obtained by applying wave optics to a plane mirror also hold for a mirror that is curved but does not focus the beam onto the detector. It will be shown that this wave-optical treatment yields results similar to those of geometrical optics if some moderate assumptions are made. We will then treat the case of a focusing mirror on a similar way. The theoretical derivation in this section sets an easy way to pass from physical optics to geometrical optics via the stationary phase approximation.

We confine the treatment to the 1D case and assume that the mirror is an ideal reflector along its whole length in this paper. This is reasonable due to the very small grazing angle of the X-ray mirror [21]. Suppose the incident beam comes from a point source. We begin with the setup of the coordinate systems as shown in Fig. 1. Four sets of coordinate systems should be defined for convenience. The point source is defined as the origin of the source coordinate system *x _{s}O_{s}z_{s}*. The

*x*axis is parallel to the main propagation direction of the source, while the other two axes are orthogonal to the

_{s}*x*axis. The distance between the point source and the mirror center is

_{s}*D*. We then define a fixed image plane coordinate system. This fixed coordinate system will be used only when we name a certain point

*z*on the fixed image plane for our consideration. This coordinate system is not shown in Fig. 1 to avoid unnecessary confusion. This fixed coordinate system is defined as

_{i}*x*. It is located at distance

_{fi}O_{fi}z_{fi}*F*from the mirror center and the

*z*axis is perpendicular to the main reflected beam from the mirror center. The

_{fi}*x*axis is parallel to the reflected line from the mirror center. Another movable image plane coordinate system

_{fi}*x*can be defined for convenience. The

_{i}O_{i}z_{i}*x*axis is parallel to the main reflected direction of the beam, while the other two axes are orthogonal to the

_{i}*x*axis. We set the origin of the movable coordinate system

_{i}*x*to be the certain point

_{i}O_{i}z_{i}*z*that is considered on the fixed image plane. As a result, the origin of the movable image plane coordinate system moves along the observation plane for different investigated image points. When the origin of the mirror surface coordinate system is the center of the mirror, the

_{i}*x*coordinate system overlaps with the fixed

_{i}O_{i}z_{i}*x*coordinate system. The mirror coordinate system

_{fi}O_{fi}z_{fi}*xOz*is defined as follows. If the mirror is a perfect plane, there exists a virtual point source according to the law of reflection. The origin of the mirror coordinate system

*xOz*is then the intersection of the perfect mirror surface and the nominal reflected line, as shown in Fig. 1. The reflected line connects the origin of the movable coordinate system

*x*, which is also the point under consideration on the fixed image plane, and the virtual point source. The mirror coordinate system

_{i}O_{i}z_{i}*xOz*thus moves along the ideal mirror surface plane. The

*x*axis of the mirror surface coordinate system is parallel to the ideal plane mirror surface, the

*z*axis is along the normal of the ideal plane.

*z*(

*x*) in the mirror coordinate system represents the mirror surface height error.

**represents the real local mirror normal vector. As shown in Fig. 1, both the main grazing angle and reflected angle are**

*n**θ*. The distance of the point source to the origin of the mirror coordinate system is

*d*, while the distance of the origin of the mirror coordinate system to the origin of the movable image coordinate system is

*f*. When

*O*is the mirror center, we have

*d*=

*D*and

*f*=

*F*. Note that

*θ*,

*d*, and

*f*are slow varying quantities along the ideal mirror surface. Thus, these quantities are slowly varying functions of

*z*. For short mirrors, the change of

_{i}*θ*,

*d*, and

*f*can be negligible.

The distance from the point source to an arbitrary point (*x*, *z*(*x*)) on the mirror surface is:

The distance from an arbitrary point (*x*, *z*(*x*)) on the mirror surface to a certain point on the movable image plane is:

We stress here that the choice of the coordinate systems for Eq. (1) and (2) are described in the above. We thus have the following expansions for *q*(*x*) and *s*(*x*):

For a certain observation point *z _{i}* on the fixed image plane, the amplitude of the electric field from a point source or single electron radiation can be calculated using the Fresnel-Kirchhoff diffraction formula:

In the above equation, *k*=1/*λ*, *λ* is the wavelength, and *I*(*x*) is the beam intensity distribution along mirror. In the paraxial case, cos*θ*_{1} and cos*θ*_{2} are very close to 1. For X-rays, *k* is very large, and the phase term therefore oscillates rapidly unless *q*’(*x*) + *s*’(*x*) ≈ 0. *I*(*x*) is assumed to be an analytic function. Equation (4) can be evaluated by stationary phase method [20], which states that an integral of the form

*X*in Eq. (6) are stationary points, for which

_{j}*h*’(

*X*) = 0. It is assumed that

_{j}*h*’’(

*X*)≠0 for all

_{j}*j*. The sign function in Eq. (6) is defined as sign[

*h*’’(

*X*)] =

_{j}*h*’’(

*X*)/|

_{j}*h*’’(

*X*)|. Using the stationary phase method, Eq. (4) has the following approximation:

_{j}Equation (7) shows that for a certain point on the image plane, the main contribution to the electric field distribution comes from those stationary points. The stationary phase method assumes a large *k* or small wavelength *λ* equivalently. Then there is no surprise that the derived result from the stationary phase method, at last, shares its general properties with pure geometrical optics. Before we do a more detailed calculation, we assume that at a certain observation point on the fixed image plane, only a single stationary point contributes to the final electric field intensity distribution. This assumption is reasonable for several reasons. Firstly, if the mirror does not focus the beam on the image plane, the intensity at a certain observation point on the final observation plane is provided by only a very small part of the optical element. This can be understood by using Fermat’s principle of least time [22]. There is usually only one route for the least light ray travel time from the source to a certain point far from the focal plane. However, this assumption is not true for the focal point, where a large number of routes have the same travel time. Secondly, mirror surfaces used in X-ray optics are in general very smooth. Because of that, when the mirror does not focus, the chance of more than one deviated reflected ray from different parts of the mirror arriving on the same point on the observation plane is very low. Therefore, only specular reflection and not diffuse scattering is considered.

In the following, we will show that these stationary points have a very simple geometrical interpretation. From Eq. (3), *q*’(*x*)+*s*’(*x*) has the following form:

We assume |*z*’(*x*)|<<sin*θ* in the above equation. This is always true for very smooth mirrors which are usually used in X-ray optics. Next, we assume that the aperture angle seen from the point source as well as from a certain image plane point is much smaller than tan*θ*, where *θ* is the nominal reflected angle. This is also a reasonable assumption. Referring to Fig. 1, the coordinate (*x*, *z*(*x*)) in the mirror coordinate system is transformed to (*d *+ *x*cos*θ*-*z*(*x*)sin*θ*, *x*sin*θ*+*z*(*x*)cos*θ*) in the source coordinate system. Likewise, the same mirror coordinate is transformed to (-*f *+ *x*cos*θ*+*z*(*x*)sin*θ*, -*x*sin*θ*+*z*(*x*)cos*θ*) in the movable image coordinate system. Mathematically, this assumption means:

Under these assumptions, Eq. (8) can be further approximated as:

Thus, the condition *q*’(*X _{j}*)+

*s*’(

*X*) = 0 leads to:

_{j}We point out again that the coordinate (*X _{j}*,

*z*(

*X*)) in mirror coordinate system is transformed to (

_{j}*d*+

*X*cos

_{j}*θ*-

*z*(

*X*)sin

_{j}*θ*,

*X*sin

_{j}*θ*+

*z*(

*X*)cos

_{j}*θ*) in source coordinate system. The second term in Eq. (11) is then the deviation of the incident angle with respect to the main incident direction referring to Fig. 1. Likewise, the third term in Eq. (11) represents the deviation with respect to the main reflected direction. Equation (11) shows that the stationary points are those at which the height error

*z*(

*x*) has the correct slope

*z*’(

*x*) to reflect an incident ray to the observation point on the image plane. In other words, at the stationary points, the propagation of the beam obeys geometric optics theory locally.

The second derivative of *q*(*x*)+*s*(*x*) is:

Similar to the previous procedure, under the assumption of |*z*’(*x*)|<<sin*θ* and Eq. (9), the above equation can be further approximated as:

We have assumed earlier that only one stationary point contributes strongly to the final intensity distribution at one fixed point on the image plane. As a result, combining the above equations, the intensity distribution at a certain observation point *z _{i}* is:

We omit the constant coefficient in the above equation, just to show the main relationship between the intensity and the surface error. Note in the above equation, as the observation point *z _{i}* changes,

*d*,

*f*, and

*θ*all change slowly. If the mirror is short enough, these quantities can be approximated as constants.

The second derivative of the mirror surface error *z*’’(*x*) in Eq. (14) is evaluated with respect to the mirror surface coordinate. Although the mirror surface coordinate system moves along the ideal mirror plane for different observation points on the fixed image plane, the second derivative of mirror surface height error *z*(*x*) does not change with these coordinate systems. What can be measured from the experiment is the wavefront or its derivative on the observation plane. Thus, we should project the distortion from the mirror surface to the plane that is parallel to the observation plane. On that plane, the wavefront from the point source has the mean radius of curvature *d.* The local variation from the mean spherical wavefront is the second derivative of the mirror wavefront distortion −2*z*(*X _{j}*)sin

*θ*with respect to the new coordinate

*z*’,

_{i}*z*’≈

_{i}*X*sin

_{j}*θ*. The following relation is then satisfied:

In Eq. (15), *W*’’(*z _{i}*’) is the second derivative of the wavefront in terms of the coordinate

*z*’, while

_{i}*z*’’(

*X*) is the second derivative of the surface error with respect to the mirror coordinate

_{j}*x*. The intensity distribution on the final observation plane

*I*(

*z*) is simply a slightly magnified distribution of

_{i}*I*(

*z*’) with a scaling factor of (

_{i}*d*+

*f*)/

*f*. Because of that, we rewrite Eq. (14) using the coordinate

*z*’. The intensity distribution on the final observation plane is obtained through scaling with the factor (

_{i}*d*+

*f*)/

*f*. Other terms in Eq. (14) vary very little compared to

*z*’’(

*x*), thus we have the following approximate correspondence:

As indicated by Eq. (11), when the mirror does not focus, wave optics results are, to a large extent, equivalent to geometrical optics results. Then it is no surprise that similar results can be found from ray tracing simulations [18]. In [18], a focusing mirror whose focus is off the detector is discussed. We show that this case is not very different from the plane mirror. Figure 2(a) shows the case of a plane mirror and Fig. 2(b) shows a focusing mirror with the detector off the focus. For the plane mirror, the physical model is the wavefront from a virtual point source being distorted at the mirror surface and then propagate to the final observation plane. For the focusing mirror, the focal point can be viewed as the virtual source in Fig. 2(a). The distorted wavefront before the focal plane is the same as at the same distance after the focal point. The physical model after the focal plane in Fig. 2(b) is then the same as Fig. 2(a). Thus, the discussions for a plane mirror can be applied with little modifications to a focusing mirror whose focus is off the detector.

Equation (16) sets the relationship between the intensity and the second derivative of the wavefront. Usually, 1/(*f*- *X _{j}*cos

*θ*)>>

*W*’’(

*z*’), thus, by using Maclaurin expansion and neglecting the slowly varying terms, the intensity distribution is simply proportional to the second derivative of the wavefront:

_{i}Similar to [18], if the source has a finite size such as the radiation from an electron bunch, the final intensity distribution is a convolution of the electron bunch distribution *G*(*z _{i}*’) and the single electron radiation:

In summary, under some moderate assumptions, we have set a relatively simple relationship between the second derivative of the wavefront and the fine structures which appeared in the de-focused images. From the more rigorous wave optics, using the stationary phase method, we set an easy pass to this result which is already obtained from geometrical optics. Note that the stationary phase approximation is not limited to the case where the detector is far from the mirror’s focal plane. It can also account for wave-optical effects when the detector is on the focal plane, where multiple stationary points can contribute to the intensity at one point on the detector.

## 3. At-wavelength metrology

We use the speckle-based *in situ* and at-wavelength wavefront sensing technique to measure the second derivative of the X-ray wavefront. The speckle-based technique tracks the movement of the speckle pattern to obtain the slope error or the local curvature information of the tested optical element. The speckle pattern can be generated by simply putting abrasive paper into the X-ray beam. Other materials such as cellulose acetate membrane [23] can also be used as long as there is a random modulation of the beam. There are several experimental implementations for the speckle-based technique [19,24–28]. To speed up the data acquisition time, the one-dimension (1D) X-ray speckle scanning (XSS) method is used in this work. The XSS method enables the pixel-wise analysis of the wavefront to achieve high spatial resolution.

The wavefront of the X-ray beam is denoted as *W*(*x, y*). Then the local propagation direction of the wavefront, the direction of the rays in terms of the geometric optics, is parallel to the vector ∇*W*(*x, y*) where ‘∇’ means the gradient of the wavefront. The speckle grains serve as the markers of the wavefront. When moving the speckle generator, the speckle pattern on the detector plane will move accordingly. The whole displacement of the speckle pattern comes from both speckle generator movement and the wavefront propagation. By tracking the speckle movement on the detector plane, the local propagation direction of the wavefront can be recovered.

The experimental setup for the XSS technique has been sketched in Fig. 3(a). The speckle generator can be placed upstream or downstream of the tested optical elements. For the 1D XSS technique, the speckle generator should be scanned vertically or horizontally. In general, the scan direction has a better spatial resolution than its orthogonal direction thanks to the high precision moving stage [29]. As a result, the scan direction should be in accordance with the setting of the tested optical element. As shown in Fig. 3(a), if the tested mirror is facing sideways, the scan direction should be set parallel to the *x* axis to achieve the best spatial resolution along the mirror length direction.

In principle, two scan modes can be used in the XSS technique. For the differential mode, the slope error of the tested optical element can be directly obtained when the reference beam images are used [19,26,28]. For the self-correlation mode, when the reference beam is not available or not needed, we can use only one stack of speckle images by tracking the speckle displacement between the nearby pixels [25]. The local curvature of the wavefront can be directly obtained from the self-correlation mode. In this case, the measured wavefront consists of the incident beam wavefront and the modulation of the tested sample. Recall that in section 2 we set the relationship between the intensity distribution and the local curvature of the wavefront at the CCD plane. The self-correlation mode from the XSS technique provides us an ideal tool for the experimental verification. Because of this, we will only focus on self-correlation analysis from the XSS technique throughout this paper.

One image is taken at each moving step of the speckle generator in the 1D XSS technique. Thus, a stack of images will be acquired after the whole 1D scan. In order to get pixel-wise resolution, a single row of one image is taken out to be analyzed if the speckle generator is moved vertically. These single rows from each image in the image stack will be stitched together to a whole 2D image. As the name indicates, cross-correlation is needed for self-correlation analysis as for other speckle-based techniques. The two images to be cross-correlated are those taken from the stitched rows [25]. The *i*th and the *j*th row of each image from the image stack are taken out to be cross correlated. The correlation function is used to determine the displacement *iy* between the two chosen images with sub-pixel accuracy [30]. The displacement *iy* is in the unit of speckle generator scanning step *s*. As shown in Fig. 3(b), if the local wavefront directions at the two positions corresponding to the two rows (*i*th and *j*th) on the CCD plane are the same, the nominal displacement of the two images should be the displacement *iy* times the speckle scanning step *s* rather than the (*j-i*) times the pixel size *p*. This discrepancy is caused by the different local wavefront propagation direction at the two positions on the CCD plane. In other words, if there is no wavefront direction error, the real displacement (*j-i*)×*p* of the two chosen images is equal to the tracked displacement *iy*×*s* of the image features. The distance between the mirror center and the CCD plane is *d*. The change of local wavefront propagation direction is Δ(∂*W*/∂*y*). We have the following relation:

The change of local wavefront propagation direction Δ(∂*W*/∂*y*) divided by (*j*-*i*)×*p* equals the second derivative of the wavefront ∂^{2}*W*/∂*y*^{2} approximately. The second derivative of the wavefront or the reciprocal of the local radius of curvature *R _{y}* thus is

The above equation shows that the local radius information at the CCD plane can be obtained through the XSS technique using the self-correction analysis. The same equation can be obtained if the speckle generator moves horizontally. In that case, just choose two columns on the CCD plane instead of two rows. An equivalent way of getting the above equations is to set the relationship between the local wavefront radius of curvature and the local magnification factor, this can be found in [24]. In any case, self-correlation analysis with the XSS technique can obtain the local radius of curvature of the wavefront or the second derivative of the wavefront directly. As a result, this technique provides us an ideal method to verify the theory proposed in the previous section.

## 4. Experiment

#### 4.1 Brief introduction on experiments

The experiments were conducted at the Diamond Light Source Test beamline B16 with a bending magnet source [31]. The vertical source size (RMS value) is about 14.6µm. A monochromatic beam was used for the experiments. There are two ways of generating monochromatic beam in B16, namely, through the double crystal monochromator (DCM) and the double multilayer monochromator (DMM). Three separate experiments were conducted. The speckle technique has been used for all the experiments. We first investigated the striations that come from the DMM. Then we measured two different plane mirrors. The experiment setup is shown in Fig. 3(a). Sandpapers with grain sizes around 1µm to 3µm were used as speckle generators. These sandpapers were mounted on nano-precision moving stages with 2D scanning ability. The 2D scan stages were located at around 41m from the source. The investigation of the DMM was conducted in the absence of plane mirrors. In other words, the sandpaper was placed downstream of the tested optical element for the investigation of DMM striations. For the measurement of plane mirrors, the sandpaper was placed upstream of the tested optical elements. The images were recorded by a CCD camera integrated with a scintillator attached to an optical lens system. The effective pixel size can be changed by adjusting the lens system [32]. The specific experiment parameters for different experiments will be given in the following discussions.

#### 4.2 Experiment of DMM

There are two lanes of bilayer coatings on the DMM for different energy coverage. One lane is deposited with Ni/B_{4}C bilayers, the other one is deposited with Ru/B_{4}C bilayers. We used 10keV for the Ni/B_{4}C and 15keV for the Ru/B_{4}C bi-layers for the at-wavelength measurements. The effective pixel size of the detector for the DMM investigation was 0.69µm. The detector was placed about 1.24m from the speckle generator. The 1D scan was performed along the vertical direction, which is *y* axis as shown in Fig. 3(a). The scan step was set to 1µm.

Figure 4 shows the results obtained for Ru/B_{4}C bilayers. The 2D information is shown in Fig. 4(a). The two images shown here are both rotated 90° clockwise. The top of Fig. 4(a) is the intensity distribution obtained by the CCD. The 1D information which corresponds to the dashed lines in Fig. 4(a) is shown at the top of Fig. 4(b). The bottom of Fig. 4(a) is the 2D information of the second derivative of wavefront ∂^{2}*W*/∂*y*^{2}. The second derivative of the wavefront is calculated using the method introduced in section 3, from Eq. (20). The speckle generator is scanned vertically along the *y* axis to match the vertical reflection of the DMM. The corresponding 1D ∂^{2}*W*/∂*y*^{2}is shown at the bottom of Fig. 4(b) with a black dashed line. According to the theory in section 2, the 1D ∂^{2}*W*/∂*y*^{2} should convolve with a Gaussian distribution which represents the vertical source size. The *σ* of the Gaussian distribution is about 14.6µm, in this case around 21 pixels on the CCD. The red solid line at the bottom of Fig. 4(b) shows the convolved ∂^{2}*W*/∂*y*^{2}.

Figure 5 shows the similar results obtained for Ni/B_{4}C bilayers. Figure 5(a) shows the images of the 2D intensity and ∂^{2}*W*/∂*y*^{2}, respectively. The comparison between the intensity and the convolved ∂^{2}*W*/∂*y*^{2} distribution along the dashed line is shown in Fig. 5(b). The Gaussian distribution for convolution is the same as in Fig. 4. The Pearson correlation coefficient is much lower than for the Ru/B_{4}C bilayers. This is due to the poor ∂^{2}*W*/∂*y*^{2} raw data quality as shown in Fig. 5(b).

The comparison of the convolved ∂^{2}*W*/∂*y*^{2} and the intensity distribution in Fig. 4(b) and Fig. 5(b) gives us a strong indication of the connection between the second derivative of wavefront and the fine structures of the intensity image. Although the correlation coefficient is not high, especially for Ni/B_{4}C bilayers, the ∂^{2}*W*/∂*y*^{2} curve and intensity curve show a similar trend. This connection can be explained from the theory described in section 2.

Several possible reasons account for the discrepancy of the second derivative of wavefront and the de-focused intensity image. First, we arrived at the relatively simple theoretical result in section 2 by dropping the incident beam intensity term, from Eq. (14) to Eq. (16). This is because the second derivative of the wavefront is insensible to the slow varying of the intensity distribution. If the incident beam has strong local (high frequency) distortion especially in the orthogonal direction to the speckle generator scan direction, this local distortion cannot be detected by 1D XSS scan but can be observed from the intensity image. Meanwhile, the low-frequency features of the intensity distribution are also invisible from the second derivative of the wavefront. Second, the accuracy of the 1D XSS experiment depends strongly on the incident beam intensity and on the sensitivity of the detector system because both these factors influence the signal-to-noise ratio (SNR) of the measurement. With the same CCD camera, scintillator and lens (see Section 4.1), the recorded intensity of the speckle images produced by Ni/B_{4}C at 10keV was only one-third as strong as that of the speckle images produced by Ru/B_{4}C at 15keV. Although the spectral power in W/eV emitted by the bending magnet is about 1.5 times greater at 10keV than at 15keV, the estimated air path of roughly 2m cancels this out. In addition, the two multilayer coatings may have different reflectivity, or the DMM may not have been tuned to its maximum output flux. The lower intensity reaching the detector at 10keV reduces the SNR and thus the accuracy of the sub-pixel cross-correlation algorithm, thus worsening the quality of the obtained ∂^{2}*W*/∂*y*^{2}. However, there is room to improve the quality of the data collection at 10 keV, both by retuning the DMM and by increasing the effective pixel size with a less strongly magnifying lens. The current poor correlation for the Ni/B_{4}C multilayer therefore does not indicate a fundamental flaw in the XSS technique. Third, the DMM was vibrating all the time during the data acquisition. The vibration frequency is about tens to hundreds of hertz while the single-image acquisition time is about 2s and the whole data acquisition time is around several minutes. The DMM vibration will also influence the subpixel accuracy of the cross-correlation calculation. This can further lower the SNR and thus the acquired ∂^{2}*W*/∂*y*^{2} data quality. Fourth, the convolution operation used when dealing with the vertical source size effect may be debatable [33]. Further, for two very close points on the detector plane, interference may take place. As a result, the moderate assumptions made in section 2 may not be applied. This can be distinct when the detector pixel size is very small and the detector to speckle generator distance is very large. Because of the above possible reasons, the Pearson correlation coefficients for the DMM experiment results cannot be very high. Nevertheless, the similar trend which is shown both in Fig. 4(b) and Fig. 5(b) strongly indicates the connection of the second derivative of the wavefront and the fine structures presented in the intensity image.

#### 4.3 Experiment of plane mirror 1

We also measured the plane mirrors using the speckle-based at-wavelength technique. The tested plane mirror 1 is 450mm long with one lane of nickel coating on the silicon substrate. The monochromatic beam of 15keV comes from the DMM was used for the measurement. As mentioned in the above section, the DMM was vibrating all the time. This constant vibration will severely impact the data quality of the acquired second derivative of the wavefront. In order to decouple the vibration caused by the DMM and gain better stability, the tested plane mirrors were facing sideways as shown in Fig. 3(a). Another reason for this setting is to decouple the incident beam structures, which usually appear as horizontal stripes along the *x* axis. Unlike the DMM striations investigation in section 4.2, here the speckle generator was scanned horizontally along the *x* axis. The scan step was set to 1µm. The grazing angle of the mirror was 3mrad. The detector was placed around 0.83m from the mirror center. The effective detector pixel size was 1.07µm. The slope error can also be obtained by the speckle-based at-wavelength technique. The slope error of this 450mm-long mirror is around 1.08µrad.

Figure 6 shows the 2D images. Figure 6(a) shows the 2D intensity distribution. Note that the horizontal stripes on the image come from the DMM. Figure 6(b) shows the 2D map of the second derivative of the wavefront ∂^{2}*W*/∂*x*^{2}. We can see some good matches between the intensity structures and ∂^{2}*W*/∂*x*^{2}. Especially all the vertical stripes in the intensity distribution can find their counterparts from 2D ∂^{2}*W*/∂*x*^{2} distribution. Note that no convolution is performed for the mirror case. This is because the beam from the bending magnet in the horizontal direction is generated from an arc of the electron trajectory, and therefore the horizontal beam is uniformly extended. *I*(*x*) in Eq. (4) is constant when considering the electron bunch effect. As a result, there is no intensity variation in the horizontal direction and no need for convolution.

#### 4.4 Experiment of plane mirror 2

The most obvious disadvantage of the beam after the DMM is the apparent striations appearing on the acquired intensity image. To eliminate the obvious striations coming from the incident beam, a second, smoother mirror was measured using a beam after the DCM. The beam energy is also 15keV. Plane mirror 2 is a longer plane mirror with a total length of around 1m. The plane mirror 2 has no coatings on its silicon substrate. In order to get better stability, this mirror was also facing sideways. Thus, the experimental layout is almost the same as the plane mirror 1. The mirror grazing angle was 2mrad. The detector was placed around 1.7m from the mirror center. The effective detector pixel size is 3.0µm.

The RMS slope error of plane mirror 2 is around 0.17µrad. This mirror is smoother by about one order of magnitude than plane mirror 1. However, from Fig. 7(a) we can still see fine structures from the reflected image. As seen from Fig. 7(b), some good matches between the fine intensity structures and the second derivative of the wavefront ∂^{2}*W*/∂*x*^{2} can also be observed. These images are rotated 90° clockwise. Again, no convolution is needed. We point out some structures from the intensity distribution originate from the DCM, such as the large bright area on the upper-right of Fig. 7(a). Because the scan direction is not along the DCM reflection direction, the image structures formed from the DCM surface waviness cannot be detected by the 1D scan in its orthogonal direction.

To investigate the connections of the intensity fine structures and ∂^{2}*W*/∂*x*^{2} quantitatively, four line segments are extracted from Fig. 7(a) and Fig. 7(b). These line profiles are shown in Fig. 7(c). Like the previous section, the Pearson correlation coefficients are calculated. The correlation coefficients are 0.80, 0.66, 0.58 and 0.52, respectively. Besides, we also choose four rectangular regions from Fig. 7(a) and Fig. 7(b) for comparison. There are several criteria to evaluate the resemblance of two images. Here we use the *OpenCV* image processing library and the *TM_CCOEFF_NORMED* criterion for our evaluation. The correlation coefficient will be 1 if the two images are exactly the same. For detailed information, please refer to [34]. The calculated correlation coefficients for these four rectangular areas are 0.86, 0.67, 0.71 and 0.74, respectively.

The possible reasons for the discrepancy between the intensity image and the ∂^{2}*W*/∂*x*^{2} image are similar to those proposed in section 4.2 even though the mirrors are much more stable. In any case, the experimental results for the plane mirrors again show strong connection between the intensity fine structures and the second derivative of the wavefront. The theory behind this has been discussed in section 2.

## 5. Conclusion

To fully understand the origin of the irregular fine structures of the reflected X-ray beam, we have thoroughly derived the relationship between the second derivative of the wavefront and the stripe pattern of the flat field image by using wave optics theory under the stationary phase approximation. The speckle-based at-wavelength metrology technique provides us a unique way to verify the proposed relation. These experimental results agree well with the theoretical model. The results indicate that not only the mirror slope error, which relates to the first derivative of the wavefront, but also the mirror’s local radius of curvature, which relates to the second derivative of the wavefront, should be considered and properly specified for the X-ray mirrors used in some X-ray imaging applications. It should be noted that most of the present ex-situ metrology techniques can provide either the height error or the slope error. Although the mirror’s local radius of curvature can be derived from the measured slope error, the accuracy for the retrieved local radius of curvature will impact the prediction of the irregular stripe pattern. The high precision in-situ and at-wavelength metrology can be considered as a better way to overcome this limitation and help to improve the present wavefront performance and achieve ‘stripe free’ beam for future reflection optics.

## Funding

Diamond Light Source (NR26501); European Metrology Programme for Innovation and Research (730872).

## Acknowledgments

We thank Dr. Oliver Fox and Andrew Malandain for their experimental supports.

## Disclosures

The authors declare no conflicts of interest.

## References

**1. **M. N. Boone, F. Van Assche, S. Vanheule, S. Cipiccia, H. Wang, L. Vincze, and L. Van Hoorebeke, “Full-field spectroscopic measurement of the X-ray beam from a multilayer monochromator using a hyperspectral X-ray camera,” J. Synchrotron Radiat. **27**(1), 110–118 (2020). [CrossRef]

**2. **A. Rack, C. Morawe, L. Mancini, D. Dreossi, D. Parkinson, A. MacDowell, F. Siewert, T. Rack, T. Holz, and M. Krämer, “Reflection on multilayer mirrors: beam profile and coherence properties,” in * Advances in X-Ray/EUV Optics and Components IX*(International Society for Optics and Photonics, 2014), p. 92070V.

**3. **C. Morawe, R. Barrett, P. Cloetens, B. Lantelme, J.-C. Peffen, and A. Vivo, “Graded multilayers for figured Kirkpatrick-Baez mirrors on the new ESRF end station ID16A,” in * Advances in X-Ray/EUV Optics and Components X*(International Society for Optics and Photonics, 2015), p. 958803.

**4. **S. Matsuyama, S. Yasuda, J. Yamada, H. Okada, Y. Kohmura, M. Yabashi, T. Ishikawa, and K. Yamauchi, “50-nm-resolution full-field X-ray microscope without chromatic aberration using total-reflection imaging mirrors,” Sci. Rep. **7**(1), 46358 (2017). [CrossRef]

**5. **A. Rack, T. Weitkamp, M. Riotte, D. Grigoriev, T. Rack, L. Helfen, T. Baumbach, R. Dietsch, T. Holz, and M. Krämer, “Comparative study of multilayers used in monochromators for synchrotron-based coherent hard X-ray imaging,” J. Synchrotron Radiat. **17**(4), 496–510 (2010). [CrossRef]

**6. **C. Morawe, R. Barrett, K. Friedrich, R. Klünder, and A. Vivo, “Spatial coherence studies on x-ray multilayers,” in * Advances in X-Ray/EUV Optics and Components VI*(International Society for Optics and Photonics, 2011), p. 813909.

**7. **V. Van Nieuwenhove, J. De Beenhouwer, F. De Carlo, L. Mancini, F. Marone, and J. Sijbers, “Dynamic intensity normalization using eigen flat fields in X-ray imaging,” Opt. Express **23**(21), 27975–27989 (2015). [CrossRef]

**8. **B. Münch, P. Trtik, F. Marone, and M. Stampanoni, “Stripe and ring artifact removal with combined wavelet—Fourier filtering,” Opt. Express **17**(10), 8567–8591 (2009). [CrossRef]

**9. **M. Hubert, A. Pacureanu, C. Guilloud, Y. Yang, J. C. da Silva, J. Laurencin, F. Lefebvre-Joud, and P. Cloetens, “Efficient correction of wavefront inhomogeneities in X-ray holographic nanotomography by random sample displacement,” Appl. Phys. Lett. **112**(20), 203704 (2018). [CrossRef]

**10. **I. A. Schelokov, O. Hignette, C. Raven, A. A. Snigirev, I. Snigireva, and A. Suvorov, “X-ray interferometry technique for mirror and multilayer characterization,” in * Multilayer and Grazing Incidence X-Ray/EUV Optics III*(International Society for Optics and Photonics, 1996), pp. 282–292.

**11. **A. Suvorov, H. Ohashi, S. Goto, K. Yamauchi, and T. Ishikawa, “One-dimensional surface profile retrieval from grazing incidence images under coherent X-ray illumination,” Nucl. Instrum. Methods Phys. Res., Sect. A **616**(2-3), 277–280 (2010). [CrossRef]

**12. **A. Rommeveaux and A. Souvorov, “Flat x-ray mirrors as optical elements for coherent synchrotron radiation conditioning,” in * X-Ray Optics Design, Performance, and Applications*(International Society for Optics and Photonics, 1999), pp. 70–77.

**13. **A. Souvorov, M. Yabashi, K. Tamasaku, T. Ishikawa, Y. Mori, K. Yamauchi, K. Yamamura, and A. Saito, “Deterministic retrieval of surface waviness by means of topography with coherent X-rays,” J. Synchrotron Radiat. **9**(4), 223–228 (2002). [CrossRef]

**14. **F. Roddier, “Curvature sensing and compensation: a new concept in adaptive optics,” Appl. Opt. **27**(7), 1223–1225 (1988). [CrossRef]

**15. **D. Spiga, S. Basso, M. Bavdaz, V. Burwitz, M. Civitani, O. Citterio, M. Ghigo, G. Hartner, B. Menz, and G. Pareschi, “Profile reconstruction of grazing-incidence X-ray mirrors from intra-focal X-ray full imaging,” in * Optics for EUV, X-Ray, and Gamma-Ray Astronomy VI*(International Society for Optics and Photonics, 2013), p. 88611F.

**16. **D. Spiga, “X-ray beam-shaping via deformable mirrors: surface profile and point spread function computation for Gaussian beams using physical optics,” J. Synchrotron Radiat. **25**(1), 123–130 (2018). [CrossRef]

**17. **J. P. Sutter, S. G. Alcock, F. Rust, H. Wang, and K. Sawhney, “Structure in defocused beams of X-ray mirrors: causes and possible solutions,” in * Adaptive X-Ray Optics III*(International Society for Optics and Photonics, 2014), p. 92080G.

**18. **N. Josep and G. Gastón, “Modulation of intensity in defocused beams,” in *Advances in X-Ray/EUV Optics and Components VIII*(International Society for Optics and Photonics, 2013), p. 884810.

**19. **S. Berujon, R. Cojocaru, P. Piault, R. Celestre, T. Roth, R. Barrett, and E. Ziegler, “X-ray optics and beam characterization using random modulation: experiments,” J. Synchrotron Radiat. **27**(2), 293–304 (2020). [CrossRef]

**20. **L. Mandel and E. Wolf, * Optical coherence and quantum optics* (Cambridge University, 1995), Chap. 3.

**21. **L. Raimondi and D. Spiga, “Mirrors for X-ray telescopes: Fresnel diffraction-based computation of point spread functions from metrology,” Astron. Astrophys. **573**, A22 (2015). [CrossRef]

**22. **M. Born and E. Wolf, * Principles of optics: electromagnetic theory of propagation, interference and diffraction of light*7th ed. (Cambridge University, 1999), Chap. III.

**23. **Y. Kashyap, H. Wang, and K. Sawhney, “Two-dimensional transverse coherence measurement of hard-X-ray beams using near-field speckle,” Phys. Rev. A **92**(3), 033842 (2015). [CrossRef]

**24. **H. Wang, J. Sutter, and K. Sawhney, “Advanced in situ metrology for x-ray beam shaping with super precision,” Opt. Express **23**(2), 1605–1614 (2015). [CrossRef]

**25. **S. Berujon, H. Wang, S. Alcock, and K. Sawhney, “At-wavelength metrology of hard X-ray mirror using near field speckle,” Opt. Express **22**(6), 6438–6446 (2014). [CrossRef]

**26. **H. Wang, Y. Kashyap, and K. Sawhney, “Speckle based X-ray wavefront sensing with nanoradian angular sensitivity,” Opt. Express **23**(18), 23310–23317 (2015). [CrossRef]

**27. **M.-C. Zdora, “State of the art of X-ray speckle-based phase-contrast and dark-field imaging,” J. Imaging **4**(5), 60 (2018). [CrossRef]

**28. **S. Berujon, R. Cojocaru, P. Piault, R. Celestre, T. Roth, R. Barrett, and E. Ziegler, “X-ray optics and beam characterization using random modulation: theory,” J. Synchrotron Radiat. **27**(2), 284–292 (2020). [CrossRef]

**29. **H. Wang, Y. Kashyap, and K. Sawhney, “From synchrotron radiation to lab source: advanced speckle-based X-ray imaging using abrasive paper,” Sci. Rep. **6**(1), 20476 (2016). [CrossRef]

**30. **P. Bing, X. Hui-Min, X. Bo-Qin, and D. Fu-Long, “Performance of sub-pixel registration algorithms in digital image correlation,” Meas. Sci. Technol. **17**(6), 1615–1621 (2006). [CrossRef]

**31. **K. J. S. Sawhney, I. P. Dolbnya, M. K. Tiwari, L. Alianelli, S. M. Scott, G. M. Preece, U. K. Pedersen, and R. D. Walton, “A Test Beamline on Diamond Light Source,” AIP Conference Proceedings1234, 387–390 (2010).

**32. **T. Zhou, H. Wang, T. Connolley, S. Scott, N. Baker, and K. Sawhney, “Development of an X-ray imaging system to prevent scintillator degradation for white synchrotron radiation,” J. Synchrotron Radiat. **25**(3), 801–807 (2018). [CrossRef]

**33. **G. Geloni, E. Saldin, E. Schneidmiller, and M. Yurkov, “Transverse coherence properties of X-ray beams in third-generation synchrotron radiation sources,” Nucl. Instrum. Methods Phys. Res., Sect. A **588**(3), 463–493 (2008). [CrossRef]

**34. **https://docs.opencv.org/3.4/de/da9/tutorial_template_matching.html