Skip to content

Commit 88ce139

Browse files
committed
refactor: ♻️ change sorter_name
1 parent 1d80584 commit 88ce139

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

element_array_ephys/spike_sorting/si_spike_sorting.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ def make(self, key):
100100
).fetch1("clustering_method", "acq_software", "clustering_output_dir", "params")
101101

102102
# Get sorter method and create output directory.
103-
sorter_name = (
104-
"kilosort2_5" if clustering_method == "kilosort2.5" else clustering_method
105-
)
103+
sorter_name = clustering_method.replace(".", "_")
106104

107105
for required_key in (
108106
"SI_SORTING_PARAMS",
@@ -209,9 +207,7 @@ def make(self, key):
209207
output_dir = find_full_path(ephys.get_ephys_root_data_dir(), output_dir)
210208

211209
# Get sorter method and create output directory.
212-
sorter_name = (
213-
"kilosort2_5" if clustering_method == "kilosort2.5" else clustering_method
214-
)
210+
sorter_name = clustering_method.replace(".", "_")
215211
recording_file = output_dir / sorter_name / "recording" / "si_recording.pkl"
216212
si_recording: si.BaseRecording = si.load_extractor(recording_file)
217213

@@ -264,10 +260,7 @@ def make(self, key):
264260
output_dir = find_full_path(ephys.get_ephys_root_data_dir(), output_dir)
265261

266262
# Get sorter method and create output directory.
267-
sorter_name = (
268-
"kilosort2_5" if clustering_method == "kilosort2.5" else clustering_method
269-
)
270-
263+
sorter_name = clustering_method.replace(".", "_")
271264
output_dir = find_full_path(ephys.get_ephys_root_data_dir(), output_dir)
272265
recording_file = output_dir / sorter_name / "recording" / "si_recording.pkl"
273266
sorting_file = output_dir / sorter_name / "spike_sorting" / "si_sorting.pkl"

0 commit comments

Comments
 (0)