diff --git a/src/spikeinterface/sortingcomponents/motion_estimation.py b/src/spikeinterface/sortingcomponents/motion_estimation.py index e7b5e23d15..ef3a39bed1 100644 --- a/src/spikeinterface/sortingcomponents/motion_estimation.py +++ b/src/spikeinterface/sortingcomponents/motion_estimation.py @@ -322,7 +322,7 @@ def run( if histogram_depth_smooth_um is not None: bins = np.arange(motion_histogram.shape[1]) * bin_um - bins -= np.mean(bins) + bins = bins - np.mean(bins) smooth_kernel = np.exp(-(bins**2) / (2 * histogram_depth_smooth_um**2)) smooth_kernel /= np.sum(smooth_kernel) motion_histogram = scipy.signal.fftconvolve(motion_histogram, smooth_kernel[None, :], mode="same", axes=1)