X-ray characterization by energy-resolved powder diffraction

A method for single-shot, nondestructive characterization of broadband x-ray beams, based on energyresolved powder diffraction, is described. Monte-Carlo simulations are used to simulate data for x-ray beams in the keV range with parameters similar to those generated by betatron oscillations in a laser-driven plasma accelerator. The retrieved x-ray spectra are found to be in excellent agreement with those of the input beams for realistic numbers of incident photons. It is demonstrated that the angular divergence of the x rays can be deduced from the deviation of the detected photons from the Debye-Scherrer rings which would be produced by a parallel beam. It is shown that the angular divergence can be measured as a function of the photon energy, yielding the angularly resolved spectrum of the input x-ray beam.


I. INTRODUCTION
X-ray beams are widely used in science to determine the temporal, spatial, and elemental constituents of matter; and in medicine they have therapeutic as well as diagnostic applications.In many of these applications, it is important to know the properties of the x-ray beam.This is particularly true for therapeutic applications, where it is important to know the energy and number of x-ray photons which are delivered.The properties of well established and stable sources-such as x-ray tubes or synchrotron beam linescan be determined in separate calibration measurements.However, other x-ray sources, particularly those in an early stage of their development, can suffer from large shot-toshot fluctuations in their properties.For these sources, it would be highly desirable to characterize the x rays delivered to an experiment or target in a short interval or, for the case of pulsed beams, in a single shot.This requires the development of techniques for single-shot, nondestructive characterization of x-ray beams.
A source of bright, ultrafast x rays of particular current interest is the betatron radiation emitted from plasma accelerators.In this scheme, the ponderomotive force of an intense, ultrafast laser pulse excites a plasma wave which trails the laser pulse [1].The electric fields within this plasma wave can be 3 orders of magnitude greater than in conventional radio-frequency accelerators, allowing the generation of electron beams with energies of several GeV in accelerator stages only a few centimeters long [2][3][4][5].The radial electric fields of the plasma wave cause the accelerating electron bunch to undergo transverse betatron oscillations, leading to the emission of radiation [6]; this has a broad, synchrotron-like spectrum [7][8][9] with energies typically on the order of 10 keV [10][11][12][13], but which can be extended to the multi-MeV range by resonantly driving the electron oscillation with the trailing edge of the driving laser pulse [14].
Betatron radiation generated within laser-plasma accelerators is increasingly finding applications.Its small source size makes it suitable for phase contrast imaging [15].Further, its short duration-typically tens of femtoseconds or shorter-and inherent synchronization to the electron bunch and the driving laser pulse, enable pump-probe applications such as x-ray absorption spectroscopy [9].An additional motivation for characterizing betatron radiation is that it can be used to probe the operation of the plasma accelerator itself [6,[16][17][18][19].
Existing methods for characterizing x-ray sources of this type include penumbral imaging of a knife edge to measure the source size [20], and recording the transmission through arrays of filters to estimate the spectrum [11,12].The spectrum can also be measured by scanning a single-crystal x-ray monochromator [21], which yields a time-averaged spectrum, or in a single shot by photon counting [7].
Many of the methods above destroy the x-ray beam, preventing the simultaneous characterization and application of the beam.Often there are other limitations: for example, unless filters with a narrow bandwidth are available, determining the spectrum from the relative transmission through different filters requires that the shape of the spectrum is known.
To overcome these limitations, we propose a novel method based on a combination of x-ray powder diffraction and energy-resolved photon counting.The essential idea is to diffract a small fraction of the x-ray beam from a thin sample of a powdered crystal, and to detect single diffracted x rays with a CCD.The spectrum of the diffracted x rays, and hence that of the incident beam, can be determined directly from the distribution of CCD counts.Further, as we show later, the angular dependence of the spectrum can be found from the spatial distribution of the diffracted photons about the Debye-Scherrer rings produced by a zerodivergence beam.Since only a fraction of the incident photons are diffracted (of order 10 −4 ), the measurement is essentially nondestructive, and the remaining beam can be used simultaneously for applications if the material has a low attenuation coefficient.We note that our proposed method, which we call X-ray Characterization by Energy-Resolved Powder (XCERP) diffraction, is similar to Single Hit Energy-resolved Laue Diffraction (SHiELD).In the latter method energy-resolved photon counting of Laue diffraction from a single crystal is used to determine changes in the crystal structure when under dynamic stress [22].With XCERP diffraction this concept is inverted so that diffraction from a known crystal structure is used to determine properties of the unknown incident x-ray beam.
In this paper we describe the principle of operation of XCERP diffraction and, via Monte-Carlo simulations, demonstrate that it can retrieve complex x-ray spectra.We show that the divergence of the incident beam can be determined from the measured diffraction pattern, and we demonstrate that the angularly resolved spectrum of the incident beam can be deduced.Finally, we discuss limitations of the method.

II. THEORETICAL BACKGROUND
The fundamental relationship used in x-ray diffraction is Bragg's law [23], nλ ¼ 2d hkl sin θ B , where n ¼ 1; 2; 3; … is the order of diffraction, λ is the x-ray wavelength, d hkl is the lattice spacing for the fhklg planes, and θ B is the angle between the ray and the crystal plane.Diffraction of monochromatic x rays from a powdered sample of micronsized crystallites will form rings of angular radius 2θ B , each ring corresponding to a different combination of the Miller indices.The intensity of the diffracted signal from a specific set of planes [24,25] is given by where r e is the classical electron radius, M hkl is the multiplicity of the fhklg family of planes, v is the volume of the sample's unit cell, V is the effective volume of powder being irradiated (which also accounts for absorption within the sample) and F hkl is the structure factor.The Lorentz-polarization factor, LP, depends on the polarization of the radiation and the diffraction geometry; the exponential term incorporates the temperature dependence of the diffracted intensity due to lattice vibrations, characterized by the Debye-Waller factor, WðTÞ.
For polychromatic sources, the Debye-Scherrer rings will be broadened and will overlap, making it difficult to determine either the crystal structure or the spectrum of the radiation.However, this difficulty can be overcome by operating the detector in an energy-resolved single-photon mode which allows the Debye-Scherrer ring pattern to be extracted for each incident x-ray wavelength.If the crystal structure is known, this diffraction pattern can be used to determine the properties of the x-ray beam.
Figure 1 shows schematically an experimental arrangement which could be used for XCERP diffraction.An x-ray beam is incident on a thin sample of a powdered crystal of known crystallographic structure.A small fraction of the entire incident x-ray beam is diffracted by the crystal and detected by an x-ray CCD.This method of sampling the beam brings several advantages: (i) most of the beam propagates through the powdered crystal and can then be used in applications; (ii) the density of photons reaching the detector will be sufficiently low to allow photon counting [26]; (iii) the whole beam is sampled, which allows beams with an angularly dependent spectrum to be characterized.

III. SPECTRUM RETRIEVAL WITH XCERP DIFFRACTION
The spectrum of the diffracted x-ray photons S diff ðEÞ can be found straightforwardly from the distribution of CCD counts using standard photon counting techniques [7,26].This involves direct detection of x rays on a CCD with the requirement that the number of photons incident on a given FIG. 1. Geometry of an XCERP diffraction measurement.A broadband x-ray beam is incident normally on a powdered target.Diffraction from the powder sample produces Debye-Scherrer rings with angular radii which vary with photon energy and lattice plane spacing.The distance along the axis from source to powder is D sp and the distance from powder to detector is D pd .The radial distances of the detector's upper and lower edges from the beam axis are r 1 and r 2 , respectively.Most of the x-ray beam is not diffracted and can be used for application such as, in this case, phase-contrast imaging.
pixel is either one or zero.In the case that an x ray is captured, the number of photoelectrons created is directly proportional to the energy of the x ray.By calibrating the CCD, for example, using the characteristic radiation from a radioactive source, each pixel acts as a spectrometer and so the diffracted spectrum can be found from a histogram of the pixel values.For a silicon based detector, detection is effective in the range of tens of eV up to tens of keV.The energy resolution for each detected x ray is typically limited by Fano noise which results in a statistical variation in the charge generated by the x ray of a given energy [27].As an example, assuming a silicon-based detector (Fano factor of 0.1) and a 10 keV photon, the FWHM is approximately 140 eV.
The spectrum of the incident beam S inc ðEÞ is related to the spectrum of the diffracted beam S diff ðEÞ, but is not identical since the probability of diffraction depends on the energy of the x ray.The spectra are related by S diff ðEÞ ¼ RðEÞS inc ðEÞ, where RðEÞ is the probability that an incident photon of energy E will be diffracted from the sample to the detector.The response function RðEÞ will depend on the experimental geometry and the crystal used, and can be found by calculating the spectrum of diffracted photons for a spectrally flat incident spectrum, since S flat diff ðEÞ ¼ RðEÞS flat inc .Hence the spectrum of an unknown source is given by S inc ¼ ðS flat inc =S flat diff ÞS diff .Alternatively, RðEÞ could be measured using a source of known broad x-ray spectrum placed at the location of the unknown source.
To test the XCERP diffraction method we developed a Monte-Carlo code to simulate the diffraction pattern produced by an arbitrary incident beam.In outline, this code considers a bundle of incident photons following some distribution which is a function of angle and energy, P inc ðE; φÞ; with a probability determined by Bragg's law and the reflectivity (1), these photons are diffracted by the crystal planes; and the diffracted photons are then projected onto the plane of the detector.
For the work described here the powdered crystal was assumed to be silicon [28,29]; the sample thickness was assumed to be 50 μm; and the distances from source to powder and from powder to detector were taken to be D sp ¼ 100 mm and D pd ¼ 50 mm, respectively.We note that the XCERP diffraction method can be used with any material for which the crystal structure, Debye-Waller factor and scattering factors are known.
As a first demonstration we consider the case of an incident beam with a spectrum similar to (on-axis) synchrotron radiation, i.e., of the form where C E is a normalization constant, E c is the critical energy and K α ðxÞ is the modified Bessel function of the second kind.For simplicity, we initially assume that there is no correlation between photon energy and incident angle, and allow the angular distribution taken to be Gaussian with an energy-independent standard deviation σ φ : where C φ is a normalization constant.Figure 2 shows an example of a calculated diffraction pattern produced by N sim ¼ 1 × 10 5 simulated incident photons with E c ¼ 20 keV.
The spectrum of the diffracted beam can be found simply by binning the photons according to their energy.In order to find the incident spectrum it is necessary to calculate RðEÞ; this can be done using the same Monte-Carlo code to calculate the spectrum of diffracted photons for the case of a spectrally flat incident beam.
We note that in a real experiment, the number of incident photons required to give the number of diffracted photons used in the simulations described by this work will not be the same as the number of photons simulated in the Monte-Carlo code since the probability that each photon diffracts is artificially scaled in order to improve computational efficiency.The scaling factor used is where the summation of the reflectivity ( 1) is over all Miller indices and is calculated for each of the N sim photons.The number of photons N inc required in a real experiment is therefore related to the number of simulated incident photons by N inc ¼ N sim =α.
Figures 3(a) and 3(b) compare the incident and retrieved spectra for a synchrotron spectrum with E c ¼ 20 keV, σ φ ¼ 2.5 mrad and an estimated 1.2 × 10 8 and 6.0 × 10 6 incident photons, respectively.In both cases the retrieved spectrum is in excellent agreement with the incident spectrum, but, as expected, the agreement is better for the larger number of incident photons.These photon numbers may be compared with the approximately 10 8 -10 9 x-ray photons generated by betatron oscillations in laser-plasma accelerators of electrons with energies of order ∼200 MeV [6,14,20,30].
For reference, the simulation for Fig. 3(a) uses N sim ¼ 10 5 simulated incident photons, α ¼ 8.3 × 10 −4 , leading to an equivalent of N inc ¼ 1.2 × 10 8 photons in a real experiment.The resulting number of diffracted photons which then fall on the CCD, which we assume for the sake of the simulation consists of 1000 × 1000 pixels of length 20 μm, is 8.2 × 10 3 .
In order to demonstrate the flexibility of XCERP diffraction we also simulated the retrieval of the complex spectrum shown in Fig. 3(c).Even in this extreme case the retrieved spectrum is seen to be in close agreement with that of the incident beam, demonstrating the utility of XCERP diffraction in cases for which the shape of the incident spectrum is unknown or the form of the spectrum cannot be characterized by a small number of parameters.
As can be seen from Fig. 3, the spectrum can only be retrieved for photon energies above some lower bound, determined by the photon energy E min for which 2θ max ¼ Θ d where Θ d ¼ tan −1 ðr 2 =D pd Þ is the maximum angle subtended by the detector at the sample and θ max is the Bragg angle associated with the crystal's largest plane separation d max .In the arrangement shown in Fig. 1, the lower bound is found to be E min ¼ hc=½2d max sin ðΘ d =2Þ.
For the geometry assumed in the simulations shown in Fig. 3(a), we find that E min ¼ 7.4 keV for diffraction from the f111g set of planes in silicon; this agrees with the lower cutoff observed in the retrieved spectra.The spectral range can be extended to lower photon energies by adjusting the experimental geometry, for example, by increasing the ratio r 2 =D pd .However, there is an intrinsic lower bound to the detectable photon energy which occurs in transmission (reflection) geometry when the diffracted photon is perpendicular (antiparallel) to the incident beam.The minimum detectable photon energy E min ¼ βhc=d max where β ¼ 1=ð2 ffiffi ffi 2 p Þ for transmission and β ¼ 1=2 for reflection.For silicon, this leads to intrinsic minima of 2.8 keV for transmission and 2.0 keV for reflection.

IV. DIVERGENCE RETRIEVAL WITH XCERP DIFFRACTION
Further information about the incident beam may be obtained by plotting the radial position rðEÞ of each detected photon against its energy, as shown in Fig. 4. The solid curves show the radii r hkl ðEÞ of the Debye-Scherrer rings produced by diffraction from the hkl planes of photons incident along the beam axis with energy E. Photons detected away from these curves, i.e. with r ≠ r hkl , must have been incident with φ ≠ 0. Hence the distribution of detected photons about these curves ΨðE; rÞ gives information on the angular distribution of the incident radiation Pðφ; EÞ.For comparison, three cases have been shown with σ φ ¼ 2.5, 1.0 and 5.0 mrad.
It is not straightforward to deduce Pðφ; EÞ from the measured distribution about the r hkl curves, Ψ exp ðE; rÞ.However, assuming a given form for the angular distribution of the incident beam Φ model ðφ; pÞ-where p represents the model parameters-allows the expected distribution of photons about each curve Ψ model ðE; rÞ to be compared with the measured distribution Ψ exp ðE; rÞ.Minimizing the difference between the measured and calculated distributions then allows the optimum parameters of the model angular distribution to be found.
For the cases considered in this paper, we have found that for a given photon energy, the radial offset r − r hkl , and hence ΨðE; rÞ, does not depend strongly on the diffraction plane fhklg.In general for this to hold true we require: (i) the angle subtended by the detector at the powder sample to be sufficiently small that r 2 ≲ D pd ; and (ii) the divergence of the incident beam to be much less than 1 rad (this second constraint is easily satisfied for the x-ray sources of interest).Alternatively, conditions (i) and (ii) need not be satisfied if instead D sp ≫ D pd .

A. Retrieval of energy-independent divergence
To demonstrate retrieval of the angular distribution by XCERP diffraction, we first use the same simulation data as shown in Fig. 3(a), which assumed an incident beam with an on-axis synchrotron spectrum and an energy-independent angular distribution.To analyze this case, we assumed a Gaussian model Φ model ðφ; σ test Þ with a standard deviation σ test .Figure 5 shows the "measured" distribution Ψ exp calculated by the Monte-Carlo diffraction code and the best-fit model distribution Ψ model after least squares minimization to determine the optimum σ test .This FIG. 5. Distributions of photons ΨðrÞ for diffraction by powdered silicon and an incident x-ray beam with the same parameters as in Fig. 3(a) calculated: by the Monte-Carlo diffraction code (grey bars); and for a Gaussian angular distribution Φ model ðφ; σ test Þ after least squares minimization (blue).The best fit corresponds to a divergence of σ test ¼ 2.51 AE 0.08 mrad.The red lines show error bars calculated assuming that the number of photons in each radial bin follows a Poisson distribution.FIG. 6. Demonstration of the retrieval of an energy-dependent divergence with XCERP diffraction for an incident beam with the same parameters as Fig. 3(a) except for an energy-dependent divergence for photons in the range 0 keV < E < 50 keV given by σ φ ½mrad ¼ 5 − 0.075 E½keV.The retrieved divergence for each 10 keV energy bin is shown in blue; error bars, calculated assuming the number of photons detected within each energy bin are Poisson distributed, are shown by the solid red lines; the standard deviation used to generate the simulation's incident beam is shown by the dotted green line.FIG. 7. Comparison of the angularly resolved spectrum retrieved by XCERP diffraction (colored surface) with that of an input beam with the parameters as in Fig. 6 (gray mesh).The side panels show the angularly resolved spectra integrated over energy (left) and angle (right) for the retrieved (blue line) and input (gray line) spectrum.The integrated spectra have been scaled so that they can be displayed on the same z-axis.
procedure yields σ test ¼ 2.51 AE 0.08 mrad, which is in remarkable agreement with the value σ φ ¼ 2.50 mrad for the input beam.We note that typical values of the full-angle divergence of a plasma accelerator betatron source, for example, are of order 10 mrad [15,20,31] and so would be measurable with XCERP diffraction.

B. Retrieval of energy-dependent divergence
In general the x-ray spectrum depends on the angle of emission.In this case we can divide plots like Fig. 4 into energy bins and perform the least squares fit procedure described above to the set of points within each bin.
To demonstrate this we simulated the diffraction of a synchrotron source with an energy-dependent angular divergence for photons in the range 0 keV < E < 50 keV given by a Gaussian whose standard deviation varies as σ φ ½mrad ¼ 5 − 0.075 E½keV; the other parameters of the beam were as for Fig. 3(a).As shown in Fig. 6, the retrieved divergence for each energy bin is in very good agreement with that of the incident beam, demonstrating the potential for XCERP diffraction to measure angularly resolved spectra.
These retrieval methods may be combined to produce an angularly resolved spectrum in which the only assumption made is the form of the divergence as a function of photon energy.Figure 7 shows that the angularly resolved spectrum retrieved by XCERP diffraction is in very good agreement with that of the input beam for parameters corresponding to Fig. 6.

V. DISCUSSION
A number of factors have to be considered when designing an XCERP diffraction measurement.The properties of the crystalline material affect both the diffracted and transmitted beams: the geometry of the experiment, and the crystal used, should be chosen so that the minimum detectable photon energy E min is below the photon energies of interest; and in general, high-Z elements should be avoided in the powdered crystal to prevent strong attenuation of the transmitted (and diffracted) beam.In this paper we have presented calculations for the case of silicon, which is a good candidate for the powdered material since high quality samples (SRM 640e), used as a standard for powder diffraction [32], are readily available.
The experimental geometry also has a significant effect on the retrieval.For example, the ratio D sp =D pd affects the maximum divergence which can be retrieved: for larger D sp =D pd undesirable merging of the Debye-Scherrer rings will occur for higher beam divergence.To quantify this, we see from Fig. 4 that for the case considered, the majority of detected photons diffract from the f111g, f220g and f311g planes.The smallest radial separation of these rings is between those arising from the f220g and f311g planes, and hence this separation limits the maximum divergence which can be retrieved.In this case, to measure the beam divergence we require where θ hkl B is the first order Bragg angle for the fhklg set of planes at a given energy.We emphasize that even when ( 5) is not satisfied, retrieval of the energy spectrum will still be possible as long as the width of the Debye-Scherrer rings due to the beam divergence is smaller than the dimensions of the detector.
On the other hand, in principle, it is possible to determine sub-milliradian divergences.However, effects which broaden the diffraction peaks-such as the effect of finite sizes of the source and crystallites-become important when retrieving low source divergences on the order of ∼1 mrad.Hence, the distribution Ψ exp would be convoluted with the profiles of each broadening mechanism and an accurate divergence retrieval would not be possible.These effects are not important for the case shown in Fig. 6 since Ψ exp is dominated by the divergence of the source.It should be noted that peak broadening has not been modeled in any simulations described by this work.
As is well known, determining the spectrum by photon counting requires that a sufficiently high number of photons are detected to ensure good statistics, whilst ensuring that the average number of photons reaching each pixel is much less than one [7,26].
Throughout this paper we have assumed a perfect detector.In practice, the detector quantum efficiency (DQE) typically has a peak of over 90% near photon energies of 5 keV, but the response can extend to a few tens of keV with DQE ≈ 10%.We note that detectors are being developed with enhanced DQE in the tens of keV range; for example, a combination of a back-illuminated CCD with a scintillator has been shown [33] to allow single photon detection up to 80 keV.If the DQE is below unity then the number of photons incident on the detector should be increased by a factor of 1=DQE in order to prevent loss of resolution.
A number of steps could be taken to improve the signal level.For example, a transverse array of detectors with a central aperture through which the undiffracted beam can pass could be employed [34].The dynamic range sets an upper limit for the number of energy bins which can be used in the spectrum retrieval, but since the dynamic range is typically above 10 3 this should not impose significant limitations.
As was noted for the SHiELD technique [22], noise-for example, arising from fluorescence-could be eliminated to a large extent since it will occur at pixel positions which are uncorrelated with the photon energy and the expected position of the Debye-Scherrer rings.
Errors arising from imperfect knowledge of the ment geometry would only marginally affect the results.The greatest impact would be on the divergence retrieval since errors of this type would result in incorrect calculation of the positions of the Debye-Scherrer rings and hence an incorrect fit of Ψ model .In many cases, errors of this type would be detected; for example, for a cylindrically symmetric x-ray beam the distribution Ψ exp should be symmetric, for a given photon energy, about the r hkl curves, and hence deviations from this would indicate incorrect calculation of the r hkl curves.In such cases it would be possible to use the experimental geometry as parameters in a fit procedure to match the set of r hkl curves with the experimental data.

VI. CONCLUSIONS
We have presented a novel technique, XCERP diffraction, for single-shot, nondestructive measurement of the spectrum and divergence of x-ray beams based on energyresolved x-ray powder diffraction.To demonstrate this we used a Monte-Carlo code to simulate data for x-ray beams with parameters similar to those generated by betatron oscillations in a laser-driven plasma accelerator.The retrieved x-ray spectra were found to be in excellent agreement with those of the input beams for realistic numbers of incident photons.Further, we demonstrated that the angular divergence of the x-ray beam could be deduced from the displacement of the detected photons from the Debye-Scherrer ring which would be produced by x rays propagating along the beam axis.This allowed the angular divergence to be retrieved as a function of photon energy, and hence the angularly resolved spectrum of the beam to be determined.We expect that the XCERP diffraction technique will be particularly useful for simultaneous characterization and application of x-ray beams with fluctuating properties.

FIG. 2 .
FIG. 2. Scatter plot of the location ðx; yÞ and energy E of photons arriving in the plane of the detector for the case of diffraction by powdered silicon of an x-ray beam with a synchrotron spectrum of E c ¼ 20 keV and σ φ ¼ 2.5 mrad.The number of photons used in the simulation was N sim ¼ 1 × 10 5 .

FIG. 3 .
FIG.3.Comparison of the incident and retrieved (blue) spectra for the case of diffraction by powdered silicon; for the incident beam, the underlying spectrum is shown by the dashed black line and that of the sample generated by the Monte-Carlo code is shown by the gray bins.(a) and (b) show the spectra for an incident beam with a synchrotron spectrum with E c ¼ 20 keV and σ φ ¼ 2.5 mrad and: (a) 1.2 × 10 8 photons; (b) 6.0 × 10 6 photons.Shown in (c) are the incident and deduced spectra for a beam of 1.2 × 10 8 photons with a complex spectrum.For all plots the spectrum of the beam transmitted through the powder sample is shown in green, and the error bars (red) are calculated assuming the number of photons detected within each energy bin follows a Poisson distribution.

FIG. 4 .
FIG. 4. Scatter plots of radial distance r from the beam axis as a function of photon energy.The solid lines show the radii of the Debye-Scherrer rings r hkl for photons incident along the beam axis.The assumed properties of the incident beam used for Fig. 4(a) are as in the data shown in Fig. 3(a), with σ φ ¼ 2.5 mrad.Figures 4(b) and 4(c) show the plots for simulations with σ φ ¼ 1.0 mrad and σ φ ¼ 5.0 mrad, respectively.