More focus on Database analysis and direct DSP'ing of run_id's

This commit is contained in:
Silas Oettinghaus
2025-04-08 10:21:41 +02:00
parent 74066d0669
commit e86930335e
20 changed files with 1008 additions and 187 deletions

View File

@@ -689,10 +689,17 @@ classdef Signal
%estimate start pos of signal
maxpeaknum = floor(length(a)/length(b));
[pks,pkpos,w,p] = findpeaks(abs(co./max(co)),'MinPeakDistance',length(b)/2,'MinPeakHeight',0.2,'NPeaks',maxpeaknum,'SortStr','descend');
try
[pks,pkpos,w,p] = findpeaks(abs(co./max(co)),'MinPeakDistance',length(b)/2,'MinPeakHeight',0.2,'NPeaks',maxpeaknum,'SortStr','descend');
catch
warning(['Error in findpeaks, ususally the seuqnece is too short. Max peak num: ', num2str(maxpeaknum)]);
return
end
if mean(w) > 10 || mean(p) > 10
return
else
sequenceFound = 1;
end
if options.debug_plots
@@ -700,6 +707,8 @@ classdef Signal
findpeaks(abs(co./max(co)),'MinPeakDistance',length(b)/2,'MinPeakHeight',0.2,'NPeaks',maxpeaknum,'SortStr','descend')
end
shifts = lags(pkpos);
shifts = shifts(shifts>=0);
@@ -752,6 +761,12 @@ classdef Signal
end
%%
function obj = filter(obj,a,b)