A simple method for mitigating error in the fixed-offset of a double-crystal monochromator

In order to maintain a constant monochromatic synchrotron X-ray beam height for all energies, the separation between the crystals of a double-crystal monochromator is typically adjusted, via translation of the second crystal, while X-ray energy is varied, via rotation of the crystal pair. The ability to accurately translate the second crystal requires precise knowledge of the separation between the two crystals and, when present, crystal miscuts. Here, a simple method for calibrating the crystal gap from measured variation in the X-ray beam height that eliminates error in the ﬁxed beam offset is provided.

At a hard and/or tender X-ray absorption spectroscopy beamline, a double-crystal monochromator (DCM) with two independent diffracting crystals is typically employed to select and scan the X-ray energy (Golovchenko et al., 1981;Mills & King, 1983;Frahm, 1989;Heald et al., 1999;Segre et al., 2000;Richwin et al., 2001;Fischetti et al., 2004;Proux et al., 2006;Kropf et al., 2010;Prestipino et al., 2011;Liu et al., 2012;Sutton et al., 2017).Monochromators that use two diffracting surfaces from a single channel-cut crystal (Tolentino et al., 1998;Frahm ISSN 1600-5775 et al., 2005;Sto ¨tzel et al., 2010;Khalid et al., 2011;Nonaka et al., 2012;Mu ¨ller et al., 2015;Mu ¨ller et al., 2016) or four diffracting crystal surfaces (Sayers et al., 1983;Heald, 1984Heald, , 1988;;Heald et al., 1986;Trela et al., 1988;Heald & Sayers, 1989;Tolentino & Rodrigues, 1992;Hrdy ´, 1995;Tolentino et al., 1995;Kraft et al., 1996;Krumrey, 1998;Krumrey et al., 1998;Hayama et al., 2018) are also sometimes employed.In a DCM, the incident X-rays diffract from a first and then a second crystal such that the incident and outgoing X-ray beams are parallel.Energy is varied by adjusting the angle of the crystals with respect to the incident X-ray beam according to Bragg's law.Adjusting the angle of the crystals will also change the separation between incoming and outgoing beams, and in many DCMs the X-ray beam exit height is maintained constant during energy scanning by synchronously changing the distance, or gap, between the crystals.At each energy, a unique value of the crystal gap will provide the desired fixed offset between incoming and outgoing beams.Thus, to effectively maintain a constant exit height, the true value of the crystal gap must correspond to exactly this unique setpoint value with minimal error.Because the actual crystal gap is not necessarily well known, its presumed value may differ from its true value, and when attempting to set the crystal gap to the unique setpoint required at a given energy, the error present will result in motion of the X-ray beam at the sample.Such motion is particularly dramatic at relatively low energies where the movements of the monochromator crystals needed to obtain an incremental change in energy are largest.This is illustrated in Fig. 1(a), which shows the change in beam height as a function of energy due to an error, g , in the crystal gap.
Changes in the exit beam height can also be caused by unwanted monochromator crystal asymmetry or errors in the miscut, , of asymmetric crystals, as illustrated in Fig. 1(e).In this paper, we present a simple method for first measuring and then correcting errors in the crystal gap calibration.

