voxel_average_w_uncertainty#
- 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.
- Parameters:
pet_voxels (np.ndarray) – 2D M x N array of PET voxels with M voxels and N time frames. Typically takes the output of
apply_mask_4d().- Returns:
average_w_uncertainty (tuple[np.ndarray, np.ndarray]) –
- Average and standard deviation of
PET voxels for each time frame.