A robust tool for photon source geometry measurements using the fractional Talbot effect

: A reliable measurement of beam coherence is important for optimal performance of a number of coherence methods being utilized at third-generation synchrotrons and free-electron lasers. Various approaches have been proposed in the past for determining the source size, and hence the degree of coherence; however they often require complex setups with perfect optics and suffer from undeﬁned uncertainties. We present a robust tool for X-ray source characterization with a full quantitative uncertainty analysis for fast on-the-ﬂy coherence measurements. The inﬂuence of three multilayer monochromator crystals on the apparent source size is evaluated using the proposed method.


Introduction
Coherence represents one of the most fundamental features of third-generation synchrotrons and upcoming hard X-ray free-electron lasers being exploited in a vast amount of experimental approaches [1]. Well-established techniques such as X-ray photon correlation spectroscopy [2], coherent X-ray diffraction imaging [3], lensless imaging [4], phase contrast imaging [5][6][7][8] as well as the recently developed ptychography [9], polyCDI [10] and GI-USAXS [11] are only a few to be named. Accordingly, the precise knowledge of source size and its modification by Xray optical elements remains a crucial part in beamline construction, methods development as well as in different kinds of simulations and evaluations dealing with image formation therein.
By identifying coherence as the ability to observe interference phenomena, we have to differentiate temporal coherence, determined by the spectral bandwidth (monochromaticity), from spatial (transverse) coherence, being directly related to the intensity distribution across the source, i.e. the effective source size of the radiation [12,13]. Thus, deploying a strategy to measure the source size is tantamount to determining the degree of spatial coherence in a selected cross section of an X-ray beam.
In the past, various methods have been reported for coherence measurements of synchrotron X-ray sources and more recently for free-electron lasers in the hard X-ray regime. Paterson et al. [14] successfully utilized Young's double-slit experiment [12] with X-rays, providing an efficient method for measuring coherence of undulator radiation that had previously only been applied in the visible and EUV light regime [15,16]. Leitenberger et al. [17] extended the technique to hard X-rays and deployed (double and single) pin-hole diffraction using an energy-dispersive detector for simultaneously studying coherence properties of a large spectral range [18,19]. Various analog interferometric methods, such as the characterization of Fresnel interference fringes produced by a round fiber or slit [13], the use of an intensity [20], a shearing [21] or a prism [22] interferometer and the evaluation of diffraction patterns created from a phase-shifting mask [23], have each been reported. More recently, Young's experiment has been used to study the spatial and temporal coherence of single, femtosecond X-ray pulses generated by a hard X-ray free-electron laser [24]. A complementary approach to transverse coherence measurements has been introduced by Cloetens et al. [25] by comparing the first Fourier coefficients in the so-called Talbot images, where self-imaging of a periodic object occurs. Subsequently, this was refined by recognizing that in a fully-coherent beam the higher-order Fourier coefficients are also preserved in partial Talbot distances [26], reducing the necessary number of distances to be taken in an experiment.
The above methods also have certain drawbacks, e. g. in terms of a challenging setup and/or alignment [21,24], by requiring energy-resolved detectors [18,19] or by being very sensitive to imperfections in the used optical elements [23,26]. In addition, all methods have in common that they provide only a very limited uncertainty analysis for the measured source size values.
In this paper we address these weaknesses by proposing a method with a simple setup, previously introduced in [26], omitting the assumption of perfect optical elements (gratings), and precise knowledge of the X-ray energy spectrum. We show that with a combined approach of modeling and evaluating experimental data, it becomes possible to make the calculation fully automatic and quantitative. In addition to earlier methods, the quantitative nature of our approach is supported by a detailed uncertainty analysis, incorporating all relevant error sources in a simplified error model.
In general, the methodology for measuring source size can be applied when evaluating coherence preservation of reflective and diffractive X-ray optical elements [27][28][29] . We apply our method to determine the effective X-ray source size influenced by a Si(111) and three multilayer monochromators and show that the straightforward setup and data evaluation of our approach favors its routine use for this purpose. The fitting procedure can also be used for improving the characterization of recently proposed grating geometries for interferometric imaging [30].

