Wavefront metrology measurements at SACLA by means of X-ray grating interferometry

The knowledge of the X-ray wavefront is of importance for many experiments at synchrotron sources and hard X-ray free-electron lasers. We will report on metrology measurements performed at the SACLA X-ray Free Electron Laser by means of grating interferometry which allows for an at-wavelength, in-situ, and single-shot characterization of the X-ray wavefront. At SACLA the grating interferometry technique was used for the study of the X-ray optics installed upstream of the end station, two off-set mirror systems and a double crystal monochromator. The excellent quality of the optical components was confirmed by the experimental results. Consequently grating interferometry presents the ability to support further technical progresses in X-ray mirror manufacturing and mounting. © 2014 Optical Society of America OCIS codes: (050.1950) Diffraction gratings; (340.0340) X-ray optics; (120.0120) Instrumentation, measurement, and metrology; (140.2600) Free-electron lasers (FELs); (340.7450) X-ray interferometry; (340.7470) X-ray mirrors. References and links 1. P. Emma, R. Akre, J. Arthur, R. Bionta, C. Bostedt, J. Bozek, A. Brachmann, P. Bucksbaum, R. Coffee, F.-J. Decker, Y. Ding, D. Dowell, S. Edstrom, A. Fisher, J. Frisch, S. Gilevich, J. Hastings, G. Hays, Ph. Hering, Z. Huang, R. Iverson, H. Loos, M. Messerschmidt, A. Miahnahri, S. Moeller, H.-D. Nuhn, G. Pile, D. Ratner, J. Rzepiela, D. Schultz, T. Smith, P. Stefan, H. Tompkins, J. Turner, J. Welch, W. White, J. Wu, G. Yocky, and J. Galayda, “First lasing and operation of an angstrom-wavelength free-electron laser,” Nature Photon. 4, 641–647 (2010). 2. T. Ishikawa, H. Aoyagi, T. Asaka, Y. Asano, N. Azumi, T. Bizen, H. Ego, K. Fukami, T. Fukui, Y. Furukawa, S. Goto, H. Hanaki, T. Hara, T. Hasegawa, T. Hatsui, A. Higashiya, T. Hirono, N. Hosoda, M. Ishii, T. Inagaki, Y. Inubushi, T. Itoga, Y. Joti, M. Kago, T. Kameshima, H. Kimura, Y. Kirihara, A. Kiyomichi, T. Kobayashi, C. Kondo, T. Kudo, H. Maesaka, X. M. Marchal, T. Masuda, S. Matsubara, T. Matsumoto, T. Matsushita, S. Matsui, M. Nagasono, N. Nariyama, H. Ohashi, T. Ohata, T. Ohshima, S. Ono, Y. Otake, C. Saji, T. Sakurai, T. Sato, K. Sawada, T. Seike, K. Shirasawa, T. Sugimoto, S. Suzuki, S. Takahashi, H. Takebe, K. Takeshita, K. Tamasaku, H. Tanaka, R. Tanaka, T. Tanaka, T. Togashi, K. Togawa, A. Tokuhisa, H. Tomizawa, K. Tono, S. Wu, M. Yabashi, M. Yamaga, A. Yamashita, K. Yanagida, C. Zhang, T. Shintake, H. Kitamura, and N. Kumagai, “A compact X-ray free electron laser emitting in the sub-angstrom region,” Nature Photon. 6, 540–544 (2012). 3. N. Loh, D. Starodub, L. Lomb, C. Hampton, A. Martin, R. Sierra, A. Barty, A. Aquila, J. Schulz, J. Steinbrener, R. Shoeman, S. Kassemeyer, C. Bostedt, J. Bozek, S. Epp, B. Erk, R. Hartmann, D. Rolles, A. Rudenko, B. Rudek, L. Foucar, N. Kimmel, G. Weidenspointner, G. Hauser, P. Holl, E. Pedersoli, M. Liang, M. Hunter, L. Gumprecht, N. Coppola, C. Wunderer, H. Graafsma, F. Maia, T. Ekeberg, M. Hantke, H. Fleckenstein, H. #205973 $15.00 USD Received 5 Feb 2014; revised 26 Mar 2014; accepted 30 Mar 2014; published 7 Apr 2014 (C) 2014 OSA 21 April 2014 | Vol. 22, No. 8 | DOI:10.1364/OE.22.009004 | OPTICS EXPRESS 9004 Hirsemann, K. Nass, T. White, H. Tobias, G. Farquar, W. Benner, S. Hau-Riege, C. Reich, A. Hartmann, H. Soltau, S. Marchesini, S. Bajt, M. Barthelmess, L. Strueder, J. Ullrich, P. Bucksbaum, M. Frank, I. Schlichting, H. Chapman, and M. Bogan, “Sensing the wavefront of X-ray free-electron lasers using aerosol spheres,” Opt. Express 21, 12385–12394 (2013). 4. A. Schropp, R. Hoppe, V. Meier, J. Patommel, F. Seiboth, H. J. Lee, B. Nagler, E. C. Galtier, B. Arnold, U. Zastrau, J. B. Hastings, D. Nilsson, F. Uhlén, U. Vogt, H. M. Hertz, and C. G. Schroer, “Full spatial characterization of a nanofocused X-ray free-electron laser beam by ptychographic imaging,” Sci. Rep. 3, 1633 (2013). 5. D. Nilsson, F. Uhlén, A. Holmberg, H. Hertz, A. Schropp, J. Patommel, R. Hoppe, F. Seiboth, V. Meier, C. G. Schroer, E. Galtier, B. Nagler, H. Lee, and U. Vogt, “Ronchi test for characterization of nanofocusing optics at a hard X-ray free-electron laser,” Opt. Lett. 37, 5046–5048 (2012). 6. S. Matsuyama, H. Yokoyama, R. Fukui, Y. Kohmura, K. Tamasaku, M. Yabashi, W. Yashiro, A. Momose, T. Ishikawa, and K. Yamauchi, “Wavefront measurement for a hard-X-ray nanobeam using single-grating interferometry,” Opt. Express 20, 24977–24986 (2012). 7. S. Rutishauser, L. Samoylova, J. Krzywinski, O. Bunk, J. Grünert, H. Sinn, M. Cammarata, D. M. Fritz, and C. David, “Exploring the wavefront of hard X-ray free-electron laser radiation,” Nat. Commun. 3, 947 (2012). 8. C. David, B. Nöhammer, H.H. Solak, and E. Ziegler, “Differential X-ray phase contrast imaging using a shearing interferometer,” Appl. Phys. Lett. 81, 3287 (2002). 9. A. Momose, S. Kawamoto, I. Koyama, Y. Hamaishi, K. Takai, and Yoshio Suzuki, “Demonstration of X-ray Talbot interferometry,” Jpn. J. Appl. Phys. 42, L866–L868 (2003). 10. T. Weitkamp, A. Diaz, C. David, F. Pfeiffer, M. Stampanoni, P. Cloetens, and E. Ziegler, “X-ray phase imaging with a grating interferometer,” Opt. Express 12, 6296–6304 (2005). 11. F. Pfeiffer, C. Grünzweig, O. Bunk, G. Frei, E. Lehmann, and C. David, “Neutron phase imaging and tomography,” Phys. Rev. Lett. 96, 215505 (2006). 12. F. Pfeiffer, T. Weitkamp, O. Bunk, and C. David, “Phase retrieval and differential phase-contrast imaging with low-brilliance X-ray sources,” Nat. Phys. 2, 258–261 (2006). 13. T. Weitkamp, A. Diaz, C. David, F. Pfeiffer, M. Stampanoni, P. Cloetens, and E. Ziegler, “X-ray wavefront analysis and optics characterization with a grating interferometer,” Appl. Phys. Lett. 86, 054101 (2005). 14. F. Pfeiffer, O. Bunk, C. Schulze, A. Diaz, T. Weitkamp, C. David, J. F. van der Veen, I. Vartanyants, and I.K. Robinson, “Quantitative measurement of the coherence function of a hard x-ray beam using a grating interferometer,” Phys. Rev. Lett. 94, 163104 (2005). 15. A. Diaz, C. Mocuta, J. Stangl, M. Keplinger, T. Weitkamp, F. Pfeiffer, C. David, T. H. Metzger, and G. Bauer, “Coherence and wavefront characterization of Si-111 monochromators using double-grating interferometry,” J. Synchrotron Radiat. 17(3), 299–307 (2010). 16. S. Rutishauser, I. Zanette, T. Weitkamp, T. Donath, and C. David, “At-wavelength characterization of refractive X-ray lenses using a two-dimensional grating interferometer,” Appl. Phys. Lett. 99, 221104 (2011). 17. S. Rutishauser, A. Rack, T. Weitkamp, Y. Kayser, C. David, and A. T. Macrander, “Heat bump on a monochromator crystal measured with X-ray grating interferometry,” J. Synchrotron Radiat. 20, 300–305 (2013). 18. I. Zanette, T. Weitkamp, T. Donath, S. Rutishauser, and C. David, “Two-Dimensional X-ray grating interferometry,” Phys. Rev. Lett. 105, 248102 (2010). 19. H. Ohashi, M. Yabashi, K. Tono, Y. Inubushi, T. Sato, T. Togashi, Y. Senba, T. Koyama, H. Yumoto, K. Miyokawa, T. Ohsawa, S. Goto, and T. Ishikawa, “Beamline mirrors and monochromator for X-ray free electron laser of SACLA,” Nucl. Instrum. Meth. A 710, 139–142 (2013). 20. S. Rutishauser, M. Bednarzik, I. Zanette, T. Weitkamp, M. Börner, J. Mohr, and C. David, “Fabrication of twodimensional hard X-ray diffraction gratings,” Microelectro. Eng. 101, 12–16 (2013). 21. C. David, J. Bruder, T. Rohbeck, C. Grünzweig, C. Kottler, A. Diaz, O. Bunk, and F. Pfeiffer, “Fabrication of diffraction gratings for hard X-ray phase contrast imaging,” Microelectron. Eng. 84, 1172–1177 (2007). 22. C. David and D. Hambach, “Line width control using a defocused low voltage electron beam,” Microelectron. Eng. 46, 219–222 (1999). 23. U. Flechsig, A. Jaggi, S. Spielmann, H. Padmore, and A. MacDowell, “The optics beamline at the Swiss light source,” Nucl. Instrum. Meth. A 609, 281–285 (2009). 24. T. Weitkamp, C. David, C. Kottler, O. Bunk, and F. Pfeiffer, “Tomography with grating interferometers at lowbrilliance sources,” Proc. SPIE 6318, 63180S (2006). 25. K. Tono, T. Togashi, Y. Inubushi, T. Sato, T. Katayama, K. Ogawa, H. Ohashi, H. Kimura, S. Takahashi, K. Takeshita, H. Tomizawa, S. Goto, T. Ishikawa, and M Yabashi, “Beamline, experimental stations and photon beam diagnostics for the hard X-ray free electron laser of SACLA,” New J. Phys. 15, 083035 (2013). 26. K. Tono, T. Kudo, M. Yabashi, T. Tachibana, Y. Feng, D. Fritz, J. Hastings, and T. Ishikawa, “Single-shot beamposition monitor for X-ray free electron laser,” Rev. Sci. Instrum. 82, 023108 (2011). 27. M. Kato, T. Tanaka, T. Kurosawa, N. Saito, M. Richter, A. A. Sorokin, K. Tiedtke, T. Kudo, K. Tono, M. Yabashi, and T. Ishikawa, “Pulse energy measurement at the hard X-ray laser in Japan,” Appl. Phys. Lett. 101, 023503 (2012). 28. H. Wang, K. Sawhney, S. Berujon, E. Ziegler, and S. Rutishauser, “X-ray wavefront characterization using a rotating shearing interferometer technique,” Opt. Express 19, 16550–16559 (2011). #205973 $15.00 USD Received 5 Feb 2014; revised 26 Mar 2014; accepted 30 Mar 2014; published 7 Apr 2014 (C) 2014 OSA 21 April 2014 | Vol. 22, No. 8 | DOI:10.1364/OE.22.009004 | OPTICS EXPRESS 9005 29. S. Rutishauser, “X-ray grating interferometry for imaging and metrology,” Ph.D. Thesis (2013). 30. M. Takeda, H. Ina, and S. Kobayashi, “Fourier-transform method of fringe-pattern analysis for computer-based topography and interferometry,” J. Opt. Soc. Am. 72, 156–160 (1982). 31. T. Weitkamp, A. Diaz, B. Nöhammer, F. Pfeiffer, M. Stampanoni, E. Ziegler, and C. David, “Moiré interferometry formulas for hard X-ray wavefront sensing,” Proc. SPIE 5533, 140–144 (2004). 32. T. Weitkamp, I Zanette, F. Pfeiffer, and C. David, “Design aspects of X-ray grating interferometry,” in Proceedings of the AIP Conference 1466, 84–89 (2012). 33. P. Modregger, B. R. Pinzer, T. Thüring, S. Rutishauser, C. David, and M. Stampanoni, “Sensitivity of X-ray grating interferometry,” Opt. Express 19, 18324–18338 (2011). 34. T. Donath, M. Chabior, F. Pfeiffer, O. Bunk, E. Reznikova, J. Mohr