Method
A DCM consists of two single crystals maintained in positions that satisfy the diffraction conditions of both crystals for a given energy while also directing the beam to the location of the sample under study.The crystal surfaces are polished to align with a selected crystallographic plane, and in order to meet the diffraction condition of both crystals, these surfaces are kept parallel or near parallel by a motorized mechanical assembly often referred to as the crystal cage or crystal stage.In some cases, the diffraction planes are inclined with respect to the crystal surface, which is referred to as a miscut or asymmetry.The implications of using such crystals will be discussed later, but first symmetric crystals will be considered.
The crystal cage imparts multiple motions to the crystals.They can be rotated as a pair, typically about an axis of rotation on the surface of the first crystal.Other axes of rotation are also sometimes selected (Golovchenko et al., 1981;Mills & King, 1983).Rotation of the crystals sets the angle at which the X-ray beam is incident on the crystal diffraction planes (), as illustrated in Fig. 2. In addition, the second crystal pitch (Á) and roll () can be adjusted independently.While necessary for correction of possible crystal misalignment, the second crystal pitch can also be used to Change of the exit beam height, Áh, of a Si (111) DCM between 2.1 and 20.0 keV (a-d) due to an error, g , in the crystal gap calibration, as determined from equation ( 4) and (e-h) due to a miscut, , that is not taken into account when setting the crystal gap, as determined from equation (11).Multiplication of the value on the vertical axis by g for (a-d) and h f for (e-h) gives Áh, where Áh is the difference between h() at the value of (a, e) energy, (b, f ) cosðÞ, (c, g) cotðÞ, or (d, h) given on the horizontal axis and h() at 2.1 keV.
intentionally misalign, or detune, the crystals, which can provide rejection of higher-order harmonics in the X-ray beam.In some monochromators, the second crystal has the ability to translate parallel to the first crystal surface within the scattering plane of the X-rays.This motion is not necessary if the second crystal is made sufficiently long to receive the X-ray beam at all allowed angles.Finally, the second crystal can be translated in the direction perpendicular to the first crystal surface by either an independent motion or by mechanical coupling to the motion.As noted above, the adjustable crystal gap is used to maintain a constant or fixed offset between the incoming and outgoing X-ray beams so that the beam height does not vary at the sample position during acquisition of an absorption spectrum.

Symmetric crystals
For symmetric crystals, the separation between the X-ray beams entering and exiting the monochromator, h(), is given by the equation where g() is the distance between the crystal surfaces and referred to here as the crystal gap.The crystal gap is perpendicular to the surface and relevant diffraction planes of the first crystal, which are parallel to those of the second crystal when both crystals meet the diffraction condition.A schematic of X-ray diffraction from a DCM that illustrates the crystal gap, beam offset height, and incident angle is shown in Fig. 2. Additionally, while equation ( 1) is well known, a derivation is provided in Appendix A for the interested reader.To find the value of g needed to obtain a given offset, one needs only to solve equation (1) for g() and substitute the desired value of the fixed offset for h().The value of g found in this way is the setpoint (g s ) used to set the crystal gap when scanning the monochromator energy, and we can write where h f is the desired fixed value of the X-ray beam offset.Use of equation ( 2) to fix the exit beam height will work well when g() becomes equal to g s () upon setting the crystal gap.However, let us consider the case where the absolute value of g is not well known.Such errors could be introduced when mounting the monochromator crystals in the crystal cage for example.Let us also assume that relative changes in g are accurately known and controlled, as can be expected for translation driven by a stepper motor, especially when an encoder is included.Then the error in g is constant, and the relationship between g() and g s () can be written where g is the error or difference between the true and desired values of g.By substituting equation ( 3) and then equation (2) into equation ( 1), one finds Equation (4) shows that when there is a difference between the actual and setpoint values of g, the offset will not be fixed to the desired value and will instead continue to change with .
A means for correcting the error is also indicated by equation ( 4).It shows that the beam height is a linear function of cos with a slope of 2 g , as illustrated in Fig. 1(b).Thus, by measuring h(), the error can be determined and then taken into account.However, direct determination of h through measurement of both incoming and outgoing beam heights may not be possible because in many DCMs the first crystal cannot be removed from the incoming beam path, preventing access to the incoming beam at any location downstream of the DCM where beam-height measurement is typically feasible.Instead, the beam height is more readily measured with respect to some arbitrary reference point as illustrated in Fig. 2. Therefore, h() can be written hðÞ ¼ rðÞ À r 0 ; ð5Þ where r() is the beam height measured with respect to an arbitrary reference and r 0 is the difference between the reference position and the height of the incoming beam.Substituting r() À r 0 for h() in equation ( 4), one finds Equation ( 6) represents a line having the dependent variable r, the independent variable cos , a slope 2 g , and an intercept (h f + r 0 ).Thus, the error is readily found from the slope of a linear fit to the beam height measured as a function of cos .
Once obtained, the error can be taken into account by recalibrating the motor that controls the crystal gap such that the position corresponding to 0 is changed to correspond to g .Because the motor is unlikely to have the ability to fully close the crystal gap, calibration will likely be carried out at some other motor position corresponding to some attainable setpoint value, g s .Then the motor position that corresponds to g s must be recalibrated to have a value g 0 s such that

