File data_analysis/@meta_ev/meta_ev.m changed (mode: 100644) (index 6b773e1..2abfede) |
... |
... |
classdef meta_ev < class_conveniences |
20 |
20 |
evaluations_no@double % number of evaluations |
evaluations_no@double % number of evaluations |
21 |
21 |
opt_logneg_corrected@cell % cell array (index corresponding to tracepair) of optimal entanglement |
opt_logneg_corrected@cell % cell array (index corresponding to tracepair) of optimal entanglement |
22 |
22 |
opt_pulse_gammas@cell % cell array (index corresponding to tracepair) of optimal pulse gammas |
opt_pulse_gammas@cell % cell array (index corresponding to tracepair) of optimal pulse gammas |
|
23 |
|
max_physical_logneg@cell % cell array (index corresponding to tracepair) of maximum of logneg over physical CMs |
23 |
24 |
tracepairs_no@double % number of tracepairs used for each evaluation (enforced to be the same) |
tracepairs_no@double % number of tracepairs used for each evaluation (enforced to be the same) |
24 |
25 |
common@struct % struct which contains all those evaluation_properties which are shared by all evaluations |
common@struct % struct which contains all those evaluation_properties which are shared by all evaluations |
25 |
26 |
common_path % longest path which is a parentdir to all ev_files |
common_path % longest path which is a parentdir to all ev_files |
|
... |
... |
classdef meta_ev < class_conveniences |
37 |
38 |
ln_fig = [] % figure handle for internally generated plot logneg vs gamma |
ln_fig = [] % figure handle for internally generated plot logneg vs gamma |
38 |
39 |
ln_cont_fig = [] % figure handle for internally generated contour plot of opt. logneg |
ln_cont_fig = [] % figure handle for internally generated contour plot of opt. logneg |
39 |
40 |
ln_cut_fig = [] % figure handle for internally generated cut plot of opt. logneg |
ln_cut_fig = [] % figure handle for internally generated cut plot of opt. logneg |
|
41 |
|
ln_phys_cut_fig = [] % figure handle for internally generated cut plot of max.physical logneg |
40 |
42 |
pw_cont_fig = [] % figure handle for internally generated contour plot of opt. pulse width |
pw_cont_fig = [] % figure handle for internally generated contour plot of opt. pulse width |
41 |
43 |
pw_cut_fig = [] % figure handle for internally generated cut plot of opt. pulse width |
pw_cut_fig = [] % figure handle for internally generated cut plot of opt. pulse width |
42 |
44 |
fig_label = '' % additional label to distinguish plots when saving |
fig_label = '' % additional label to distinguish plots when saving |
|
... |
... |
classdef meta_ev < class_conveniences |
194 |
196 |
meta.my_save_fig(meta.ln_cont_fig, 'lnopt'); meta.ln_cont_fig = []; |
meta.my_save_fig(meta.ln_cont_fig, 'lnopt'); meta.ln_cont_fig = []; |
195 |
197 |
meta.my_save_fig(meta.pw_cont_fig, 'pwopt'); meta.pw_cont_fig = []; |
meta.my_save_fig(meta.pw_cont_fig, 'pwopt'); meta.pw_cont_fig = []; |
196 |
198 |
meta.my_save_fig(meta.ln_cut_fig, 'lnopt_cut'); meta.ln_cut_fig = []; |
meta.my_save_fig(meta.ln_cut_fig, 'lnopt_cut'); meta.ln_cut_fig = []; |
|
199 |
|
meta.my_save_fig(meta.ln_phys_cut_fig, 'lnmax_phys_cut'); meta.ln_phys_cut_fig = []; |
197 |
200 |
meta.my_save_fig(meta.pw_cut_fig, 'pwopt_cut'); meta.pw_cut_fig = []; |
meta.my_save_fig(meta.pw_cut_fig, 'pwopt_cut'); meta.pw_cut_fig = []; |
198 |
201 |
end |
end |
199 |
202 |
|
|
|
... |
... |
classdef meta_ev < class_conveniences |
234 |
237 |
'opt_pulse_gammas', 'index', k)); |
'opt_pulse_gammas', 'index', k)); |
235 |
238 |
end |
end |
236 |
239 |
end |
end |
|
240 |
|
function max_physical_logneg = get.max_physical_logneg(meta) |
|
241 |
|
max_physical_logneg = cell([1, meta.tracepairs_no]); |
|
242 |
|
for k=1:meta.tracepairs_no |
|
243 |
|
max_physical_logneg{k} = cell2mat(meta.for_each_evaluation_get(... |
|
244 |
|
'max_physical_logneg', 'index', k)); |
|
245 |
|
end |
|
246 |
|
end |
237 |
247 |
function opt_logneg_corrected_interp = get.opt_logneg_corrected_interp(meta) |
function opt_logneg_corrected_interp = get.opt_logneg_corrected_interp(meta) |
238 |
248 |
if isempty(meta.opt_logneg_corrected_interp_private) |
if isempty(meta.opt_logneg_corrected_interp_private) |
239 |
249 |
opt_logneg_corrected_interp = cell([1, meta.tracepairs_no]); |
opt_logneg_corrected_interp = cell([1, meta.tracepairs_no]); |
File data_analysis/@meta_ev/plot_cuts.m changed (mode: 100644) (index bf8e0d0..93bcc3b) |
1 |
|
function plot_cuts(meta, plot_type, tracepairs_ind, varargin) |
|
|
1 |
|
function fig = plot_cuts(meta, plot_type, tracepairs_ind, varargin) |
2 |
2 |
switch meta.gridtype |
switch meta.gridtype |
3 |
3 |
case 'vector' |
case 'vector' |
4 |
4 |
par_ind = 2; |
par_ind = 2; |
|
... |
... |
function plot_cuts(meta, plot_type, tracepairs_ind, varargin) |
9 |
9 |
otherwise |
otherwise |
10 |
10 |
error('"plot_cuts" is only implemented for gridtypes "matrix" or "vector".') |
error('"plot_cuts" is only implemented for gridtypes "matrix" or "vector".') |
11 |
11 |
end |
end |
12 |
|
plot_cuts_matrix(meta, plot_type, tracepairs_ind, args{:}); |
|
|
12 |
|
fig = plot_cuts_matrix(meta, plot_type, tracepairs_ind, args{:}); |
13 |
13 |
|
|
14 |
14 |
|
|
15 |
|
function plot_cuts_matrix(meta, plot_type, tracepairs_ind, par_ind, par_vals, varargin) |
|
|
15 |
|
function fig = plot_cuts_matrix(meta, plot_type, tracepairs_ind, par_ind, par_vals, varargin) |
16 |
16 |
% assertEqual(meta.gridtype,'matrix',... |
% assertEqual(meta.gridtype,'matrix',... |
17 |
17 |
% 'only implemented for gridtype "matrix"') |
% 'only implemented for gridtype "matrix"') |
18 |
18 |
if isequal(par_vals, 'all') |
if isequal(par_vals, 'all') |
|
... |
... |
function plot_cuts_matrix(meta, plot_type, tracepairs_ind, par_ind, par_vals, va |
27 |
27 |
fig_handle = 'ln_cut_fig'; |
fig_handle = 'ln_cut_fig'; |
28 |
28 |
y_data = meta_filtered.opt_logneg_corrected{tracepairs_ind}; |
y_data = meta_filtered.opt_logneg_corrected{tracepairs_ind}; |
29 |
29 |
cmap = flipud(cbrewer('div','RdBu',512)); |
cmap = flipud(cbrewer('div','RdBu',512)); |
|
30 |
|
case {'phys_logneg', 'max_physical_logneg', 'max_phys_ln'} |
|
31 |
|
display_name = 'Max. log. negativity over physical CMs'; |
|
32 |
|
fig_handle = 'ln_phys_cut_fig'; |
|
33 |
|
y_data = meta_filtered.max_physical_logneg{tracepairs_ind}; |
|
34 |
|
cmap = flipud(cbrewer('div','RdBu',512)); |
30 |
35 |
case {'pulsewidth', 'opt_pulse_gamma', 'opt_pulsewidth'} |
case {'pulsewidth', 'opt_pulse_gamma', 'opt_pulsewidth'} |
31 |
36 |
display_name = 'Optimal pulse width [kHz]'; |
display_name = 'Optimal pulse width [kHz]'; |
32 |
37 |
fig_handle = 'pw_cut_fig'; |
fig_handle = 'pw_cut_fig'; |
|
... |
... |
function plot_cuts_matrix(meta, plot_type, tracepairs_ind, par_ind, par_vals, va |
48 |
53 |
linewidth = 1.5; |
linewidth = 1.5; |
49 |
54 |
subplotnum = 111; |
subplotnum = 111; |
50 |
55 |
show_zero = false; |
show_zero = false; |
|
56 |
|
show_legend = true; |
51 |
57 |
for k=1:2:length(varargin) |
for k=1:2:length(varargin) |
52 |
58 |
switch lower(varargin{k}) |
switch lower(varargin{k}) |
53 |
59 |
case {'x_scale','xscale'} |
case {'x_scale','xscale'} |
|
... |
... |
function plot_cuts_matrix(meta, plot_type, tracepairs_ind, par_ind, par_vals, va |
74 |
80 |
colororder = varargin{k+1}; |
colororder = varargin{k+1}; |
75 |
81 |
case {'legend_postfix','legendpostfix'} |
case {'legend_postfix','legendpostfix'} |
76 |
82 |
legend_postfix = varargin{k+1}; |
legend_postfix = varargin{k+1}; |
|
83 |
|
case {'show_legend','legend'} |
|
84 |
|
show_legend = varargin{k+1}; |
77 |
85 |
case {'legend_numberformat','legendnumberformat'} |
case {'legend_numberformat','legendnumberformat'} |
78 |
86 |
switch varargin{k+1} |
switch varargin{k+1} |
79 |
87 |
case 'engineering' |
case 'engineering' |
|
... |
... |
function plot_cuts_matrix(meta, plot_type, tracepairs_ind, par_ind, par_vals, va |
96 |
104 |
end |
end |
97 |
105 |
end |
end |
98 |
106 |
if isempty(fig) |
if isempty(fig) |
99 |
|
meta.(fig_handle) = figure; hold all; |
|
|
107 |
|
fig = figure; hold all; |
100 |
108 |
else |
else |
101 |
109 |
figure(fig); subplot(subplotnum); hold all; |
figure(fig); subplot(subplotnum); hold all; |
102 |
|
meta.(fig_handle) = fig; |
|
103 |
110 |
end |
end |
|
111 |
|
meta.(fig_handle) = fig; |
|
112 |
|
|
104 |
113 |
if ~isempty(colororder) |
if ~isempty(colororder) |
105 |
114 |
set(gca, 'ColorOrder', colororder); |
set(gca, 'ColorOrder', colororder); |
106 |
115 |
end |
end |
|
... |
... |
function plot_cuts_matrix(meta, plot_type, tracepairs_ind, par_ind, par_vals, va |
130 |
139 |
labels(meta_filtered.param_names{x_ind},display_name); |
labels(meta_filtered.param_names{x_ind},display_name); |
131 |
140 |
set(gca, 'xscale', x_scale, 'yscale', y_scale) |
set(gca, 'xscale', x_scale, 'yscale', y_scale) |
132 |
141 |
meta_ev.xylims(x_lims, y_lims); |
meta_ev.xylims(x_lims, y_lims); |
133 |
|
leg = legend('Location', legend_location); |
|
134 |
|
legtitle = get(leg,'title'); |
|
135 |
|
switch meta.gridtype |
|
136 |
|
case 'matrix' |
|
137 |
|
title_str = sentence_case(meta_filtered.param_names{par_ind}); |
|
138 |
|
otherwise |
|
139 |
|
title_str = ''; |
|
140 |
|
end |
|
141 |
|
if ~(legend_title_maxlength==inf) |
|
142 |
|
title_str = linewrap(title_str, legend_title_maxlength); |
|
|
142 |
|
if show_legend |
|
143 |
|
leg = legend('Location', legend_location); |
|
144 |
|
legtitle = get(leg,'title'); |
|
145 |
|
switch meta.gridtype |
|
146 |
|
case 'matrix' |
|
147 |
|
title_str = sentence_case(meta_filtered.param_names{par_ind}); |
|
148 |
|
otherwise |
|
149 |
|
title_str = ''; |
|
150 |
|
end |
|
151 |
|
if ~(legend_title_maxlength==inf) |
|
152 |
|
title_str = linewrap(title_str, legend_title_maxlength); |
|
153 |
|
end |
|
154 |
|
set(legtitle,'string', title_str,... |
|
155 |
|
'interpreter', 'latex','FontSize',11); |
|
156 |
|
set(leg, 'Color', 'w', 'FontWeight', 'normal',... |
|
157 |
|
'LineWidth', 1, 'Interpreter', 'latex','FontSize',11); |
143 |
158 |
end |
end |
144 |
|
set(legtitle,'string', title_str,... |
|
145 |
|
'interpreter', 'latex','FontSize',11); |
|
146 |
|
set(leg, 'Color', 'w', 'FontWeight', 'normal',... |
|
147 |
|
'LineWidth', 1, 'Interpreter', 'latex','FontSize',11); |
|
148 |
159 |
|
|
149 |
160 |
meta.my_postprocess_plot(meta.(fig_handle)); |
meta.my_postprocess_plot(meta.(fig_handle)); |
150 |
161 |
if show_zero |
if show_zero |