fancyTrapz2Variance¶
-
fiducia.error.
fancyTrapz2Variance
(energyNorms, yChis, segments, responseUncertaintyFrame, channels, interpProp=True)[source]¶ Calculate the variance when propogating uncertainties through
fiducia.cspline.fancyTrapz2()
.- Parameters
energyNorms (numpy.ndarray) – Array of normalized energies over which the integral is computed.
yChis (numpy.ndarray) – 3D array corresponding to the \(M_{y \chi}\) coefficients. Array shape corresponds to (energyNorms, chLen, dToY). See
fiducia.error.detectorArrVariance()
segments (numpy.ndarray) – Array of segments produced by
segmentsArr()
with the knotsresponseUncertaintyFrame (pandas.core.frame.DataFrame) – DataFrame holding uncertainty percentages of DANTE channel responses as a function of photon energy (not normalized).
channels (numpy.ndarray) – Array of DANTE channel numbers.
interpProp (bool, optional) – Boolean to decide if
error.responseInterpVariance()
should be used. If False, :func:`cspline.responseInterp() is used, speeding up the calculation. Note that the uncertainty is would not be propagated correctly if False. With future optimizations, this option to choose may be removed. Default is True.
- Returns
integArrVariance – A matrix containing the folded integration of the \(M_{y \chi}\) matrix and response function uncertainty matrix, with respect to normalized photon energy. Has shape (len(channels), len(segments), len(knotIndex)).
- Return type
xarray.Dat
Notes
See also
cspline.fancyTrapz2
Examples