Experimental setup
The experiments were carried out at the X02DA TOMCAT beamline of the Swiss Light Source (SLS) at the Paul Scherrer Institute (Villigen, Switzerland) and the setup is depicted in Fig. 1. The X-ray beam, produced by a 2.9 T super-bending magnet on a 2.4 GeV storage ring (with ring current I = 400 mA, top-up mode), was monochromatized with a Si(111) double-crystal (DCM) and two different double-multilayer monochromators (DMM), respectively. The latter two consist of different compositions, coated on a Si(111) substrate, for use at different energy ranges: [Ru/C] 100 (100 layers, 4 nm periodicity) for energies below 22 keV and [W/Si] 100 (100 layers, 3 nm periodicity) for energies above [31]. The source size was measured at the following energies using always one of the standard monochromators: 14 keV, 15 keV, 16 keV, 17 keV, and 21.8 keV. We explain later on, why this choice of energies was particularly suitable. For the characterization of a V/B 4 C multilayer crystal (3.02 nm periodicity) the X-ray energy was set to 18 keV using the Si(111) monochromator and the crystal was placed on a goniometer 1480 mm upstream from the grating. The detailed setup for the measurement of the V/B 4 C multilayer crystal has been reported elsewhere [29].  A 2D mixed phase and absorption grating (see Fig. 2) was placed at R = 26.3 m and R = 26.5 m distances from the source, respectively. A CCD detector coupled with visible light optics (20× magnification) and a 20 μm thick scintillator was used for acquiring images, yielding an effective pixel size of 0.38 μm. The grating was aligned with a goniometer (about the z-axis), whereby smalls z-tilts can also be corrected by rotating the detector, which introduces a negligible effect of projecting the respective source sizes onto one another. Tilts about the x-and y-axes were treated computationally and are discussed later on. Thus, it is noteworthy that, in the most simplified setup, the grating can be aligned purely by eye, making the use of high precision motors obsolete. For the characterization of the V/B 4 C multilayer, the pixels of the acquired images were binned by a factor of 2, yielding an effective pixel size of 0.76 μm. The detector was moved to various propagation distances z ranging from 0.002 − 2.102 m. At each distance, an image was taken and corrected with the respective dark and flat-field images, prior to further analysis. Due to different X-ray fluxes under each experimental condition, the exposure times t exp were adjusted as follows: t exp = 0.2 s for the [Ru/C] 100 , t exp = 1.5 s for the [W/Si] 100 and t exp = 36.0 s for the combined Si(111) and V/B 4 C multilayer measurement. The time required for acquiring a full set of 106 Talbot images was between 30 and 120 min.

Theoretical background
For interpreting the Fresnel diffraction images after the interaction of the X-ray beam with the periodic grating, we summarize the model for the above described experimental imaging setup by starting from an idealized point source emitting a spherical wave. The wave field ψ at a distant point r can be described as with wave vector k and amplitude A. For simplicity, we disregard the time dependency by observing the wave only at t = 0. The wave field disturbance after passing a diffraction object such as a 2D grating is described by Huygens-Fresnel principle stating that the result is a superposition of secondary wavelets emerging from every point of the initial wavefront [12]. Detailed mathematical treatment yields two possible solutions, namely the two Rayleigh-Sommerfeld solutions and the Fresnel-Kirchhoff diffraction formula, which are equivalent for the present setup [32]. Using the latter of the two, we arrive at: where G is the area along the diffraction object (grating), n the normal vector to it, and z and R represent position vectors indicated in Fig. 1. It is then possible to simplify the above expression by regarding a big source-to-grating distance (i. e. Fresnel approximation) to give: In the following formulation, we restrict ourselves to the case of a 2D grating with grating coordinates x 0 and y 0 that are normal to the axis z. Since the grating can be seen as an operator changing the amplitude and/or phase of the impinging wavefront at defined values x 0 and y 0 , it can be expressed as a function multiplied with the wavefront at the grating position. Further on, we consider only small angles and utilize the fact that the aperture diameters (i. e. grating pitch) of the object are orders of magnitudes greater then the wavelength, which makes the Rayleigh-Sommerfeld and Fresnel-Kirchhoff formulas identical and omits the above cosine term [32]. Equation (3) then transforms to: source-to-grating distance R and k = |k|. After applying the so-called paraxial approximation and combining the grating function G and the phasor of the impinging wavefront in function f (x 0 , y 0 ) we finally get: where x and y are now the coordinates of the imaging plane. This equation can now be evaluated by two different approaches: either by applying the paraxial approximation to the phasor of the impinging wavefront [33], which leads to the definition of the defocussing distance D and magnification M: or by identifying above equation as a convolution of f (x, y) with the Fresnel kernel. We choose the latter for simplicity reasons and get: where C is a constant, proportional to the amplitude of the impinging wave.
To account for the finite source, the Van-Cittert-Zernike theorem is then applied assuming an extended quasi-monochromatic incoherent (i. e. partially coherent) source. Assuming further a Gaussian-shaped source [1], we use the so-called projected source sizes σ proj,H and σ proj,V with where σ i is the FWHM of the horzontal and vertical source size, respectively [34]. The final expression for the intensity of the Fresnel diffraction pattern I at r = (x, y, z) is thus given by: The function f (x, y) describes the wavefront just after passing the grating and reads as: where h(x, y) is the grating function with coordinates x and y, δ and β are the refractive and absorption indices, respectively. The function h(x, y) can be expressed e. g. as a binary function with the grating's gold pillar height h, integer n, grating period a and grating's gold pillar width w. According to the fabrication process of the grating, function h(x, y) was slightly modified in the numerical implementation to include a slight trapezoidal shape of the grating with angle α.