Asymmetric crystals
Aside from error in the calibration of the crystal gap, changes in the exit height can also result from miscut, or asymmetric, DCM crystals, where the asymmetry may be due to errors in crystal polishing or intentionally introduced.As with symmetric crystals, the exit height from a DCM with asymmetric crystals can be fixed by adjusting the crystal gap to account for changes in the angle of incidence, which depends on both the miscut and .However, a crystal may not be known to have a miscut or the exact miscut angle may not be precisely known.Therefore, one would be unable to correctly account for the asymmetry, resulting in beam motion.With small source sizes and highly focused X-rays, even small errors in the miscut can cause variation of the exit height.As with errors in the crystal gap, errors in the miscut can be determined from the variation of the beam height with and then taken into account when adjusting the crystal gap to eliminate beam motion.
With the gap between the crystal faces, g, being perpendicular to the first crystal surface but not the crystal diffraction planes, equation ( 1) is no longer valid for miscut crystals, and the angle-dependent beam height is instead expressed by where is the angle of incidence on the first and second crystal diffraction planes, which are maintained parallel to meet the diffraction condition on both crystals, and and are the differences between and the incident angles on the second and first crystal surfaces, i.e. the miscut angles, respectively (Frahm et al., 2019).A schematic of X-ray diffraction from a DCM with asymmetric crystals is given in Fig. 3, and a derivation of equation ( 8) based thereupon is given in Appendix B.
For asymmetric crystals, the crystal gap needed to fix the exit height is dictated by equation ( 8).By solving for g and substituting the desired value of the fixed height, h f , for h(), one finds that for miscut crystals the crystal gap must be set according to If the asymmetry is ignored and the setpoint is selected using equation ( 2), then the beam height will continue to change with according to which is found by substituting the right-hand side of equation (2) for g() and 2 sin cos for sinð2Þ in equation ( 8) (Frahm et al., 2019).For small and , equation (10) becomes Unlike equation ( 4), which is linear in cos , equation ( 11) is linear in cot , as shown in Fig. 1(g).Thus, an error in the height due to the presence of a miscut can be readily distinguished from an error due to a difference in the actual and setpoint values of the crystal gap.In Figs.1(e) and 1(f), the beam height calculated from equation ( 11) is plotted as a function of energy and cos , respectively.It illustrates that beam height changes more at larger values of cos and is nearly linear in energy.This is markedly different from the larger changes in height at lower energies that occur due to a difference in the actual and setpoint values of g.
In principle, if a miscut of unknown angle is present, it could be determined from the angular variation in height.When measured with respect to an arbitrary reference, as described by equation ( 5), equation ( 11) becomes Thus, can be determined from the slope of a linear fit to the measured beam height versus cot .Note that while a residual error in will cause the fixed offset to deviate slightly from the desired value, this deviation will not change with , and beam motion will not occur.Therefore, for the purpose of eliminating beam motion, one can generally assume that has the same value as .Furthermore, in some cases, may be too large for equation ( 11) to sufficiently approximate equation ( 10).In such cases, the true value of can be considered as the sum of a value used to set the crystal gap, s , and an error in this value, , and the small-angle approximation can then be applied to rather than .This scenario is discussed further in Appendix C.
When both errors due to a miscut and miscalibration of the crystal gap are present, the beam height will vary according to which is found by substituting equation ( 3) and then equation (2) into equation ( 8) and again utilizing the relationship 2 sin cos = sinð2Þ.For small and this becomes Combining with equation ( 5), the beam height measured with respect to an arbitrary reference is found to be The measured angle dependence of the height can be fit with equation ( 15) to determine and g .Due to potential correlations between fit variables, several iterations may be needed to ensure a successful correction, and one may wish to separately determine and g .This can be accomplished by measuring the dependence of the height two times, where after the first measurement an additional error ( 0 g ) is intentionally added to g by recalibrating the motor that controls the crystal gap such that 0 becomes 0 g .Then, for the second measurement, the beam height is given by The difference between the second and first measurements is and, in equation ( 17), is the only remaining unknown.After is determined by fitting the difference between the second and first series of measurements, g can be determined by fitting the measured values of r with equation ( 15) or ( 16), making sure to take proper account of 0 g .After finding g , the motor that controls the crystal gap can be recalibrated as described by equation ( 7).A fixed offset can then be effectively maintained by using equation ( 9) to set the crystal gap, where both and can be set to the value of determined from fitting of Ár() with equation (17).

