restructure and organize
This commit is contained in:
@@ -815,11 +815,18 @@ classdef Signal
|
||||
|
||||
pkpos = sort(pkpos);
|
||||
|
||||
% if mean(w) > 15 || mean(p) > 15
|
||||
% return
|
||||
% else
|
||||
% sequenceFound = 1;
|
||||
% end
|
||||
if isempty(pks)
|
||||
warning(['Error in findpeaks, ususally the seuqnece is too short. No Peaks detected']);
|
||||
return
|
||||
end
|
||||
|
||||
if max(p) < 0.3 || median(w) > 15
|
||||
%median(w) > 15 part means “reject if the detected correlation peaks are too broad.” That can be sensible: a true sync peak should often be sharp.
|
||||
warning(['Error in findpeaks, ususally the seuqnece is too short. max(p) = ',num2str(max(p)),'; median(w)=',num2str(median(w)),'']);
|
||||
return
|
||||
end
|
||||
|
||||
sequenceFound = 1;
|
||||
|
||||
if options.debug_plots
|
||||
figure(121212);clf
|
||||
|
||||
Reference in New Issue
Block a user