Authored by Anthony Boyer

Tuning outlier detection for StimDetect

@@ -787,7 +787,7 @@ if length(stimulation)>1 @@ -787,7 +787,7 @@ if length(stimulation)>1
787 remove=[]; 787 remove=[];
788 for i1=1:length(stimulation) 788 for i1=1:length(stimulation)
789 difftmp=abs(stimulation-stimulation(i1)); 789 difftmp=abs(stimulation-stimulation(i1));
790 - if isempty(find(difftmp>0.9*Stim & difftmp<1.1*Stim,1)) 790 + if isempty(find(difftmp>0.6*Stim & difftmp<1.4*Stim,1))
791 remove=[remove i1]; 791 remove=[remove i1];
792 end 792 end
793 end 793 end
@@ -797,7 +797,7 @@ end @@ -797,7 +797,7 @@ end
797 797
798 %remove isolated stimulations (short clusters) 798 %remove isolated stimulations (short clusters)
799 dstimulation=diff(stimulation); 799 dstimulation=diff(stimulation);
800 -index = find(dstimulation>=1.1*Stim); 800 +index = find(dstimulation>=1.4*Stim);
801 if ~isempty(index) 801 if ~isempty(index)
802 index = unique([1 index+1 length(stimulation)+1]); 802 index = unique([1 index+1 length(stimulation)+1]);
803 dindex = diff(index); 803 dindex = diff(index);