I21: an advanced high-resolution resonant inelastic X-ray scattering beamline at Diamond Light Source

The design of the resonant inelastic X-ray scattering beamline at Diamond Light Source, I21, is presented. X-ray commissioning results are shown and compared with the optical simulations.


Introduction
Resonant inelastic X-ray scattering (RIXS) is a powerful spectroscopic technique capable of probing charge-neutral excitations, such as charge-transfer excitations (e.g. between the ligand anions and the metal cations), and orbital excitations (e.g. dd or ff ), in a broad range of materials. With an improved energy resolution corresponding to the mid-infrared energy regime (i.e. 100-500 meV), RIXS, in particular the direct RIXS at the L-edges of transition metal elements, has shown to be capable of characterizing collective magnetic excitations in quantum magnetic materials (Braicovich et al., 2009;Ament et al., 2011). This newly revealed capability has excited considerable interest in the condensed matter physics community due to its complementarity with inelastic neutron scattering and because it is particularly advantageous for probing magnetic excitations in small samples or complex systems with multiple magnetic elements. RIXS has thus become a sought after technique, and, as such, the new generation of soft X-ray RIXS instruments (e.g. ID32 at ESRF, I21 at DLS, SIX at NSLS II, AGM-AGS at TPS, VERITAS at MAX IV) have been proposed and constructed, aiming to achieve a resolution of $ 25 meV comparable with k B T at ambient temperature (Brookes et al., 2018;Dvorak et al., 2016;Singh et al., 2021).
Among the newly delivered advanced RIXS instruments, the I21-RIXS beamline has achieved a robust combined energy resolution of $ 35 meV at the Cu L-edge, and $ 16 meV at the O K-edge. The breakthrough of the energy resolution has led to a wave of novel discoveries. For instance, charge density wave (CDW) excitations, electron-phonon anomalies, and acoustic plasmons were revealed in various cuprate superconductors Lee et al., 2021;Lin et al., 2020;Nag et al., 2020). For the newly discovered infinitelayer nickelate superconductors, RIXS revealed remarkable dispersive magnons akin to that of cuprates despite crucial differences in the electronic structures of the two . With the improved energy resolution, new insights were obtained on the orbiton physics in a canonical orbital system KCuF 3 . In material sciences, a coherent manybody exciton was discovered in a van der Waals antiferromagnet (Kang et al., 2020). I21 has also provided crucial spectroscopic evidence in identifying oxidized O 2 trapped in the highly charged unstable Li-rich battery cathode materials (House et al., 2020a,b).
Besides the research at the L-edges of 3d transition metal oxides (TMOs), there has been mounting interest in applying RIXS to 4d and 5d TMOs (Gretarsson et al., 2020;Moretti Sala et al., 2018). Therefore, the I21 beamline was proposed to deliver a dedicated high-resolution RIXS facility with a broad energy range from 280 eV to 3000 eV covering the C K-edge, O K-edge, all 3d L-edges, most 4d L-edges and some 5d M-edges.
To obtain high energy resolution in the soft X-ray range, high-quality grating optics are essential as they contribute directly to the energy broadening. Also, a long instrument is strongly desirable given all energy-resolving optics work at grazing angles. We expand the discussions of how to achieve a high-resolution soft X-ray RIXS beamline and spectrometer in Section 2. On the other hand, improving the energy resolution means that the X-ray photon throughput will be naturally reduced. Therefore a long undulator source, a simple beamline with minimal number of optics are preferable. For the spectrometer, collecting optics are imperative to enhance the acceptance angle of the high-resolution RIXS. Details of how we achieve a high photon throughput are laid out in Section 3. To target RIXS applications in three-dimensional materials, a complex cryogenic manipulator with six degrees of freedom is implemented for the momentum space mapping (see Section 4). The general mechanical design of the RIXS spectrometer is also presented in Section 4. To make the very high energy resolution practically usable, the whole instrument needs to be stable and user friendly. We discuss the relevant design and achievements including the long-term stability of the beamline in Section 5.
2. The energy resolution of the I21 RIXS beamline 2.1. Optical scheme of the beamline and the spectrometer The I21 beamline employs the divergent variable line spacing (dVLS) plane-grating optical design to achieve the best possible energy resolution at the soft X-ray energy range. This was corroborated by a thorough investigation of the dVLS optics scheme together with the collimated constant line spacing plane-grating monochromator (cPGM) and the convergent variable line spacing (cVLS) plane-grating monochromator optical designs (Strocov et al., 2010;Pereiro et al., 2009). As detailed in Section 2.2, the pre-mirror and gratings in the PGM are the main optics contributing to the energy resolution in the dVLS concept. However, in the  cPGM or cVLS scheme, extra components such as the collimating or (re)focusing mirrors affect the energy resolution. In addition, these optics also reduce the total efficiency of the beamline and make the alignment of the beamline more complex. These are detrimental factors to the photonhungry RIXS technique, especially when a very high energy resolution and precision alignment are desired.
For the RIXS spectrometer, the most commonly implemented optics schemes include the Rowland circle design (Nordgren et al., 1989), the VLS-Hettrick Underwood planegrating design (Hettrick et al., 1988), the AGM-AGS active grating design (Lai et al., 2014) and the spherical VLS (SVLS) grating design (Ghiringhelli et al., 2006). We will not provide a systematic comparison of all optical schemes as this has been done previously (Dvorak et al., 2016). Nevertheless, the same criteria hold for the selection of the optics scheme of the I21 RIXS spectrometer. We are strongly in favour of the SVLS concept based on the viewpoints that: (1) it is probably the simplest optical design as only one optics element, i.e. the SVLS grating, is in the dispersive plane. So in theory, for a given grating, the scheme could attain the best possible energy resolution than, for instance, the Hettrick Underwood design, in which more than one optics element is involved in the energy-resolved plane; (2) the optimization of the SVLS spectrometer for any energy is much less stringent than other schemes as one can find a focal condition by varying any of the entrance arm, the exit arm, or the grating incidence angle; (3) the focal plane can be optimized to a near grazing incident angle. For standard CCD detectors having an effective spatial resolution of 24 mm (Ghiringhelli et al., 2006) (see the expanded discussion in Section 2.2), the tilted focal plane can significantly improve its effective spatial resolution.
We show the entire I21 beamline optics layout in Fig. 1. X-rays generated from the APPLE-II undulator are fully accepted by the first plane optic M1. The M1 mirror acts to cut out high-energy radiation hence a lot of the radiation power of the X-ray beam. The tangentially cylindrical and sagittally plane M2 mirror focuses the horizontal X-ray beam to the exit slit. Deflected X-rays are dispersed by the dVLS plane-grating monochromator (PGM). The dVLS PGM comprises an internally water-cooled plane pre-mirror (M3) and four VLS plane gratings (VPG) which have water-cooled copper blocks clamped to the sides of the gratings. The X-rays are monochromated and vertically focused by the VLS grating to the exit slit. Thus monochromatic X-rays form a stigmatic source at the exit slit. The divergent X-rays are finally refocused by the M4 ellipsoidal mirror to the sample position. X-rays scattered from the sample are vertically intercepted by the SVLS grating delivering a monochromatic and converging beam focused onto the CCD detector. Horizontally two M5 plane-parabolic mirrors feature a very large horizontal acceptance angle hence relatively high photon throughput for the spectrometer. Detailed optical parameters of all beamline mirrors are summarized in Tables 1 and 2. The undulator parameters are shown in Table 3.