Application
We have applied the method described above to mitigate error in the fixed offset of the Si(111) DCM at beamline 9-BM of the Advanced Photon Source (APS).The distances between the bending magnet source and all relevant beamline components are given in Table 1.The DCM is located 26.6 m from the bending magnet source and can maintain a fixed offset, h, at any value between 20 and 25 mm over its full energy range.The exit beam height was measured at values of cos from 0.3828 to 0.9948 in intervals of 0.006.This corresponds to an energy range from 2140 eV to 19350 eV, which spans the Kedges of P to Nb.At each cos value, a phosphor screen located 28.1 m from the source and mounted on a steppermotor-driven linear-motion stage was translated through the beam.The beam intensity incident on the screen was monitored by measuring the total electron yield from the screen, which was biased by a 24 V battery.The beam intensity after the screen was detected with a helium-filled ion chamber located approximately 57 m from the source.Both detection methods yield similar results.An upward-bounce Rh-coated toroidal focusing mirror was located 29.4 m from the source, which is downstream of both the phosphor screen and DCM and upstream of the ion chamber.A roughly 10 mm-thick aluminium foil was placed in front of the screen to absorb low-energy, i.e. ultraviolet, synchrotron radiation, which can contribute to the electron yield signal.The foil will also absorb most of the radiation from the fundamental reflections of the Si (111) crystals at the lowest energies at which the beam height was measured.However, sufficient intensity from higher-order harmonics is present for measurement.
The X-ray beam intensity was monitored as a function of the fluorescence screen height, I(r sc ), as the screen was translated through the beam at each cos value.The beam height, r, was determined by taking the center of mass of a Gaussian fit to the first derivative of I(r sc ). Figure 4 shows I(r sc ) measured at = 48.8 and illustrates the typical behavior of I(r sc ) where the intensity is seen to drop as the screen passes through the beam.The derivative of I(r sc ), which is peaked about the point where the screen passes through the beam, and the value of r(48.8 ) determined therefrom are also shown in Fig. 4. Before each scan of the screen through the X-ray beam, the second crystal pitch was scanned to obtain the double-crystal rocking curve, as shown for example in the inset to Fig. 4, and then set to the position that maximized the beam intensity.At each cos value, the second crystal roll was also scanned and set to the position that centered the beam on a horizontal slit located in front of the ion chamber.
Measured values of rðcos Þ are shown in Fig. 5.In the initial measurement (red circles), r increases linearly with cos , as expected for symmetric crystals.Also as expected from the relationship between and X-ray energy, most of the height change occurs at the lowest X-ray energies examined, as shown in the inset to Fig. 5.A linear fit to rðcos Þ, shown by the black line, has a slope of 428(3) mm.According to equation ( 6), g is equal to half of the slope, which is 214 mm.Following equation ( 7), the motor that controls the crystal gap was recalibrated such that any position previously having a value g s now has a value g 0 s = g s + 214 mm.After calibration, the beam height was measured again and is now relatively constant compared with before calibration, as shown by the blue-green isotoxal stars in Fig. 5.1