Introduction
Hard X-ray free electron lasers (XFELs), like the Linac Coherent Light Source (LCLS) [1], SPring-8 Angstrom Compact free electron Laser (SACLA) [2] and other upcoming facilities, provide X-ray radiation with an unprecedented brightness, spatial coherence and pulse duration.The unique properties offered by the hard XFEL sources led to a variety of groundbreaking, innovative experiments which do not only rely on the unique time structure, high degree of transverse coherence and peak power of the X-ray pulses but also on a clean and well-defined wavefront.For the latter reason the monochromators and offset mirrors upstream of the end station where the experiments are performed have to be capable of preserving the wavefront properties of the radiation delivered by the XFEL source.The development of adequate diagnostic tools for the investigation of the wavefront characteristics of XFEL sources is therefore important.Indeed, metrology and wavefront sensing measurements are necessary in order to characterize the influence of the optical components on the wavefront and to better understand the FEL radiation.Different approaches are currently proposed for focused hard XFEL beams in order to characterize the focusing optics [3][4][5][6].Besides the mentioned techniques grating interferometry has been proven to be a valuable tool for the at-wavelength, in-situ and single-shot investigation of the non-focused hard X-ray pulses delivered by an XFEL [7].The distortions of the wavefront induced by the optical components could be observed under operational conditions.Initially the grating interferometry technique was developed for phase-contrast X-ray imaging at synchrotron radiation beam lines [8][9][10], neutron sources [11], and with X-ray tubes [12].Because of its sensitivity regarding the local wavefront propagation direction X-ray grating interferometry was also applied at synchrotron facilities for the metrology of X-ray optics, e.g., for the characterization of a multilayer mirror [13], the comparison of the coherence and wavefront properties of beam line optics [14,15], the analysis of the wavefront distortions induced by a Be lens [16] or the investigation of the surface deformation of a double crystal monochromator under different heat loads [17].With respect to off-line metrology tools, in-situ metrology measurements with grating interferometry allow for a characterization of the optical components under operational conditions and to ascertain in a non-invasive manner a wavefront degradation due to radiation damage, temperature (heat load) or mechanical effects (mounting, vibrations).
We exploited the sensitivity of the grating interferometry technique in order to characterize the hard X-ray wavefront after the optical elements installed at beam line 3 of the SACLA XFEL [19].The equivalent height profiles, which are representative for the combined impact of both optical elements on the incident wavefront, of the employed total reflection mirrors (TRM), respectively the Si(111) double crystal monochromator (DCM) were extracted from the at-wavelength metrology measurements performed with the grating interferometer.The presented measurements were realized in the moiré mode which enabled us to profit from the single-shot capabilities of the grating interferometer in the investigation of the X-ray wavefront.