The energy resolution of the primary beamline
The critical beamline components relevant to the energy resolution are the undulator source, the PGM and the exit slit. M1 and M2 are horizontally deflecting optics with plane Table 1 List of all mirrors up to the sample position.   (Brookes et al., 2018). The double-bouncing configuration ensures that monochromatic X-rays propagate parallel to the incoming beam. The variable line density of the gratings follows a polynomial equation, making monochromatic X-rays converge and focus at the exit slit. The vertical exit slit usually operates between 10 and 50 mm for selecting certain energy bandwidth.
For the plane VPG gratings (i.e. the radius of curvature R ' 1), the VLS coefficients are optimized by zeroing the grating equation (4), the f 20 (5), f 30 (6) and f 40 (7) terms at one reference energy (Appendix A). As both the grating and the focus equation are fulfilled simultaneously across the whole energy range, the beamline works at a fixed c ff value (cos/ cos ) unlike the cPGM scheme where the c ff value is a variable. Note that one could minimize the impact of the powerinduced deformation on the M3 pre-mirror by optimizing c ff (Reininger et al., 2008). We discuss the effect of the absorbed power further in Section 2.5.
Contributions to the beamline energy resolution from the photon source, the PGM optics, and the exit slit are expressed in Appendix B. The total energy resolution of the beamline is a vector sum of the four contributions.
It is noticeable that the longer the beamline entrance arm r 1 or the exit arm r 2 (at a fixed exit slit opening), the smaller the contributions from the source size and the exit slit. To achieve the best possible energy resolution, r 1 and r 2 are optimized to 43 m and 28 m, respectively, by considering the space constraints of the internal beamline and the external spectrometer hall. We highlight that the PGM optic slope errors ( Gr and PM ) should reflect the final surface quality including the surface deformation induced by the mechanical clamping, and the angular instabilities caused by cooling water and the PGM mechanics. For the design of the I21 beamline, we paid significant effort to minimize the effective PGM optics surface slope errors. At the very early stage of the beamline construction, we purchased VPG grating substrates with specifications of 0.1 mrad slope error [the root mean square (RMS) value is used throughout unless otherwise stated]. For the optimization of the mechanical clamping, a comprehensive metrology study was performed in the Optics Metrology Lab at Diamond using the Diamond-NOM slope profiler (Alcock et al., 2016;Nistea et al., 2019). This study found that the surface slope error is remarkably sensitive to the mechanical configuration and the procedure of how the cooling mechanics are clamped onto the gratings. Using metrology feedback, the design and clamping procedure were optimized to minimize the strain induced in the optics. One needs to be meticulous in future designs if a surface slope error of < 0.05 mrad is desired. For the M3 pre-mirror, because of the high absorbed power, we chose an internally water-cooled mirror design. The final achievements are slightly better than the design specifications of 0.2 mrad for all PGM optics. Table 4 summarizes the VPG grating parameters including the optimized surface slope errors. We show in Fig. 2(a) the analytical and ray-traced beamline full width at half-maximum (FWHM) energy resolutions based on the measured slope errors. All ray-tracing results presented here were performed using SHADOW (Sanchez del Rio et al., 2011).
The I21 beamline is equipped with a gas cell as a standard component for quantifying the beamline energy resolution. It was used at the early stage of the beamline commissioning before the RIXS spectrometer became online. Most of the commissioning was performed at the Ne K-edge ($ 868 eV). The energy resolution extracted from the deconvolution analysis matches well with the design; however, it starts to plateau at < 50 meV due to the fitting uncertainty.   List of all gratings in the I21 PGM before the sample position.
Note that for VPG4, which has two coating stripes (Pt and Au), any parameters with multiple values represent the measurement performed with different coating stripes.

The energy resolution of the secondary spectrometer
From the optical scheme point of view, the I21 RIXS spectrometer is equivalent to a SVLS grating beamline. This parallel is stressed in the I21 spectrometer grating mechanics being labelled as the spherical grating monochromator (SGM). Given the space constraints of the spectrometer hall, we optimized the nominal length of the spectrometer at the reference energy to 13 m. Considering the limited translation ranges of the detector stage, we designed two SVLS gratings to cover the core energy range of 280-1500 eV. A third SVLS grating covers the intermediate X-ray energy range of 2-3 keV. The SVLS grating line density (a 0 coefficient) and the nominal incident angle were optimized for the sake of the best energy resolution and the maximal vertical acceptance angle (for more details see Section 3.3). The higher-order VLS coefficients and the radius of curvature of the SVLS substrates were optimized by zeroing equations (4), (5), (6) and (7) shown in Appendix A. We skip the discussion of the optimization procedure which is consistent with that developed by Strocov et al. (2011).
Concerning contributions to the spectrometer energy resolution, the vertical focal beam at the sample position, the SVLS grating optics and the CCD area detector represents the photon source, the diffraction optics and the exit slit, respectively. The detailed forms of these contributions are similar to equations (9), (10) and (12). Fig. 3 shows the focal beam size at the sample position with a fixed exit slit opening of 10.0 mm FWHM using the VPG2 grating at 1 keV. The ray-tracing vertical focal beam size at the sample is about 2.0 mm FWHM. The actual measured value is $ 2.0 mm, 2.5 mm and 3.0 mm FWHM at around 1 keV for VPG1, VPG2 and VPG3, respectively. The actual vertical beam size for VPG1 is consistent with the ray-tracing result; however, it becomes greater for VPG2 and VPG3. The horizontal focal beam size is $ 40 mm FWHM independent of the beamline gratings, consistent with the ray-tracing result. The slightly worse vertical focus at the sample is likely due to the beam footprint extending beyond the size of the polished area in the vertical plane. The M4 mirror is very curved in this direction, so it becomes increasingly difficult for mirror manufacturers to polish the optical surface as one moves away from the centre of the optical surface. The operational nominal c ff for VPG1, VPG2 and VPG3 is 2.0, 3.0 and 5.0, respectively. As a consequence, the vertical footprint on the M4 mirror becomes larger from VPG1 to VPG3, hence gradually greater vertical focal beam size at the sample position.
Similar to the VPG gratings, we specified an effective slope error of 0.2 mrad for the SVLS gratings whose curvature is only along the tangential direction, i.e. retaining a cylindrical shape. Although a slope error of 0.05 mrad is achieved for the substrates, the finally optimized slope error is around 0.15 mrad after the grating clamping. Note that the measurement has slightly larger error bars than that of the VPG gratings due to the curvature and the transparency of the silica substrates. Nevertheless, we reiterate that the mechanical clamping is pivotal to the effective slope error. The measured vibrational stability of the SGM mechanics is $ 10 nrad, which is negligible for the current setup. All the SVLS grating parameters are shown in Table 5.
For the CCD detector, only commercial products were assumed to be available for the early beamline operation. Due to the charge spread-out in the soft X-ray energy range, the effective spatial resolution of CCD detectors is about 24 mm FWHM greater than the typical pixel size of 13.5 mm (Ghiringhelli et al., 2006). For the SVLS spectrometer, the X-ray focal plane can be designed to a grazing-incidence angle () so   The measured focal beam size at the sample position with VPG2 at 1 keV and the exit slit opening at as to minimize the contribution from the CCD detector. For I21, the operational angle of the detector is optimized to be between 10 and 40 for the energy range of 280-1500 eV. The automation of the detector angular motion is achieved via a ferrofluidic seal design. For each energy position, although the detector is supposed to work at its optimized geometry, we notice that the energy resolution within the detector (one inch square) is tolerable within the operational angle.
The energy resolution of the spectrometer is a vector sum of the above three contributions. For the energy position other than the reference energy, the grating equation (4), the focus equation (5) and the coma equation (6) are fulfilled simultaneously. The horizontal (vertical) translation range of the detector is 5200 (1400) mm to cover the core energy range 280-1500 eV. Based on the actual achieved SVLS grating slope error (0.15 mrad) and the actual averaged vertical beam size (2.5 mm), we performed the analytical calculation of the spectrometer resolution together with the ray-tracing results, shown in Fig. 2(a). Note that the originally specified energy resolution of the spectrometer, based on slightly different source (2.0 mm) and grating slope errors (0.2 mrad), is comparable with the current calculations.

The total combined energy resolution
To obtain the total combined energy resolution, we take the vector sum of the beamline and the spectrometer FWHM energy resolutions and present the analytical result in Fig. 2 In addition, we plot the actual achieved energy resolution via measuring the elastic peak line width at the CCD detector for various grating combinations. The measured energy resolutions of the VPG1 + SVLS1 and VPG2 + SVLS2 match very well with the design throughout the whole energy range. However, for the VPG3 + SVLS2, the reality is always slightly worse than the theory. As explained, this may be partially due to the slightly larger vertical focal beam size (3.0 mm FWHM). We highlight that achieving the optimized energy resolution is straightforward owing to a free parameter available in the parameter set of the spectrometer. Fig. 4 displays the elastic peaks measured at the Cu L 3 -edge (930 eV) and the O K-edge (532 eV) using VPG2 + SVLS2 and VPG3 + SVLS2 grating configuration, respectively. The elastic peaks are fitted by Gaussian functions although there are indications of very small aberrations from the beamline optics. To demonstrate the RIXS data quality, we present a typical Cu L 3 -edge RIXS spectrum from a Bi 2 Sr 2-x La x CuO 6+ cuprate superconductor sample in Fig. 5. The high energy resolution of $ 38 meV and high photon throughput enable us to acquire a good statistical RIXS spectrum in 12 min where the bond-stretching phonons are clearly resolved from the elastic peak.  Elastically scattered X-ray beam at (a) Cu L-and (b) O K-edges from a carbon tape, fitted with Gaussian line-shapes of FWHM 35 and 16 meV, respectively. Insets show the achievable energy resolution at I21 for the three PGM gratings VPG1 (600 l/mm), VPG2 (1000 l/mm) and VPG3 (2000 l/mm) in combination with SGM gratings SVLS1 (1500 l/mm) and SVLS2 (2700 l/mm) at Cu L-and O K-edges.

Figure 5
Bi 2 Sr 2-x La x CuO 6+ (x = 0.6) Cu L-edge RIXS spectrum at q k = 0.635 Å À1 projected along the crystalline a-axis acquired for 10 min using the grating combination of VPG2 and SVLS2 with an energy resolution of 38 meV . The pink dashed line is the elastic peak and the green dashed line is the bond-stretching phonon. The black solid line is a cumulative fit of the components and a linear background from paramagnons. Table 5 List of all gratings in the I21 SGM after the sample position.

Other contributions to the energy resolution
Heat load on the optics is inherently associated with highflux X-ray sources due to their high power. The M1 and M2 mirrors, which were designed and built by IDT Ltd, are directly cooled by a gallium-indium eutectic filled into a notch on the top surface of the optics. The eutectic itself is cooled by water through a metal fin. This cooling concept delivers sufficient cooling efficiency and, importantly, it avoids the mechanical clamping and minimizes cooling-induced vibrations. The most detrimental effect of the absorbed power on the energy resolution is the local surface deformations of the PGM optics along the tangential direction. A heat bump over the beam footprint alters the radius of curvature of the optics. To mitigate the impact, the M3 mirror is internally watercooled through narrow channels just 1 mm beneath the mirror surface. The VPG gratings are also water-cooled through copper pipelines attached to the side of the gratings. The rest of the optics and mechanics downstream of the PGM are uncooled. In the dVLS scheme, the altered focal condition of M3 due to the absorbed power can be partially mitigated by modifying the operational c ff value. We have observed that the c ff value corresponding to the best energy resolution changes as a function of the cooling-water flow rate. In other words, the c ff value correction works, though the non-spherical curvature may remain as part of the energy resolution broadening. The latter could be another potential source of detrimental contribution to the VPG3 energy resolution.
In the first year of the beamline operation, we experienced a gradual deterioration of the energy resolution. For instance, at the Cu L 3 -edge, the energy resolution increased monotonically from $ 35 meV to $ 55 meV. The resolution at the rest of the other energy positions also decayed similarly. Surprisingly, inhomogeneous energy resolution was found as a function of the M3 mirror's transverse position. Visual inspection revealed that serious carbon contamination has developed near the interface of the cooled and the uncooled area. This was most likely due to the accidental beam heating from the initial X-ray commissioning during which the X-ray beam was placed close to the edge of the cooled zone. Subsequent optical metrology showed that the mirror surface had deformed significantly with the worst area having a slope error of 50 mrad. The deterioration of the energy resolution is correlated to the surface deformation induced by the beam heating. Note that there was no obvious change in the vacuum pressure in the PGM over the course of the first year of operation. Replacement of the damaged M3 mirror by an identical one has restored the energy resolution, and it has remained stable after we constrained the X-ray beam far away from the uncooled region.
Coma and spherical aberrations are detrimental to microfocusing using grazing-incidence X-ray optics. For instance, we revealed that the beamline energy resolution worsens if more than 4 of the vertical divergent beam ( is the RMS value of the vertical divergence) is accepted at the entrance of the PGM. Here the coma aberration of the PGM optics becomes non-negligible under the large vertical beam illumi-nation. A similar situation happens for the spectrometer: the energy resolution deteriorates if the vertical acceptance of the SVLS grating is greater than 3 mrad, potentially due to nonnegligible coma and spherical aberrations.
In reality, the vibration instability is another source of contribution to the energy resolution. The PGM and SGM internal mechanics are isolated from their external chambers which are supported by granite blocks. The exit slit, M4 mirror mechanics and the sample chamber also rest on granite supports. For the spectrometer, the SGM mechanics is built on top of granite air-bearing systems. The entire spectrometer steel structure is an in-house design which achieved the vertical (horizontal) vibration instability of $ 50 nm (100 nm) up to 100 Hz near the detector at a height of 2.0 m above the floor (Howell et al., 2018). To ensure the same floor stability between the whole beamline and the spectrometer, the I21 spectrometer hall floor is piled using the same pile spacing and length as the Diamond internal floor. The pattern of piles was optimized to maximize the floor stability at the exit slits, sample position and radial pattern for the spectrometer airbearing systems. The piled floor has achieved a vibration stability of $ 20 nm RMS between 1 and 100 Hz. Note that the vibrational stability does not impact much on the current performance. However, it may contribute in the future once the quality of the grating optics are improved.
3. X-ray photon throughput 3.1. A long straight and a long undulator RIXS is a very photon hungry technique. For a high-resolution RIXS instrument, the number of photons accumulated at the detector is even more scarce due to the largely reduced energy bandwidth and the collection angle of the spectrometer.
When the I21 beamline was proposed, a long straight section was selected so that a long undulator could be installed to provide a high photon flux. Eventually, a single 5 m-long helical undulator was designed and built by the in-house insertion device group at Diamond Light Source. The photon flux was simulated using the Spectra code (Tanaka, 2021) and is presented in Fig. 6. Note that all photon fluxes presented here, both calculated or measured, are for a ring current of 300 mA. Note that the high energy range (2-3 keV) can only be achieved by higher-order harmonics of the undulator in linearly polarized mode. The final choice of the period is based on the requirement of the minimum energy of the beamline.

Optimizing mirror reflectivities
We chose the dVLS optics scheme for achieving a high energy resolution but also for attaining the minimized number of optics compared with other optics schemes. All mirror optics were optimized to obtain a high reflectivity. For instance, M1, M2 and M4 mirrors work at shallowest possible grazing-incidence angles to maximize the photon throughput of the beamline. Additionally, multiple coating stripes of Pt, Ni and amorphous carbon were applied to both M1 and M2 to yield a high reflectivity throughout the entire energy range [see Figs. 7(a) and 7(b)]. For the strongly curved M4 ellipsoidal mirror, two identical optics (with a single layer of Pt and Ni coating stripe on each) are vertically staggered to cover the whole energy range [see Fig. 7(d)]. The same coating strategy (Pt and Ni) was applied to the M3 pre-mirror which works very effectively as the Ni coating yields about 50% higher reflectivity than the Pt coating for a photon energy lower than the Ni L-edges and above 2 keV [see Fig. 7(c)]. In Fig. 8, we show the monochromatic photon flux measured at a ring current of 300 mA using a calibrated photodiode AXUV-100 installed downstream of the exit slit with an opening of 10 mm FWHM. The ray-tracing results are also presented in Fig. 8. X-ray photon throughput of the RIXS spectrometer would have been significantly compromised if we simply adopted the conventional divergent SVLS optics scheme. The size limitation of the detector poses severe constraints on the collection angle of a long spectrometer. We investigated the collection mirror systems to enhance the horizontal angular acceptance H . Eventually, we implemented two planeparaboloidal mirrors (M5), symmetrically placed as close as possible to the sample so as to maximize H . M5 are sagittally placed in the beam path with a  Simulated photon flux transmitted through the I21 front-end as a function of energy for three polarizations: linear horizontal (LH), linear vertical (LV) and circular (C). The simulation was done for the existing front-end aperture, which has an angular acceptance of 178 mrad horizontally and 143 mrad vertically. This allows > 99% of the beam to pass through at the minimum energy of 250 eV. Circularly polarized light is available up to 1500 eV using the first harmonic. For linearly polarized light, the highest flux is provided by the first harmonic up to around 1200 eV, while the third harmonic provides the highest flux up to 2300 eV. Higher harmonics (up to the 11th harmonic) provide the maximum flux for linearly polarized light up to 3000 eV.

Figure 7
The simulated reflectivity of M1, M2, M3 and M4 mirrors as a function of energy. Note that the reflectivity of the M3 mirror is based on its corresponding angle for each energy position. The measured (filled) and ray-tracing (open) monochromatic photon flux as a function of energy with the exit slit opening of 10 mm at a ring current of 300 mA. fixed geometry having the plane (paraboloidal) surface in the sagittal (tangential) direction. In other words, M5 does not contribute to the energy resolution but only collimates X-ray photons in the horizontal plane [see the top view of the M5 schematics in Fig. 9(a)]. The optimization of the grazingincidence angle is based on a figure of merit F() which is the effective collection angle, i.e. approximates to the product of the mirror reflectivity R() (based on common coating materials of Pt or Ni) and the collection angle H (), For a mirror operating in a grazing geometry, the collection angle H () can be approximately expressed as in which d is the distance between the sample and the close end of the mirror (d has a minimized value of 55 mm due to the space constraint), L stands for the mirror length which is dependent on the incidence angle and must fulfil that the total horizontal span of the two stripes of beam is not greater than the ruled grating width (W = 30 mm), 2 sin 2ðd þ L=2Þ þ sin L ¼ 30: In addition we set the criteria that the figure of merit F() has to maintain a relatively high value up to the energy of around 1500 eV. Eventually we optimized and L to be 2 and 190 mm, respectively. For instance at the reference energy of 930 eV using SVLS2, this corresponds to an effective horizontal collection angle of 27.6 mrad in contrast to $ 2 mrad without the M5 mirror. For the 2-3 keV high-energy range, we applied the same optimization method and found that the angle is optimized to 1 based on a metal coating of Ni or Rh. As a result, two pairs of M5 mirrors are implemented for the M5 system (details of the mechanical setup are discussed in Section 4). Similar to the beamline mirrors, we also applied multiple coating stripes to M5 for maximizing the reflectivities benefiting from the vertical plane shape. In Fig. 9(b), we present the absolute figure of merit and the relative figure of merit for both the core-energy (M5a) and the high-energy (M5b) mirrors. Note that the relative figure of merit demonstrates the gain of the horizontal acceptance after implementing M5 comparing with a fixed horizontal acceptance angle of 2 mrad without the M5 mirror. The latter is fixed to the value at the reference energy of 930 eV which in principle is a variable dependent on the SVLS grating and the sampleto-detector distance. In Fig. 10 we show Bi 2 Sr 2-x La x CuO 6+ Cu L-edge RIXS spectra collected with and without one of the M5a mirrors. The RIXS spectral line shape is consistent between the two, despite a factor of 14 difference in their intensities. The actual gain of the throughput matches well with the analytical calculation. The substantial gain of the photon throughput is not without a price. M5 mirrors have a considerable magnification ratio of $ 100 requiring very delicate alignment with high precision and reproducibility. Measuring RIXS signals throughout the momentum space is a critical requirement for most single-crystal RIXS studies; therefore the X-ray focal beam has to meet both the pivot point of the M5 mirrors, which is the true 2 rotation centre, and the pivot point of the manipulator rotation stage which is the true rotation centre, within 20 mm over a large angular range of 150 . More details of the mechanical setup are explained in Section 4. Besides the major demand in optics alignment, the close proximity (< 5 mm) between the M5 mirror system and the sample manipulator requires diligent mechanical designs for the sample manipulator and the sample transfer systems.   Bi 2 Sr 2-x La x CuO 6+ (x = 0.2) Cu L-edge RIXS spectra collected with and without M5 collecting mirrors and normalized to the incident X-ray flux. The inset shows the zoom into the low-energy excitations of the spectra.
The application of a single M5 mirror has been a default operational mode for most users. Operating with two M5 mirrors doubles the RIXS efficiency for samples having no momentum dependence. For single-crystal materials, adding the second M5 mirror makes the alignment more complex, particularly due to the limited size of the current CCD sensor.
One minor point of using collecting optics is the slightly compromised momentum resolution. It increases from AE 4 Â 10 À4 (2.3 Â 10 À4 ) to AE 0.01 (0.006) Å À1 at the Cu L 3 -(O K-) edge. Although this is more than a one order of magnitude increase in the momentum resolution, it is still sufficient for most momentumresolved RIXS studies.

Optimizing grating efficiencies
One of the major constraints of the photon throughput of soft X-ray beamlines is the grating efficiency. To achieve a high energy resolving power (e.g. >20 000), the grating efficiency is typically below 10%. For the I21 beamline, we designed and optimized three VPG gratings with line densities of 600 lines mm À1 (l/mm), 1000 l/mm and 2000 l/mm, to cover the core energy range (280-1500 eV), for the high-flux, mediumresolution and high-resolution mode, respectively. Fig. 11(a) displays the simulated grating efficiencies together with the corresponding at-wavelength measurements performed at the Optics Beamline at BESSY (Eggenstein et al., 2013). The REFLEC program (Schä fers & Krumrey, 1996) was used to simulate the grating efficiencies. Note that each grating works at a more or less fixed c ff value across the vast majority of the energy range. The energy range of 2-3 keV is covered by the VPG4 grating which falls out of the main focus of the paper.
Optimizing the efficiency of the SVLS gratings is more complex than that of the VPG gratings. The primary drive is to achieve the targeted energy resolution with highest possible effective vertical collection angle which is the product of the grating efficiency and the vertical collection angle V . Due to the large energy range and the limited vertical and horizontal translation ranges of the detector platform, two SVLS gratings are needed to cover the energy range of 280-1500 eV. We specified an energy resolution of $ 15 meV (25 meV) at the reference energy of 530 eV (930 eV) for the SVLS1 (SVLS2) grating, based on the following parameter set: the spectrometer length (at the reference energy) = 13 000 mm, SVLS slope errors = 0.2 mrad (RMS), length of SVLS gratings = 200 mm, source size = 2.0 mm (FWHM), CCD resolution = 24 mm (FWHM) with angle = 20 . In order to achieve this, the analysis delivers a grating line-density of 1500 l/mm (2700 l/mm). For both SVLS gratings, a common nominal grazing-incidence angle of 2.4 was chosen to fulfil the designed translation ranges of the detector. Also, an optimized grating entrance arm r 1 of 2200 mm is chosen for the reference energy so that the range of r 1 over the entire energy range fits within the mechanical constraints of the SGM. Full optimization of the SVLS gratings was made by using our own analytical code, the REFLEC program as well as the TraceVLS program from Strocov et al. (2011). We show in Fig. 11(b) the simulated efficiency of each SVLS grating.

Carbon contamination
Carbon contamination is a serious issue for soft X-ray beamlines. A thin amorphous carbon layer normally builds up on optics surfaces and deteriorates its reflectivity. At the I21 beamline, we set a stringent vacuum pressure threshold for the initial beamline commissioning. All optics components and chambers are always baked up to around 110 C for vacuum conditioning after every vacuum intervention. During operation, the pressure of the M1 and M2 systems is <1 Â 10 À9 mbar under the X-ray exposure. The pressure of the PGM system is <5 Â 10 À10 and < 5 Â 10 À9 mbar without and with X-rays, respectively. Unlike other beamlines, where a low dose of O 2 is leaked to the PGM system to actively minimize carbon contamination, we found that the optics reflectivity is well maintained after the first few years of user operation, and hence a partial O 2 pressure is not used. We would like to note that the Ni coatings on M1, M2 and M3 may be at risk of oxidizing in a partial O 2 pressure, so this was another factor in our decision.

The I21 sample station and the RIXS spectrometer
One critical aspect of modern RIXS beamlines for the study of three-dimensional quantum materials is that one needs to be able to measure at an arbitrary point in reciprocal space. In practical terms, this means that one needs to be able to rotate the sample about at least three independent rotation axes that pass through the sample. It also means that one needs to be able to change the scattering angle: i.e. in the case of I21, one needs to be able to rotate the whole $ 15 m-long spectrometer arm. When one considers that all of the above also needs The simulated VPG and SVLS grating efficiencies (lines) as a function of energy. The results of the at-wavelength measurement (filled dots) on VPG gratings are also provided.
to be performed under ultra-high vacuum conditions (< 1 Â 10 À9 mbar), and that the light emitted from the sample needs to be able to pass to the CCD detector located at the end of the spectrometer, then it is clear that this is a tremendous mechanical engineering challenge. Moreover, many quantum materials have novel behaviour at low temperatures (<50 K), so it is also important to be able to cryogenically cool samples. Finally, as described in Section 3.2, in order to enhance the SVLS spectrometer throughput it is vital to use horizontally collecting mirrors (M5) at the expense of broadening the momentum resolution in the horizontal plane. The effectiveness of these mirrors is enhanced by having them as close as possible to the sample position, and therefore at I21 these mirrors are installed inside the sample vessel. An overview of the sample area is presented in Fig. 12.
In this section, many of the mechanical and vacuum engineering aspects of the I21 sample station and the RIXS spectrometer are described in detail. We firstly describe the I21 sample manipulator. We then present the mechanics for the M5 mirror system, followed by a description of the sample vessel in which the manipulator and the M5 system are both installed. Finally, we describe the design of the RIXS spectrometer, and discuss the key design decisions that we made.

Sample manipulator
The I21 sample manipulator is essentially a modified version of the sample manipulator in use at the I05 ARPES beamline at Diamond Light Source. Further details about the manipulator can be found in the I05 beamline paper (Hoesch et al., 2017). Here we focus only on the modifications that were made for the I21 beamline. The manipulator is shown in Fig. 13.
One important modification was to enable drain current measurements to be performed on the sample, so total electron yield X-ray absorption measurements become applicable. This was accomplished by introducing a sapphire layer behind the sample puck holder, which at low temperatures is an excellent thermal conductor but a poor electrical conductor. This electrically isolates the sample so that it is possible to measure a drain current from it. The change also raises the lowest possible sample temperature achievable, so whereas at I05 <7 K is achieved, at I21 a lowest temperature of 9.5 K is obtained. However, this is still much lower than $ 20 K that most other RIXS beamlines can achieve at present.
The I05 manipulator design blocks incoming or outgoing X-rays with an angle $ 20 . While this is not a significant issue for most ARPES studies, this design would exclude certain grazing geometries which can be very important in momentum-resolved soft X-ray RIXS studies. Therefore, for the I21 manipulator, the sample position was shifted in the positive x direction (see Fig. 13) in order to enable grazing incoming/outgoing X-ray beams. Consequently the centre of rotation of the chi () axis is displaced with respect to the centre of rotation of the th () axis. Therefore in order to rotate , one needs to correct the sample position in both x and z as otherwise the sample would precess out of the beam. This precession correction has been implemented in software and is used routinely by users.
Another key difference relative to the I05 manipulator is the order in which the translation stages and the rotation stage are mounted out-of-vacuum. At I05 the rotation stage is mounted on top of the XYZ translation stage (so if the sample is moved in the horizontal XY plane, the rotation axis also moves), whereas at I21 the rotation stage is underneath the XYZ translation stage, and is fixed to the sample vessel. This means that at I21 the rotation axis is decoupled from the XYZ translation stage. This decision was made because it is critical for I21 that any part of the sample can be put on the rotation axis to eliminate sample precession. An alternative A rendering of the I21 sample station and the surrounding area.

Figure 13
The I21 sample manipulator. In panel (a) the whole manipulator is shown, with the key out-of-vacuum components labelled. Panel (b) shows the sample holder of the manipulator, with all six degrees-of-freedom labelled. solution would have been to put the XYZ stage in vacuum, as was done at the ID32 RIXS beamline at the ESRF (Brookes et al., 2018), but this would have been incompatible with the invacuum M5 mirror design and would also have compromised the base temperature achievable.
In addition, the I05 manipulator uses a differentially pumped rotary feedthrough (ZRP100) from VacGen as the rotation stage, but the eccentricity of such a stage is uncertain. Since any eccentricity of the rotation stage would manifest itself as a change in sample position as a function of , we chose to use a high-precision rotation stage (a HUBER Goniometer 420) which HUBER Diffraktionstechnik GmbH supplied with a differentially pumped rotary feedthrough integrated into the design. The eccentricity of this stage was found to be <5 mm.
The alignment of the sample manipulator is critical for efficient operation of the I21 beamline. It is of paramount importance that the focal beam position is coincident with the sample manipulator rotation axis, otherwise the RIXS signal shifts from the centre of the detector when is changed. One can see this effect in Fig. 14, where the X-ray beam is deliberately shifted away from the rotation axis in 25 mm increments. Even after one 25 mm step, we already see that the beam is noticeably shifted from the centre of the detector screen when in grazing incidence ( = 20 ) or in grazing outgoing ( = 140 ) geometries. Such a high sensitivity is a direct consequence of the extreme magnification ratio of the M5 mirror optics. In practice we have found that the beam needs to be within 20 mm of the rotation axis in order to minimize such effects. These observations demonstrate that the low eccentricity of the HUBER rotation stage is absolutely vital to ensure smooth user operation.
As with the I05 design, the sample manipulator has the same angular range for the in-vac and phi () axes. The detailed motion parameters are presented in Table 6. The I21 manipulator is compatible with standard Omicron pucks. Samples can be transferred via a loadlock which allows up to five samples to be installed at once.

The M5 mirror system
In Fig. 15(a) a rendering of the M5 optics in their mirror holders is shown. As described in the optical properties of M5 mirrors in Section 3.2, a pair of optics was implemented for obtaining the highest possible photon throughput in the core energy range up to 1.5 keV (M5a). An additional pair (M5b) was implemented for the high-energy range (2-3 keV). The mechanics were designed so that each of the vertical stack of mirrors could be clamped separately and any induced clamping distortions could be checked on the Diamond-NOM before installation (Alcock et al., 2010(Alcock et al., , 2016. Each vertical stack of mirrors could then be installed into the main mechanics using three bolts from the back, minimizing the risk of any damage to the optical surfaces during installation. The two vertical stacks of mirrors are mounted on two independent ultra-high-vacuum (UHV) compatible hexapods, manufactured by SmarAct GmbH. The two vertical stacks of mirrors are so close to each other that the two SmarPods are effectively nested together, but they were carefully designed Panels showing the movement of the RIXS signal on an Andor CCD detector for different X-ray incident angles () and sample x positions. The top, middle and bottom rows correspond to = 20 , 80 and 140 , respectively. The panels in each column correspond to increments of x in steps of 25 mm in negative or positive directions from the central position. Table 6 List of manipulator motion axes with corresponding motion specifications.

Minimum incremental step
Unidirectional reproducibility x AE 5 mm <5 mm 0 . 5 mm y AE 5 mm <5 mm 0 . 5 mm z AE 50 mm < 1 mm 0 . 5 mm > 345 < 0.001 < 0.001 À30 ! +45 < 0.05 < 0.05 AE 170 < 0.01 < 0.05 so that it is not possible for them to clash with each other. As one can anticipate from Fig. 15(a), the close proximity of the mirror holders and the mirror optics means that, without mitigation, one mirror could easily collide into another using the independent hexapods. This problem is circumvented by the addition of seven in-vacuum limit switches mounted on the mirror holders, which alert users if the mirror mechanics are in a dangerous position. These limit switches also act as hard stops, making it impossible for the mirrors to contact one another. In Fig. 15(b) a rendering of the whole M5 mirror mechanics (with all other components removed, including the sample chamber) is presented. In operation, the M5 optics need to be rotated about a vertical axis to match the scattering angle of the spectrometer. This is achieved by using a UHV-compatible rotation stage from Newport (an RV350). The eccentricity of this stage is <5 mm.
As the I21 M5 mirror system consists of two horizontal pairs of mirrors, one needs to be able to translate the mirrors vertically by up to 90 mm to switch between the top pair and the bottom pair. This is done ex-vacuum by a granite wedge stage that was designed in-house at Diamond Light Source using rails from Schneeberger. The vertical motion is then transferred into ultra-high vacuum using the four posts shown in Fig. 15(b) which pass through four bellows mounted on the bottom of the sample vessel.
For operation at multiple values of 2 scattering angle formed between the beamline and the spectrometer arm, it is critical that the eccentricity of the Newport rotation stage is minimized, that the rotation axis of the Newport rotation stage is as close to vertical as possible, and that any parasitic horizontal translations or parasitic rotations of the M5 vertical stage are minimized. The motion of the M5 vertical stage was checked via two methods: the horizontal translations were checked using a laser tracker system which was sensitive to motions down to 50 mm, while the parasitic angles and orientation of the rotation axis were checked using an autocollimator setup to measure the change in angle of the stage as a function of the position of the M5 vertical stage. After fine adjustment of the support structure between the granite wedge stage and the Newport rotation stage, we found no parasitic horizontal translations (down to $ 50 mm), while the parasitic rotations were below AE 40 mrad. Fig. 16(a) shows a photograph of the inner part of the sample vessel which can be compared with a rendering of the 3D engineering model in Fig. 16(b). Besides the aforementioned optics and mechanics, two photodiodes are mounted on the Newport rotation stage close to the sample manipulator. These were initially anticipated to collect the X-ray fluorescence signal from samples for X-ray absorption spectra (XAS). Another set of photodiodes are installed on an invacuum slewing ring further away from the manipulator. When combined with the M5 mirrors, these rotary photodiodes are found to provide XAS data with a comparable quality to the fixed photodiodes. The rotary photodiodes also   The I21 M5 collection mirror mechanics. Panel (a) is a rendering of the M5 optics and the mirror holders, while (b) shows the whole M5 mirror mechanics. act as an important detector for the beamline alignment and the sample half-cutting alignment, which are crucial for setting up user experiments.

Sample vessel with continuously rotatable outgoing X-ray port
In order to be able to measure RIXS over a large range of scattering angles, one needs to be able to rotate an outgoing X-ray port on an ultra-high-vacuum sample vessel. One possible solution is to use very large differentially pumped rotary feedthroughs, but this is complicated by the fact that one needs to keep the incoming X-ray port fixed while rotating the outgoing X-ray port. Another solution is to use a triple-rotating flange, as is used at the SIX beamline at NSLS II (Dvorak et al., 2016), which can use standard (if very large) differentially pumped feedthroughs but requires complicated motion control systems to make sure the port moves as required. We chose to use the solution pioneered by CINEL, which uses differentially pumped seals in a novel geometry, following the design used at the ID32 beamline at the ESRF (Brookes et al., 2018).
The I21 sample vessel provides a large angular range (0-150 ) for 2. This enables RIXS measurements to be performed at low scattering angles (< 50 ) which is essential for some science cases . The base pressure achieved in the sliding-seal vessel is 2 Â 10 À10 mbar and is pumped with one 500 l s À1 ion pump (Gamma Vacuum 500T), a 300 l s À1 turbomolecular pump (Edwards Vacuum nEXT300D) and a cryopump (SHI Cryogenics Group Marathon CP-8). The sliding-seal vessel achieves a remarkable vacuum pressure of < 7 Â 10 À10 mbar while the sliding seal is in motion thanks to the differential-pumping seal design from CINEL.
To ensure the mechanical stability, the sample vessel is supported on four airpads resting on four granite posts around the M5 mirror system, as shown in Fig. 17. The initial alignment of the eccentricity between the manipulator rotation axis and the M5 rotation stage was done by using the airpads to move the whole sample vessel in the horizontal plane. Once the correct location of the sample vessel was found, the vessel was firmly secured in place.
A great effort was made in the early design of the sample chamber to ensure that there are two CF40 ports at exactly 90 to one another in the horizontal scattering plane. This was originally enabled to allow any sample precession to be monitored using the cameras, but in practice the extreme sensitivity of the M5 mirror system to the sample position (see Fig. 14) acts as a far more sensitive measure of the eccentricity of the sample. However the attention placed on ensuring excellent visibility inside such a complex sample vessel has proved to be worthwhile, as it helps make operation of the endstation more intuitive and straightforward.

The mechanical design of the RIXS spectrometer
An overview of the I21 RIXS spectrometer and the dedicated spectrometer hall are shown in Fig. 18. The optical design of the spectrometer was described in Section 2.1.
The SVLS gratings optics are accommodated in a SGM monochromator (BesTec) which follows a similar internal mechanical design as a typical PGM but with only one rotational axis. Because of the requirement of a variable entrance arm r 1 , the SGM mechanics is supported on an air-bearing system which works in combination with a rack and pinion drive system. Unlike the PGM, the SGM mechanics is equipped with two linear wedge stages underneath to accommodate the potential misalignment of the roll axis or the absolute height of the SGM. Since there is no absorbed power to be concerned with for the RIXS spectrometer, the SVLS gratings are only base-clamped without the need of cooling mechanics. The overall mechanical stability has been measured as $ 10 nrad up to 100 Hz.
The steel structure of the spectrometer was an in-house design by Diamond Light Source and manufactured by OCSAM. The horizontal (vertical) detector stage was made so as to cover a translation range of 5.5 m (2.0 m). The structure of the two stages were optimized to achieve the highest possible eigenfrequency of the first mode. The two motions are based on linear rails and equipped with absolute encoders. The lattice structure was designed to be light and stiff so as to support the long but retractable beam tube and bellows between the SGM and the detector vertical stage. The linking structure is flexible in the vertical direction but rigid in the horizontal in order to make the whole spectrometer acting effectively as one single mechanical component for the rotational motion of the scattering angle.
Similar to the ERIXS spectrometer design at ID32, the I21 spectrometer uses airpads to lift the detector platform when the spectrometer is rotated about the sample position. However, at I21 the SGM also moves on air-bearings, whereas at ID32 the system sits on a high-precision rail. In principle a rail could act as a spring, making the grating mechanics less stable. We chose to use an air-bearing so that when the air is switched off, the contact with the highly stable ground is maximized (see Section 5).
During the early stage of the user operation, we observed deformations near the interfaces of the marble tiles. These are troublesome for the air-bearing system which only lifts the entire spectrometer in the region of $ 40 mm. The heavy weight of the I21 spectrometer may be partially the cause of the deformations; however, the unavoidable settlement of the whole building may also be contributing to the issue. The situation is improving as we have performed repolishing of the granite and marble floors. We are also currently increasing the lifting capacity by making new air-bearing systems for the detector platform.

Beamline stability
We have demonstrated the importance of the high-frequency vibrational stability of optics and mechanics for achieving a good energy resolution. Equally, the long-term stability ($ hours) of the beamline components is also critical to ensure smooth RIXS data acquisition and in general user friendliness. At the I21 beamline, almost all motions are equipped with encoders operating in close-loop. For instance, for the vertical beam (relevant to the energy resolution), pitch angular motions of PGM and SGM optics are corroborated with highest possible angular stability in both the short term (vibrations) and the long term (drifts). We also designed a feedback system (up to 10 Hz) to control the horizontal beam position throughout the beamline. For the M1 and M2 mirrors, besides the coarse pitch angular motions supplied by the primary mirror mechanics (supplied by IDT Ltd), additional pitch motions of the individual optics are implemented via an in-vacuum piezo-drive mechanics. As part of the beamline diagnostics tools, drain current measurements were enabled from the blade edges of the second and third white-beam slits (WBS, supplied by BesTec) installed downstream of M1 and M2, respectively. Thus M1 fine pitch is auto-corrected by the differential drain current of WBS2 located 13.5 m downstream of M1. Similarly, M2 fine pitch is auto-corrected via the horizontally focused monochromatic beam imaged by a scintillator screen at the exit slit.
In Fig. 19 we present a typical long-term drift of an elastic peak. Over the course of $ 7 h, the horizontal position of the elastic signal drifts within AE 20 pixels during an energy detune RIXS measurement. This corresponds to a horizontal beam stability control of $AE3 mm at the sample position. The vertical position of the elastic signal from a momentumdependent RIXS measurement drifts within $AE2 pixels which indicates that the combination of the SGM pitch angular stability and the detector stability is within AE 80 nrad.
The environmental temperature stability of the whole spectrometer hall is closely controlled by the air-conditioning system to minimize the thermal drift of the beamline optics and the mechanics. For instance, the temperature stability of the spectrometer hall is controlled to be within AE 0.1 C over the course of five days. The low thermal fluctuations of Overview of the I21 RIXS spectrometer. the spectrometer hall, together with the large steel structure which has minimal thermal expansion, ensure smooth user operations.

Beamline control systems, data acquisition and data analysis
The I21 beamline control system is realized using Linux and Windows servers interfaced to the equipment being controlled. These are connected across a network to workstations that provide the operator interface and other functionalities. The software for the control system is built on EPICS, which is an open source software platform used by many large-scale facilities.
For the data acquisition, we use the Generic Data Acquisition (GDA) system which is now implemented on almost all beamlines at Diamond. GDA provides a common Jython syntax scripting environment with graphics user interface and object customizations specific for the science performed at the beamlines concerned. For the I21 beamline, a specific perspective is designed for RIXS data acquisition in which common functionalities developed for other beamlines can be shared but one could also add specific requirements. All data collected at I21 are written in the NeXus file format (Kö nnecke et al., 2015) in which rich metadata is captured including the positions of almost all critical beamline components and the values of various monitoring devices. This is, of course, highly beneficial for the downstream data analysis as well as for future reference.
RIXS data analysis software was developed to run within Diamond's data visualization and processing package called DAWN (Basham et al., 2015). Image background subtraction, data reduction from 2D images to 1D line spectra, and correlation between RIXS spectra were implemented using the DAWN data processing framework (Filik et al., 2017). Also, DAWN was extended with the ability to aggregate line spectra into 2D or 3D datasets to enable plotting in energy and momentum spaces.

Conclusion and future outlook
We presented the optical design and the actual achievements of the I21 RIXS beamline facility at Diamond Light Source. The attained total energy resolution matches well with the theoretical value. Owing to the unique design of the collection mirrors, the I21 beamline features unprecedented X-ray photon throughput even at a very high energy resolution mode. We also elaborated on the detailed mechanical designs of the sample manipulator, the M5 collection mirror system, the sample vessel with continuously rotatable outgoing port, and the RIXS spectrometer. Practical lessons learned during the design, construction and optimization stages were introduced throughout the paper for interested readers.
The intermediate-energy RIXS (between 2 keV and 3 keV) will be soon available at the I21 beamline. The white-beam optics as well as the refocusing and collection mirrors were carefully designed and implemented in the construction phase. The only optics currently under commissioning are the corresponding VLS grating. In addition, we are also in a design phase for a full polarimeter analysis apparatus. In the future, the I21 beamline will be capable of disentangling the outgoing polarization of RIXS signal to aid the study of lowenergy excitations.
We will constantly seek the improvement of the energy resolution and the photon throughput at the I21 beamline. Fundamentally the beamline energy resolution and the throughput are limited by the overall quality of the VPG gratings. New grating optics and improvements to their mechanics are required to achieve better performance. For the RIXS spectrometer, the energy resolution is mainly limited by the detector spatial resolution, the SVLS grating quality, and the vertical focal beam size. Significant efforts are needed in order to improve the total energy resolution in the future.
The I21 beamline has been recognized by the broad user community for being stable, reproducible and highly efficient. However, certain areas can still be improved. For instance, cooling or warming up the manipulator takes a significant amount of time which is sometimes detrimental to a short user experiment. The sample transfer system is complex, particularly due to the proximity of the manipulator and the collection mirrors. Finally we believe there is still potential to refine the automation of the beamline optimization, the data analysis and the remote control. This would not only help to ease the burden of increasing numbers of remote users but also allow to build up a more user friendly RIXS facility in the long term.

APPENDIX A VLS grating focusing
We show below the grating diffraction formula, the expressions of the VLS grating focal condition, the coma aberration and the spherical aberration (Strocov et al., 2011;Chiuzbȃ ian et al., 2012):  f 20 ¼ cos 2 r 1 þ cos 2 r 2 À cos þ cos R À a 1 k; In the above, and are X-rays incident and diffraction angles of grating optics, respectively. R is the radius of curvature of the gratings ($1 for the VPG at the beamline). is the wavelength. r 1 is the distance from the photon source to the VPG grating, and r 2 is distance from the VPG grating to the exit slit. k is the diffraction order. a i are coefficients of a VLS grating with local groove density (Strocov et al., 2011) GðxÞ ¼ a 0 þ a 1 x þ a 2 x 2 þ a 3 x 3 þ . . . : All the above equations are applicable to the spectrometer SVLS grating optics. In this case, R is the actual radius of curvature of the SVLS gratings. r 1 is the distance from the sample vertical focal beam spot to the SVLS grating, and r 2 is the distance from the SVLS grating to the CCD detector.

APPENDIX B Energy resolution of the beamline
Below we show the individual contribution, namely, the photon source, the PGM optics and the exit slit, to the beamline energy resolution (Strocov et al., 2011): ÁE Gr ¼ Gr cos þ cos a 0 m E; ð10Þ in which E is the X-ray energy, AE S , Gr , PM and AE Ex represent the full width at half-maximum (FWHM) of the vertical photon source size, the tangential slope errors of the VLS grating, the tangential slope errors of the M3 pre-mirror and the exit slit vertical opening, respectively. r 1 and r 2 stand, respectively, for the length of the entrance arm and the length of the exit arm with respect to the PGM grating optics. a 0 , m and are the constant line density of the VPG grating, the diffraction order (equal to 1) and the X-ray photon wavelength, respectively. and are the incident and diffraction angle (with respect to the normal) of the VPG grating. The primary beamline energy resolution is a quadratic sum of the four contributions: