Stuff during JLT writing...

This commit is contained in:
Silas Oettinghaus
2025-11-21 15:37:58 +01:00
parent 888cbbd23e
commit 75dddca1f2
25 changed files with 946 additions and 189 deletions

View File

@@ -348,6 +348,7 @@ classdef Signal
options.displayname = "";
options.color = [];
options.normalizeToNyquist = 0;
options.addDCoffset = 0;
options.normalizeTo0dB = 0;
options.max_num_lines = []; % Leave empty or omit to disable line rotation
options.fft_length = [];
@@ -415,6 +416,8 @@ classdef Signal
ax = gca;
hold on
p_dbm = p_dbm+options.addDCoffset;
for s = 1:min(size(p_dbm))
if isempty(options.color)
plot(x_vec, p_dbm(:,s), 'DisplayName', options.displayname, 'LineWidth', 1);

View File

@@ -206,7 +206,7 @@ classdef ChannelFreqResp < handle
function plot(obj)
figure(55);
figure();
clf;
Havg = obj.H;
@@ -225,7 +225,7 @@ classdef ChannelFreqResp < handle
xlim([0.2 .5*max(obj.faxis)*1e-9]);
grid on;
figure(56);
figure();
clf;
@@ -246,7 +246,7 @@ classdef ChannelFreqResp < handle
xlim([0.2 .5*max(obj.faxis)*1e-9]); grid on;
%%% plot for publication
figure(1234);
figure(101);
hold all;
box on;
title('Magnitude Freq. Response');
@@ -269,6 +269,25 @@ classdef ChannelFreqResp < handle
legend('Interpreter','latex')
grid on;
%
figure(100); hold on;
Havg = obj.H;
Havg = Havg./max(Havg);
Hall = obj.H_all;
for i = 1:size(Hall,1)
Hall(i,:) = Hall(i,:)./max(Hall(i,:));
end
%1)
col = cbrewer2('Paired',8);
hold all;box on;title('Magnitude Freq. Response');
plot(obj.faxis/1e9, 20*log10(abs(Hall)),'linewidth',0.1,'LineStyle','-','Color',col(1,:),'HandleVisibility','off') ;
xlim([0.2 .5*max(obj.faxis)*1e-9]);
plot(obj.faxis/1e9, 20*log10(abs(Havg)),'LineWidth',2,'Color',col(2,:));
grid on;
end

View File

@@ -137,7 +137,21 @@ classdef DataStorage < handle
if ~isempty(tmp)
if isa(tmp,'double')
value(i,:) = tmp ;
try
value(i,:) = tmp ;
catch
a = size(value,2);
b = size(tmp,2);
if a > b
value(i,:) =[tmp,NaN(1,a-b)] ;
elseif a < b
value(i,:) = tmp(1:size(value,2)) ;
else
error('unknwon case...')
end
end
elseif isa(tmp,'Signal') || isa(tmp,'struct') || isa(tmp,'Exfo_laser') || isa(tmp,'DC_supply')
if i == 1
value = {};