Source size calculation
In theory, for calculating the spatial degree of coherence of the beam in the plane of the grating (and with that the source size), the recorded diffraction patterns are further expanded into a 2D Fourier series with coefficientsĨ(k x , k y , z) = F [I(x, y, z)]. By calculating these coefficients at different propagation distances z i , it is possible to obtain the degree of coherence [26]. The results will be distorted, however, if outliers exist at the respective points of interest, caused for instance by imperfect grating parameters and/or alignment as well as statistical errors originating from (imprecise) dark-/flat-field corrections and eventual beam fluctuations. We therefore propose a formalism that requires only approximate knowledge about all parameters affecting the results. First, we define horizontal and vertical Talbot image line profiles by averaging column-and line-wise: where n y and n x are the number of pixels in the vertical and horizontal directions, respectively. We then extract principle Fourier components of the line profiles, analog to [26], by: with k x = p size · n x /(Ma), k y = p size · n y /(Ma) depending on the pixel size p size , the grating period a, magnification M and the total number of pixels. From now on, we omit the explicit notation for horizontal and vertical Fourier coefficients, as they are treated equally further on, but distinguish those obtained from simulated and experimental Talbot images, denoted as F sim (z) and F exp (z). The further approach is as follows: based on the fact that Talbot images can be correctly modeled given that all experimental parameters are known [see Eq. (10)], the source size can be determined implicitly by using an appropriate set of simulation variables. More precisely, Fourier coefficients F sim (z) can be varied depending on the source size (and other parameters) and fitted by means of weighted least-squares to F exp (z).
In doing so, we define a modified least-squares error (LSE) p as a measure for the quality of the fit between F sim (z) and F exp (z): with propagation distances z = (z 1 ,...,z i , . . .), energy E, source size σ , grating's duty cycle d c , trapezoidal angle α, total number of propagation distances n z and being the normalized experimental and simulated principal Fourier coefficients. In the following, we denote p as the "weighted LSE". Obviously, if a particular set of parameters minimizes p so that it approaches 0, the solution is found. Considering that, we only need to define minimum and maximum margins for each parameter that are consistent with the experimental setup and conduct an efficient search in the parameter space for minimizing p.
The detailed flowchart of the complete algorithm is depicted in Fig. 3: for each parameter E, σ , d c and α, n max intervals are "nested" between given minimum and maximum margins. Fourier coefficients for the simulated and experimental Talbot images are then calculated for each direction (horizontal and vertical) independently. Within this step, the averaged line profiles from Eq. (14) are additionally multiplied with a Hanning window function to reduce leakage and aliasing effects [35]. After normalization, the weighted LSE p is calculated and compared to the value of p start , which upon initialization can be any big number (e. g. p start = ∞) and for any further iteration contains the lowest occurrence of p heretofore. If p is lower than p start at this point then the whole set of parameters is written to temporary memory and p start is overwritten by the current value of p. These steps are repeated until all intervals for all parameters have been run through. Thereafter, the parameters corresponding to the lowest value of p are loaded and used to nest intervals for the next iteration. The nesting is implemented similarly to a bisection method (also known as binary search algorithm), where n max sections are used rather than only two. Finally, after repeating the nesting k max times, the calculated source size along with other parameters can be loaded from temporary memory.  The fitting procedure is demonstrated in Fig. 4 for an X-ray beam of 21.6 keV monochromatized by the Si(111) double-crystal monochromator. Fourier coefficients were obtained from 106 different propagation distances and starting parameters were set to: E min = 21.5 keV, We analyze this approach in more detail. The normalization of the Fourier coefficients [in Eq. (17)] with their respective mean values (rather than e. g. the maximum ones) is done in order to equally account for Fourier coefficients over the whole range of z i when fitting to the experimental data. The weighting in Eq. (16) follows another simple principle: small values of Fourier coefficients contain less information (more noise), and thus, deviations arising from these coefficients are penalized by the additional weighting when minimizing p. The only remaining ambiguity in this respect arises from the fitting procedure itself, namely the treatment of local minima which represents a common challenge for most iterative processes. In the present work we address this issue by multiplying each interval, that is parted upon interval nesting, with an additional factor s. To be exact, each parted interval is additionally "stretched" by an arbitrary factor s (as indicated in Fig. 3), thus enabling each parameter to "climb out" of a local minimum in a subsequent iteration step. Naturally, there exist more sophisticated methods for treating local extrema which are not discussed further, as they were not required in the present study. Finally, all parameter margins are set in consistence with the experimental setup: the Xray energy margin originates from the fact that the aligned energy might not be correct due to impreciseness in the monochromator calibration; the source size margin can be set arbitrarily in a region where the source size is approximately expected; and the margins for the grating's duty cycle and angle on the one hand account for grating's fabrication impreciseness and on the other hand for imprecise grating alignment in the beam. In particular, the latter two account for tilts about x-and y-axes causing more pronounced trapezoidal pillar shapes [30].
We can conclude that with the above approach it is possible to conduct the complete source size calculation implicitly in an automated way and, more importantly, without any user interaction, by recursively finding an optimized set of fit parameters. The great advantage is that the information from all Fourier coefficients is used, making the method robust to statistical errors and precise at the same time. The total number of iterations for the two (horizontal and vertical) source sizes is calculated by giving N max = 120, 204 for the present example of n max = 3 intervals, k max = 7 iterations with s = 1.5 and n z = 106 propagation distances. The complete calculation took about 10 min on a single PC (Pentium i5, Mathworks Matlab), whereas a single iteration step lasted around 6 ms. In order to boost the calculation time, the simulation from Eq. (10) was conducted in 1D independently for the horizontal and vertical directions.

