From b1104ce09158c09175af94682e6e7a0281a7cda2 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Wed, 9 Oct 2024 09:37:00 -0500 Subject: [PATCH] fix(spike_sorting): create empty `sorting_analyzer` folder when no units found --- element_array_ephys/spike_sorting/si_spike_sorting.py | 1 + 1 file changed, 1 insertion(+) diff --git a/element_array_ephys/spike_sorting/si_spike_sorting.py b/element_array_ephys/spike_sorting/si_spike_sorting.py index 7a652076..a47f1d89 100644 --- a/element_array_ephys/spike_sorting/si_spike_sorting.py +++ b/element_array_ephys/spike_sorting/si_spike_sorting.py @@ -284,6 +284,7 @@ def make(self, key): def _sorting_analyzer_compute(): if not has_units: log.info("No units found in sorting object. Skipping sorting analyzer.") + analyzer_output_dir.mkdir(parents=True, exist_ok=True) # create empty directory anyway, for consistency return # Sorting Analyzer