stuff from star

This commit is contained in:
Silas Oettinghaus
2025-03-03 09:16:58 +01:00
parent d099efea03
commit b05515d326
8 changed files with 109 additions and 26 deletions

View File

@@ -355,7 +355,7 @@ classdef Signal
end
if isempty(options.fft_length)
options.fft_length = 2^(nextpow2(length(obj.signal))-7);
options.fft_length = 2^(nextpow2(length(obj.signal))-9);
end
if options.normalizeToNyquist == 0
@@ -837,9 +837,9 @@ classdef Signal
mode = 1;
histpoints = 1024; %% 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; %% horizontal resolution
histpoints_horizontal = 2048; %% horizontal resolution
hist_data=zeros(histpoints,histpoints_horizontal ); %% initilize eye diagram
if isa(obj,'Opticalsignal')
@@ -895,16 +895,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");