voxel_average_w_uncertainty ================================================================== .. py:function:: petpal.preproc.regional_tac_extraction.voxel_average_w_uncertainty(pet_voxels: numpy.ndarray) -> tuple[numpy.ndarray, numpy.ndarray] Spatially average flattened PET voxels and get the standard deviation as well. Takes a 2D M x N numpy array with M voxels and N time frames and returns a tuple of 1D N-length numpy arrays with the mean activity and standard deviation for each time frame. :param pet_voxels: 2D M x N array of PET voxels with M voxels and N time frames. Typically takes the output of :func:`~petpal.preproc.regional_tac_extraction.apply_mask_4d`. :type pet_voxels: np.ndarray :returns: *average_w_uncertainty (tuple[np.ndarray, np.ndarray])* -- Average and standard deviation of PET voxels for each time frame.