Resolution of a bent-crystal spectrometer for X-ray free-electron laser pulses: diamond versus silicon

The resolution function of a bent-crystal spectrometer for pulses of an X-ray free-electron laser is evaluated. Under appropriate conditions, the energy resolution reaches the ratio of the lattice spacing to the crystal thickness.


Introduction
The self-amplified spontaneous emission (SASE) radiation pulses of an X-ray free-electron laser (XFEL) originate from random current fluctuations in the electron bunch (Saldin et al., 2000). As a result, the intensity and the spectrum vary from one pulse to another. The spectral composition of every pulse used in an experiment needs to be measured individually.
Diffraction at a bent crystal transforms the energy spectrum of a pulse into the angular spectrum of the diffracted waves, as shown in Fig. 1. Each wavelength in the initial polychromatic highly collimated X-ray pulse, incident on a bent crystal, finds a position on the crystal where the Bragg law is satisfied for this wavelength, and diffracts to the respective Bragg angle. Several bent-crystal spectrometers have been built and tested at the XFEL sources. Zhu et al. (2012), Rich et al. (2016) and Boesenberg et al. (2017) inserted bent crystals directly into the X-ray beam, while Makita et al. (2015) and Kujala et al. (2020) used the beams deflected by linear gratings for further diffraction at bent crystals.
To resolve the entire spectrum of a pulse, the bending radius needs to be chosen such that each wavelength in the spectrum finds a position at the bent crystal where its Bragg condition is satisfied. The Bragg conditions corresponding to a spectral width up to 100 eV have to be fulfilled within the spatial width of the X-ray pulse, which is below 1 mm at the XFEL sources. That requires bending radii of the order of 10 cm. Bending radii from 5 to 30 cm were used in the works cited above. A practical limit on the thickness of the bent crystal comes from the need to reach such small bending radii. The works cited above employed 10 mm-thick silicon or 20 mm-thick diamond plates in 110 and 111 orientations. Zhu et al. (2012) combined two bent-crystal spectrometers, with different bending radii and employing different reflections, one to cover the whole energy range and the other to reach a high resolution in a limited energy range. Zhu et al. (2012) proposed that the resolution of the bentcrystal spectrometer is mainly limited by two different contributions originating from the dynamical diffraction parameters, the extinction depth Ã and the Darwin width Á B . The applicability of dynamical theory for planar crystals to the strongly bent ones was not argued, however. Boesenberg et al. (2017) and Kujala et al. (2020) considered the detector pixel size as a parameter limiting the resolution.
Recently, we have given a detailed theoretical description of the X-ray diffraction at strongly bent crystals (Kaganer et al., 2020). We found that, because of the strong bending, the orientation of the crystal with respect to the incident X-ray wave deviates from the Bragg condition within the Darwin width Á B in an interval of distances that is small compared with the extinction length Ã. As a result, diffraction for bending radii smaller than the critical radius R c ¼ Ã=Á B is kinematical. The kinematical diffraction approximation is satisfied in a broad range of crystal curvatures and X-ray energies. Spatial and angular distributions of the diffracted intensity have been calculated. In modelling diffraction of the XFEL pulses, it has been presumed that the scattering amplitudes for different frequencies add up coherently.
In the present work, we thoroughly analyse the diffracted intensity integrated over the pulse duration. We find that the coherent sum of the amplitudes describes an instant diffraction signal. In the time-integrated signal, the intensities, rather than the amplitudes, of different frequencies add up. Afanasev & Kohn (1977) arrived at a similar conclusion when analysing diffraction from a continuous incoherent X-ray source and averaging over random time instants of the emission of individual atoms.
We show that the spectral resolution of a bent-crystal spectrometer is controlled by two parameters. In the case of Fraunhofer diffraction, one parameter is simply the ratio of the lattice spacing of the actual reflection to the crystal thickness. The other parameter depends on the crystal thickness, its bending radius, and the anisotropic elastic constants of the crystal. These parameters are modified for finite crystaldetector distances (Fresnel diffraction). Still, two parameters controlling the resolution are derived.

