Skip to content

Commit

Permalink
Merge pull request #2290 from alejoe91/small-fixes
Browse files Browse the repository at this point in the history
Fix histogram time smoothing samekind error
  • Loading branch information
samuelgarcia authored Dec 5, 2023
2 parents db7af11 + 24d48c2 commit 13036f1
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 13036f1

Please sign in to comment.