Experimental
Grating interferometry is based on the diffraction of the incident x-rays by a periodic binary grating and the measurement of the resulting interference pattern.The diffracting grating used for the interferometry measurements is a micrometer-sized line structure in the onedimensional version [8,9], or a mesh-structure in the two-dimensional version [18].The waves propagating through the grating have small shear angles and create an interference pattern.Due to the Talbot effect, the interference has maximum contrast at certain, discrete distances downstream of the grating [9,31], called fractional Talbot distances.
From a measured interference pattern the wavefront gradient can be recovered since distortions in the incident wavefront induce distortions in the recorded interference pattern.The interferometer is sensitive to wavefront aberrations in the order of the wavelength.The angular sensitivity is proportional to the distance behind the diffraction grating at which the diffraction pattern is measured and inversely proportional to the grating period.In practice wavefront gradient can be measured with an accuracy of the order of 10 nanoradian using micrometer-sized grating structures.The period of the measured interference pattern depends, however, on the period of the diffraction grating and is therefore usually too small to be resolved by position-sensitive detectors.A second grating, which has a period matching the one of the interference pattern, is inserted in front of the detector and used as a transmission mask.
The superposition of the interference pattern and the second grating creates a pattern of moiré fringes.When the grating structures are rotated around the incident beam axis with respect to the camera reference system by an angle β 1 for the diffraction angle and an angle β 2 ( = β 1 ) for the absorption grating, the observed intensity pattern I(x, y) corresponds to a superposition of the interference pattern I i (x, y) generated by the first grating with the structures of the second grating I g (x, y): where and For small rotation angles of one grating with respect to the other one, the moiré pattern I m (x, y) can conveniently be imaged using an adequate camera system, whereas the spatial modulations with a high frequency I hf (x, y) can not be resolved.In Eq. 1 an undistorted moiré pattern is assumed.Distortions can be accounted for by an additional, additive term in the cosine factor describing the interference fringe modulation I i (x, y).The period of the interference pattern is represented by p i and the one of the absorption grating by p 2 .
The employed gratings were fabricated from 250 µm thick polished Si < 100 > substrates which were first thinned to about 35 µm thickness by means of deep reactive ion etching in order to minimize the X-ray absorption in the grating substrate.Each grating pattern was written by means of electron-beam lithography and transferred into the Si membrane with a deep reactive ion etching process [20,21].For the diffracting grating, the depth of the grating trenches was chosen to generate at the selected X-ray photon energy a π-phase shift of the X-ray photons passing through the grating structures.The depth of the grating trenches was thus equal to π/(kδ ), where k corresponds to the norm of the wavevector and δ to the refractive index decrement in the real part of the refractive index.Together with the duty cycle of 0.5, this yields the best diffraction efficiency for the ±1 st diffraction orders and provides an optimal fringe visibility.The period of the interference pattern p i corresponds then to half the period of the diffraction grating for plane waves.Regarding the absorption grating, gold was deposited in the grating trenches by electroplating.The height of the deposited gold in the grating trenches has to be sufficiently large to absorb most of the incident X-rays in order to optimize the fringe contrast and visibility.Thus, for both gratings the aspect ratios have to be sufficiently high in order to either provide the required phase shift or absorption efficiency.The grating period of the diffracting grating was 4 µm, the one of the absorbing grating 2 µm.Besides the required high aspect ratios, the gratings should be moreover free of any distortions and defects in order to be suitable for metrology applications.Also the positioning of the grating structures in the microfabrication process should be executed with high accuracy.To fulfill both requirements the grating patterns were written by an electron beam writer using the continuous path mode in order to avoid stitching errors [22].The grating quality impacts directly the quality of the recorded data and the interpretation of the results.
The diffraction gratings optimized for an X-ray energy of 12.4 keV were checked together with the absorption grating used at the SACLA for their fringe visibility at the X05DA Optics beam line at the Swiss Light Source (SLS) [23].This allowed us to choose beforehand the most suitable diffraction grating for the experiment at the XFEL and to not rely solely on the inspection of the gratings with a scanning electron microscope.The interferometer was positioned 17 m from the bending magnet source and operated in the 5 th Talbot order (intergrating distance 60.2 mm).The intergrating distance for the n th fractional Talbot order is in the case of π-phase shifting diffraction gratings with a period p 1 given by [24] where n is an odd integer number and λ corresponds to the wavelength of the incident radiation.At these positions the fringe visibility is best.
At the SACLA, which was operated at a repetition rate of 10 Hz, the grating interferometer was installed in the experimental hutch 1 at beam line 3 [25].The interferometer was placed 99.7 m downstream of the last undulator section, respectively 12.2-17.2m from the beam line optical components.There are two different TRM configurations available at beam line 3, one with an energy cut-off at 7.5 keV (TRM I) and the other with a cut-off at 15 keV (TRM II).The selected X-ray photon energy was 7 keV for both TRM configurations and 12.4 keV for the TRM II and for the Si(111) DCM.The pulse intensity, monitored by an in-line beam monitor [26,27], fluctuated around 140-150 µJ corresponding to about 1.2 × 10 11 photons per pulse at 7 keV and 7.5 × 10 10 photons per pulse at 12.4 keV.The grating interferometer was operated at an intergrating distance of 123.8 mm and 220.4 mm, respectively, corresponding to the 11 th fractional Talbot order of a π-phase shifting grating.The selected Talbot order represented a compromise between angular sensitivity and spatial resolution.The latter factor Fig. 1.Illustration of the grating interferometer setup used at the SACLA facility.The XFEL pulses generated in the undulator section (not shown) were incident at an angle θ on either two TRM or a Si(111) DCM.The vertical offset after the optical components corresponded to 20 mm.The grating interferometer was installed further downstream and consisted of two binary line gratings, a diffraction grating splitting the beam into the ±1 st diffraction orders and an absorption grating placed in front of the detector (for details see text).Scanning electron micrographs of both gratings are shown on the bottom left, respectively middle panel.The grating structure periods were 4 µm and 2 µm, respectively, while the required structure height was defined by the energy of the incident X-ray photons (for details see text).To realize the measurements in the moiré mode both gratings were tilted symmetrically around the beam axis with respect to the camera system while their separation distance d corresponded to the 11 th fractional Talbot order.A single-shot moiré pattern for horizontally aligned gratings, providing a sensitivity in the vertical direction, is shown in the bottom right panel.
improves when decreasing the Talbot order and the period of the absorption grating [13] while the former factor is proportional to the lateral shear and thus the intergrating distance.A good fringe visibility is ensured by the large transverse coherence of the XFEL radiation.The measurements of the wavefront phase gradient were performed with one-dimensional gratings, providing a sensitivity to wavefront deformations in the direction perpendicular to the grating lines.Measurements in both orientations of the gratings, horizontal and vertical, were realized.The absorption grating was rotated against the diffraction grating and the resulting moiré fringes were recorded by a 2D camera system (640 × 480 pixels, effective pixel size of s = 3.83 µm) coupled to a YAG screen.

