Cubic spline interpolation is able to recover temporally and spectrally resolved soft x-ray fluxes from an array of K-edge filtered x-ray diodes without the need for *a priori* assumptions about the spectrum or the geometry of the emitting volume. The mathematics of the cubic spline interpolation is discussed in detail. The analytic nature of the cubic spline solution allows for analytical error propagation, and the method of calculating the error for radiation temperature, spectral power, and confidence intervals of the unfolded spectrally resolved flux is explained. An unfold of a blackbody model demonstrates the accuracy of the cubic spline unfold. Tests of cubic spline performance using spectrally convolved detailed atomic model simulation results have been performed to measure the method’s ability to conserve spectral power to within a factor of 2 or better in line-dominated regimes. The unfold is also demonstrated to work when information from the x-ray diode array is limited due to high signal-to-noise ratios or the lack of signal due to over-attenuation or over-filtration of the x-ray diode signal. The robustness of the unfold with respect to background subtraction and raw signal processing, signal alignment between diode traces, limited signal information, and initial conditions is discussed. Results from an example analysis of a halfraum drive are presented to demonstrate the capabilities of the unfold in comparison with previously established methods.

## I. INTRODUCTION

Spectrally integrated x-ray diagnostics^{1–3} such as the ones fielded at the Omega Laser Facility and the National Ignition Facility allow estimations of radiation temperatures and spectral power without the need for crystal spectrometers. An array of x-ray diodes with different K-edge filters samples finite areas of the spectrum in question to determine the radiated power in that band. X-ray mirrors are also used as filters for high energy photons for K-edge filters at lower photon energy bands. The filter components, x-ray diode, cable chain, attenuators, and digitizing oscilloscope form what is commonly referred to as a channel of the array, as illustrated in Fig. 1. A typical array of diodes is capable of spanning the soft spectral range from 60 eV to 3000 eV. K-edge filtration is imperfect, and there is much overlap in the spectral response between channels. For this reason, it is important to correlate information from all possible channels when calculating the spectrally resolved x-ray flux. Furthermore, it is required to have one channel measuring higher energy photons (>3000 eV) because they can contribute signals to the softer channels. Not accounting for the hard x-ray contribution can lead to a gross overestimation of the spectrum in the 1000 eV–2000 eV photon energy range, which is critical for estimating the gold M-band in hohlraums for indirect-drive fusion applications.

Many methods^{4} have been employed in the past to recover the x-ray spectrum from the channel signal traces, some of which require assumptions or measurements for the spectral shape^{5,6} or considerations about the geometry^{7} of the source. These methods are accurate and can reconstruct the x-ray spectrum adequately, but they can fall apart in the face of complications such as insufficient signal-to-noise ratios, lack of signal due to over-attenuation, or if the method is used outside of its intended purpose. There are several methods previously published utilizing B-splines^{8} for spectral deconvolution,^{9,10} along with the proposed improvements on such methods utilizing intervals weighted with the relative intensity.^{11} Cubic spline interpolation was also used to obtain the unfolded x-ray flux using *a priori* knowledge and several iterations to refine the interpolation.^{12} Cubic spline interpolation provides an analytical way of solving for the time and spectrally resolved x-ray flux with no free parameters, no assumptions about the geometry or material of the emitting plasma, and no assumptions about the shape of the spectrum. This method can be sensitive to low signal-to-noise ratios and the temporal alignment of the diode traces as much as the previous methods, but it is more robust in its ability to recover the x-ray spectrum when data are lacking or have poor signal-to-noise ratios. Cubic spline coefficients have no direct physical interpretation, but they provide interpolated, temporally and spectrally resolved x-ray flux and radiation temperature of any plasma in any geometry.

## II. THEORY