Time-integrated diffraction intensity
We assume full transverse coherence of the incident XFEL pulse and take into consideration only its time structure. The electric field of the pulse can be represented by its spectrum: Here, ! is the frequency of a plane-wave component, k ¼ !=c is its wavevector, c is the speed of light and s 0 is the unit vector in the direction of the wave propagation. The wave packet (1) is incident on a bent-crystal spectrometer. We consider its diffraction on a bent crystal in the kinematical (first Born) approximation. The applicability limits of this approximation were established by Kaganer et al. (2020) and are discussed in Section 5. We follow the description of the first Born approximation by Born & Wolf (2019, Section 13.1.2), but keep explicitly the time exponent expðÀi!tÞ, which is usually implicit when considering diffraction of a monochromatic wave, and keep the integration over the frequencies !. The amplitude of the scattered wave is where r e is the classical electron radius and %ðrÞ is the actual quantum density of the electrons in the crystal lattice [see also Landau & Lifshitz (1984), Section 124]. The spatial integration is performed over the volume V of the crystal. In the Fraunhofer limit r ) r 0 one has where s is the unit vector in the direction to the detector, r ¼ rs. The correction to equation (3) at smaller distances (Fresnel diffraction) is considered in Section 4. Using equation (3), the scattered wave (2) can be represented as where the scattering amplitude in the first Born approximation is Here, the dependence of the scattering amplitude f 1 on the length of the wavevector k is explicitly noted. The intensity of the scattered wave at the time instant t is Schematic of a bent-crystal spectrometer. A collimated polychromatic beam is incident on a bent crystal. Each wavelength in the beam is diffracted at the position where the Bragg condition is satisfied for this wavelength. The scattering angle for a reference wavelength is 2 " , while for another wavelength it is " þ .
where the asterisk denotes the complex conjugate and k n ¼ ! n =c are the wavevectors (n ¼ 1; 2). We consider the measurement of the scattered intensity by a detector that integrates the intensity over the pulse duration (otherwise, if the detector were able to resolve the time structure of the pulse, the spectrometer would not be needed). Hence, the measured intensity is a result of integration over the pulse duration: Integration of the time-dependent term in equation (6) gives rise to a delta function ð! 1 À ! 2 Þ, so that the intensity integrated over the time is This equation replaces equation (17) of Kaganer et al. (2020), where a coherent superposition of the waves with different wavevectors has been presumed. The squared scattering amplitude jf 1 ðs; s 0 ; kÞj 2 in equation (8) is a function of the frequency ! and the scattering angle (the angle between vectors s 0 and s). One can consider the scattering angle as twice the Bragg angle for another frequency ! 0 , which is defined by this condition. Then, the scattering intensity is represented as a function of ! 0 . This representation is used in all papers on the bent-crystal spectrometers cited in Section 1 since it allows one to conveniently present the angular spectrum of the scattered intensity in the same scale as the energy spectrum of the incident pulse. Explicit expressions relating the scattering angle to the artificial frequency ! 0 are derived in the next section. Here we denote ð2r 2 e =r 2 Þjf 1 ðs; s 0 ; kÞj 2 as Rð! 0 ; !Þ and rewrite equation (8) as an integral: where J ð! 0 Þ is the intensity (8) after the change of variables from to ! 0 . One can see that if the resolution is ideal, i.e. Rð! 0 ; !Þ is ð! À ! 0 Þ, the spectrum of the diffracted waves in the ! 0 scale coincides with the spectrum of the incident wave. The aim of the next sections is to calculate the resolution function Rð! 0 ; !Þ for a bent-crystal spectrometer.

