Skip to content

Commit

Permalink
Fix histogram time smoothing samekind error
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Dec 5, 2023
1 parent 8852629 commit 24d48c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spikeinterface/sortingcomponents/motion_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 24d48c2

Please sign in to comment.