Cubic Spline Matrices (fiducia.cspline)

Created on Fri Mar 8 09:41:36 2019

Functions for working with cubic spline equation in matrix form.

@author: Pawel M. Kozlowski

Functions

splineCoords(energy, energyStart, energyEnd)

Convert photon energy value into normalized coordinates for a particular spline region.

splineCoordsInv(energyNorm, energyStart, …)

Given a normalized energy value and the bounds of a spline segment, return the un-normalized photon energy value.

yCoeffArr(energyNorm, chLen)

Returns the matrix M_y(t) for a given value of t in:

dCoeffArr(energyNorm, chLen)

Returns the matrix M_D(t) for a given value of t in:

dToyArr(chLen)

Construct matrix for converting from \(D_i\) to \(y_i\) vector.

responseInterp(energyNorm, energyMin, …)

Given a DANTE detector response as a function of energy, convert the response to normalized photon energy, t, over a given spline segment, and return interpolated response values for a given value of t.

yChiCoeffArr(energyNorm, chLen, dToY)

This is the matrix corresponding to:

yChiCoeffArrEnergies(energyNorms, chLen, dToY)

This is the matrix corresponding to:

fancyTrapz2(energyNorms, yChis, segments, …)

Trap rule integration of the folding between our \(M_{y \chi}\) matrix and response function matrix, with respect to normalized photon energy, for each channel.

segmentsArr(knots)

Returns the bounds of each spline segment, given the spline knot points.

detectorArr(channels, knots, responseFrame)

Matrix representing the spectrally integrated folding of the detector response with a cubic spline interpolation of the x-ray spectrum.

knotSolve(signals, detArr, …[, …])

Get knot points \(y_i\) from measured DANTE signals \(S_d\).

reconstructSpectrum(chLen, knots, knotsY[, …])

Reconstruct the inferred DANTE spectrum given the knot points \(y_i\) obtained from knotSolve().