weighted_sum_computation ============================================== .. py:function:: petpal.utils.math_lib.weighted_sum_computation(pet_series: ants.core.ANTsImage | numpy.ndarray, frame_duration: numpy.ndarray, half_life: float, frame_start: numpy.ndarray, decay_correction: numpy.ndarray) Weighted sum of a PET image based on time and re-corrected for decay correction. :param image_frame_duration: Duration of each frame in pet series :type image_frame_duration: np.ndarray :param half_life: Half life of tracer radioisotope in seconds. :type half_life: float :param pet_series: 4D PET image series, as a data array. :type pet_series: np.ndarray :param image_frame_start: Start time of each frame in pet series, measured with respect to scan TimeZero. :type image_frame_start: np.ndarray :param image_decay_correction: Decay correction factor that scales each frame in the pet series. :type image_decay_correction: np.ndarray :returns: *image_weighted_sum (np.ndarray)* -- 3D PET image computed by reversing decay correction on the PET image series, scaling each frame by the frame duration, then re-applying decay correction and scaling the image to the full duration. .. seealso:: * :meth:`petpal.image_operations_4d.weighted_series_sum`: Function where this is implemented.