Data analysis
When performing measurements in the moiré mode, first a calibration of the orientation around the optical axis (XFEL pulse axis) with respect to the camera system of the diffraction and absorption gratings is required, also in order to obtain quantitative results.To do so the moiré fringe patterns were recorded in a grating rotation scan sequentially at different orientation angles of the absorption grating around the optical axis.The angular stepping was 4.2 mrad.The covered angular range was about 250 mrad wide and centered on the position where the absorption and the diffraction grating lines are parallel to each other.At each position of the absorption grating the individual images for 50 successive XFEL pulses were recorded and the average of the images was considered in order to reduce the sensitivity to shot-to-shot fluctuations.From each mean image the fringe frequency (and hence the period) in the horizontal and vertical direction of the image was extracted by means of a two-dimensional fast Fourier transform and a subpixel fitting routine.The moiré period p m and the moiré frequency f m in either the x− or y−direction are connected through where N pix corresponds to the number of pixels in the considered direction.The position variation with the grating orientation of the first order Fourier component in the horizontal and in the vertical direction allows to extract several information on the interferometer [28,29].Indeed, the moiré pattern (Eq. 1) which is recorded at each position can be written as with and representing the moiré fringe period in the horizontal, respectively vertical dimension on the recorded image.The interference fringe period p i and the absorption grating period p 2 are for π-phase shifting gratings connected to the diffraction grating period p 1 via the magnification Both relationships are valid for gratings which are not divergence matched for a design radius of curvature.This was the case for the gratings used during the measurements at the SACLA.When solving Eqs. 5 and 6 for cos β 2 , respectively sin β 2 , a parametric relationship for the fringe period in the horizontal and vertical direction is obtained through cos 2 β 2 + sin 2 β 2 = 1, The unknown parameters, which are the diffraction grating orientation angle β 1 and the magnification M (hence the wavefront radius of curvature R = d/(M − 1) where d stands for the intergrating distance), can be retrieved through a minimization procedure with respect to the experimental values p i mx and p i my of the fringe period in the horizontal and vertical direction at the different orientation angles of the absorption grating where β 1 and M are the optimization parameters and a sensible choice for k is 1 since an L 1 -norm minimization is relatively insensitive to noise.The calibration of the absorption grating orientation angle β 2 , measured with respect to the camera coordinate system, is finally realized through either Eq. 5 or Eq. 6.
# Fig. 2. The fringe frequencies, or equivalently the fringe periods p mx and p my , in the horizontal and vertical directions were extracted via two-dimensional Fourier analysis for different orientations of the absorption grating around the optical axis (the XFEL pulse axis).In the left panel the fringe period in both directions is defined for a given grating position, the dashed lines indicate the fringe orientation.The fringe inclination angle with respect to the camera reference system can also be deduced.The dependence of the fringe period in both directions on the grating orientation allowed, by means of a minimization procedure (Eq.8), to calibrate the angular orientation of both gratings with respect to the camera orientation system and to extract the radius of curvature of the wavefront in the direction perpendicular to the grating structures (right panel).In the present illustration this was realized for vertically aligned gratings.The intersection of both curves indicates the presence of a residual moiré fringe at the position where the lines of the absorption grating are parallel to the ones of the diffraction grating.Indeed, the diffraction and the absorption grating were not divergence matched.
Following the grating rotation scan, recording the moiré fringes at a single position of the absorption grating allowed to retrieve the spatially resolved wavefront phase Φ(x, y).The latter was extracted for each recorded image through Fourier analysis [30]: a Fourier transform in the direction parallel to the grating lines permits to isolate the first order component from the remaining frequencies (among them the carrier frequency), an inverse Fourier transform of this component allows to extract the fringe phase Ψx, y which has then to be unwrapped (Fig. 3, upper right panel).Eventual artifacts caused by a deviation in the experimental images from the periodic boundary conditions required by the mentioned Fourier analysis were suppressed by the application of a Hann window before processing the individual images.From the fringe phase the wavefront propagation angle in the direction perpendicular to the grating lines can be retrieved through [31] (Fig. 3, lower left panel): The fringe period in the horizontal direction p mx , respectively vertical direction p my is connected to the previously extracted fringe phase through Solving Eq. 5, respectively 6, for the unknown magnification M and inserting Eq. 10 into Eq.9, a Taylor series expansion to the first order of the expression 1/1 The design magnification M 0 and the intergrating distance d are known from the setup.The orientation angles for the diffraction and the absorption grating, β 1 and β 2 , were extracted from the grating rotation scan and the fringe phase Ψ(x, y) from the Fourier analysis of the moiré fringes.The error resulting from the geometric series identity is of the order of a percent provided that the fringe inclination angle arctan p mx p my is small [29].The latter condition is typically satisfied (Fig. 2).The wavefront phase can be retrieved, starting from through an integration.The equivalent height profile of the optical component in the XFEL beam (either one of the TRM pairs or the DCM) in the perpendicular direction to the grating lines is then given by where θ corresponds to the incidence angle of the XFEL pulses on the optical component, i.e., 4 mrad for the TRM I, 2 mrad for the TRM II, respectively 160 mrad for the DCM (Bragg angle at 12.4 keV).For the configuration with horizontal grating lines this gives also the angle for the projection of the height profile since the optical components were vertically deflecting.The curvature of the wavefront in the transverse direction was accounted for before the integration while propagation effects were negligible because of the short distance from the optical component under investigation to the interferometer.Since the spherical shape of the wavefront was still contained in the wavefront phase, the aspherical shape of the height profile was retrieved by subtracting a second order polynomial (Fig. 3, lower right panel).
The spatial resolution provided by the interferometer is mainly determined by the lateral shear of the ±1 st diffraction orders, the camera resolution and the projection angle on the investigated optics [13,32].Increasing the intergrating distance d allows for a larger shear, a good compromise with the angular resolution of the interferometer has to be found.The latter is proportional to the sensitivity of the grating interferometer [32][33][34].