The cubic spline is well known, and there are several derivations and codes available as resources,^{13–15} but in order to provide a consistent definition of terms relevant to the implementation and subsequent error analysis in this article, a full derivation of the cubic spline is presented here. Much of the derivation follows the same notation found in the work of Bartels, Beatty, and Barsky.^{13} The signal at any time in a detector channel is described by convolving the incident x-ray spectrum with the response function of that channel,

where *V*_{i} is the signal recorded on channel *i*, *E* is the photon energy, *R*_{i}(*E*) is the spectrally resolved response of channel *i*, Ω_{i} is the solid angle of the detector, and *X*(*E*, *t*) is the x-ray spectrum incident on the diode array at time *t*. Equation (1) can also be extended to get the time-integrated x-ray spectrum by integrating between the start (*t*_{1}) and end (*t*_{2}) of the signal,

The x-ray spectrum is approximated by a series of cubic splines. Each piece of the spline takes the form

where *τ*_{i} ∈ [0, 1] is the photon energy normalized on the boundaries of the cubic spline,

Here, the index *i* spans the number of channels from 1 to *n*. The absorption edge of the *i*th channel is the knot point *E*_{i} of the spline, as illustrated by example response functions from the Dante^{3} x-ray detector in Fig. 2. Each *Y*_{i} is referred to as an interval of the spline. For *n* channels of information, there are *n* + 1 knot points, including the initial point, and *n* intervals of the spline. Since the initial value is an extra free parameter, it must be specified for the other values of the spline to be defined. There are ways to eliminate this free parameter empirically, which will be discussed later. For the spline to be a nice smooth function, the function value and its first and second derivatives need to be equal at each knot point. Enforcing these boundary conditions for the function value and first derivative yields the following relations:

Applying the boundary conditions to each interval of the spline reduces the unknowns to the two variables *y*_{i} and *D*_{i} for each segment. The variable *y*_{i} corresponds to the function value at the *i*th knot point, and *D*_{i} is the first derivative value at the *i*th knot point. Reformulating the cubic spline equation in terms of *y*_{i} and *D*_{i} values,

and collecting like terms give

Two more boundary conditions are required to complete the system of equations. This comes with several choices, the simplest being the “natural spline” conditions where

Specifying this boundary condition changes the spline equation for the first and last interval to

and

The above equations can be written as the addition of two matrices as follows:

where

and

Equation (10) can be further simplified by using the boundary conditions in Eq. (5) to formulate *D*_{i} in terms of *y*_{i}. The boundary conditions on the second derivatives can be expressed as two matrices *χ*_{1} and *χ*_{2},

where

Hence, now, **D** is expressed in terms of **y** as follows:

Substituting this into the spline equation gives

and extracting the vector **y**,

Each row of the matrix **Y** corresponds to the spline interval, and each column corresponds to the knot points. The dimensions of the matrix are, therefore, *n* × *n* + 1. Substituting Eq. (17) into Eq. (1) gives

Since the vector **y** has no dependence on photon energy, it comes out of the integral as a constant and the remaining terms form a matrix,

It is important to note that the matrix **M**_{int} has rows that correspond to channels and columns that correspond to knot points and is calculated by integrating each spline interval *Y*_{i,j} with the response function and solid angle and summing the results in each column. This sum results in a single row of values for each channel, which comprises each row of values in **M**_{int}. This matrix will always have dimensions of *n* × *n* + 1 and has no inverse.

## III. IMPLEMENTATION

There are *n* equations and *n* + 1 unknowns, so a value for *y*_{1} must be arbitrarily specified to finish the cubic spline. This known value corresponds to the first column of values in **M**_{int}, so $Mi1(int)y1$ is subtracted from the signals **V**, leaving an *n* × *n* matrix $S$ on the left-hand side of the equation with the remaining *ŷ* vector of unknowns,

The matrix $S$ can now be inverted to solve for the remaining knot point values,

