Routines to load and DSP measured data from MPI experiment with SD40

This commit is contained in:
Silas
2024-10-21 07:28:32 +02:00
parent 2927a29d85
commit 6dca327d10
5 changed files with 109 additions and 78 deletions

View File

@@ -344,13 +344,14 @@ classdef Signal
% spectrum_plot(obj.signal,options.fsamp,options.figurename,options.displayname);
N = 2^(nextpow2(length(obj.signal))-8);
N = 2^(nextpow2(length(obj.signal))-10);
if options.normalizeToNyquist==0
[p_lin,w] = pwelch(obj.signal,hanning(N),N/2,N,obj.fs,"centered","power","mean");
w=w.*1e-9;
else
[p_lin,w] = pwelch(obj.signal,hanning(N),N/2,N,"centered","power","mean");
p_lin = smooth(p_lin,0.05,'rloess');
end