From d9f8e0cfdd0788139cfb08d536d97ed416815a63 Mon Sep 17 00:00:00 2001 From: eliezyer Date: Wed, 25 Nov 2020 13:25:52 -0500 Subject: [PATCH] small update to kilosort path folder when there's none --- io/bz_GetSpikes.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/io/bz_GetSpikes.m b/io/bz_GetSpikes.m index 0902c6f7..501ca0f7 100644 --- a/io/bz_GetSpikes.m +++ b/io/bz_GetSpikes.m @@ -167,7 +167,11 @@ fold_idx = find(cellfun(@(x) ~isempty(x),aux)); %in case of multiple folders, it's going to take the first one in the %list - kilosort_path = temp(fold_idx(1)); + if ~isempty(fold_idx) + kilosort_path = temp(fold_idx(1)); + else + kilosort_path = []; + end if strcmpi(sortingMethod,'clu') || ~isempty(cluFiles) % LOADING FROM CLU/ RES fs = spikes.samplingRate;