# Also in the Article

X-ray spectral reconstruction
This protocol is extracted from research article:
Compact spectroscopy of keV to MeV X-rays from a laser wakefield accelerator
Sci Rep, Jul 13, 2021;

Procedure

We write the integrated energy deposited in layer i of the calorimeter as a vector with components $Di(i=1,2,...,24)$. We wish to reconstruct from this the spectrum $dN/d(ħω)$ of incident X-rays, which we discretize as a vector $dNj/d(ħω)$ describing the number of photons in bin j of energy $ħωj$ and width $d(ħωj)$. A stack response matrix $Rij$ describes the energy deposited in layer i by photon of energy $ħωj$ and relates $Di$ to $dNj/d(ħω)$ via49:

where the sum is over the number of energy bins, N. Here, $N≈1600$, with $d(ħωj)=1$ keV for 5 keV $<ħωj<200$ keV, $d(ħωj)=20$ keV for 200 keV $<ħωj<10$ MeV, $d(ħωj)=250$ keV for 10 MeV $<ħωj<200$ MeV, $d(ħωj)=1$ MeV for 200 MeV $<ħωj<400$ MeV and $d(ħωj)=5$ MeV for 400 MeV $<ħωj<600$ MeV. We generate $Rij$ by simulating energy deposition in the stack’s absorbers and IPs by mono-energetic photon beams of different $ħωj$ using Geant470. A reconstruction begins with an initial guess of $dNjd(ħω)(ħωj,p¯)$, which here is constrained to take the form of a physics-based analytic function of $ħωj$, typically including a small set $p¯$ of fit parameters, describing betatron, ICS or bremsstrahlung radiation, or a combination of them. Specific functions used for each type of X-ray source are presented in the Results. Knowledge of the presence and location of PMs and converters, and other experimental parameters, is critical in choosing appropriate functions. The most accurate models take the measured electron spectrum (Fig. 1b) specifically into account. However, models that do not depend explicitly on the electron spectrum are also useful for rapid, albeit approximate, results. In either case, a forward calculation using Eq. (8) generates a first-generation $Di(calc)$, which is compared to the measured energy distribution $Di(meas)$. A fitness function

i.e. the sum of squared residuals between the calculated and measured energy, then evaluates the goodness of fit where, n denotes the number of layers. In subsequent iterations, $dNjd(ħω)(ħωj,p¯)$ is varied in an effort to minimize $F(p¯)$. Here, we unfold the spectral shape, not the absolute value, of $dNjd(ħω)(ħωj,p¯)$, by fitting to the energy distribution $Di$ normalized to total deposited energy $∑i=1nDi$. The overall scaling is reintroduced after the completed unfolding to account for the total energy in the beam (see Supplementary Material for stack calibration). As in solving any complex inverse problem with incomplete information, convergence of the iterative procedure and uniqueness of any best fit solution cannot be guaranteed. Thus thorough tests of the sensitivity of results to initial guesses, awareness of experimental conditions, liberal use of physical constraints on the form of solutions and accurate evaluation of error are essential to achieving reliable results.

Note: The content above has been extracted from a research article, so it may not display correctly.

Q&A