From 197b73a5db8d6f5cf2f2b250b671ff23470b8e37 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Tue, 6 Feb 2024 09:34:03 +0100 Subject: [PATCH] Tiny ufunc fix in motion_estimation --- src/spikeinterface/sortingcomponents/motion_estimation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)