Uncertainty analysis
We complete the above formalism by treating the influence of measurement uncertainties to the overall source size calculation. The approximation made within Fresnel-Kirchhoff diffraction formula correctly describes the physical problem if all distances R, R , z, z as well as all object's structures (such as grating pitch etc.) are orders of magnitudes greater than the wavelength λ [32]. This condition is in full agreement with the investigated energy range of 10 − 40 keV. The paraxial approximation from Eq. (6) is justified by the fact that we are concerned with regions very close to the optical axis. On the other hand it has also been shown that combined paraxial-Fresnel approximation is more accurate than either one imposed separately [36]. As a result, we only need to treat measurement uncertainties affecting Eq. (10) in order to account for the overall source size measurement accuracy. In the following we consider maximal error margins for each error source.
Starting from the assumption that the grating has a perfect shape (α = 0 • , d c = 0.5), that all of its parameters are known (h, w) and it is perfectly aligned in the beam, the experimental results will still differ from the theoretical prediction due to the uncertainty in the adjusted propagation distance of the detector, which will affect the Fresnel kernel and for our experiment we estimate to be less than Δz = 2 mm. The maximal error margin for the source size can be evaluated numerically from this value by including it in the weighted LSE from Eq. (16) and postulating that the precision of z is directly determining the precision of the source size σ : Thus, the source size uncertainty Δσ is calculated by two subsequent simulations for finding an appropriate value of Δσ that equally alters the weighted LSE p as Δz. This relation is derived from the fact that it is impossible to define the origin of p = 0 from the acquired experimental data and the subsequent calculation of p. Likewise, z is also directly connected with the energy uncertainty, which arises from the fact that the energy cannot be selected very precisely by the monochromator (see above). For this reason, the energy uncertainty is treated the same way by requiring that meaning that it is impossible to determine whether p = 0 arises from Δz or ΔE, which is why they have to be treated equally in order to cover maximal error margins.
In a more realistic case, however, we also have to account for fabrication imperfections in the grating, which influence the two grating terms (absorption, phase shift) and the impinging wavefront from Eq. (11), or more generally, the wavefront right after the grating that is then propagated. For doing so, we define an effective wave vector uncertainty Δk eff and require that it incorporates all uncertainties originating from the grating's fabrication process: where Δh is the uncertainty of the fabricated grating's pillar height and Δδ and Δβ are the dispersion and absorption uncertainties, respectively. The latter two originate from imperfections in the grating's gold structures, that have a slightly altered gold density and thus induce slightly different phase shifts and absorption levels for X-rays. By evaluating Eq. (21) we obtain: which can further be approximated by making use of Δk ≈ k Δh h and ΔkΔh h Δk. The last term is evaluated separately: Estimating the maximal order of magnitude for each term and the given X-ray energy range yields: Now Eq. (22) can be simplified to finally leading to the effective wave vector and energy uncertainty: with the speed of light c and Planck's constanth. In the latter approximation we have used the fact that k · O(10 −2 ) ≈ Δk and 2Δk · O(10 −2 ) Δk. We can thus state that the most pronounced error from the grating's fabrication process will result in a slightly modified phase shift and absorption, which can be consolidated into an effective energy uncertainty. The only remaining error sources in this respect are the grating's duty cycle and angle that are determined very precisely in the fitting process as they significantly influence the shapes of the curves in Fig. 4. This means that, once the best fit has been found, the source size uncertainty no longer depends on the uncertainties of these parameters. As mentioned above, their values depend mainly on the grating's fabrication process as well as the alignment of the grating in the beam. Finally, we shortly discuss the uncertainties of the wave vector Δk and the propagation distance Δz affecting the Fresnel kernel in Eq. (10). Following the same strategy as before to consolidate both values into an effective wave vector uncertainty, we write and obtain: To evaluate this equation we regard two marginal conditions. For Δz z, it is trivial to show that Δk eff ≈ Δk, meaning that for longer propagation distances the precision of the detector's travel range will be negligible. For Δz ≈ z we get the relatively big value of Δk eff ≈ k/2, but it can be shown that the magnitude of Δk is proportional to the magnitude of Δz. This means, if we require Eq. (28) to have the same order of magnitude as Δk eff from before, it is in fact enough to measure the first Fourier coefficients several centimeters away from the grating. For our case, this constraint is obsolete since the fitting algorithm equally takes all Fourier coefficients into account and if a few coefficients are incorrect, the final results will not be altered. Moreover, uncertainties affecting the Fresnel kernel have already been taken into account in Eqs. (19) and (20).