Resolution of a bent-crystal spectrometer: Fraunhofer diffraction
The scattering amplitude (5) for an ideal crystal is governed by the Fourier component % Q expðiQ Á rÞ of the electron density %ðrÞ for the actual reciprocal-lattice vector Q. The displacement field uðrÞ due to the bending causes the change of the electron density according to the change of the positions of the atoms to %½r À uðrÞ and the respective change of its Fourier component to % Q exp½iQ Á r À iQ Á uðrÞ. The kinematical diffraction amplitude (5) can be written as an integral over the scattering plane of the crystal: where D is the thickness of the crystal plate and q ¼ ks À ks 0 À Q. Here, the scattering plane is the xz plane with the x axis tangent to the surface of the bent crystal at x ¼ 0 and the z axis along the inner surface normal. The origin is taken in the middle plane of the crystal plate (see Fig. 1). Let us calculate the components of the scattering vector q in this frame. An X-ray pulse consists of plane waves of different frequencies incident onto the crystal at the same angle " with respect to the x axis. The angle " is the Bragg angle for some reference frequency " ! ! with the wavevector " k k ¼ " ! !=c. The Bragg law for this frequency reads d sin " is the lattice spacing of the chosen reflection. The x and z components of the reciprocal-lattice vector in the chosen coordinate system are Q ¼ ð0; À2 " k k sin " Þ. The wavevector of the incident wave with any other frequency ! in the pulse possesses the same incidence angle " but another wavevector k, so that The diffracted intensity is measured as a function of the angle between the x axis and the vector s (see Fig. 1). Hence, the wavevector of the diffracted wave is As mentioned in the previous section, it is convenient to consider the scattering angle " þ as twice the Bragg angle of a wave with the frequency ! 0 defined by this condition. The Bragg law reads d sin½ð " þ Þ=2 ¼ =k 0 , where k 0 ¼ ! 0 =c is the respective wavevector. A straightforward calculation of the components of the vector q ¼ ks À ks 0 À Q gives [see also Appendix B by Kaganer et al. (2020)] For symmetric Bragg reflections considered in the present work, Q Á u ¼ ÀQu z , so that only the u z component of the displacement field is of interest. For a crystal cylindrically bent to a radius R, it is (Kaganer et al., 2020) To achieve the cylindrical bending of a rectangular plate, the bending momenta have to be applied to the perpendicular edges of the plate. The same bending state can be approached by applying a momentum to the apex of a triangle-shaped plate (Terentyev et al., 2016). The parameter in equation (14) depends on the anisotropic elastic constants of the crystal, particularly, for a 110oriented diamond plate, ¼ 0:02, while for a silicon plate of the same orientation ¼ 0:18. For 111-oriented plates, the respective values are ¼ 0:047 for diamond and ¼ 0:22 for silicon. Exceptionally small values for diamond are a result of compensation of the Poisson and anisotropy effects, which gives rise to a little depth dependence of the lattice spacing.
The term expðÀiQx 2 =2RÞ in the integral (10) due to the displacement field of a bent crystal gives rise to an x range relevant to diffraction of the order of ðRdÞ 1=2 , which is comparable with D and much smaller than the lateral dimensions of the crystal. Hence, the integration over x in equation (10) can be performed in infinite limits. This integration results in a phase factor that drops out when calculating jf 1 j 2 . In the remaining integral over z, we proceed to a dimensionless variable ¼ 2z=D. Then, the integral (10) gives where it is denoted In the case of Fraunhofer diffraction, only the q z component of the scattering vector in equation (13) is relevant. The resolution function in equation (9) depends on the difference ! 0 À !, so that we write it as Rð! 0 À !Þ, and the integral (9) is a convolution integral. Before calculating the integral (15), let us discuss its properties qualitatively. As long as the parameter b is small enough, the second term in the exponent in equation (15) can be neglected. Numerical examples presented below show that, practically, b does not need to be very small: this term can be neglected for jbj < $ 2. When this condition is satisfied, the resolution function is simply sinc 2 g, where sincðxÞ ¼ sinðxÞ=x. We write hereafter jbj, where this is relevant, since the radius R can be positive for a convex crystal bending, as shown in Fig.  1, or negative for a concave bending.
The condition jbj < $ 2 imposes a lower limit to the radius R. At the same time, the upper limit to the radius is the requirement of the applicability of the kinematical approximation, so that the radius should be small compared with the critical radius R c ¼ Ã=Á B . The theoretical examples presented in this section and the experimental examples in Section 5 show that the interval between these limits is broad enough and covers a practically feasible range of parameters.
The resolution can be quantified using the Rayleigh criterion, formulated for spectral lines with the shapes described by the function sinc 2 g (see Born & Wolf, 2019, Section 7.6.3). Rayleigh proposed that two components of the same intensity are just resolved, when the principal intensity maximum of one coincides with the first intensity minimum of the other. This criterion corresponds to g ¼ and gives the resolution ÁE=E ¼ ð! 0 À !Þ= " ! ! ¼ d=D. Hence, provided jbj < $ 2, the relative resolution ÁE=E does not depend on the X-ray energy and on the bending radius and is equal to the ratio of the lattice spacing of the chosen reflection to the thickness of the bent crystal.
The integral (15) can be calculated and expressed through cosine and sine Fresnel integrals CðxÞ and SðxÞ as where FðxÞ ¼ CðxÞ þ iSðxÞ. Fig. 2 compares the Fraunhofer diffraction curves for Si(440) and C*(220) reflections at the X-ray energy of 8 keV. Fig. 2(a) compares Darwin curves, i.e. the diffraction curves for non-bent infinitely thick crystals. The Darwin widths are 0.07 and 0.15 eV for silicon and diamond reflections, respectively. Figs. 2(b)-2(d) compare the diffraction curves, calculated by equation (17), from the crystal plates of different thicknesses bent to a radius of R = 0.1 m.
The curves in Fig. 2(b) are calculated for the crystal thickness of D = 10 mm. The values of the parameter b given by equation (16) are 1.47 and 0.125 for silicon and diamond reflections, respectively. Both values are smaller than 2, the shape of the resolution functions is given by sinc 2 g and gives rise to the resolutions ÁE=E ¼ d=D. The diamond reflection provides a slightly worse resolution, since the lattice spacing is larger. Fig. 2(c) shows diffraction curves for a two times larger thickness, D = 20 mm. The values of the parameter b increase by a factor of 4. As a result, this parameter becomes larger than 2 for silicon (b ¼ 5:9), which results in a substantial broadening of the diffraction line. This parameter remains smaller than 2 for diamond (b ¼ 0:5), and the resolution improves by a factor of 2 compared with Fig. 2(b), since the crystal thickness is two times larger. In Fig. 2(d), the thickness is again increased by a factor of 2, to D = 40 mm. The factor b becomes four times larger compared with the case of Fig. 2(c). For silicon, it is large, b ¼ 23:6, and the diffraction curve broadens further. For diamond, it just reaches the value b ¼ 2, and the resolution improves by a factor of 2 and reaches the value ÁE ¼ 0:025 eV. Further increase of the thickness causes a reduction in the resolution for diamond as well. We note that the resolution obtained for a 40 mm-thick strongly bent diamond plate is six times better than that of a planar crystal given by its Darwin width. Thus, the recipe to get the best resolution in Fraunhofer diffraction from a strongly bent crystal is to maximize the ratio D=d while keeping the parameter b in equation (16)   exceptionally small value of for diamond allows larger thicknesses, while keeping b < 2, and results in a notably better resolution. This recipe is modified at finite distances to a detector, which is discussed in the next section. Fig. 3 compares a spectrum of the XFEL pulse incident on the bent crystal with the calculated spectra obtained with the bent-crystal spectrometers. The pulse generated during the SASE process at the European XFEL is simulated with the code FAST (Saldin et al., 1999), which provides a 2D distribution of electric field in real space at the exit of the undulator for each time moment for various parameters of the electron bunch and the undulator. Simulation results are stored in an in-house database (Manetti et al., 2019). The pulse is simulated for the electron energy 17.5 GeV and the active undulator length corresponding to the low-gain regime of SASE (Schneidmiller & Yurkov, 2014). Conversion from the time domain to the frequency domain is performed using the WavePropaGator package (Samoylova et al., 2016), which provides a 2D distribution of electric field for each frequency of the pulse. We use the spectrum at the centre of the pulse in the frequency domain, assuming this distribution to be the same across the beam.
The spectra obtained with the bent-crystal spectrometers are calculated by equation (9) with the resolution function (17). Two reflections from crystals bent to a radius R = 0.1 m are compared: Si(440) from a 10 mm-thick plate and C*(220) from a 20 mm plate. The latter gives two times better resolution compared with the former, cf. Figs. 2(b), 2(c). A characteristic separation between the peaks in the spectrum is 0.12 eV. These peaks are well resolved by the C*(220) spectrometer with its resolution of 0.048 eV and still resolved with the Si(440) spectrometer with the resolution of 0.08 eV.

