How the spectrometer works ========================== Technical movement ------------------ The movements of the HRIXS are controlled by a PLC. On the PLC level we assure that the spectrometer cannot be moved outside of its safe working conditions, as defined by the instruction manual. Three of those parameters are trivial, the grating pitch, the grating postion *G* and the detector position *D* simply have a minimum and a maximum value as shown in Figure 35 (page 79) in the instruction manual. The height *Y* of the detector should be kept such that the angle δ of the detector is below 15°. So the detector height should be calculated from *Y* = (*D* - *G*) tan δ. It is also important that the detector pitch follows this angle δ, but it needs to be adjustable by a small angle ɣ, -1° < ɣ < 1° (ɣ is shown exaggerated in the instruction manual). So the detector pitch θ is θ = δ + ɣ. Physical parameters ------------------- The HRIXS uses a variable line spacing (VLS) grating to disperse the incoming X-Ray beam onto a detector. Two different gratings are available, with a nominal line spacing of *n*\ :sub:`0` = 1000 lines / mm or *n*\ :sub:`0` = 3000 lines / mm. Calculations of such a grating can be found in Svitozar Serkez' Thesis https://bib-pubdb1.desy.de/record/275967/files/Thesis%20PDF.pdf on page 37. The grating equation applies, with entrance angle α and exit angle β we have .. math:: \sin α - \sin β = m n_0 λ, where *m* is the diffraction order and λ is the wavelength. (Obviously *E* λ = *hc* with the photon energy *E*, Planck's constant *h* and the speed of light *c*) The VLS grating focusses the beam onto the detector following .. math:: \frac{\cos α + \cos β}{R} - \frac{\cos^2 α}{r_1} + \frac{\cos^2 β}{r_2} = m λ n_1 where *n*\ :sub:`1` represents the linear chirp of the grating spacing, *R* is the radius of curvature of the grating, and *r*\ :sub:`1` and *r*\ :sub:`2` are the lenght of the entrance and exit arm of the spectrometer. The coma abberation is minimized if .. math:: \left(\frac{\cos^2 α}{r_1}-\frac{\cos α}{R}\right)\frac{\sin α}{r_1} + \left(\frac{\cos^2 β}{r_2}-\frac{\cos β}{R}\right)\frac{\sin β}{r_2} = m λ n_2 where *n*\ :sub:`2` represents the linear and quadratic chirp of the grating spacing. By now we have four physical parameters (α, β, *r*\ :sub:`1`, *r*\ :sub:`2`) but only three equations. As a fourth equation we could use the position of the sagittal focus, as proposed by Svitozar. But usually this is not a critical parameter, so instead we leave one variable free (*r*\ :sub:`1`), and use this variable to optimize resolution vs. transmission: if the grating is close to the source, we improve transmission, if it is further away, we improve the resolution. The technical parameters can be calculated as follows: *D* = *r*\ :sub:`1`, α + β + δ = 180°, and *G* - *D* = *r*\ :sub:`2` cos δ.