List of commits:
Subject Hash Author Date (UTC)
Fix problem with potentially unavailable mounted shares in pseudo_hash_test 0bdac14223066f07f4c66b43b46ae8445d64b5fb Jason Hoelscher-Obermaier 2016-07-19 14:17:38
Allow to explicitly set samples_per_pulse in entanglement_evaluation 92bb0279be01f3d16c7ac512647063b7136822ae Jason Hoelscher-Obermaier 2016-07-19 13:20:28
Fit calibration data in PXIcalibration.m 3c65712b7a88037dbe75b8af2a6cc02acfbc93e8 Jason Hoelscher-Obermaier 2016-07-12 11:44:18
Add possible keyword 'full' to run_entanglement_evaluation_simulation 8cb63059391ecb194057d10dfed767c1a1a6e123 Jason Hoelscher-Obermaier 2016-07-11 10:32:39
add quickcheck_dualhomo_long for long traces which are recorded in chunks 5e8a134a87ca94358eaa52118f33f4116899bf6a Jason Hoelscher-Obermaier 2016-07-11 10:31:49
move old manual tests gausseof_test and gausssfparams_test to subfolder 'old' 660dffd0646e831fe8105750ab7fbbe4093ca8dc Jason Hoelscher-Obermaier 2016-07-11 10:26:22
Add PXIcalibration.m c85d63ea6567c75a4f2b9eadb604d8aaa947d096 Jason Hoelscher-Obermaier 2016-07-12 09:18:02
Add script for quick check of measured dual-homo-data 98153eab38e56a9f42f86e2442c316ac2e707362 Jason Hoelscher-Obermaier 2016-06-24 15:26:56
Add (apparently) missing argument in subfct assert_consistency_of_varargin 904e585940ea4c4cb462cf32dc0ce23d20d84943 Jason Hoelscher-Obermaier 2016-06-24 15:24:29
Fix minor bug in run_entanglement_evaluation_simulation.m 011055a6fe3640cbba0bd1cfd6739e6cdbe6b140 Jason Hoelscher-Obermaier 2016-06-24 15:22:55
Add snapshot-plot and snapshot-histogram of timedata dae83d9300c01d0d5d5508731ad7c10189147b7a Jason Hoelscher-Obermaier 2016-06-24 15:22:01
Import and export correlation-functions using .mat-files (plus test) 1a3753962e1fd51e4085a9e887493ae10c99a966 Jason Hoelscher-Obermaier 2016-06-16 15:07:59
Export results in .mat-format instead of .tsv to preserve double precision 8ad59e6e359f0172fb2d60c91b2aa764cf40b599 Jason Hoelscher-Obermaier 2016-06-16 13:16:34
Change calibration method to a per-mode based calibration to shotnoise 38718be504ca4960f072c4e7f3602ecda6b79714 Jason Hoelscher-Obermaier 2016-06-16 12:39:26
Suppress unnecessary output in some functions e59949293bce61f53d444a02d4646d03bc16a78a Jason Hoelscher-Obermaier 2016-06-16 12:03:54
Refactor run_entanglement_evaluation_simulation dc585c8941b2bf97dc182a8afc1082b10ec8dee2 Jason Hoelscher-Obermaier 2016-06-16 11:34:45
Include functionality of run_.._quick into run_entanglement_evaluation_simulation 12cc4e34841c52e44a49dae459497b45efedda17 Jason Hoelscher-Obermaier 2016-06-16 11:09:56
Add prototypical evaluation folder for quick tests of the entanglement evaluation 920d5ccf6408b1f0122e8b8af7b15f8518433f44 Jason Hoelscher-Obermaier 2016-06-16 10:18:32
Remove unfinished fct symplectic_fcts_test.m e44f20cd99436fcdfe601c23178bbd5aa94bbe9e Jason Hoelscher-Obermaier 2016-06-16 10:14:16
Move remaining cov.matrix-based functions to subfolder covmats a7434c41951a01fcabd067313b71ab2565d0e958 Jason Hoelscher-Obermaier 2016-06-16 10:03:44
Commit 0bdac14223066f07f4c66b43b46ae8445d64b5fb - Fix problem with potentially unavailable mounted shares in pseudo_hash_test
Author: Jason Hoelscher-Obermaier
Author date (UTC): 2016-07-19 14:17
Committer name: Jason Hoelscher-Obermaier
Committer date (UTC): 2016-07-19 14:17
Parent(s): 92bb0279be01f3d16c7ac512647063b7136822ae
Signer:
Signing key:
Signing status: N
Tree: a3e52a982d70f9d72154b89bf0277457939cceb7
File Lines added Lines deleted
data_analysis/unittests/pseudo_hash_test.m 29 23
File data_analysis/unittests/pseudo_hash_test.m changed (mode: 100644) (index 4f944f6..4aa9dc1)
... ... function shared = setup
12 12 shared.shafunction = @(filename) pseudo_hash(filename, 'bytes', shared.bytes_for_test); shared.shafunction = @(filename) pseudo_hash(filename, 'bytes', shared.bytes_for_test);
13 13
14 14 shared.file = '.test.dat'; shared.file = '.test.dat';
15 assert_file_nonexistent(shared.file);
15 16 fid = fopen(shared.file,'w+'); fid = fopen(shared.file,'w+');
16 17 fwrite(fid, shared.data, shared.precision); fwrite(fid, shared.data, shared.precision);
17 18 fclose(fid); fclose(fid);
 
