List of commits:
Subject Hash Author Date (UTC)
Add sanity_check-scripts due to Tobias Wenzl 9d02f936ea3ffed8fe13039087934c3326c33350 Jason Hoelscher-Obermaier 2016-09-30 12:10:45
Add peak_identification function due to Tobias Wenzl c8a4a8d38e8a909a5688e8ed5d3a88712f571dfa Jason Hoelscher-Obermaier 2016-09-30 12:07:52
Also export calibrated CMs, log.negativity and physicality from ev-object if they exist c063641e12dc805b62f5ef8bf49a5311dc803770 Jason Hoelscher-Obermaier 2016-09-22 12:53:49
Add method plotLogneg to entanglement_evaluation-class e7443b5adbcf6a9ef4a4dc95c5e27160e5c2f704 Jason Hoelscher-Obermaier 2016-09-22 12:23:44
Add darknoise-subtraction-method to entanglement_evaluation be1fc701bd39f6a0892383f9446daf408e6f7394 Jason Hoelscher-Obermaier 2016-09-22 09:30:49
Adapt test to check for result of CM-calibration procedure in entanglement_evaluation_test... e1b9ab299b267f97a7fdd24f4e1cce6abe942185 Jason Hoelscher-Obermaier 2016-09-20 16:15:52
Change quad.order to q1,p1,q2,p2,..,x1,y1,x2,y2,... everywhere for consistency 997cd1260b8b222bd0b6ebf3f8567db04ace24fd Jason Hoelscher-Obermaier 2016-09-20 10:30:19
Check that mode order is q1, p1, q2, p2, .... in calibrate_cm_test.m f5619421e505f4305e7ee12a173c5d85aef70196 Jason Hoelscher-Obermaier 2016-09-20 10:26:34
Add help to permute_data.m 22f7ede0384bfcb1f0a86556340e9e022586a508 Jason Hoelscher-Obermaier 2016-09-20 10:25:35
Fix ineffective test on entanglement_evaluation objects which are handles d5d85b7f9a1a7abd7384983b9d49bfb217d598aa Jason Hoelscher-Obermaier 2016-09-19 17:22:06
Allow to specify the traces to use for shotnoise-calibration by hand fdec708fa527788bc7c86a57462fddf3bd8678bc Jason Hoelscher-Obermaier 2016-09-15 10:24:00
Add dummy-mode to PXItrace: creates mock file for testing instead of an actual data file 14e29d60337a57ab13b3e950182520442c06a57e Jason Hoelscher-Obermaier 2016-09-15 10:05:23
Correct documentation in parseVararginForMissingFields.m 9e8a954bda526bb307d930cf07aaf9928eb19365 Jason Hoelscher-Obermaier 2016-09-14 17:10:28
Modify TestRunDisplay to suppress annoying html-output when running tests from command line 828228430097491d6fc591177699038ad02ab35d Jason Hoelscher-Obermaier 2016-09-14 17:10:08
Turn software_version into hidden, dependent property 4c6d3523d2abe43b7b17bfba303b16a57f679169 Jason Hoelscher-Obermaier 2016-09-14 13:22:17
Add import_traces-functionality to entanglement_evaluation 35d6b299912f30fb11cdc15d9b9299d9f556b5d0 Jason Hoelscher-Obermaier 2016-09-14 12:01:12
Speed up entanglement_evaluation_test 2a113d1fab8b9473cf2b9c939ea1c474ac43763e Jason Hoelscher-Obermaier 2016-09-14 09:14:56
cleaned up /model directory: moved all files (*model*) to toolbox 'optomechanics' ddf5a93a3e61b5e05714f92c5f21b63538235474 Witlef Wieczorek 2016-09-07 11:55:18
added return of StateNames adb7cc3eacaddf2406efc00f59b97285ad842d15 Witlef Wieczorek 2016-09-07 10:38:01
Additions from Felix (Praktikant) 5a644d3df18ba505a2b9ac58c7e2e4e8fa47810b Felix Roithmayr 2016-08-19 15:11:38
Commit 9d02f936ea3ffed8fe13039087934c3326c33350 - Add sanity_check-scripts due to Tobias Wenzl
Author: Jason Hoelscher-Obermaier
Author date (UTC): 2016-09-30 12:10
Committer name: Jason Hoelscher-Obermaier
Committer date (UTC): 2016-09-30 12:10
Parent(s): c8a4a8d38e8a909a5688e8ed5d3a88712f571dfa
Signer:
Signing key:
Signing status: N
Tree: 72c593701a2a1b57858b05bf1d44dc4f0682ec3f
File Lines added Lines deleted
PXItraces/SanityChecks/.gitignore 1 0
PXItraces/SanityChecks/sanity_check.m 67 0
PXItraces/SanityChecks/sanity_check_header_v2.m 125 0
File PXItraces/SanityChecks/.gitignore added (mode: 100644) (index 0000000..28942b2)
1 /old/
File PXItraces/SanityChecks/sanity_check.m added (mode: 100644) (index 0000000..bf3220f)
1 function [del,median_variance,upper_bound_sigma,lower_bound_sigma,variance_data] = ...
2 sanity_check(testobj,upper_bound_sigma_FC,upper_bound_sigma_OM,cyc_end,read_nr,data_type)
3
4 range = testobj.DAQrange;
5 upper_bound_range = range/2;
6 lower_bound_range = -range/2;
7
8 max_data = zeros(1,cyc_end);
9 min_data = zeros(1,cyc_end);
10 variance_data = zeros(1,cyc_end);
11
12 testobj.fopen();
13 for i=1:cyc_end
14 data = testobj.fread(read_nr);
15 max_data(i) = max(data);
16 min_data(i) = min(data);
17 variance_data(i) = var(data);
18 end
19 testobj.fclose();
20
21 nr = 5;
22 sigma_variance = std(variance_data);
23 median_variance = median(variance_data);
24 upper_bound_sigma = median_variance + nr * sigma_variance;
25 lower_bound_sigma = median_variance - nr * sigma_variance;
26 del = [];
27 ind = 1;
28
29 for i=1:cyc_end
30 if max_data(i) > upper_bound_range || min_data(i) < lower_bound_range
31 start = ((i-1)*read_nr+1);
32 stop = (i*read_nr);
33 fprintf('Sample %i to %i --> Out of range!!!\n',start,stop);
34 del(ind,1) = start;
35 del(ind,2) = stop;
36 del(ind,3) = 1;
37 ind = ind + 1;
38 elseif variance_data(i) > upper_bound_sigma || variance_data(i) < lower_bound_sigma
39 start = ((i-1)*read_nr+1);
40 stop = (i*read_nr);
41 fprintf('Sample %i to %i --> Out of 5*sigma!!!\n',start,stop);
42 del(ind,1) = start;
43 del(ind,2) = stop;
44 del(ind,3) = 2;
45 ind=ind+1;
46 end
47 if (strcmp(data_type,'SN') || strcmp(data_type,'OM')) && (variance_data(i) <= upper_bound_sigma_FC)
48 start = ((i-1)*read_nr+1);
49 stop = (i*read_nr);
50 fprintf('Sample %i to %i --> FC out of lock!!!\n',start,stop);
51 del(ind,1) = start;
52 del(ind,2) = stop;
53 del(ind,3) = 3;
54 ind=ind+1;
55 end
56 if strcmp(data_type,'OM') && variance_data(i) <= upper_bound_sigma_OM
57 start = ((i-1)*read_nr+1);
58 stop = (i*read_nr);
59 fprintf('Sample %i to %i --> OM out of lock!!!\n',start,stop);
60 del(ind,1) = start;
61 del(ind,2) = stop;
62 del(ind,3) = 4;
63 ind=ind+1;
64 end
65 end
66
67 end
File PXItraces/SanityChecks/sanity_check_header_v2.m added (mode: 100644) (index 0000000..d8bea7e)
1 %% Add path
2 clear;
3 close all;
4 % clc
5 addpath(genpath('C:\Users\aspel\Matlab\datoolbox'));
6 cd('C:\Users\aspel\Matlab\datoolbox');
7 read_nr = 3e4;
8 % cyc_end = 1e3;
9
10 %% Darknoise
11 basedir = 'C:\Users\aspel\Desktop\Test';
12 filepath = fullfile(basedir, 'Pdark_1_amp_Range0200mV_Amplification50dB.dat');
13 testobj = timetrace(filepath,...
14 'samplingrate', 80E6,...
15 'DAQrange', 0.2,...
16 'amplification', sqrt(1E5));
17 data_type = 'DN';
18 cyc_end = 1+floor((testobj.sample_no)/(read_nr));
19 fprintf('\nDarknoise:\n');
20 tic;
21 [del_DN,median_variance_DN,upper_bound_sigma_DN,lower_bound_sigma_DN,variance_data_DN] = ...
22 sanity_check(testobj,[],[],cyc_end,read_nr,data_type);
23 toc;
24
25 %% Shotnoise
26 basedir = 'C:\Users\aspel\Desktop\Test';
27 filepath = fullfile(basedir, 'Pshot_1_amp_Range0200mV_Amplification40dB.dat');
28 testobj = timetrace(filepath,...
29 'samplingrate', 80E6,...
30 'DAQrange', 0.2,...
31 'amplification', sqrt(1E4));
32 data_type = 'SN';
33 cyc_end = 1+floor((testobj.sample_no)/(read_nr));
34 fprintf('\nShotnoise:\n');
35 tic;
36 [del_SN,median_variance_SN,upper_bound_sigma_SN,lower_bound_sigma_SN,variance_data_SN] = ...
37 sanity_check(testobj,upper_bound_sigma_DN,[],cyc_end,read_nr,data_type);
38 toc;
39
40 %% Optomechanics
41 basedir = 'C:\Users\aspel\Desktop\Test';
42 filepath = fullfile(basedir, 'P50muW_1_amp_Range0200mV_Amplification30dB.dat');
43 testobj = timetrace(filepath,...
44 'samplingrate', 80E6,...
45 'DAQrange', 0.2,...
46 'amplification', sqrt(1E3));
47 data_type = 'OM';
48 cyc_end = 1+floor((testobj.sample_no)/(read_nr));
49 fprintf('\nOptomechanics:\n');
50 tic;
51 [del_OM,median_variance_OM,upper_bound_sigma_OM,lower_bound_sigma_OM,variance_data_OM] = ...
52 sanity_check(testobj,upper_bound_sigma_DN,upper_bound_sigma_SN,cyc_end,read_nr,data_type);
53 toc;
54
55 %% Output command window
56 fprintf('\nDarknoise:\n');
57 if isempty(del_DN)
58 fprintf('All data is usable!!!\n');
59 else
60 fprintf('%.2f%% of data not usable!!!\n',100*length(del_DN)*read_nr/testobj.sample_no);
61 end
62
63 fprintf('\nShotnoise:\n');
64 if isempty(del_SN)
65 fprintf('All data is usable!!!\n');
66 else
67 fprintf('%.2f%% of data not usable!!!\n',100*length(del_SN)*read_nr/testobj.sample_no);
68 end
69
70 fprintf('\nOptomechanics:\n');
71 if isempty(del_OM)
72 fprintf('All data is usable!!!\n');
73 else
74 fprintf('%.2f%% of data not usable!!!\n',100*length(del_OM)*read_nr/testobj.sample_no);
75 end
76
77 %% Output textfile
78 if ~isempty(del_DN)
79 dlmwrite('C:\Users\aspel\Desktop\Test\DN.txt',del_DN);
80 end
81
82 if ~isempty(del_SN)
83 dlmwrite('C:\Users\aspel\Desktop\Test\SN.txt',del_SN);
84 end
85
86 if ~isempty(del_OM)
87 dlmwrite('C:\Users\aspel\Desktop\Test\OM.txt',del_OM);
88 end
89
90 %% Read textfile
91 % type('C:\Users\aspel\Desktop\Test\DN.txt')
92 % type('C:\Users\aspel\Desktop\Test\SN.txt')
93 % type('C:\Users\aspel\Desktop\Test\OM.txt')
94
95 %% Plots incl. bounds
96 step = 1e3;
97 x = 1:step:length(variance_data_DN);
98 figure();
99 plot(variance_data_DN,'color',[0,0,1]);
100 hold on;
101 plot(x,median_variance_DN,'color',[1,0,0]);
102 hold on;
103 plot(x,upper_bound_sigma_DN,'color',[1,0,0]);
104 hold on;
105 plot(x,lower_bound_sigma_DN,'color',[1,0,0]);
106
107 x = 1:step:length(variance_data_SN);
108 figure();
109 plot(variance_data_SN,'color',[0,0,1]);
110 hold on;
111 plot(x,median_variance_SN,'color',[1,0,0]);
112 hold on;
113 plot(x,upper_bound_sigma_SN,'color',[1,0,0]);
114 hold on;
115 plot(x,lower_bound_sigma_SN,'color',[1,0,0]);
116
117 x = 1:step:length(variance_data_OM);
118 figure();
119 plot(variance_data_OM,'color',[0,0,1]);
120 hold on;
121 plot(x,median_variance_OM,'color',[1,0,0]);
122 hold on;
123 plot(x,upper_bound_sigma_OM,'color',[1,0,0]);
124 hold on;
125 plot(x,lower_bound_sigma_OM,'color',[1,0,0]);
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