List of commits:
Subject Hash Author Date (UTC)
Add methods for quick export of all figs to meta_ev.m eba909118fe050479c8ff32e3c889f88c95c5837 Jason Hoelscher-Obermaier 2017-03-30 07:36:39
Add reset method to clear previous postprocessing results in meta_ev e299ba7be1625c170da5e1428537228df6c99cf2 Jason Hoelscher-Obermaier 2017-03-30 07:01:19
Add property common_path (deepest directory which is a parentdir to all the evaluations) in meta_ev.m 307d34599088d874a1f1b9ff1e9ea817cbe0bd2c Jason Hoelscher-Obermaier 2017-03-29 10:32:58
Add methods for interpolation of optimal lognegs and pulse-widths to meta_ev.m 3b1aba42eb665a534c6397e7607cd985702a9baa Jason Hoelscher-Obermaier 2017-03-29 10:00:35
Add plot-method to plot logneg versus gamma for quick inspection of all evaluations b2b8160418ccfef2689e89220734ea909d9a7787 Jason Hoelscher-Obermaier 2017-03-29 08:26:31
Allow quick initialization of meta_ev-objects by passing metadata-file to meta_ev-constructor. 9ac4214ca8aaa6a1c14a40d82274c415b880c203 Jason Hoelscher-Obermaier 2017-03-29 08:02:11
Allow setting default_sample_no for all traces from within meta_ev. 3cb242deef4b73fb363e655f34d53c8e8126b356 Jason Hoelscher-Obermaier 2017-03-29 07:35:11
Implement default_sample_no in PXItrace.m d521c86737e91f6d5b20c89b6ac0b809f18eee95 Jason Hoelscher-Obermaier 2017-03-29 07:28:31
Implement calculation of 'common' properties of all contained evaluations also for non-scalar values b77e69637343b4cce7b97789a1d3c6cd0335dd19 Jason Hoelscher-Obermaier 2017-03-29 06:58:49
Collect values of all evaluation-properties shared by all evaluations in a struct 'common' 8db1a37897d8db64d26c600900ecfb198f2291a6 Jason Hoelscher-Obermaier 2017-03-28 16:29:20
Allow convenient extraction of optimal entanglement and pulse width from all evaluations inside meta-ev 66e26078ccb9ca86dad55a62617ec8605fb759ce Jason Hoelscher-Obermaier 2017-03-28 16:09:40
Add meta_ev-class for more convenient postprocessing of multiple entanglement_evaluation-objects 147dd9b11bc1f950416d48142adfecc0dcc3f814 Jason Hoelscher-Obermaier 2017-03-28 14:36:08
Delete any previously calculated optima of log.neg. or pulse width at the end of calculate_log_neg edee9ece25f4249891ccc8485aaedc10c01c4386 Jason Hoelscher-Obermaier 2017-03-28 12:02:11
Refactor calibratePulsedCMs and trace_out c108334ad59fd087cef91e002a992e50652dc6e4 Jason Hoelscher-Obermaier 2017-03-28 11:56:13
Add logging of git-status via status_git_repos_on_path to simulate_entanglement 3658991dd37a657cad1a3aba5933a276b649fbd1 Jason Hoelscher-Obermaier 2017-03-28 10:08:52
Improve logging of git status in class_conveniences: dirty working tree state is also logged 96a3acca155c3ad47edaa625368e5a25875c332b Jason Hoelscher-Obermaier 2017-03-28 09:51:53
Add 3rd-party convenience fct printstruct.m to print a tree-view of a struct d6595191240086e6c8247a6e055c8e4a161d4459 Jason Hoelscher-Obermaier 2017-03-27 14:39:19
Improve plot appearance in plotLogneg.m and add option to reposition legend. 81d281f0f354594af42a13722ed6994cb1b0d0fb Jason Hoelscher-Obermaier 2017-03-27 11:43:15
Improve legend in plotLogneg to also include entries for interpolated data and optima 805cb3e67bad3be9bddafada3258f5a8a7e60707 Jason Hoelscher-Obermaier 2017-03-27 11:14:06
Add function tex_escape which escapes characters forbidden in tex 136b200a3a98f06f36b4ae3a18a97c66ce1b8c88 Jason Hoelscher-Obermaier 2017-03-27 10:03:53
Commit eba909118fe050479c8ff32e3c889f88c95c5837 - Add methods for quick export of all figs to meta_ev.m
Author: Jason Hoelscher-Obermaier
Author date (UTC): 2017-03-30 07:36
Committer name: Jason Hoelscher-Obermaier
Committer date (UTC): 2017-03-30 07:36
Parent(s): e299ba7be1625c170da5e1428537228df6c99cf2
Signer:
Signing key:
Signing status: N
Tree: 5d43c537107dec7fd07829fd726f3b4c906801a8
File Lines added Lines deleted
data_analysis/@meta_ev/meta_ev.m 43 16
File data_analysis/@meta_ev/meta_ev.m changed (mode: 100644) (index 638ab76..930a2fc)
... ... classdef meta_ev < class_conveniences
11 11 param_names@cell % cell array of parameter names (read from meta_data_file) param_names@cell % cell array of parameter names (read from meta_data_file)
12 12 params@cell % cell array of parameter arrays (params{1} corresponds to param_names{1}) params@cell % cell array of parameter arrays (params{1} corresponds to param_names{1})
13 13 gridtype % string: 'vector' or 'matrix' describing type of grid gridtype % string: 'vector' or 'matrix' describing type of grid
14 meta_label = '' % string describing the evaluation (could be 'traced_out_2' e.g.)
14 15 end end
15 16 properties(Dependent) properties(Dependent)
16 17 dimensions@double vector % dimensions of evaluations-vector or -matrix dimensions@double vector % dimensions of evaluations-vector or -matrix
 