Results and discussion
Two separate experiments were conducted to characterize all three standardly used monochromators at the X02DA TOMCAT beamline. Fourier coefficients for the Si(111) DCM are depicted in Fig. 4., whereas Fig. 5 and Fig. 6 correspond to measurements with the multilayer monochromators. The influence on the beam coherence from the V/B 4 C multilayer crystal is shown in Fig. 7. The source size values obtained with the fitting algorithm as well as all calculated uncertainties are listed in Tab. 1 and graphically represented in Fig. 8.
The vertical source size of the beam was found to be about 30% smaller using the Si(111) monochromator crystals when compared to the multilayer monochromator stripes. Likewise, a smaller vertical source size was measured at higher X-ray energies, which can be explained by a smaller vertical beam divergence at higher energies as a characteristic of bending magnet radiation. The two multilayer monochromator stripes, which were both measured at the same energy, showed no significant differences (as shown in Fig. 5).
In the second experiment the horizontal source size was found to be about 17% bigger than in the first one. This variation in time is attributed to the storage ring operation conditions, in particular the undulator gap opening at the nearby X05LA FEMTO beamline. The broadening of the electron beam at the TOMCAT beamline was caused by closing the gap at the FEMTO beamline when the second set of coherence measurements were performed. The vertical source size, on the other hand, depends on the status of the orbit and coupling correction and may change more frequently depending on the machine operation mode. This is why the vertical source size for the [Ru/C] 100 monochromator at lower energies was smaller during the second experiment. Table 1 also highlights the actual value of the X-ray energy that resulted from the fitting procedure. The values were found to be systematically lower than the aligned energy based on the pre-calibrated monochromators, being indicative of how precise the X-ray energies can actually be set during beamline operation. The respective energy uncertainties ΔE eff correspond to effective uncertainties in the aligned mean energy. Thus they must not be confused with the energy bandwidth of the monochromated beam, which is in the range of a few percent [31].
For measuring the influence of a V/B 4 C multilayer crystal on the X-ray beam, the previously introduced fitting algorithm had to be slightly modified. First, since the energy E is determined precisely during an initial reference measurement with the Si(111) monochromator and the grating, E can be regarded as a constant parameter (from that point on). Secondly, the sourceto-sample distance R in Eq. (11) was added as a fitting variable, while in Eq. (9) it was left unchanged with R = 26.5 m. By doing so, the wavefront curvature of the X-ray beam after being reflected from the V/B 4 C multilayer was studied independently from the source size. Thus, we found that the horizontal beam characteristics were not altered significantly by the multilayer, yielding a horizontal source size of 154 μm and a curvature radius of 25.0 m. In the vertical direction, the curvature radius of the beam was decreased to 4.5 m, while the source size was found to be 43 μm. This effect is obvious from the shifted value of the Talbot plane to z = 0.7 m [in Fig. 7(b)] in the vertical direction as compared to z = 0.6 m in the horizontal direction. From Fig. 7 it is also clearly visible that in the range of z = 0−0.4 m, the fitting results for the vertical coefficients are not as good as for the horizontal ones. As discussed above, this effect can be affiliated to a local minimum in the fitting procedure regarding the grating's duty cycle and/or trapezoidal angle.
In earlier studies [26,29], the first Fourier coefficients exhibit smooth behavior as a function of the defocusing distance, while our data (see e. g. Fig. 6) shows "dips" in the plots of the Fourier coefficients. This makes our plots less similar to the usual visibility curves in the literature. For a mixed phase-absorption grating, which we used for our measurement, this is predominantly a consequence of the deviation in the duty cycle from the ideal 0.5 and the   Finally, we briefly discuss some other aspects of our method. In the beginning, two assumptions were made from which the formalism was derived, namely that experimental data is captured only with a limited precision and that all data can be modeled correctly if experimental parameters are known. Since the source size calculation takes place in the Fourier space, the variation of simulated Fourier coefficients has been investigated therein. The energy range was chosen so that the grating equally represents a phase and absorption grating in order to cover preferably the most complicated case. It is clear, however, that lowering and/or increasing the X-ray energies would facilitate further simplifications to the model [i. e. in Eq. (11)]. We found that the necessary number of Talbot images, and with that Fourier coefficients, depends not only on the chosen range of z, but also on the quality of the data. For instance, in the presence of noisy data, many Talbot images are required for obtaining a correct fit and for reducing statistical errors (e. g. from beam fluctuations). Decreasing the travel range of the detector, on the other hand, simplifies the experimental setup, but may increase the calculated uncertainty which we showed to be directly connected to the uncertainty of the adjusted detector's propagation distance (Δz). Applied to the [Ru/C] 100 multilayer at 21.3 keV, a reduction to 56 Talbot images and z = 1.1 m yields σ H = (131 ± 3) μm and σ V = (44 ± 2) μm, which represents only a marginally greater uncertainty. For other experimental conditions, however, these results may vary as the values depend both on the curve shapes and the measured range of z. Concerning the data from Tab. 1, the same parameters were used in the fitting procedure, while the source size and energy uncertainties were calculated for each dataset separately.

