minor changes in datastorage
This commit is contained in:
@@ -125,7 +125,7 @@ classdef DataStorage < handle
|
||||
lin_idx = obj.getIndicesByPhys(varargin);
|
||||
errcnt = 0;
|
||||
for i=1:numel(lin_idx)
|
||||
try
|
||||
% try
|
||||
tmp = obj.sto.(storageVarName){lin_idx(i)};
|
||||
if ~isempty(tmp)
|
||||
if isa(tmp,'Signal')
|
||||
@@ -145,17 +145,17 @@ classdef DataStorage < handle
|
||||
end
|
||||
else
|
||||
errcnt = errcnt+1;
|
||||
|
||||
value(i,:) = NaN ;
|
||||
if errcnt < 3
|
||||
%get back the n-dimensional subiondices...
|
||||
[sub{1:length(size(obj.sto.(storageVarName)))}] = ind2sub(size(obj.sto.(storageVarName)),lin_idx(i));
|
||||
% [sub{1:length(size(obj.sto.(storageVarName)))}] = ind2sub(size(obj.sto.(storageVarName)),lin_idx(i));
|
||||
|
||||
%get back the physical representaion
|
||||
word = [];
|
||||
for phys_idx = 1:numel(obj.fn)
|
||||
parametername = obj.fn(phys_idx);
|
||||
word = [word,char(parametername),': ', num2str(obj.parameter.(parametername).getPhysForIndex(sub{phys_idx})),' ;'];
|
||||
end
|
||||
% word = [];
|
||||
% for phys_idx = 1:numel(obj.fn)
|
||||
% parametername = obj.fn(phys_idx);
|
||||
% word = [word,char(parametername),': ', num2str(obj.parameter.(parametername).getPhysForIndex(sub{phys_idx})),' ;'];
|
||||
% end
|
||||
% warning(['Requested Data is not in Warehouse ', word]);
|
||||
elseif errcnt == 3
|
||||
% warning(['... ', word]);
|
||||
@@ -166,9 +166,9 @@ classdef DataStorage < handle
|
||||
% warning([num2str(errcnt),' requested datapoint(s) not in warehouse.']);
|
||||
end
|
||||
|
||||
catch
|
||||
error('Error in Datastorage: Something happened while looking up in warehouse.')
|
||||
end
|
||||
% catch
|
||||
% error('Error in Datastorage: Something happened while looking up in warehouse.')
|
||||
% end
|
||||
end
|
||||
else
|
||||
error('Wrong Request using ExampleWarehouse.getStoValue(*parameter set*). Give me all the Parameters! Please!')
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
|
||||
filename = "C:\Users\Silas\Nextcloud4\Dokumente\02_Ablage_Office\Lab_Data_24\bias_sweep\PAM4_10km_ffe__wh.mat";
|
||||
filename = "/Users/silasoettinghaus/Documents/MATLAB/PAM4_b2b_bias_sweep_20241023_145739_wh.mat";
|
||||
a = load(filename);
|
||||
wh2 = a.obj;
|
||||
|
||||
m = wh2.getStoValue('m',wh2.parameter.vbias.values(1),wh2.parameter.awg_vpp.values(1));
|
||||
precomp_max = 5;
|
||||
m = wh2.getStoValue('m',wh2.parameter.vbias.values(1),wh2.parameter.awg_vpp.values(1),precomp_max);
|
||||
|
||||
v_bias_vals = wh2.parameter.vbias.values;
|
||||
awg_vpp_vals = wh2.parameter.awg_vpp.values;
|
||||
@@ -14,8 +15,8 @@ rop_measured = [];
|
||||
cnt = 0;
|
||||
for awg_vpp_cur = awg_vpp_vals
|
||||
cnt = cnt+1;
|
||||
bers(cnt,:) = wh2.getStoValue('ber',v_bias_vals,awg_vpp_cur);
|
||||
rop_measured(cnt,:) = wh2.getStoValue('rop',v_bias_vals,awg_vpp_cur);
|
||||
bers(cnt,:) = wh2.getStoValue('ber_mlse',v_bias_vals,awg_vpp_cur,precomp_max);
|
||||
rop_measured(cnt,:) = wh2.getStoValue('rop',v_bias_vals,awg_vpp_cur,precomp_max);
|
||||
end
|
||||
|
||||
[bestber,bestindex] = min(bers,[],'all');
|
||||
@@ -25,6 +26,35 @@ bestvbias=v_bias_vals(v_bias_pos);
|
||||
|
||||
disp(['Best Vpp: ',num2str(bestvbias),' V; Best Vpp AWG: ',num2str(bestawgvpp),' V' ])
|
||||
|
||||
|
||||
|
||||
figure()
|
||||
hold on
|
||||
for i = 1:numel(awg_vpp_vals)
|
||||
va=awg_vpp_vals(i);
|
||||
a=scatter(rop_measured(i,:),bers(i,:),'DisplayName',['FFE AWG:',num2str(va)],'LineWidth',1);
|
||||
|
||||
a.DataTipTemplate.DataTipRows(1).Label = 'P out';
|
||||
|
||||
a.DataTipTemplate.DataTipRows(2).Label = 'BER';
|
||||
|
||||
a.DataTipTemplate.DataTipRows(3).Label = 'Vbias';
|
||||
a.DataTipTemplate.DataTipRows(3).Value = v_bias_vals;
|
||||
a.DataTipTemplate.DataTipRows(3).Format = 'auto';
|
||||
end
|
||||
|
||||
% Continue with the rest of your plot settings
|
||||
yline(3.8e-3, 'DisplayName', 'HD-FEC', 'LineStyle', '--', 'HandleVisibility', 'off');
|
||||
xlabel('ROP');
|
||||
ylabel('Bit Error Rate (BER)');
|
||||
title('Bit Error Rate vs. ROP');
|
||||
set(gca, 'yscale', 'log');
|
||||
set(gca, 'Box', 'on');
|
||||
grid on;
|
||||
grid minor;
|
||||
legend('Interpreter', 'none');
|
||||
|
||||
|
||||
figure();
|
||||
sgtitle(['PAM ', num2str(m)])
|
||||
subplot1 = subplot(1,2,1);
|
||||
|
||||
Reference in New Issue
Block a user