EvenlyInterpolate =========================================================== .. py:class:: petpal.kinetic_modeling.tac_interpolation.EvenlyInterpolate(tac_times: numpy.ndarray, tac_values: numpy.ndarray, delta_time: float) A class for basic evenly interpolating TACs with respect to time When performing convolutions with respect to time, care needs to be taken to account for the time-step between samples. One way to circumvent this problem is to resample data evenly with respect to the independent variable, or time. Uses :py:class:`scipy.interpolate.interp1d` to perform linear interpolation. :ivar interp_func: Interpolation function given the provided TAC. :vartype interp_func: scipy.interpolate.interp1d :ivar resample_times: Array containing evenly spaced TAC times. :vartype resample_times: np.ndarray :ivar resample_vals: Interpolated activities at the calculated resample times. :vartype resample_vals: np.ndarray Initializes an instance of the EvenlyInterpolate class for TAC interpolation. The constructor takes the Time-Activity Curve (TAC) times and values as inputs, along with a delta time value. It utilizes the SciPy function `scipy.interpolate.interp1d` to perform a linear interpolation of the provided TAC. After initializing, it generates an interpolation function based on the TAC times and values. It uses this function to calculate interpolated activities for a new array of evenly spaced times. These times start at the start time of the original TAC and end at the end time, with steps of delta time. :param tac_times: The time-points at which the original TAC activities were sampled. It should be a 1D numpy array with increasing float values. :type tac_times: np.ndarray :param tac_values: The corresponding activity values of the provided TAC sampled at tac_times. It should be a 1D numpy array of float values. :type tac_values: np.ndarray :param delta_time: The time-step to use for the creation of evenly spaced resample times. It should be a positive float value. :type delta_time: float .. py:method:: get_resampled_tac() -> numpy.ndarray Returns the resampled times and values of the Time-Activity Curve (TAC). The function combines the resampled times and values into a single numpy array. :returns: *(np.ndarray)* -- An array containing two numpy arrays. The first array corresponds to the resampled times and the second array corresponds to the resampled activity values of the TAC.