Skip to content

Commit 89cbc66

Browse files
committed
revert inversion of function order II
1 parent 4ad9c62 commit 89cbc66

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

src/spikeinterface/comparison/comparisontools.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,27 @@ def compute_agreement_score(num_matches, num1, num2):
6060
return num_matches / denom
6161

6262

63+
def do_count_event(sorting):
64+
"""
65+
Count event for each units in a sorting.
66+
67+
Kept for backward compatibility sorting.count_num_spikes_per_unit() is doing the same.
68+
69+
Parameters
70+
----------
71+
sorting: SortingExtractor
72+
A sorting extractor
73+
74+
Returns
75+
-------
76+
event_count: pd.Series
77+
Nb of spike by units.
78+
"""
79+
import pandas as pd
80+
81+
return pd.Series(sorting.count_num_spikes_per_unit())
82+
83+
6384
def count_match_spikes(times1, all_times2, delta_frames): # , event_counts1, event_counts2 unit2_ids,
6485
"""
6586
Computes matching spikes between one spike train and a list of others.
@@ -83,27 +104,6 @@ def count_match_spikes(times1, all_times2, delta_frames): # , event_counts1, ev
83104
return matching_event_counts
84105

85106

86-
def do_count_event(sorting):
87-
"""
88-
Count event for each units in a sorting.
89-
90-
Kept for backward compatibility sorting.count_num_spikes_per_unit() is doing the same.
91-
92-
Parameters
93-
----------
94-
sorting: SortingExtractor
95-
A sorting extractor
96-
97-
Returns
98-
-------
99-
event_count: pd.Series
100-
Nb of spike by units.
101-
"""
102-
import pandas as pd
103-
104-
return pd.Series(sorting.count_num_spikes_per_unit())
105-
106-
107107
def get_optimized_compute_matching_matrix():
108108
"""
109109
This function is to avoid the bare try-except pattern when importing the compute_matching_matrix function

0 commit comments

Comments
 (0)