aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHunter Rew <hbrew@email.wm.edu>2014-10-10 01:45:54 -0400
committerHunter Rew <hbrew@email.wm.edu>2014-10-10 01:45:54 -0400
commit2540572609ae3f1de0b6a0d5c9955840f4bdc754 (patch)
treedabd9d85bbeb7c5f4d2e34d5d9c94012cd404b19
parent4accdbc4da5f5e0a9167739f5adc9fa548800a7d (diff)
downloadeit_filter_simulations-testing.tar.gz
eit_filter_simulations-testing.zip
Cleaned up control functions.testing
Changed config for longer times and smaller ground state decay. data/ is a symlink to an additional drive, may cause funny behavior when cloning.
-rw-r--r--config.m4
-rw-r--r--control/getSimulation.m3
-rw-r--r--control/getSimulations.m14
l---------data1
-rw-r--r--data/.gitignore4
-rw-r--r--octave-workspacebin461 -> 9474 bytes
-rw-r--r--source/eit.xmds48
-rw-r--r--source/simulate.py6
8 files changed, 35 insertions, 45 deletions
diff --git a/config.m b/config.m
index 0d9b525..78bcd09 100644
--- a/config.m
+++ b/config.m
@@ -3,9 +3,9 @@
% Always run this file first.
%
-decay_ground = [0.00001]; % Ground state decay
+decay_ground = [0.000001]; % Ground state decay
decay_upper = [6]; % Excited state decay
-drive = [linspace(1e-2,7e-2,10)]; % Drive/control field
+drive = [linspace(5e-3,5e-2,10)]; % Drive/control field
drive = drive; % Choose which drives you want
detuning1 = [0]; % Single photon detuning
dephase_bc = [0]; % Ground state dephasing
diff --git a/control/getSimulation.m b/control/getSimulation.m
index 6eb964e..0c5b877 100644
--- a/control/getSimulation.m
+++ b/control/getSimulation.m
@@ -1,9 +1,8 @@
-function [detunings2, probe, absorptions, z] = getSimulation(dataFile)
+function [detunings2, probe, z] = getSimulation(dataFile)
data = load(dataFile);
detunings2 = data._1.detuning';
z = data._1.z;
- absorptions = squeeze(data._2.PabI(:,end,:));
probe = squeeze(data._1.I1_out(:,end,:));
end
diff --git a/control/getSimulations.m b/control/getSimulations.m
index e3d5851..19cce0e 100644
--- a/control/getSimulations.m
+++ b/control/getSimulations.m
@@ -1,9 +1,9 @@
-function [drives, widths, minAbsorptions, contrasts, z] = getSimulations(decay_bc, detuning, dephase_bc)
+function [drives, widths, transmissions, contrasts, z] = getSimulations(decay_bc, detuning, dephase_bc)
global data_dir
dataFiles = dir([data_dir, decay_bc, '*_*_', detuning, '*_', dephase_bc, '*.h5']);
widths = [];
- minAbsorptions = [];
+ transmissions = [];
contrasts = [];
drives = [];
detunings1 = [];
@@ -11,18 +11,18 @@ function [drives, widths, minAbsorptions, contrasts, z] = getSimulations(decay_b
for i = 1:length(dataFiles)
dataFile = dataFiles(i).name;
- [detunings2, probes, absorptions, z] = getSimulation([data_dir, dataFile]);
+ [detunings2, probes, z] = getSimulation([data_dir, dataFile]);
width_by_z = [];
contrast_by_z = [];
- absorption_by_z = [];
+ transmission_by_z = [];
for j = 2:length(z)
- [width, probe, contrast] = getPeak(detunings2, probes(:,j));
+ [width, transmission, contrast] = getPeak(detunings2, probes(:,j));
width_by_z = [width_by_z; width];
- absorption_by_z = [absorption_by_z; probe];
+ transmission_by_z = [transmission_by_z; transmission];
contrast_by_z = [contrast_by_z; contrast];
end
widths = [widths; width_by_z'];
- minAbsorptions = [minAbsorptions; absorption_by_z'];
+ transmissions = [transmissions; transmission_by_z'];
contrasts = [contrasts; contrast_by_z'];
sections = strfind(dataFile, '_');
drive = dataFile(sections(1)+1:sections(2)-1);
diff --git a/data b/data
new file mode 120000
index 0000000..a068fbc
--- /dev/null
+++ b/data
@@ -0,0 +1 @@
+/run/media/hunter/Media/Workspace/eit/data \ No newline at end of file
diff --git a/data/.gitignore b/data/.gitignore
deleted file mode 100644
index 5e7d273..0000000
--- a/data/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore
diff --git a/octave-workspace b/octave-workspace
index 8622b89..a4f53f9 100644
--- a/octave-workspace
+++ b/octave-workspace
Binary files differ
diff --git a/source/eit.xmds b/source/eit.xmds
index 592c0fc..778309c 100644
--- a/source/eit.xmds
+++ b/source/eit.xmds
@@ -48,7 +48,7 @@
<validation kind="run-time"/>
<arguments>
<argument name="decay_upper_arg" type="real" default_value="1e1" />
- <argument name="decay_ground_arg" type="real" default_value="1e-3" />
+ <argument name="decay_ground_arg" type="real" default_value="1e-6" />
<argument name="drive_arg" type="real" default_value="1e-1" />
<argument name="probe_arg" type="real" default_value="1e-4" />
<!-- Expected detuning width needed is:
@@ -59,7 +59,7 @@
<argument name="delta1_arg" type="real" default_value="0" />
<argument name="dephase_bc_arg" type="real" default_value="0" />
<argument name="start_time" type="real" default_value="0" />
- <argument name="end_time" type="real" default_value="100" />
+ <argument name="end_time" type="real" default_value="5000" />
<![CDATA[
decay_upper = decay_upper_arg;
@@ -87,8 +87,8 @@
<dimension name="detuning" lattice="256" domain="(domain_min, domain_max)" />
-->
- <dimension name="t" lattice="1000" domain="(start_time, end_time)" />
- <dimension name="detuning" lattice="100" domain="(detuning_min, detuning_max)" />
+ <dimension name="t" lattice="50000" domain="(start_time, end_time)" />
+ <dimension name="detuning" lattice="10" domain="(detuning_min, detuning_max)" />
</transverse_dimensions>
</geometry>
@@ -134,7 +134,7 @@
and what algorithm we want to use.
-->
<integrate algorithm="ARK45" tolerance="1e-5" interval="7e-2">
- <samples>100 100</samples>
+ <samples>100</samples>
<operators>
<operator kind="cross_propagation" algorithm="SI" propagation_dimension="t">
<integration_vectors>population</integration_vectors>
@@ -195,35 +195,29 @@
<output format="hdf5" >
<sampling_group basis="t detuning" initial_sample="yes">
<dependencies>E_field</dependencies>
- <moments>I1_out I2_out</moments>
+ <moments>I1_out</moments>
<![CDATA[
I1_out = mod2(probe);
- I2_out = mod2(drive);
+ //I2_out = mod2(drive);
]]>
</sampling_group>
- <sampling_group basis="t detuning" initial_sample="yes">
- <!-- <moments>PaaR PaaI PbbR PbbI PccR PccI PabR PabI PcaR PcaI PcbR PcbI</moments>
+ <!--<sampling_group basis="t detuning" initial_sample="yes">
+ <moments>PaaR PaaI PbbR PbbI PccR PccI PabR PabI PcaR PcaI PcbR PcbI</moments>
<dependencies>population</dependencies>
<![CDATA[
- PaaR = Paa.Re();
- PaaI = Paa.Im();
- PbbR = Pbb.Re();
- PbbI = Pbb.Im();
- PccR = Pcc.Re();
- PccI = Pcc.Im();
- PabR = Pab.Re();
+ //PaaR = Paa.Re();
+ //PaaI = Paa.Im();
+ //PbbR = Pbb.Re();
+ //PbbI = Pbb.Im();
+ //PccR = Pcc.Re();
+ //PccI = Pcc.Im();
+ //PabR = Pab.Re();
PabI = Pab.Im();
- PcaR = Pca.Re();
- PcaI = Pca.Im();
- PcbR = Pcb.Re();
- PcbI = Pcb.Im();
- ]]> -->
- <moments>PabI PabR</moments>
- <dependencies>population</dependencies>
- <![CDATA[
- PabI = Pab.Im();
- PabR = Pab.Re();
+ //PcaR = Pca.Re();
+ //PcaI = Pca.Im();
+ //PcbR = Pcb.Re();
+ //PcbI = Pcb.Im();
]]>
- </sampling_group>
+ </sampling_group>-->
</output>
</simulation>
diff --git a/source/simulate.py b/source/simulate.py
index c1dccaf..6807154 100644
--- a/source/simulate.py
+++ b/source/simulate.py
@@ -10,7 +10,7 @@ FNULL = open(os.devnull, 'w')
# Wrapper for call function to forward output to /dev/null
def bash(command):
- call(command, shell=True, stdout=FNULL, stderr=STDOUT)
+ call(command, shell=True)#, stdout=FNULL, stderr=STDOUT)
# Divide the given values into n arrays
def splitRange(x, n):
@@ -96,8 +96,8 @@ def simulate((index, decays_upper, decays_ground, drives, detunings1, dephasings
for detuning1 in detunings1:
for dephase_bc in dephasings_bc:
- expected_width = (math.pow(drive,2)/decay_upper + dephase_bc + decay_ground)
- domain_max = expected_width*50
+ expected_width = (math.pow(drive,2)/decay_upper)
+ domain_max = expected_width*10
domain_min = -1*domain_max
final_time = 1/expected_width*time_multiplier