Results
Both TRM configurations (low cut-off energy and high cut-off energy) were investigated at an X-ray photon energy of 7 keV.The grating lines were once aligned horizontally and once vertically.In the vertical orientation, the grating rotation scan yielded a radius of curvature (ROC) in the horizontal direction of 153.2±0.6 m and 155.1±0.6 m, respectively.The uncertainty on the ROC was derived from the standard error on the magnification M obtained during the minimization procedure (Eq.8) and the estimated error on the measured intergrating distance.
Assuming that the curvature of the wavefront in the horizontal direction is essentially due to the propagation from the source point, this indicates that the source point is before the end of the 10 th undulator section.A substantially smaller ROC was found in the vertical direction, we measured 107.4±0.4 m for the TRM I and 79.4±0.3 m for the TRM II.This indicates Fig. 3. From a single moiré pattern (upper left panel), the fringe phase in each detector column is extracted through a Fourier analysis (upper right panel).Subsequently the wavefront propagation angle can be recalculated (Eq.9; lower left panel) as well as the equivalent height profile (lower right panel) of the TRM, respectively the DCM.The spherical shape of the wavefront has to be accounted for in the wavefront slope and in the height profile in order to retrieve the aspherical components.More details can be found in the text.In the present example vertically oriented grating lines providing a sensitivity along the horizontal direction, an incident X-ray photon energy of 12.4 keV and the TRM II were considered.The fringe visibility was 0.21.
a defocusing effect of the reflecting mirrors in the vertical direction.A similar conclusion can be drawn for the measurements at 12.4 keV with the TRM II, the more pronounced defocusing effect of the latter TRM configuration being confirmed.The retrieved ROC in the horizontal direction was 158.5±0.4 m, while in the vertical direction the ROC was found to be 74.1±0.2 m.Note that in both configurations the first one of the two TRM is the same, only the incidence angle is changed to steer the XFEL beam to the second TRM [19].For the DCM the retrieved ROC was 158.8±0.5 m in the horizontal and 150.1±0.3 m in the vertical direction.In contrast to the TRM I and the TRM II, the DCM thus has a minor influence on the wavefront in either direction.
The latter assumption for the DCM was confirmed by the aspherical component of the wavefront as well as by the equivalent height profile obtained for horizontally aligned gratings (Fig. 4, bottom).The mean image of the recorded moiré pattern indicates, because of little observable distortions in the fringe pattern, that the incident wavefront presents only small deviations from the expected spherical shape.Indeed, the aspherical component is fairly flat, indicating a well-preserved wavefront, except for the corners.The measured root-mean-square (rms) wavefront aberration is equal to 0.17 µrad.The height profile yields a very smooth, flat surface without any pronounced height variations.The retrieved peak-to-valley (PV) value is 0.1 nm.The analyzed DCM section is limited by the beam size and the incidence angle on the surface.Fig. 4. Mean recorded moiré fringe image for horizontally oriented gratings, aspherical component of the wavefront slope (slope error, S. E.) in the vertical direction and the equivalent aspherical height profile (H.P.) for the TRM I, the TRM II and the DCM at an incident X-ray photon energy of either 7 keV or 12.4 keV.The displayed field of view for the mean moiré fringe image is 1.5 × 1.1 mm 2 for the lower X-ray photon energy (7 keV) and 1.0 × 0.7 mm 2 for the larger X-ray photon energy (12.4 keV).Because of different beam sizes at the two used X-ray photon energies, the width and the origin of the investigated region of the TRM II are different, explaining the different evolution of the height profile.The thick solid line represents the retrieved result for the mean image of 1000 XFEL shots for the lower X-ray photon energy and 50 XFEL shots (recorded during the grating rotation scan) for the higher X-ray photon energy.The non-solid lines stand for randomly selected single XFEL pulses, allow to visualize shot-to-shot fluctuations and are set off with respect to the result of the mean image, the latter being centered on the origin of the vertical axis.
Regarding both TRM configurations, the recorded moiré fringe pattern do not present strong distortions, inferring the same conclusion for the incident wavefront (Fig. fig:results).The rms value is 0.14 µrad for the TRM I and 0.05 µrad, respectively 0.15 µrad for the TRM II at X-ray photon energies of 7 keV and 12.4 keV.However, the aspherical component of the wavefront presents a curvature for both mirror configurations at an X-ray photon energy of 7 keV.The single-shot results are fairly comparable to the result obtained for the mean image.At an X-ray photon energy of 7 keV, the observed curvature is more pronounced for the TRM I.Moreover, the equivalent height profile shows a larger height variation along the surface.The equivalent height profiles along the vertical direction of both TRM configurations are displayed in Fig. 4. The PV value for the TRM I is 8.6 nm (rms=2.2nm).For the TRM II the measured PV values are 3.7 nm (rms=1.2nm) and 10.4 nm (rms=2.3nm) at X-ray photon energies of 7 keV and at 12.4 keV, respectively.If a 300 mm wide area centered along the TRM II is considered the PV values equal 1.2 nm, respectively 2.0 nm, the central region shows thus a good agreement between the two used X-ray photon energies.It can be concluded that the mirror surfaces are of excellent quality, especially the central parts of the height profile are extremely flat.The more pronounced bending at the edges, where also the wavefront shows more pronounced distortions, can probably be attributed to the mirror mounting.This emphasizes the importance of in-situ measurements under operational conditions.Comparing the results of different XFEL pulses (non-solid lines in Fig. 4) to the corresponding mean results (solid lines in Fig. 4) the capability for single-shot measurements of the grating interferometer is demonstrated.At the lower X-ray photon energy the different single-shot results match well between each other, while at the higher X-ray photon energy a less stable wavefront was observed which is explained by larger energy and intensity fluctuations of the different shots delivered by the XFEL and confirmed by larger positional fluctuations of the different pulses on the recorded images.
The spatial resolution along the surface is, compared to the DCM where the beam footprint is much smaller, limited by the shallow incidence angles on the TRM surfaces.The transverse height profile of both TRM configurations is comparable to the result shown in Fig. 3.At a photon energy of 12.4 keV and for horizontally aligned gratings, the orientation of the diffraction grating was first changed by 180 • , then the one of the absorption grating, each time followed by a grating rotation scan.Independently of the grating orientation, the retrieved radius of curvature in the vertical direction were identical and the equivalent height profiles presented the same trend.From this cross-check test, it can be concluded that the gratings were of good quality and did not present local artifacts influencing the measurement at a given position along the grating lines.The angular off-set of the diffraction grating with respect to the camera system was about 2.1 mrad for the measurements at an X-ray photon energy of 7 keV and 14.4 mrad for the measurements at an X-ray photon energy of 12.4 keV.With respect to the absorption grating the angular offset was 50.5 mrad, respectively 79.0 mrad.