Resolution of a bent-crystal spectrometer: Fresnel diffraction
This section is devoted to evaluating the effect of a finite distance between the bent-crystal spectrometer and a detector. The finite distance to a detector is accounted for by the subsequent term in the expansion (3): jr À r 0 j ' r À s Á r 0 þ ½r 0 À ðr 0 Á sÞs 2 2r : Substituting r 0 ¼ ðx; zÞ and s ¼ ðcos ; À sin Þ in the coordinates of Fig. 1, we find that equation (10) acquires an additional phase term exp½ikðx sin þ z cos Þ 2 =2L in the integral.
Hereafter, the spectrometer-detector distance is denoted by L instead of r for convenience. The wavevector k and the scattering angle can be replaced in this term with sufficient accuracy with the reference values " k k and " . Calculation of the integral (10) with this additional phase factor has been performed in our previous work (Kaganer et al., 2020). After evaluation of the integral over x in the infinite limits, we arrive at a modified equation (15), Calculation of the integral (19) is the same as in equation (17) above: The resolution function in equation (24) depends on ! and ! 0 , rather than the difference ! À ! 0 in equation (17). As a result, the diffracted spectrum is stretched or squeezed, depending on the sign of the bending. This is discussed below. Similarly to the Fraunhofer diffraction case described in the previous section, a maximum resolution is reached as long as jb bj < $ 2. If this condition is satisfied, the resolution according to the Rayleigh criterion, which follows from equation (23) Spectrum of a SASE pulse incident on the bent-crystal spectrometers (grey lines) and spectra of the diffracted waves for the C*(220) reflection from a 20 mm-thick crystal (red lines) and for the Si(440) reflection from a 10 mm-thick crystal (blue lines), both bent to a radius of 0.1 m. Fraunhofer diffraction. (a) Whole spectrum, (b) magnified central part.
If R > 0, in the case of the convex bending shown in Fig. 1, the resolution becomes worse compared with the Fraunhofer diffraction. Conversely, for a concave bending R < 0, the resolution is better than in the case of Fraunhofer diffraction. The correction can be notable when the bending radius R and the distance to a detector L are comparable. We expect, however, that R ( L is a more common case. We take into account this correction in the numerical calculations below but do not discuss it further. The parameterb b in equation (22) can be rewritten as where is the wavelength, and the Bragg law 2d sin " ¼ is used. Kaganer et al. (2020) considered this parameter in the case ¼ 0 (and hence b ¼ 0) and stated that the Fraunhofer limit is reached when the diameter of the first Fresnel zone ðLÞ 1=2 exceeds the crystal thickness seen from the direction of the diffracted beam, D cos " . In the general case b 6 ¼ 0, both contributions tob b need to be taken into account, to provide the desired condition jb bj < $ 2.
Since the sign of b coincides with the sign of R, the condition jb bj < $ 2 is satisfied at different distances L for the convex and the concave bending. The effect of finite distances is especially strong for diamond, since the parameter , and hence b, are especially small. As an illustration, Fig. 4 presents the dependencies of the parameterb b on the distance to a detector L at the X-ray energy of 8 keV for the bending radii R ¼ AE0:1 m. We choose a 10 mm-thick silicon and a 20 mmthick diamond since such crystal thicknesses have been used in the experimental works discussed in the next section. Fig. 4(a) shows the parameterb b for a 10 mm-thick silicon plate in the reflection (440). At a distance L = 1 m, the values ofb b are close to the Fraunhofer limit jbj ' 1:47. For a convex bending, the value ofb b remains smaller than 2, and hence a maximum resolution is provided, down to a distance of 0.3 m. For a concave bending, jb bj remains smaller than 2 for distances exceeding 0.1 m, as a result of the compensation of the curvature of the lattice planes and the curvature of the wavefront. Fig. 4(b) shows a corresponding calculation for a 20 mmthick diamond plate in the reflection (220). A notable deviation from the value jbj ' 0:5 in the Fraunhofer limit takes place already at a distance of 10 m. A critical valueb b ¼ 2 is reached at a distance of 0.8 m for a convex bending and at a distance of 0.55 m for a concave bending. As expected, finite distances to a detector give rise to a stronger effect for diamond since the finite distance correction in equation (26) is added to a smaller b. Fig. 5 compares resolution functions for the same diffraction conditions as in Fig. 4 at different distances to a detector and the convex crystal bending, R = 0.1 m. When the distance L is reduced, the resolution curves calculated for Si(440) in Fig. 5(a) change only a little, in agreement with Fig. 4(a), where the value ofb b remains smaller than 2 for the distances L exceeding 0.3 m. In contrast, the resolution curves for C*(220) in Fig. 5(b) are notably modified and broadened sinceb b in Fig.  4(b) increases with the reducing distance L and exceeds the value of 2 for L < 0.8 m. We note that Figs. 4 and 5 compare silicon and diamond crystals of different thicknesses. For a silicon crystal of the same thickness of 20 mm as diamond, the value ofb b would increase by a factor of 4, and the desirable resolution by equation (25) could not be reached. Fig. 6 shows the same selected region of a SASE pulse spectrum as in Fig. 3(b), and the spectra of the diffracted waves calculated by equation (9) with the resolution function (19) for the C*(220) reflection from a 20 mm-thick crystal bent to radii R ¼ AE0:1 m at the distance to a detector of L = 0.6 m. At this distance, as follows from Fig. 4(b), the parameterb b is slightly larger than 2 for the convex bending and somewhat smaller than 2 for the concave bending. As a result, the diffracted wave spectrum for the concave bending in Fig. 6(b) reveals somewhat better resolution compared with the convex bending case in Fig. 6(a).
The diffracted spectra in Fig. 6 are scaled with respect to the incidence spectrum. The spectrum is stretched for R > 0 and The dependence of the parameterb b given by equation (22) on the distance L to a detector for the X-ray energy of 8 keV, bending radii R ¼ AE0:1 m, and (a) Si(440) reflection at 10 mm crystal thickness and (b) C*(220) reflection at 20 mm crystal thickness.

Figure 5
Resolution curves for Fresnel diffraction at the X-ray energy of 8 keV for (a) Si(440) reflection, crystal thickness 10 mm, and (b) C*(220) reflection, crystal thickness 20 mm. Bending radius R = 0.1 m, distances to a detector 0.3, 0.6 and 1 m. squeezed for R < 0. This effect reduces with the increasing distance to a detector and vanishes in the Fraunhofer limit. As discussed in Section 3, the curves of diffracted intensity are not a real spectrum. Rather, they are a representation of the angular distributions of the intensity in terms of energy distributions. For Fraunhofer diffraction, such recalculation of the angular spectrum differs from the incident spectrum because of the finite resolution. At finite distances between the bent-crystal spectrometer and a detector, the diffracted spectrum is also scaled with respect to the incident spectrum. Table 1 compares the resolutions of the bent-crystal spectrometers, reported in the experimental studies, with the calculated resolutions. The accuracy in determination of both quantities is limited by a number of factors. In the experiments, the spectrum of the incident pulse is not known. The resolution inferred from the oscillations in the diffracted spectrum can provide only an upper bound for the resolution since a resolution better than the widths of the oscillations will not show up. An additional smearing of the diffracted intensity is caused by a detector resolution, given by its pixel size and a finite distance to it.

Discussion
In the calculations, even the diffraction of a monochromatic incidence wave gives rise to complicated intensity profiles like the ones shown in Figs. 2 and 5, which need to be characterized by a single number representing the resolution. The full width at half-maximum (FWHM) of the calculated diffraction curves seems a reasonable characteristic of the curves, although it ignores their internal structure. However, we would like to keep the resolution given by the Rayleigh criterion for the cases of the best available resolution, when the resolution function is given by sinc 2 g, as in Figs. 2(b) and 5(a). In these cases, the Rayleigh resolution is 1.13 times larger than the FWHM of the respective peak. Therefore, we define the resolution ÁE as 1.13 Â FWHM. The values thus obtained from the intensity curves calculated by equation (24) are presented in Table 1 for the respective experimental conditions.
As a first step of the analysis, we calculate the critical radii R c for the applicability of the approximation of kinematical diffraction employed in the present work. The critical radius is given by the ratio R c ¼ Ã=Á B of the Bragg case extinction length Ã to the Darwin width Á B (Kaganer et al., 2020). If the bending radius is small compared with the critical radius, the  Table 1 Resolutions of the bent-crystal spectrometers reported in the experiments and the corresponding calculated resolutions.
The critical radius R c for applicability of the kinematical calculation is given by the ratio of the extinction length to the Darwin width Ã=Á B . Bending radii R, crystal thicknesses D and the distances L to a detector are taken from the corresponding publications. The parameterb b is calculated by equation (22). The calculated resolution ÁE is obtained from the FWHMs of the intensity curves calculated by equation (24). The experimental resolutions are the ones reported in the corresponding publications.

Figure 6
A selected region of a SASE pulse spectrum, the same as in Fig. 3(b), and the spectra of the diffracted waves for the C*(220) reflection from D = 20 mm crystal and the distance from the bent-crystal spectrometer to a detector L = 0.6 m. (a) Convex bending, R = +0.1 m, (b) concave bending, R = À0.1 m.
length of the path of the incident wave in the crystal, where it remains in conditions of dynamical diffraction, i.e. within the angular range Á B , is small compared with the length Ã needed to produce a strong diffracted wave. Then, the diffracted wave remains weak compared with the transmitted wave and can be calculated kinematically. Both quantities, Ã and Á B , are calculated using Sergey Stepanov's X-Ray Server (Stepanov, 2004(Stepanov, , 2021 for respective energies and reflections, and the resulting critical radii R c are presented in Table 1. The bending radii R are smaller than the respective critical radii R c in all cases listed in Table 1, except for the Si(111) reflection reported by Zhu et al. (2012). This reflection was chosen to cover the whole spectrum of the pulse at the cost of lower resolution. We calculate the energy resolution in the kinematical approximation for this case as well, for the sake of completeness.
Next, we calculate, for every experiment listed in Table 1, the parameterb b by equation (22). As long as jb bj < $ 2, the optimum resolution given by equation (25) is reached. The Si(220) reflection by Rich et al. (2016) corresponds to a large valueb b ¼ 9:4 and gives rise to a low energy resolution. In all other cases,b b does not exceed 3.6, and the resolution is worse than the optimum one, up to a factor 3.4.
The calculated energy resolutions ÁE presented in Table 1 are obtained by simulating the respective resolution curves by equation (24) and numerically obtaining the FWHMs of the curves. The resolution is defined to be 1.13 Â FWHM, as suggested above. In all cases, the calculated resolutions in Table 1 are smaller than the corresponding experimental resolutions. This is expected since our calculations do not take into account a finite detector resolution, partial incoherence of the SASE pulse, the X-ray amplitude variation across the pulse, and further possible inhomogeneities in the experiments.
The energy resolution of a bent-crystal spectrometer is given mostly by the ratio d=D. The finite-distance correction factor R sin " =2L in equation (25) is about 0.1 or less for the spectrometers in Table 1. To improve the resolution, one would need to increase the crystal thickness D. However, there is almost no room for that sinceb b is proportional to D 2 and should not exceed 2, while in Table 1 it is at that limit or above in most cases. A possible way to increase the silicon crystal thickness is to use concave bending, R < 0. Then, the two terms in equation (21) have different signs and partially compensate each other. For diamond with its small , an increase of the distance to a detector L allows one to increase D and hence increase the resolution. For a large crystaldetector distance, as exemplified in Fig. 2(d), a resolution ÁE ¼ 0:025 eV, or ÁE=E ¼ 3 Â 10 À6 , can be obtained at a thickness of the diamond crystal of 40 mm.
The general formulas are illustrated in Sections 3 and 4 by calculations at an X-ray energy of 8 keV since this value is close to the energies in the experiments listed in Table 1. In the case of Fraunhofer diffraction, the parameter b in equation (16) and the relative energy resolution ÁE=E ¼ d=D are energy independent. However, at higher X-ray energies, one can proceed to higher reflection orders. If other parameters are kept unchanged, the parameter b increases (b / d À1 ) and may exceed the value of 2, which will result in a loss in resolution. As soon as b is smaller than 2, the absolute resolution ÁE remains the same in higher reflection orders.
In the case of Fresnel diffraction, the parameterb b in equation (22) and the energy resolution (25) depend on the X-ray energy through the variation of the Bragg angle " . This effect seems minor, at least for R ( L. Let us take a two times greater X-ray energy of 16 keV for a comparison. Then, the second orders of the reflections considered in Section 4, namely Si(880) and C*(440), can be used and give just the same Bragg angles as the ones in reflections Si(440) and C*(220) at 8 keV. If other parameters are not changed, the value ofb b increases by a factor of 2. It follows from Fig. 4 that at the convex bending the values ofb b will be larger than 3, which results in a decrease in resolution. For concave bending, the diamond crystal can be still used without a loss in resolution for the distances L to a detector of 1 m or more, while the silicon crystal can be used at smaller distances.

Conclusions
We have shown that the angular distribution of the intensity diffracted by a bent crystal and integrated over the pulse duration is given by a convolution of the spectrum of the incident X-ray pulse with the resolution function of the bentcrystal spectrometer. This result does not depend on the degree of temporal coherence.
We have evaluated the resolution of the bent-crystal spectrometer. It is controlled by two parameters. One parameter is the ratio d=D of lattice spacing of the chosen reflection to the thickness of the bent crystal. This ratio is the best achievable resolution, ÁE=E ¼ d=D. It is reached if jb bj < $ 2, where the parameterb b given by equation (22) combines in a single parameter the crystal thickness D, the curvature radius R, the distance to a detector L, the lattice spacing of the actual reflection d, and the parameter representing the anisotropic elastic properties of the crystal. As an example, for the C*(220) reflection and a crystal thickness of 40 mm, the resolution of ÁE=E ¼ 3 Â 10 À6 can be reached. These results allow one to optimize the parameters of the bent-crystal spectrometers for the XFEL radiation pulses.