Changes from mwork PC.

PDP 2025

MPI analysis

new focus on database and SQL
This commit is contained in:
Silas Oettinghaus
2025-03-21 08:11:40 +01:00
parent 402e491506
commit 74066d0669
36 changed files with 2234 additions and 620 deletions

View File

@@ -656,7 +656,7 @@ classdef Signal
end
%%
function [obj,S,isFlipped] = tsynch(obj,options)
function [obj,S,isFlipped,sequenceFound] = tsynch(obj,options)
% time sync and cut
arguments
obj Signal
@@ -664,6 +664,14 @@ classdef Signal
options.fs_ref = 0;
options.debug_plots = 0;
end
S = {};
isFlipped=0;
sequenceFound = 0;
%normalize the signal
a = obj.normalize("mode","oneone").signal;
@@ -681,7 +689,11 @@ classdef Signal
%estimate start pos of signal
maxpeaknum = floor(length(a)/length(b));
[pks,pkpos] = findpeaks(abs(co./max(co)),'MinPeakDistance',length(b)/2,'MinPeakHeight',0.2,'NPeaks',maxpeaknum,'SortStr','descend');
[pks,pkpos,w,p] = findpeaks(abs(co./max(co)),'MinPeakDistance',length(b)/2,'MinPeakHeight',0.2,'NPeaks',maxpeaknum,'SortStr','descend');
if mean(w) > 10 || mean(p) > 10
return
end
if options.debug_plots
figure()
@@ -692,9 +704,6 @@ classdef Signal
shifts = shifts(shifts>=0);
S = {};
isFlipped=0;
if numel(shifts) > 0
%Cut occurences of ref signal from signal (only positive shifts)