Merge branch 'main' of https://cau-git.rz.uni-kiel.de/nt/mitarbeiter/silas/imdd_simulation
This commit is contained in:
@@ -355,7 +355,7 @@ classdef Signal
|
||||
end
|
||||
|
||||
if isempty(options.fft_length)
|
||||
options.fft_length = 2^(nextpow2(length(obj.signal))-6);
|
||||
options.fft_length = 2^(nextpow2(length(obj.signal))-9);
|
||||
end
|
||||
|
||||
if options.normalizeToNyquist == 0
|
||||
@@ -844,9 +844,9 @@ classdef Signal
|
||||
|
||||
mode = 1;
|
||||
|
||||
histpoints = 1024*2; %% verticale resolution
|
||||
histpoints = 2048; %% verticale resolution
|
||||
histpoints = floor(histpoints/2)*2+1; %% to have the eye digram centered around one point make the vertical resolution uneven
|
||||
histpoints_horizontal = 512*2; %% horizontal resolution
|
||||
histpoints_horizontal = 2048; %% horizontal resolution
|
||||
hist_data=zeros(histpoints,histpoints_horizontal ); %% initilize eye diagram
|
||||
|
||||
if isa(obj,'Opticalsignal')
|
||||
@@ -905,16 +905,22 @@ classdef Signal
|
||||
hist_data(:,n)=flip(nn.'); %without flip, the eye is upside down :-(
|
||||
end
|
||||
|
||||
ax = gca;
|
||||
|
||||
plot_data = 20*log10(hist_data);
|
||||
plot_data(plot_data==-Inf) = 0;
|
||||
|
||||
imagesc(plot_data);
|
||||
|
||||
|
||||
|
||||
% beautify
|
||||
colormap(cbrewer2("Blues",4096));
|
||||
|
||||
cm=flip(cbrewer2("RdYlBu",4096));
|
||||
% cm=flip(cbrewer2("RdBu",4096));
|
||||
cm(1,:) = [1,1,1];
|
||||
cm(1,:) = [0,0,0];
|
||||
colormap(cm);
|
||||
% colormap('turbo');
|
||||
ax.Colormap(1,:) = [1,1,1];
|
||||
% ax.CLim = [0 50];
|
||||
if isa(obj,'Opticalsignal')
|
||||
title(['Optical Eye ',options.displayname])
|
||||
ylabel("Power in mW");
|
||||
|
||||
Reference in New Issue
Block a user