Conclusion
Grating interferometry, which measures the phase gradient of the incident wavefront, was employed for in-situ, at-wavelength measurements at the SACLA hard XFEL and allowed for a spatially resolved study of the X-ray wavefront.The analysis of the moiré patterns recorded at a single position of the gratings yielded the differential phase of single shots at the interferometer and allowed to retrieve the wavefront propagation angle and thus, compared to a spherical wavefront, the wavefront distortions induced by the optical components.The equivalent height profiles of both TRM configurations, respectively the DCM, confirmed that the installed optical components are of excellent quality.The individual contributions of the height profile can not be separated.The main deformations that could be observed were attributed to the mounting of the mirrors.This underlines the importance of in-situ metrology measurements under operational conditions.In this respect grating interferometry is a powerful in-situ wavefront sensing technique for metrology measurements at, both, synchrotron and XFEL facilities.Since the investigated mirrors are among the best currently available X-ray mirrors (sub-nanometer height variation for an individual mirror), not only the sensitivity of grating interferometry and its potential as a metrology tool is validated but also the potential of this technique to support and contribute to further developments in mirror manufacturing and mirror mounting.Furthermore, since grating interferometry is an in-situ technique, it can be used for the on-line tuning of adaptive X-ray optics to their optimal parameters with respect to the preservation of the incident wavefront.