Additional considerations
Energy-dependent changes of the angle at which the beam exits the monochromator may also be present, if, due to other instrumental errors, the second crystal pitch at which intensity is maximized varies with .This could result from parasitic motion of the second crystal pitch with changes in .It could also result from dispersion introduced by different lattice parameters of the two crystals, which will occur when they are at different temperatures.For a given energy, the Bragg angles of the two crystals would then differ, and the X-ray beam would exit the monochromator at an angle of 2 with respect to the incoming beam, where is the difference in Bragg angles of the two crystals.Because the first crystal receives the full energy spectrum of the X-ray source and is therefore typically actively cooled, while the second crystal receives only the monochromatic beam created by the first crystal and is not typically cooled, some temperature differential is likely.For a small difference in Bragg angles between the two crystals, the monochromator exit angle will vary with as (Proux et al., 2006) 2 ¼ À2 tanðÞ d=d; ð18Þ where d is the spacing between crystal diffraction planes.2Furthermore, depending on the finite thermal conductivity of the crystal and active cooling capacity, variation in the local crystal temperature can occur with changes in , resulting in an additional dependence of d in equation ( 18).These effects can result in a loss of the tuning of the second crystal pitch, i.e. a change in its position on the double-crystal rocking curve, and motion of the X-ray beam as energy is scanned over the roughly 1 keV energy range of an extended X-ray absorption fine-structure (EXAFS) spectrum, even when the crystal gap is well calibrated.Mechanical instabilities of the monochromator can also change the beam exit angle during energy scanning, and while typically small, these changes become significant for highly focused X-ray beams (Tucoulou et al., 2008).The focal position of a toroidal mirror or Kirkpatrick-Baez (KB) mirror depends on the source position, and changes of the incident Intensity (I) of the monochromatic synchrotron X-ray beam as a function of phosphor screen position (r sc ) at = 48.8 and its derivative.The intensity was measured by a helium-filled ion chamber downstream of the screen as the screen was translated through the X-ray beam.The beam height, r, determined from the scan is shown by the vertical blue dotted line.
[Inset] Double-crystal rocking curve.The second crystal pitch was set to the angle that maximizes I before measuring I(r sc ).angle at which the beam strikes the mirror are equivalent to virtual motion of the source (Tucoulou et al., 2008).In the presence of errors that change the beam's exit angle from the DCM, the angle of incidence upon the mirror will become a function of , and the location of the focal point will therefore change with energy.This can result in changes of the beam position as well as the beam shape and size on the sample during an EXAFS scan.If the motion is small, use of a vertical slit in front of the sample will minimize this effect, though with the drawback of a reduction in X-ray flux (Heald & Hastings, 1981).
Angular errors can be readily corrected by a feedback system that adjusts the second crystal pitch (Prestipino et al., 2011;Mills & Pollock, 1980;Golovchenko et al., 1981;Fischetti et al., 2004;Proux et al., 2006;Stoupin et al., 2010;van Silfhout et al., 2014;Zohar et al., 2016a,b).Furthermore, when angular errors resulting from parasitic motion of the second crystal are present and dispersion is negligible, a feedback system that keeps the intensity of the X-ray beam maximized will also maintain the vertical position of the X-ray beam if and only if the crystal gap is well calibrated.However, such a system could prevent detuning of the crystals or limit detuning to specific positions on the double-crystal rocking curve (Golovchenko et al., 1981).To allow the crystals to be arbitrarily detuned from the maximum of the double-crystal rocking curve, feedback on a position-sensitive detector can be used.A feedback system that adjusts the second crystal pitch to maintain the beam position will also maintain the crystal tuning and beam intensity if the crystal gap is well calibrated, again for the case where angular errors result from parasitic motion of the second crystal and dispersion is negligible.
When a crystal-temperature differential is present, angular errors due to dispersion will remain even when the second crystal pitch is optimally tuned, and the beam height will vary by 2z, where z is the distance between the sample and DCM.Thus, to avoid beam motion, feedback using a positionsensitive detector may be preferred.In this case, the tuning will vary as energy is changed, which is acceptable as long as sufficient flux is maintained.When dispersion is large enough to degrade the flux over the range of an EXAFS scan, intensity feedback in combination with other strategies to retain the position of the beam on the sample may be optimal.One such strategy is synchronous adjustment of the sample position while scanning energy (Proux et al., 2006).
Appropriate adjustment of the crystal gap can also be used as a strategy to correct for beam motion due to dispersion.The beam height at the sample will vary according to hðÞ ¼ 2gðÞ cos À 2z tanðÞ d=d; ð19Þ with respect to the height of the beam entering the DCM.Solving for g, one finds the crystal-gap setpoint is given by where the desired fixed height at the sample, h fs , has been substituted for h().Setting the crystal gap according to equation (20) will prevent beam motion at the sample.However, because the angle of the outgoing beam will still vary with , vertical beam motion will be present away from the sample with beam-height variation being largest at the DCM.Thus, if such a strategy were employed, consideration should also be given to the impact of beam motion on other optical elements such as mirrors and slits.
In aggregate, the above considerations illustrate that accurate calibration of the crystal gap has advantages even when feedback systems are used to maintain the beam position or intensity.