The spline results are quite insensitive to the values of *y*_{1}, so the value of *y*_{1} chosen can be a few orders of magnitude off and the spline will quickly recover the correct spectrum, provided it is not a gross overestimate. The same method can be applied to setting *y*_{n+1} as the boundary condition, *in lieu* of *y*_{1}. The need for a guess can be eliminated by first approximating a linear spline over the same region as shown in Fig. 3 and then taking the estimate of the initial condition to be less than the initial value of the linear spline. The linear spline generates a system of *n* unknowns for *n* channels. The point *x*_{i} of the linear spline is related to the voltage *V*_{j} of each channel by

This system of equations is solved for all *x*_{i}. The points of the linear spline are centered on the interval between knot points rather than at the knot points, as the cubic spline. The points are then joined with a linear interpolation to complete the spline. The results of this interpolation can be used to aid the cubic spline by providing estimates of the *y*_{i} values. It can even be used to adapt the cubic spline values for channels with insufficient signals by providing an initial guess to a *χ*^{2} minimization algorithm. Such methods have been employed but will not be presented here. Once the knot values are known, they are substituted back into the cubic spline equation (17) for each segment to reconstruct the x-ray spectrum *X*(*E*, *t*). The total radiated power for each time can be found by integrating over the spline. This can be done algebraically as follows:

The radiation temperature is related through the Stefan–Boltzmann law,

where *σ*_{SB} is the Stefan–Boltzmann constant, *A* is the total surface area of the emitting source, and *θ* is the angle between the surface normal and the viewing angle of the diode array. The x-ray flux recovered rarely conforms to a true blackbody, so the temperature in Eq. (24) is a brightness temperature. The geometry and orientation of the x-ray source relative to the detector must be known to calculate the radiation temperature. However, small mistakes in estimations of the surface area and angle between the surface normal and viewing angle will have little impact on the radiation temperature measurement. For this reason, these quantities will be considered as exact in the subsequent error analysis.

## IV. ERROR PROPAGATION AND CUBIC SPLINE UNCERTAINTY

Error propagation techniques for spline-like unfold algorithms have been considered in the past.^{9,12,16,17} Some of these techniques use various basis functions and carry the assumption that the response function of each diode channel is known exactly, while some consider only a Monte Carlo approach. There are two sources of errors that are considered in the subsequent analysis: (1) measurement and calibration of the response functions^{18} of each channel in the array and (2) uncertainty and variation in the signal voltages digitized on the oscilloscope. Since the cubic spline is solved exactly from these quantities, an analytical expression for the uncertainty of the spline can be obtained.

Each integrand that makes a single element in **M**_{int} consists of *n* measurements of the response function, where *r*(*E*_{k}) is one such measurement with uncertainty $\sigma r(Ek)=\sigma ir(Ek)$, where *σ*_{i} is the percent error associated with the *i*th channel. Using trapezoidal integration with a uniform grid and assuming that the end point contributions are negligible, the integrand will be

with the associated error

where $Mij(int)$ is the i, j element of the matrix **M**_{int}.

Therefore, each element $Mij(int)$ can have a percent error represented by $\sigma Mij(int)\u2248\sigma i$. This approximation is suitable since it can only be an overestimate of the error at worst and an accurate estimate at best. Monte Carlo calculations for K-edge dominant response functions verify that each element has the same percent error as the channel error to three significant figures. This carries over to the elements of the square matrix $S$.

All *y*_{i} are calculated directly from the inverse of the spline array $S\u22121$ and signal voltages **V**. The associated errors of the elements in the inverse matrix are calculated analytically from the covariances of the elements in $S$. The analytical solution can still differ from the results calculated via Monte Carlo when errors cause the matrix to be close to singular.^{19} It is for this reason that a single-element Monte Carlo must be used to accurately propagate errors through the matrix inversion for a cubic spline. If the errors associated with the calibration of the detector are small enough, the Monte Carlo error propagation can be avoided and the analytical solution for the matrix inverse errors can be used with higher confidence.