... ... function shared = setup
23 24 shared.empty.file = '.test_empty.dat'; shared.empty.file = '.test_empty.dat';
24 25 assert_file_nonexistent(shared.empty.file); assert_file_nonexistent(shared.empty.file);
25 26
26 % only runs if /media/schatzkammer/RAID1 is available --> might have to be modified on other machines!!
27 shared.ext.folder = '/media/schatzkammer/RAID1';
28 assert(exist('/media/schatzkammer/RAID1')==7,...
29 [shared.ext.folder, ' not found. Modify test accordingly!']);
27 exist_not_empty = @(folder)(exist(folder)==7)&&(~isempty(ls(folder)));
28 if exist_not_empty('/media/schatzkammer/RAID1')
29 shared.ext.folder = '/media/schatzkammer/RAID1';
30 elseif exist_not_empty('~/Downloads')
31 shared.ext.folder = '~/Downloads';
32 else
33 error(['No suitable folder for tests involving copying files found.',...
34 'Modify test accordingly!']);
35 end
30 36 shared.ext.file = fullfile(shared.ext.folder, '.test_copy.dat'); shared.ext.file = fullfile(shared.ext.folder, '.test_copy.dat');
31 37 assert_file_nonexistent(shared.ext.file); assert_file_nonexistent(shared.ext.file);
32 38 copyfile(shared.file, shared.ext.file); copyfile(shared.file, shared.ext.file);
 
... ... function teardown(shared)
45 51 delete(shared.minifile1); delete(shared.minifile1);
46 52 delete(shared.minifile2); delete(shared.minifile2);
47 53
48 function pseudo_hash_function_handle_test(shared)
54 function function_handle_test(shared)
49 55 assertEqual(shared.shafunction(shared.file),... assertEqual(shared.shafunction(shared.file),...
50 56 pseudo_hash(shared.file, 'bytes', shared.bytes_for_test)); pseudo_hash(shared.file, 'bytes', shared.bytes_for_test));
51 57
52 function pseudo_hash_bytes_sensitive_test(shared)
58 function bytes_sensitive_test(shared)
53 59 assertFalse(... assertFalse(...
54 60 isequal(... isequal(...
55 61 shared.shafunction(shared.file),... shared.shafunction(shared.file),...
56 62 pseudo_hash(shared.file, 'bytes', 1+shared.bytes_for_test))); pseudo_hash(shared.file, 'bytes', 1+shared.bytes_for_test)));
57 63
58 function pseudo_hash_default_bytes_test(shared)
64 function default_bytes_test(shared)
59 65 assertEqual(pseudo_hash(shared.file),... assertEqual(pseudo_hash(shared.file),...
60 66 pseudo_hash(shared.file, 'bytes', 1e6)); pseudo_hash(shared.file, 'bytes', 1e6));
61 67
62 function pseudo_hash_filename_filepath_test(shared)
68 function filename_filepath_test(shared)
63 69 assertEqual(shared.shafunction(shared.file),... assertEqual(shared.shafunction(shared.file),...
64 70 shared.shafunction(GetFullPath(shared.file))); shared.shafunction(GetFullPath(shared.file)));
65 71
66 function pseudo_hash_open_close_forread_test(shared)
67 pseudo_hash_before = shared.shafunction(shared.file);
72 function open_close_forread_test(shared)
73 before = shared.shafunction(shared.file);
68 74 fid = fopen(shared.file, 'r'); fid = fopen(shared.file, 'r');
69 75 fclose(fid); fclose(fid);
70 pseudo_hash_after = shared.shafunction(shared.file);
71 assertEqual(pseudo_hash_before, pseudo_hash_after);
76 after = shared.shafunction(shared.file);
77 assertEqual(before, after);
72 78
73 % function pseudo_hash_open_close_forwrite_test(shared)
74 % pseudo_hash_before = shared.shafunction(shared.file);
79 % function open_close_forwrite_test(shared)
80 % before = shared.shafunction(shared.file);
75 81 % fid = fopen(shared.file, 'w'); % fid = fopen(shared.file, 'w');
76 82 % fclose(fid); % fclose(fid);
77 % pseudo_hash_after = shared.shafunction(shared.file);
78 % assertEqual(pseudo_hash_before, pseudo_hash_after);
83 % after = shared.shafunction(shared.file);
84 % assertEqual(before, after);
79 85
80 function pseudo_hash_copy_test(shared)
86 function copy_test(shared)
81 87 assertEqual(shared.shafunction(shared.file),... assertEqual(shared.shafunction(shared.file),...
82 88 shared.shafunction(shared.copy.file)); shared.shafunction(shared.copy.file));
83 89
84 function pseudo_hash_modify_begin_test(shared)
90 function modify_begin_test(shared)
85 91 fid = fopen(shared.copy.file, 'w'); fid = fopen(shared.copy.file, 'w');
86 92 fseek(fid, 10, 'bof'); fseek(fid, 10, 'bof');
87 93 fwrite(fid, randn(1)); fwrite(fid, randn(1));
 