... ... classdef meta_ev < class_conveniences
30 31 opt_logneg_corrected_interp_private@cell = {} % ... to avoid unnecessary recomputation ... opt_logneg_corrected_interp_private@cell = {} % ... to avoid unnecessary recomputation ...
31 32 opt_pulse_gammas_interp_private@cell = {} % ... to avoid unnecessary recomputation ... opt_pulse_gammas_interp_private@cell = {} % ... to avoid unnecessary recomputation ...
32 33 common_private@struct = struct() % ... to avoid unnecessary recomputation ... common_private@struct = struct() % ... to avoid unnecessary recomputation ...
34 ln_fig = [] % figure handle for internally generated plot logneg vs gamma
35 ln_cont_fig = [] % figure handle for internally generated contour plot of opt. logneg
36 pw_cont_fig = [] % figure handle for internally generated contour plot of opt. pulse width
33 37 end end
34 38 methods methods
35 39 %%% CONSTRUCTOR %%% %%% CONSTRUCTOR %%%
 
... ... classdef meta_ev < class_conveniences
74 78 end end
75 79
76 80 function plot_logneg_versus_gamma(meta, tracepairs_ind) function plot_logneg_versus_gamma(meta, tracepairs_ind)
77 fig = figure;
81 meta.ln_fig = figure;
78 82 cmap = cbrewer('qual', 'Set1', meta.evaluations_no); cmap = cbrewer('qual', 'Set1', meta.evaluations_no);
79 83 myplotlogneg = @(ev, color_ind) ev.plotLogneg('figure', fig,... myplotlogneg = @(ev, color_ind) ev.plotLogneg('figure', fig,...
80 84 'tracepairs', tracepairs_ind, 'save_fig', false, ... 'tracepairs', tracepairs_ind, 'save_fig', false, ...
 
... ... classdef meta_ev < class_conveniences
85 89 myplotlogneg(meta.evaluations{k}, k) myplotlogneg(meta.evaluations{k}, k)
86 90 end end
87 91 end end
88 function fig = contour_plot_logneg(meta, tracepairs_ind)
92 function contour_plot_logneg(meta, tracepairs_ind)
89 93 assertEqual(meta.gridtype,'matrix',... assertEqual(meta.gridtype,'matrix',...
90 94 'only implemented for gridtype "matrix"') 'only implemented for gridtype "matrix"')
91
92 95 z_data = meta.opt_logneg_corrected_interp{tracepairs_ind}; z_data = meta.opt_logneg_corrected_interp{tracepairs_ind};
96 display_name = 'Max. log. negativity';
97
93 98 abs_max = ceil(10*max(max(abs(z_data))))/10; abs_max = ceil(10*max(max(abs(z_data))))/10;
99 c_axis_lims = [-abs_max,abs_max];
94 100 c_levels = [-abs_max:0.1:abs_max]; c_levels = [-abs_max:0.1:abs_max];
101
95 102 cmap = flipud(cbrewer('div','RdBu',512)); cmap = flipud(cbrewer('div','RdBu',512));
96 fig = meta.my_contour_plot(z_data,...
97 c_levels, 'Max. log. negativity', cmap);
98 colormap(cmap); caxis([-abs_max,abs_max])
103 meta.ln_cont_fig = meta.my_contour_plot(z_data,...
104 c_levels, display_name, cmap, c_axis_lims);
99 105 end end
100 106 function set_default_sample_no(meta, default_sample_no) function set_default_sample_no(meta, default_sample_no)
101 107 for k=1:meta.evaluations_no for k=1:meta.evaluations_no
 
... ... classdef meta_ev < class_conveniences
105 111 end end
106 112 end end
107 113 end end
114 function save_figs(meta)
115 meta.my_save_fig(meta.ln_fig, 'ln_versus_gamma');
116 meta.my_save_fig(meta.ln_cont_fig, 'lnopt');
117 meta.my_save_fig(meta.pw_cont_fig, 'pwopt');
118 end
108 119
109 120 %% GETTERS %% GETTERS
110 121 function dimensions = get.dimensions(meta) function dimensions = get.dimensions(meta)
 
... ... classdef meta_ev < class_conveniences
206 217 meta.opt_pulse_gammas_interp_private = {}; meta.opt_pulse_gammas_interp_private = {};
207 218 meta.common_private = struct(); meta.common_private = struct();
208 219 end end
209 function ln_or_pw_interp = interpolate_ln_pw(meta, ln_or_pw)
220 function ln_or_pw_interp = interpolate_ln_pw(meta, ln_or_pw, varargin)
221 refinement_factor = 6;
222 if length(varargin)>0
223 refinement_factor = varargin{1};
224 end
210 225 switch meta.gridtype switch meta.gridtype
211 226 case 'vector' case 'vector'
212 227 error('not implemented') error('not implemented')
213 228 case 'matrix' case 'matrix'
214 refinement_factor = 8;
215 229 X = meta.params{1}; X = meta.params{1};
216 230 Xq = interp2(X,refinement_factor); Xq = interp2(X,refinement_factor);
217 231 meta.params_interp{1} = Xq; meta.params_interp{1} = Xq;
 
... ... classdef meta_ev < class_conveniences
221 235 ln_or_pw_interp = interp2(X,Y,ln_or_pw,Xq,Yq,'splines'); ln_or_pw_interp = interp2(X,Y,ln_or_pw,Xq,Yq,'splines');
222 236 end end
223 237 end end
224 function fig = my_contour_plot(meta, z_data, c_levels, display_name, cmap)
238 function fig = my_contour_plot(meta, z_data, c_levels, display_name, cmap, c_axis_lims)
239 %%% contour plot
225 240 [x_data, y_data] = meta.params_interp{:}; [x_data, y_data] = meta.params_interp{:};
226 241 fig = figure; hold all fig = figure; hold all
227 242 [c_data, c_handles] = contourf(x_data, y_data, z_data,... [c_data, c_handles] = contourf(x_data, y_data, z_data,...
228 243 c_levels, 'DisplayName', display_name); c_levels, 'DisplayName', display_name);
244 colormap(cmap); caxis(c_axis_lims);
245
246 %%% cosmetics
247 xlabel (meta.param_names{1}, 'Interpreter','latex');
248 ylabel(meta.param_names{2}, 'Interpreter','latex');
249 % set(gca, 'yscale', 'lin', 'xscale', 'log')
250 grid
251 leg = legend('Location', 'NorthOutside');
252 set(leg, 'Color', 'w', 'FontWeight', 'normal', 'LineWidth', 1, 'Interpreter', 'latex')
253
229 254 %%% scatter plot of simulated data points %%% scatter plot of simulated data points
230 255 set(gca, 'layer', 'top') set(gca, 'layer', 'top')
231 256 scatter(meta.params{1}(:), meta.params{2}(:), 'xk',... scatter(meta.params{1}(:), meta.params{2}(:), 'xk',...
232 257 'MarkerFaceColor','none',... 'MarkerFaceColor','none',...
233 258 'LineWidth',1,... 'LineWidth',1,...
234 259 'DisplayName', 'Simulated data points') 'DisplayName', 'Simulated data points')
235 %%% cosmetics
236 xlabel (meta.param_names{1}, 'Interpreter','latex');
237 ylabel(meta.param_names{2}, 'Interpreter','latex');
238 % set(gca, 'yscale', 'lin', 'xscale', 'log')
239 grid
240 leg = legend('Location', 'Best');
241 set(leg, 'Color', 'none', 'FontWeight', 'normal', 'LineWidth', 1, 'Interpreter', 'latex')
260 leg = legend('Location', 'NorthOutside');
242 261
243 262 %%% contour labels %%% contour labels
244 263 text_handle = clabel(c_data, 'FontSize', 13); text_handle = clabel(c_data, 'FontSize', 13);
 
... ... classdef meta_ev < class_conveniences
263 282 end end
264 283 end end
265 284 end end
285 function my_save_fig(meta, fig_handle, fig_name)
286 if ~isempty(fig_handle)
287 fig_path = fullfile(meta.common_path, [fig_name, '__', meta.meta_label]);
288 disp(['saving figures to ', fig_path, ' .fig / .pdf'])
289 saveas(fig_handle, fig_path, 'fig');
290 saveas(fig_handle, fig_path, 'pdf');
291 end
292 end
266 293 end end
267 294 end end
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/gutc61/Membrane

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/gutc61/Membrane

Clone this repository using git:
git clone git://git.rocketgit.com/user/gutc61/Membrane

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main