After the inverse matrix element errors are calculated via Monte Carlo, the remaining error analysis can be done analytically. The error for all *y*_{i} values follows from the inverse equation (21),

The initial point subtraction from Eq. (21) has been tacitly included into the errors for the voltages $\sigma Vi$ to keep the expression simple. Each element of $Si,j\u22121$ has an associated error of $\sigma Si,j\u22121$ that is obtained from the single-element Monte Carlo analysis. Following the cubic spline relations derived from the boundary conditions in Eq. (5), the errors for the spline coefficients are

Since the integration for total radiated power is done algebraically, the error can be expressed as

with the radiation temperature error being expressed as

## V. RECOVERY OF A TEMPORALLY RESOLVED BLACKBODY SPECTRUM

A blackbody spectrum whose temperature is given as a function of time was convolved with the instrument response functions to produce a set of artificial voltage traces to be unfolded using the cubic spline technique. Spectral power and radiation temperature are also calculated from the recovered spectrally resolved x-ray fluxes for each time. The x-ray flux at peak power and the radiation temperature are shown in Fig. 4. Although there are no errors associated with convolving a known solution with the response functions, the solutions are presented with the same errors associated with the Dante x-ray diode array to show how a typical confidence interval compares to oscillations in the spline at low x-ray fluxes. The furthest deviation of the cubic spline solution from the input spectrum occurs well within this confidence interval.

The most inaccurate solutions of the cubic spline occur at radiation temperatures below 20 eV. At this temperature, high photon energy channels give voltages that would be well into the noise for any real measurement and would be omitted in the cubic spline unfold process in a real application. They are included here to demonstrate the cubic spline’s inability to accurately reconstruct the input x-ray flux with a noiseless low signal. There are many solutions that describe an x-ray flux that gives a low diode signal, but the cubic spline converges to only one such solution. The accuracy of the cubic spline unfold is, therefore, dependent upon the choices of which channels to include in the solution, and these choices can be informed in the case of a real measurement by looking at the signal-to-noise ratio.

## VI. RECOVERING A SPECTRUM IN A LINE-DOMINATED REGIME

To quantify the cubic spline interpolation’s ability to recover spectral information from arbitrary plasma conditions, a simulation of a carbon, oxygen, nitrogen, fluorine, and neon plasma being heated by a laser was post-processed with detailed atomic modeling using Spect3D,^{20} convolved with the response functions of the x-ray diode array, and then sent through the cubic spline unfold algorithm. The results are compared both graphically and by integrating over portions of the spectrum to compare how spectral power is conserved from the line-resolved simulation and the cubic spline. The line structure of the spectrum is completely lost when convolved with the response functions; however, the cubic spline is still able to resolve groups of lines. The intensity of each grouping for the line-resolved spectrum and the cubic spline reconstruction of the model are shown in Fig. 5. The coarse spectral resolution of the response functions is the main reason why the x-ray power calculated from the cubic spline differs from the input spectrum.

In comparison with the uncertainty analysis, the integrated intensity conservation is much better than the quoted error bars for spectral power. This is because of the uncertainty that exists in each channel, which is dominated by the aging of components and the extrapolation of the random errors through the aging process.^{18} If each channel is calibrated on a regular basis, then, accurate measurements can be made on the spectral power of line groups to within a factor of 2 or better. That is to say, the limiting factor in the accuracy of measuring radiated power is the calibration frequency and not the unfold process.

## VII. CUBIC SPLINE RECONSTRUCTION OF A HALFRAUM DRIVE

A good example problem to benchmark any unfold code is a blackbody or near-blackbody emitter. A laser-driven halfraum or hohlraum is able to provide such a spectrum with interesting and challenging features to fit. One of the primary roles the filtered x-ray diode arrays play in high-energy-density physics is diagnosing radiation temperatures from these targets, so it is crucial to verify that any developed spectral unfold process can recover an accurate time-resolved measurement.

