def smooth_image(data, sigma): from scipy import ndimage return ndimage.gaussian_filter(data, sigma=sigma)