@@ -57,14 +57,22 @@ class Tridesclous2Sorter(ComponentsBasedSorter):
5757 # "allow_single_cluster": True,
5858 # "cluster_selection_method": "eom",
5959 # },
60- "clusterer" : "isosplit6" ,
61- "clusterer_kwargs" : {},
60+ # "clusterer": "isosplit6",
61+ # "clusterer_kwargs": {},
62+ "clusterer" : "isosplit" ,
63+ "clusterer_kwargs" : {
64+ "n_init" : 50 ,
65+ "min_cluster_size" : 10 ,
66+ "max_iterations_per_pass" : 500 ,
67+ "isocut_threshold" : 2.0 ,
68+ },
6269 "do_merge" : True ,
6370 "merge_kwargs" : {
6471 "similarity_metric" : "l1" ,
6572 "num_shifts" : 4 ,
6673 "similarity_thresh" : 0.75 ,
6774 },
75+ "min_size_split" : 25 ,
6876 },
6977 "templates" : {
7078 "ms_before" : 2.0 ,
@@ -98,7 +106,7 @@ class Tridesclous2Sorter(ComponentsBasedSorter):
98106
99107 @classmethod
100108 def get_sorter_version (cls ):
101- return "2025.07 "
109+ return "2025.08 "
102110
103111 @classmethod
104112 def _run_from_folder (cls , sorter_output_folder , params , verbose ):
@@ -194,20 +202,11 @@ def _run_from_folder(cls, sorter_output_folder, params, verbose):
194202 clustering_kwargs ["clustering" ] = params ["clustering" ].copy ()
195203
196204 if clustering_kwargs ["clustering" ]["clusterer" ] == "isosplit6" :
197- # this is a patch to make the github CI because isosplit is installable on python > 3.11
198205 have_sisosplit6 = importlib .util .find_spec ("isosplit6" ) is not None
199206 if not have_sisosplit6 :
200- if verbose :
201- print (
202- "By default tridesclous2 need isosplit6 package for better reults please install it, automatically switch to hdbscan instead"
203- )
204- clustering_kwargs ["clustering" ]["clusterer" ] = "hdbscan"
205- clustering_kwargs ["clustering" ]["clusterer_kwargs" ] = {
206- "min_cluster_size" : 10 ,
207- "min_samples" : 1 ,
208- "allow_single_cluster" : True ,
209- "cluster_selection_method" : "eom" ,
210- }
207+ raise ValueError (
208+ "You want to run tridesclous2 with the isosplit6 (the C++) implementation, but this is not installed, please `pip install isosplit6`"
209+ )
211210
212211 unit_ids , clustering_label , more_outs = find_cluster_from_peaks (
213212 recording , peaks , method = "tdc-clustering" , method_kwargs = clustering_kwargs , extra_outputs = True , ** job_kwargs
0 commit comments