An unfold was performed on a gold halfraum driven with 20 beams with a total laser energy of 9 kJ at a viewing angle of *θ* = 75°. Halfraum drives typically have large radiation temperatures, which makes signal reduction and analysis easy. Furthermore, the filtration of each channel is optimized to look at spectra from gold halfraums and hohlraums, making this an ideal dataset for testing the unfold method. An unfold of a halfraum can also be readily compared to previous unfold methods, considering that most of them are set up to characterize these types of plasmas. The cubic spline is compared to the blackbody plus the Gaussian perturbation method described in other publications.^{4,17}

Since there is no temporal fiducial, signals are aligned by their peak voltage in time. Processing of diode voltage traces is outside the scope of this paper, but it should be noted that the temporal alignment of the signals is crucial to obtaining robust and physically meaningful results for radiation temperatures as a function of time. Misalignment of the signal traces in time, even slightly, can cause the spline to break and the unfold algorithm to produce nonphysical results; the robustness of the unfold to these errors in temporal alignment will be discussed in detail later. The data used for the following unfold are shown in Fig. 6.

The resulting spectra from these data are in good agreement with the established data analysis methods,^{17,21} with slight discrepancies at lower photon energies and higher photon energies around the classic gold M-band feature. It should be noted that the cubic spline solution is self-consistent with the experimental data, whereas the blackbody plus Gaussian perturbation unfolds are not. That is, if the x-ray flux recovered from the cubic spline were to be convolved with the response functions, they would produce the exact same voltage measurements from the experiments. The spectral power and radiation temperature are in agreement with the calculations using the blackbody with Gaussian perturbations. The spectral features toward the lower photon energy range are a bit more detailed, and there is likely a group of lines in this energy range that goes largely ignored and unaccounted for by other methods. This discrepancy in spectral shape has almost no noticeable impact on power or radiation temperature calculations. Example spectra from three times at and around peak radiated power are shown in Fig. 7 along with radiation temperature calculations with error bars.

## VIII. SPLINE FIDELITY AND TEMPORAL ALIGNMENT

If the data reduction for the halfraum drive was performed incorrectly in terms of aligning the signals in time, the results from Sec. VII would be impacted. It is important to know how sensitive the results are to this alignment and whether or not the cubic spline interpolation can identify cases where the data are poorly aligned based on how the results look. A random error to the temporal alignment is introduced, and the results for the streaked spectrum are compared as a function of the standard deviation of the random distribution. In reality, errors in the temporal alignment of the data will be more systematic than random, but their effects on the analysis results will be the same.

To study the effect of poor temporal alignment of the data on the unfold process, each signal trace was perturbed from peak alignment by a random number selected from a normal distribution with a standard deviation of *δ*. In the most extreme of cases, this can produce shifts between peak signals as great as 4*δ*. The cubic spline interpolation unfold was then performed on each perturbed set of data, and data that were able to very nearly reproduce the case of peak alignment are considered to be acceptable. Therefore, the maximum *δ* where this is true can be considered a good estimate of the requirement for temporal alignment accuracy for data to produce a reliable unfold.

Random shifts in alignment congruent with *δ* = 50 ps–60 ps are acceptable in that the unfold process is not compromised in terms of results. Three such example cases are shown in Fig. 8 to demonstrate this threshold. White regions in Fig. 8 indicate negative flux solutions, which are non-physical, and grow with increasing *δ*. At *δ* = 70 ps, the white regions span almost all possible times, meaning that almost every spectrum in the streak has nonphysical values. It is natural to have these regions of nonphysical values at the beginning and end of the cubic spline since signal values at these times are very close to zero for some channels. Typically, this can be seen at higher photon energies both early and late in time. These regions can be avoided by simply ignoring the channel that gives erroneous results. For the sake of demonstration and to reveal key failure modes in this analysis, those channels have been included. In the cases where *δ* > 70 ps, many of these channels would need to be dropped for every time step to avoid all of the nonphysical results, so the data can be said to be poorly aligned.