Summary and conclusion
In order to fix the height of the X-ray beam exiting a DCM, the true separation between the crystals must accurately correspond to the setpoint value.Error in the calibration of the crystal gap will lead to unwanted motion of the X-ray beam as energy is adjusted or scanned.Additionally, unwanted monochromator crystal asymmetry or errors in the miscut of asymmetric crystals will also lead to changes in beam height as energy is varied.Here, we show how these errors relate to and can be extracted from the variation in X-ray beam height with monochromator crystal Bragg angle.Over a range of incident angles, we determine the height of the X-ray beam at a XAFS beamline from the position at which a screen translated vertically through the beam alters the measured intensity.From this, the error in the crystal gap is obtained.After correcting for the error, the height variation with energy is found to be negligible.Along with measures to correct other errors in the motions of a DCM, such as feedback, careful calibration of the crystal gap by the simple method presented here produces robust position and intensity stability of the delivered beam at a XAFS beamline.

APPENDIX A X-ray beam height of a DCM with symmetric crystals
The crystals of a DCM with the X-ray beam striking the first crystal at angles of incidence less than /4, equal to /4, and greater than /4, are illustrated in Figs.2(a), 2(b) and 2(c), respectively.In going from the first to the second crystal, the X-ray beam travels a distance l and, when the first and second crystal diffraction planes are parallel, strikes the second crystal at the angle .The minimum separation between the crystals, g, is related to the distance l and the angle of incidence on the second crystal by From inspection of Fig. 2, this holds for all .
The first crystal deflects the X-ray beam by an angle of 2 with respect to the path of the incoming beam.From inspection of Fig. 2(a), the separation between the incoming and outgoing beams (h) is related to the beam path length and deflection angle by when the incident angle is less than /4.For an angle of incidence equal to /4, inspection of Fig. 2

(b) indicates
Substitution of /4 into equation ( 22) also gives this result.Thus equation ( 22) holds true for = /4.For an incident angle greater than /4, inspection of Fig. 2(c) shows that h is related to the path length and deflection angle by From the mirror symmetry of the sine function about the angle /2, sinð À 2Þ = sinð2Þ, and upon substitution into equation ( 24), one obtains equation ( 22).Thus equation ( 22) holds true for all .
To relate h to g, one can then solve equation ( 21) for l and substitute into equation ( 22), which gives This is exactly equation 1.

