84 lines
2.3 KiB
Matlab
84 lines
2.3 KiB
Matlab
%automate plots
|
|
[file, path] = uigetfile("C:\Users\Silas\Documents\MATLAB\Datensätze\Raw_Cluster_Simulations\");
|
|
wh = load([path filesep file]);
|
|
wh = wh.wh;
|
|
|
|
plotJob = struct();
|
|
width = 350;
|
|
height = 200;
|
|
plotJob.Position = [100 100 width 100+height];
|
|
cols = cbrewer2("paired",12);
|
|
plotJob.color = cols(1,:);
|
|
plotJob.l = 1;
|
|
plotJob.ch = 1;
|
|
|
|
plotJob.sgm = 1;
|
|
plotJob.pol = "copolarized";
|
|
plotJob.p_in = 3;
|
|
plotJob.gamma = 0.0023;
|
|
plotJob.pmd = 0.1;
|
|
plotJob.channelspacing = 400e9;
|
|
plotJob.randzdw = 0;
|
|
|
|
|
|
plotJob.plot_ber_curve = 1;
|
|
plotJob.plot_3dber_curve = 0;
|
|
plotJob.plot_violin = 0;
|
|
plotJob.plot_wavelength_sweep = 0;
|
|
plotJob.plot_wavelength_sweep_failure_rate = 0;
|
|
|
|
|
|
plotJob.dataStatArg = 'Lineplot with quartiles';
|
|
plotJob.plotTypeArg = 'Lines';
|
|
plotJob.displayname = 'a';
|
|
plotJob.title = 'title';
|
|
plotJob.figName = '1 Chann__';
|
|
plotJob.xAxisLabel = 'ROP per Channel in dBm';
|
|
plotJob.yAxisLabel = 'BER';
|
|
|
|
|
|
plotJob.d = 0;
|
|
|
|
xAxis = wh.parameter.p_out.values;
|
|
D = wh.parameter.dispersion.values;
|
|
|
|
figure()
|
|
ber_ = [];
|
|
for d_ = 0:39
|
|
if d_ == 0
|
|
plotJob.sgm = 0;
|
|
ber_(d_+1,:) = wh.getStoValue('ber',plotJob.l,d_,plotJob.sgm,string(plotJob.pol),plotJob.p_in,xAxis,plotJob.pmd,plotJob.gamma,1,plotJob.ch,1310,plotJob.channelspacing,plotJob.randzdw)';
|
|
else
|
|
plotJob.sgm = 1;
|
|
ber_(d_+1,:) = wh.getStoValue('ber',plotJob.l,d_,plotJob.sgm,string(plotJob.pol),plotJob.p_in,xAxis,plotJob.pmd,plotJob.gamma,1,plotJob.ch,1310,plotJob.channelspacing,plotJob.randzdw)';
|
|
end
|
|
hold on
|
|
plot(xAxis,ber_(d_+1,:))
|
|
set(gca,'yscale','log');
|
|
end
|
|
yline(3.8e-3);
|
|
|
|
|
|
hdfec = 3.8e-3.*ones(size(xAxis));
|
|
for i = 1:size(ber_,1)
|
|
ber_series = ber_(i,:);
|
|
a = InterX([hdfec(:)';xAxis],[ber_series;xAxis]);
|
|
cross(i) = a(2);
|
|
end
|
|
|
|
col = cbrewer2('Paired',8);
|
|
figure()
|
|
plot(D,cross,'Marker','o','MarkerSize',5,'MarkerEdgeColor',[1,1,1],'MarkerFaceColor',col(2,:),'Color',col(1,:),'LineWidth',1);
|
|
grid minor
|
|
xlabel('Accumulated Dispersion')
|
|
ylabel('Required ROP to reach FEC limit in dB')
|
|
line([D(16),D(16)],[-10,cross(16)],'linestyle','--')
|
|
line([0,D(16)],[cross(16),cross(16)],'linestyle','--')
|
|
|
|
line([D(29),D(29)],[-10,cross(29)],'linestyle','--')
|
|
line([0,D(29)],[cross(29),cross(29)],'linestyle','--')
|
|
|
|
|
|
|
|
|