## IX. SPLINE FIDELITY AND LIMITED INFORMATION UNFOLDS

In the face of malfunctioning channels or poor signal-to-noise ratios in some channels, the cubic spline unfold is still able to recover valuable information. Low signal channels can produce oscillatory solutions of the cubic spline. This is observed in the blackbody case in Fig. 4 at higher photon energies, where the emission is several orders of magnitude less than the peak. An example unfold of the same spectrum with six and three channels is shown in Fig. 9. Depending on which channels are eliminated and how, spectral power and radiation temperature can still be recovered provided the channel information spans the relevant photon energies of the emitted spectrum. The greatest impact on the information recovered from the unfold due to missing channels or channels that must be excluded due to poor signal-to-noise ratios is in the detail of the spectrum. The spectral power in a region lacking channel information will be poorly represented and largely inaccurate despite the spectral power over the whole spectrum being comparable. Radiation temperature is even more insensitive to missing data since *T*_{rad} ∼ *P*^{1/4}.

There should be a distinction made between channels that have no information and channels that have poor signal-to-noise ratios or artifacts in them that make them unusable. There is still information in a channel’s signal if it is just noise, provided there is information about the channel’s nearest neighbors. The continuum emission in x-ray spectra is usually a smooth, well-behaved function that is not prone to sharp, step-like changes. Therefore, if a channel shows no usable signal above the noise, an upper bound can be set on the spectral intensity for that spline interval. For example, if channels 3 and 5 see enough signals to be above the noise, but channel 4 does not, then, the region of the spectrum that contributes the most to channel 4’s signal can be bounded. This, in turn, affects the spline intervals that contribute to channels 3 and 5 given the overlap in the response functions. If channel 4 failed to acquire any data, either signal or noise, due to equipment malfunction, such a conclusion could not be drawn.

## X. CONCLUSIONS

Cubic splines provide a robust method of unfolding x-ray spectra from K-edge filtered x-ray diode arrays. Limits for the quality of the data required to use such a method have been explored in depth, and the cubic spline unfold method has been demonstrated to work sufficiently in the face of data misalignment and limited signal information and is largely insensitive to the type of spectrum that it analyzes. The cubic spline requires no *a priori* assumptions except for a guess of the first or last part of the spline. The unfold is also shown to be largely insensitive to this guess, and methods of eliminating this guess entirely have been explored. Results using a cubic spline interpolation are also congruent with results that are obtained from previous methods, which was demonstrated by comparing an unfold of a halfraum drive spectrum to one such method. Cubic spline interpolation also offers transparency in its methods of quantifying measurement uncertainty because it is largely analytical. This uncertainty analysis also offers key insights into the shortfalls of the calibration and maintenance of such diagnostics.

## DATA AVAILABILITY

The data that support the findings of this study are available from the corresponding author upon reasonable request.

## ACKNOWLEDGMENTS

Halfraum data have been graciously provided by T. J. Murphy and Y. H. Kim. The information, data, or work presented herein was funded in part by the Advanced Research Projects Agency-Energy (ARPA-E), U.S. Department of Energy, under Award No. DE-AR0000568, the Department of Energy National Nuclear Security Administration under Award No. DE-NA0003856, and in part under Contract No. 89233218CNA000001, the University of Rochester, and the New York State Research and Development Authority. Los Alamos National Laboratory, an affirmative action/equal opportunity employer, is operated by Triad National Security, LLC for the National Nuclear Security Administration of U.S. Department of Energy under Contract No. 89233218CNA000001.

This report was prepared as an account of work sponsored by an agency of the U.S. Government. Neither the U.S. Government nor any agency thereof, nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the U.S. Government or any agency thereof. The views and opinions of authors expressed herein do not necessarily state or reflect those of the U.S. Government or any agency thereof.