3
3
from spikeinterface import BaseRecording
4
4
import numpy as np
5
5
6
- from spikeinterface .preprocessing import center
7
6
from spikeinterface .sortingcomponents .motion .motion_utils import make_2d_motion_histogram
8
- from scipy .optimize import minimize
9
7
from scipy .ndimage import gaussian_filter
10
8
from spikeinterface .sortingcomponents .motion .iterative_template import kriging_kernel
11
9
from packaging .version import Version
@@ -83,7 +81,7 @@ def get_2d_activity_histogram(
83
81
activity_histogram *= scaler
84
82
85
83
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
87
85
88
86
temporal_bin_centers = get_bin_centers (temporal_bin_edges )
89
87
spatial_bin_centers = get_bin_centers (spatial_bin_edges )
@@ -318,11 +316,11 @@ def compute_histogram_crosscorrelation(
318
316
319
317
# Smooth the cross-correlations across the bins
320
318
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 )
322
320
323
321
# Smooth the cross-correlations across the windows
324
322
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 )
326
324
327
325
# Upsample the cross-correlation
328
326
if interpolate :
@@ -333,9 +331,9 @@ def compute_histogram_crosscorrelation(
333
331
K = kriging_kernel (
334
332
np .c_ [np .ones_like (shifts_array ), shifts_array ],
335
333
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 ,
339
337
)
340
338
341
339
xcorr_matrix = np .matmul (xcorr_matrix , K , axes = [(- 2 , - 1 ), (- 2 , - 1 ), (- 2 , - 1 )])
0 commit comments