From d4e068f21b63e4e58a1947df0cb44a26f8f30992 Mon Sep 17 00:00:00 2001 From: AntonioFR Date: Fri, 3 Mar 2023 16:05:49 -0500 Subject: [PATCH] Remove duplicate channels for multiKilosort --- preProcessing/preprocessSession.m | 1 + 1 file changed, 1 insertion(+) diff --git a/preProcessing/preprocessSession.m b/preProcessing/preprocessSession.m index b0e2189..09b9a89 100644 --- a/preProcessing/preprocessSession.m +++ b/preProcessing/preprocessSession.m @@ -240,6 +240,7 @@ function preprocessSession(varargin) channels = cat(2,shanks{kilosortGroup==i}); excludeChannels = find(~ismember((1:session.extracellular.nChannels),channels)); excludeChannels = cat(2,excludeChannels,session.channelTags.Bad.channels); + excludeChannels = unique(excludeChannels); kilosortFolder = KiloSortWrapper('SSD_path',SSD_path,'rejectchannels',excludeChannels); if cleanRez load(fullfile(kilosortFolder,'rez.mat'),'rez');