TacUncertainty#

class petpal.kinetic_modeling.tac_uncertainty.TacUncertainty(time_activity_curve: petpal.utils.time_activity_curve.TimeActivityCurve)#

Set uncertainty for kinetic modeling. Includes options for constant, calculated, or preset uncertainty.

Initialize TacUncertainty with provided arguments.

Parameters:

time_activity_curve (TimeActivityCurve) – The time activity curve used to determine uncertainties to pass onto the kinetic model.

property constant_uncertainty: numpy.ndarray#

Get constant uncertainty for the TAC.

property tac_uncertainty: numpy.ndarray#

Get uncertainty stored in the TAC itself to pass on to the kinetic model.

Raises:

ValueError – If the supplied TAC uncertainty has any NaN values.

Returns:

uncertainty_from_tac (np.ndarray) – Uncertainty stored in the supplied TAC.

abstract property calculated_uncertainty#

The calculated uncertainty for the TAC.

Currently placeholder function.

__call__(uncertainty_method: str = 'constant') numpy.ndarray#

Get the tac uncertainty corresponding to the identified method.

Parameters:

uncertainty_method (str) – Uncertainty type to apply to the tac. Default ‘constant’.

Returns:

uncertainty (np.ndarray) – The uncertainty applied to each time frame in the TAC.

Raises:

ValueError – If uncertainty_method is not one of: ‘constant’, ‘calculated’, or ‘tac’.