|
3 | 3 | import warnings |
4 | 4 |
|
5 | 5 | import numpy as np |
| 6 | +from spikeinterface.core import SortingAnalyzer, Templates, compute_sparsity |
| 7 | +from spikeinterface.core.template_tools import _get_nbefore, get_dense_templates_array, get_template_extremum_channel |
6 | 8 |
|
7 | 9 | try: |
8 | 10 | import numba |
|
12 | 14 | HAVE_NUMBA = False |
13 | 15 |
|
14 | 16 |
|
15 | | -from spikeinterface.core import compute_sparsity, SortingAnalyzer, Templates |
16 | | -from spikeinterface.core.template_tools import get_template_extremum_channel, _get_nbefore, get_dense_templates_array |
17 | | - |
18 | | - |
19 | 17 | def compute_monopolar_triangulation( |
20 | 18 | sorting_analyzer_or_templates: SortingAnalyzer | Templates, |
21 | 19 | unit_ids=None, |
@@ -110,7 +108,7 @@ def compute_monopolar_triangulation( |
110 | 108 | # wf is (nsample, nchan) - chann is only nieghboor |
111 | 109 | wf = templates[i, :, :][:, chan_inds] |
112 | 110 | if feature == "ptp": |
113 | | - wf_data = wf.ptp(axis=0) |
| 111 | + wf_data = np.ptp(wf, axis=0) |
114 | 112 | elif feature == "energy": |
115 | 113 | wf_data = np.linalg.norm(wf, axis=0) |
116 | 114 | elif feature == "peak_voltage": |
@@ -188,7 +186,7 @@ def compute_center_of_mass( |
188 | 186 | wf = templates[i, :, :] |
189 | 187 |
|
190 | 188 | if feature == "ptp": |
191 | | - wf_data = (wf[:, chan_inds]).ptp(axis=0) |
| 189 | + wf_data = np.ptp(wf[:, chan_inds], axis=0) |
192 | 190 | elif feature == "mean": |
193 | 191 | wf_data = (wf[:, chan_inds]).mean(axis=0) |
194 | 192 | elif feature == "energy": |
|
0 commit comments