detectorArr

fiducia.cspline.detectorArr(channels, knots, responseFrame, boundary='y0', npts=1000)[source]

Matrix representing the spectrally integrated folding of the detector response with a cubic spline interpolation of the x-ray spectrum. This is applied to the measured DANTE channel signals to recover knot points \(y_i\) of the cubic spline, which can then be used to reconstruct the inferred x-ray spectrum.

Parameters
  • channels (numpy.ndarray) – Array of DANTE channel numbers.

  • knots (numpy.ndarray) – Array of photon energies describing positions of spline knots.

  • responseFrame (pandas.core.frame.DataFrame) – DANTE channel responses as a function of photon energy (not normalized).

  • boundary (str, optional) – Choose whether yGuess corresponds to \(y_0\) (lowest photon energy) or \(y_{n+1}\) (highest photon energy) boundary condition. This should correspond to the photon energy value given in knots. Options are ‘y0’ or ‘yn+1’. Default ‘y0’.

  • npts (int) – Number of points used in computing the integral

Returns

detArr – Matrix representing the spectrally integrated folding of the detector response with a cubic spline interpolation of the x-ray spectrum. 2D array of channels and knot points of shape (n, n).

Return type

numpy.ndarray

Notes

For each spline segment we have:

\[M_{stuff} = \int_0^{1} (M_y(t) + 3 M_D(t) \chi_1^{-1} \chi_3) R_d(t) dt\]

Each spline is then summed to form the full detector matrix for recovering the knot points.

Examples