Skip to content

Commit de87f51

Browse files
committed
add typing
1 parent 0baa85a commit de87f51

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

src/spikeinterface/curation/remove_redundant.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010

1111

1212
def remove_redundant_units(
13-
sorting_or_sorting_analyzer,
14-
align=True,
15-
unit_peak_shifts=None,
16-
delta_time=0.4,
17-
agreement_threshold=0.2,
18-
duplicate_threshold=0.8,
19-
remove_strategy="minimum_shift",
20-
peak_sign="neg",
21-
extra_outputs=False,
22-
) -> BaseSorting:
13+
sorting_or_sorting_analyzer: BaseSorting | SortingAnalyzer,
14+
align: bool = True,
15+
unit_peak_shifts: dict[int, float] | None = None,
16+
delta_time: float = 0.4,
17+
agreement_threshold: float = 0.2,
18+
duplicate_threshold: float = 0.8,
19+
remove_strategy: str = "minimum_shift",
20+
peak_sign: bool = "neg",
21+
extra_outputs: bool = False,
22+
) -> BaseSorting | tuple[BaseSorting, list[tuple[int, int]]]:
2323
"""
2424
Removes redundant or duplicate units by comparing the sorting output with itself.
2525
@@ -133,7 +133,8 @@ def remove_redundant_units(
133133
return sorting_clean
134134

135135

136-
def find_redundant_units(sorting, delta_time: float = 0.4, agreement_threshold=0.2, duplicate_threshold=0.8):
136+
def find_redundant_units(sorting, delta_time: float = 0.4, agreement_threshold: float = 0.2,
137+
duplicate_threshold: float = 0.8) -> list[tuple[int, int]]:
137138
"""
138139
Finds redundant or duplicate units by comparing the sorting output with itself.
139140

0 commit comments

Comments
 (0)