From 24d48c2ae30a7f09aa49f7223e365803a1b2fb2e Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Tue, 5 Dec 2023 12:57:22 +0100 Subject: [PATCH] Fix histogram time smoothing samekind error --- 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 8eb9cafe9d..f7595093f5 100644 --- a/src/spikeinterface/sortingcomponents/motion_estimation.py +++ b/src/spikeinterface/sortingcomponents/motion_estimation.py @@ -327,7 +327,7 @@ def run( if histogram_time_smooth_s is not None: bins = np.arange(motion_histogram.shape[0]) * bin_duration_s - bins -= np.mean(bins) + bins = bins - np.mean(bins) smooth_kernel = np.exp(-(bins**2) / (2 * histogram_time_smooth_s**2)) smooth_kernel /= np.sum(smooth_kernel) motion_histogram = scipy.signal.fftconvolve(motion_histogram, smooth_kernel[:, None], mode="same", axes=0)