33from spikeinterface import BaseRecording
44import numpy as np
55
6- from spikeinterface .preprocessing import center
76from spikeinterface .sortingcomponents .motion .motion_utils import make_2d_motion_histogram
8- from scipy .optimize import minimize
97from scipy .ndimage import gaussian_filter
108from spikeinterface .sortingcomponents .motion .iterative_template import kriging_kernel
119from packaging .version import Version
@@ -83,7 +81,7 @@ def get_2d_activity_histogram(
8381 activity_histogram *= scaler
8482
8583 if log_scale :
86- activity_histogram = np .log10 (1 + activity_histogram ) # TODO: make_2d_motion_histogram uses log2
84+ activity_histogram = np .log2 (1 + activity_histogram ) # TODO: make_2d_motion_histogram uses log2
8785
8886 temporal_bin_centers = get_bin_centers (temporal_bin_edges )
8987 spatial_bin_centers = get_bin_centers (spatial_bin_edges )
@@ -318,11 +316,11 @@ def compute_histogram_crosscorrelation(
318316
319317 # Smooth the cross-correlations across the bins
320318 if smoothing_sigma_bin :
321- xcorr_matrix = gaussian_filter (xcorr_matrix , smoothing_sigma_bin , axes = 1 )
319+ xcorr_matrix = gaussian_filter (xcorr_matrix , sigma = smoothing_sigma_bin , axes = 1 )
322320
323321 # Smooth the cross-correlations across the windows
324322 if num_windows > 1 and smoothing_sigma_window :
325- xcorr_matrix = gaussian_filter (xcorr_matrix , smoothing_sigma_window , axes = 0 )
323+ xcorr_matrix = gaussian_filter (xcorr_matrix , sigma = smoothing_sigma_window , axes = 0 )
326324
327325 # Upsample the cross-correlation
328326 if interpolate :
@@ -333,9 +331,9 @@ def compute_histogram_crosscorrelation(
333331 K = kriging_kernel (
334332 np .c_ [np .ones_like (shifts_array ), shifts_array ],
335333 np .c_ [np .ones_like (shifts_upsampled ), shifts_upsampled ],
336- kriging_sigma ,
337- kriging_p ,
338- kriging_d ,
334+ sigma = kriging_sigma ,
335+ p = kriging_p ,
336+ d = kriging_d ,
339337 )
340338
341339 xcorr_matrix = np .matmul (xcorr_matrix , K , axes = [(- 2 , - 1 ), (- 2 , - 1 ), (- 2 , - 1 )])
0 commit comments