Conclusion
We have developed an evaluation method for coherence measurements based on the fractional Talbot effect that can be performed without the need of optically perfect X-ray diffractive elements and also does not require precise alignment in the experimental setup. The method is applicable to arbitrary X-ray energies and supports a full quantitative uncertainty analysis of the complete source size measurement. We showed that the characterization of the influence on source size by diffractive optics, such as multilayer crystals, can easily be performed also with X-ray beams of relatively low transversal coherence length. Finally, we evaluated for the first time the reliability of such measurements. All calculation tools are published under GNU General Public License and available for download at the TOMCAT homepage [37].

Appendix
For fabricating the grating, we used the method established by Gorelick et al. [38] to produce high aspect-ratio gold nanostructures by electroplating a direct written PMMA mold. We evaporated a Cr/Au/Cr (5/20/5 nm) plating base on a silicon substrate and subsequently spin-coated with a 4 micron thick PMMA resist. The grating patterns were directly written to the resist using a 100 keV Vistec EBPG 5000plus electron beam writer. The exposed chips were developed for 60 s in a mixture of isopropanol and water (7:3 by volume) [39]. The plating base's topmost chromium layer was removed by 30 s RIE plasma etching in a mixture of chlorime and carbon monoxide. The mold was filled with electroplated gold using a cyanide-based bath with a nominal density of 17 g/cm 3 and a nominal cobalt content of 1-2%, corresponding to three components contributing to the optical properties in the X-ray range.