|
10 | 10 |
|
11 | 11 |
|
12 | 12 | 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]]]: |
23 | 23 | """ |
24 | 24 | Removes redundant or duplicate units by comparing the sorting output with itself. |
25 | 25 |
|
@@ -133,7 +133,8 @@ def remove_redundant_units( |
133 | 133 | return sorting_clean |
134 | 134 |
|
135 | 135 |
|
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]]: |
137 | 138 | """ |
138 | 139 | Finds redundant or duplicate units by comparing the sorting output with itself. |
139 | 140 |
|
|
0 commit comments