summaryrefslogtreecommitdiff
path: root/control
diff options
context:
space:
mode:
authorHunter Rew <hbrew@email.wm.edu>2014-04-26 17:02:46 +0000
committerHunter Rew <hbrew@email.wm.edu>2014-04-26 17:02:46 +0000
commit0f8b12cff819c16594441158e9d2086941ad6047 (patch)
treee26a1adda5440bd1c3f53a3739db2e48e758ad8b /control
parent15405c9070cf2f75b93a2327b0acb2b1af031ac9 (diff)
downloadeit_filter_simulations-0f8b12cff819c16594441158e9d2086941ad6047.tar.gz
eit_filter_simulations-0f8b12cff819c16594441158e9d2086941ad6047.zip
Added README
Switched to h5 files for saving data Optimized multiprocessing algorithm Made plotting scripts more universal
Diffstat (limited to 'control')
-rw-r--r--control/getSimulation.m4
-rw-r--r--control/getSimulations.m8
2 files changed, 7 insertions, 5 deletions
diff --git a/control/getSimulation.m b/control/getSimulation.m
index bbc8b45..2cf09c6 100644
--- a/control/getSimulation.m
+++ b/control/getSimulation.m
@@ -1,7 +1,7 @@
function [detunings2, absorptions] = getSimulation(dataFile)
data = load(dataFile);
- detunings2 = data(:,1);
- absorptions = data(:,2);
+ detunings2 = data._1.detuning';
+ absorptions = data._1.PabI(:,end);
end \ No newline at end of file
diff --git a/control/getSimulations.m b/control/getSimulations.m
index c57d690..c072a1f 100644
--- a/control/getSimulations.m
+++ b/control/getSimulations.m
@@ -1,6 +1,7 @@
-function [widths, minAbsorptions, drives, contrast] = getSimulations(directory, decay_bc, detuning, dephase_bc)
+function [drives, widths, minAbsorptions, contrasts] = getSimulations(decay_bc, detuning, dephase_bc)
- dataFiles = dir([directory, decay_bc, '*_*_', detuning, '*_', dephase_bc, '*.dat']);
+ global data_dir
+ dataFiles = dir([data_dir, decay_bc, '*_*_', detuning, '*_', dephase_bc, '*.h5']);
widths = [];
minAbsorptions = [];
contrasts = [];
@@ -10,7 +11,7 @@ function [widths, minAbsorptions, drives, contrast] = getSimulations(directory,
for i = 1:length(dataFiles)
dataFile = dataFiles(i).name;
- [detunings2, absorptions] = getSimulation([directory, dataFile]);
+ [detunings2, absorptions] = getSimulation([data_dir, dataFile]);
[width, absorption, contrast] = getPeak(detunings2, absorptions);
widths = [widths; width];
minAbsorptions = [minAbsorptions; absorption];
@@ -23,6 +24,7 @@ function [widths, minAbsorptions, drives, contrast] = getSimulations(directory,
end
+ % Sort by drive
data = [drives, widths, minAbsorptions, contrasts];
data = sortrows(data, 1);
drives = data(:,1); widths = data(:,2); minAbsorptions = data(:,3); contrasts = data(:,4);