APPENDIX B X-ray beam height of a DCM with asymmetric crystals
Figure 3 shows the crystals of a DCM with the X-ray beam striking the diffraction planes of the first crystal at an angle and the first crystal surface at an angle À , where is the miscut angle of the first crystal.The first crystal diffracts the X-ray beam by an angle of 2 with respect to the incoming beam path and an angle of + with respect to the first crystal surface.Thus, the angle between the first crystal surface normal and the diffracted beam is /2 À ( + ).The diffracted beam strikes the second crystal diffraction planes, which are parallel to those of the first crystal, at an angle and the second crystal surface at an angle + , where is the miscut angle of the second crystal.The crystal gap originates from the first crystal surface at the point where the incident X-ray beam strikes and extends perpendicular to the first crystal surface until reaching that of the second crystal.Therefore, the crystal gap, the second crystal surface, and the beam path between the first and second crystals form a triangle from which the angle between the crystal gap and second crystal surface is found to be /2 À + .From the law of sines, the distance the beam travels from the first to the second crystal, l, is then determined to be The outgoing beam height is related to l by equation ( 22), and upon substituting the right-hand side of equation ( 26) for l in equation ( 22), one finds which is exactly equation ( 8).

APPENDIX C
Error in the X-ray beam height of a DCM with crystals having a large asymmetry In some cases, the crystal miscut may be too large for equation (11) to provide a sufficient approximation of equation ( 10).The specific value of at which the equation fails will depend on how much error in beam height a specific beamline can tolerate, which is determined by the specific details of the beamline such as source size and focusing optics.In cases where a sufficient correction is not achieved using the value of determined from equation ( 11), or more generally when the crystal gap is being set using equation ( 9), the value of can be found by considering the error in in a way similar to which the error in the crystal gap was considered in Section 2.1.To do so, is expressed in terms of the value used to set the crystal gap ( s ) and an error in this value ( ) such that Similarly, can be written where the setpoint value of is chosen to be equal to that of .The crystal gap is then set using s in place of and in equation ( 9), which gives Substituting the respective right-hand sides of equations ( 28), ( 29) and (30) for , , and g() in equation ( 8) gives For small and , this becomes Finally, the height measured with respect to an arbitrary reference position, as given by equation ( 5), is which can be used in the same manner as equation ( 12) to determine and thereby .When an error in the crystal gap calibration is present in addition to an error in , the monochromatic beam exit height is given by which is found by substituting equations (3), ( 28) and ( 29) and then equation (30) into equation ( 8) and then applying the small-angle approximation for and .When measured with respect to an arbitrary reference point, the beam height is then As discussed in Section 2.2, to independently determine and g , an additional error of known magnitude, 0 g , can be added to the crystal gap setpoint, the beam height can be measured a second time, and the two beam height measurements can be subtracted.When applied using equation ( 35), this gives where is the only unknown.After determining from Ár(), g can be found from r() using equation ( 35).

Figure 2
Figure 2 Schematic of the two crystals of a DCM diffracting an X-ray beam, shown as the thick red line, incident on the first crystal at an angle, , (a) less than /4, (b) equal to /4, and (c) greater than /4.

Figure 3
Figure 3 Schematic of the two crystals of a DCM diffracting an X-ray beam, shown as the thick red line, incident on the diffraction planes of the crystals at an angle .The diffraction planes, indicated on the crystals by blue lines, are inclined with respect to the first and second crystal surfaces by angles of and , respectively.

Figure 5 X
Figure 5 X-ray beam height (r) exiting the DCM measured as a function of the cosine of the incident angle on the first crystal ().[Inset] Change in X-ray beam height (Ár) with energy before and after crystal gap calibration.

Table 1
Distance from the bending magnet source to relevant components of beamline 9-BM.