Many changes in DBHandler

new general processing structure
just before splitting off the projects folder from this repo
This commit is contained in:
Silas Oettinghaus
2025-05-13 10:24:09 +02:00
parent 727c3d9364
commit 9ce23c4a10
38 changed files with 2440 additions and 1103 deletions

View File

@@ -693,6 +693,8 @@ classdef Signal
return
end
pkpos = sort(pkpos);
if mean(w) > 10 || mean(p) > 10
return
else
@@ -709,7 +711,7 @@ classdef Signal
shifts = lags(pkpos);
sequenceStarts = shifts;
% shifts = shifts(shifts>=0);
shifts = shifts(shifts>=0);
if numel(shifts) > 0
@@ -720,17 +722,17 @@ classdef Signal
for c = shifts
sig = obj.delay(-c,'mode','samples');
sig.signal = sig.signal(1:length(b)) .* -inverted;
sig.signal = sig.signal(1:length(b));% .* -inverted;
S{end+1,1} = sig;
end
%return/keep the sinal with the highest correlation (only within positive shifts)
[~,idx]=max(pks);
obj.signal = S{idx}.signal;
%put signal with highest corr. to first index in S array
swap = S{1};
S{1} = S{idx};
S{idx} = swap;
% %return/keep the sinal with the highest correlation (only within positive shifts)
% [~,idx]=max(pks);
% obj.signal = S{idx}.signal;
% %put signal with highest corr. to first index in S array
% swap = S{1};
% S{1} = S{idx};
% S{idx} = swap;
for c = 1:numel(shifts)
S{c}.logbook = [];
@@ -962,7 +964,7 @@ classdef Signal
% add information
if 1
if 0
pwr_dbm = round(obj.power,3);
pwr_lin = obj.power("unit",power_notation.W);