knotSolve¶
-
fiducia.cspline.
knotSolve
(signals, detArr, detArrBoundaryCol, detArrVarianceBoundaryCol, detArrInv, stdDetArrInv, signalsUncertainty=None, yGuess=1e-77, npts=1000)[source]¶ Get knot points \(y_i\) from measured DANTE signals \(S_d\).
- Parameters
signals (numpy.ndarray) – numpy array of DANTE measured signal for each channel at a particular point in time.
detArr (numpy.ndarray) – 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).
detArrBoundaryCol (xarray.DataArray) – Column of cublic spline matrix corresponding to the knots at the boundary chosen with boundary.
detArrVarianceBoundaryCol (xarray.DataArray) – Column of variances in the cublic spline matrix corresponding to the knots at the boundary chosen with boundary.
detArrInv (xarray.DataArray) – Inversion of detArr, with the column corresponding to boundary removed so detArr is invertible.
stdDetArrInv (xarray.DataArray) – Array of the standard deviation of each element in detArrInv based on variance using the ‘responseUncertaintyFrame’ propagated with Monte Carlo.
signalsUncertainty (xarray.DataArray, optional) – numpy array of the uncertainty of the DANTE measured signal for each channel at a particular point in time. The default is None.
yGuess (float, optional) – Guess for position of boundary knot point. Default is 1e-77.
npts (int, optional) – Number of points used in computing the integral. Default is 1000.
- Returns
knotsY (numpy.ndarray) – Array of knot point intensity values with yGuess appended.
knotsYVariance (numpy.ndarray) – Array with each element corresponding to the variance of the same element in ‘knotsY’.
Notes
Examples