From 2540572609ae3f1de0b6a0d5c9955840f4bdc754 Mon Sep 17 00:00:00 2001 From: Hunter Rew Date: Fri, 10 Oct 2014 01:45:54 -0400 Subject: Cleaned up control functions. Changed config for longer times and smaller ground state decay. data/ is a symlink to an additional drive, may cause funny behavior when cloning. --- config.m | 4 ++-- control/getSimulation.m | 3 +-- control/getSimulations.m | 14 +++++++------- data | 1 + data/.gitignore | 4 ---- octave-workspace | Bin 461 -> 9474 bytes source/eit.xmds | 48 +++++++++++++++++++++-------------------------- source/simulate.py | 6 +++--- 8 files changed, 35 insertions(+), 45 deletions(-) create mode 120000 data delete mode 100644 data/.gitignore 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 Binary files a/octave-workspace and b/octave-workspace 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 @@ - + - - + + @@ -134,7 +134,7 @@ and what algorithm we want to use. --> - 100 100 + 100 population @@ -195,35 +195,29 @@ E_field - I1_out I2_out + I1_out - - - PabI PabR - population - - + --> 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 -- cgit v1.2.3