... ... function pseudo_hash_modify_begin_test(shared)
90 96 isequal(shared.shafunction(shared.file),... isequal(shared.shafunction(shared.file),...
91 97 shared.shafunction(shared.copy.file))); shared.shafunction(shared.copy.file)));
92 98
93 function pseudo_hash_modify_end_test(shared)
99 function modify_end_test(shared)
94 100 assertEqual(shared.shafunction(shared.file),... assertEqual(shared.shafunction(shared.file),...
95 101 shared.shafunction(shared.copy.file)); shared.shafunction(shared.copy.file));
96 102 fid = fopen(shared.copy.file, 'w'); fid = fopen(shared.copy.file, 'w');
 
... ... function pseudo_hash_modify_end_test(shared)
101 107 isequal(shared.shafunction(shared.file),... isequal(shared.shafunction(shared.file),...
102 108 shared.shafunction(shared.copy.file))); shared.shafunction(shared.copy.file)));
103 109
104 function pseudo_hash_modify_length_test(shared)
110 function modify_length_test(shared)
105 111 fid = fopen(shared.empty.file, 'w+'); fid = fopen(shared.empty.file, 'w+');
106 112 fwrite(fid, shared.data, shared.precision); fwrite(fid, shared.data, shared.precision);
107 113 %write same data twice to get file with same beginning and end, but different length %write same data twice to get file with same beginning and end, but different length
 
... ... function pseudo_hash_modify_length_test(shared)
113 119 delete(shared.empty.file) delete(shared.empty.file)
114 120 assertFalse( isequal( hash_original, hash_doublesize)); assertFalse( isequal( hash_original, hash_doublesize));
115 121
116 function pseudo_hash_minifile_test(shared)
122 function minifile_test(shared)
117 123 assertFalse(... assertFalse(...
118 124 isequal(... isequal(...
119 125 shared.shafunction(shared.minifile1),... shared.shafunction(shared.minifile1),...
120 126 shared.shafunction(shared.minifile2))); shared.shafunction(shared.minifile2)));
121 127
122 function pseudo_hash_external_filesystem_test(shared)
128 function external_filesystem_test(shared)
123 129 assertEqual(... assertEqual(...
124 130 shared.shafunction(shared.file),... shared.shafunction(shared.file),...
125 131 shared.shafunction(shared.ext.file)); shared.shafunction(shared.ext.file));
 
... ... function pseudo_hash_external_filesystem_test(shared)
127 133 %% aux functions %% aux functions
128 134 function assert_file_nonexistent(filename) function assert_file_nonexistent(filename)
129 135 assertFalse(exist(filename)==2,... assertFalse(exist(filename)==2,...
130 [GetFullPath(filename), ' already exists!']);
136 [GetFullPath(filename), ' already exists!']);
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