summaryrefslogtreecommitdiff
path: root/simulate.m
diff options
context:
space:
mode:
Diffstat (limited to 'simulate.m')
-rw-r--r--simulate.m57
1 files changed, 30 insertions, 27 deletions
diff --git a/simulate.m b/simulate.m
index ebf882f..ba34bd5 100644
--- a/simulate.m
+++ b/simulate.m
@@ -7,42 +7,45 @@ setenv('LD_LIBRARY_PATH', libPath);
system('xmds2 eit.xmds');
setenv('LD_LIBRARY_PATH', matlabPath);
-decay_bc = 0.001;
+decay_bc = 0.00001;
decay_ab = 6;
widths = [];
absorptions = [];
-drives = logspace(-2, -3, 10);
-drives = linspace(0.003298,0.003319,20);
-detunings1 = [0:2:0];
-dephase_bc = 0.05;
+drives = logspace(0, -2, 100);
+drives = drives(1:1);
+%drives = linspace(0.0033154997,0.00331549970606061,100);
+detunings1 = [-15];
+dephase_bc = [0];
for drive = drives
width_row = [];
absorption_row = [];
- expected_width = (drive^2/decay_ab + dephase_bc + decay_bc);
- domain_max = expected_width*10;
- domain_min = -1*domain_max;
- final_time = 1/expected_width*100;
for detuning1 = detunings1
-
- run_eit = sprintf('time ./eit --drive_arg=%f --decay_arg=%f --decay_bc_arg=%f --delta1_arg=%f --domain_min=%f --domain_max=%f --dephase_bc_arg=%f --final_time=%f', drive, decay_ab, decay_bc, detuning1, domain_min, domain_max, dephase_bc, final_time);
-
- setenv('LD_LIBRARY_PATH', libPath);
- system(run_eit);
- system('xsil2graphics2 -m eit.xsil');
- setenv('LD_LIBRARY_PATH', matlabPath);
- %[drive, detuning1] % Use for debugging
- run('eit.m');
- detunings2 = detuning_1';
- PabI = PabI_1(end,:)';
- [fwhm, absorption_min] = getPeak(detunings2, PabI);
-
- width_row = [width_row, fwhm];
- absorption_row = [absorption_row, absorption_min];
- eit_plot = [detunings2, PabI];
- csv_name = sprintf('data/%f_%f_%f_%f.dat', decay_bc, drive, detuning1, dephase_bc);
- csvwrite(csv_name, eit_plot);
+ for dephasing = dephase_bc
+
+ expected_width = (drive^2/decay_ab + dephasing + decay_bc);
+ domain_max = expected_width*10;
+ domain_min = -1*domain_max;
+ final_time = 1/expected_width*100;
+ run_eit = sprintf('time ./eit --drive_arg=%0.20f --decay_arg=%f --decay_bc_arg=%f --delta1_arg=%f --domain_min=%f --domain_max=%f --dephase_bc_arg=%f --final_time=%f', drive, decay_ab, decay_bc, detuning1, domain_min, domain_max, dephasing, final_time);
+
+ setenv('LD_LIBRARY_PATH', libPath);
+ system(run_eit);
+ system('xsil2graphics2 -m eit.xsil');
+ setenv('LD_LIBRARY_PATH', matlabPath);
+ %[drive, detuning1] % Use for debugging
+ run('eit.m');
+ detunings2 = detuning_1';
+ PabI = PabI_1(end,:)';
+ [fwhm, absorption_min] = getPeak(detunings2, PabI);
+
+ width_row = [width_row, fwhm];
+ absorption_row = [absorption_row, absorption_min];
+ eit_plot = [detunings2, PabI];
+ csv_name = sprintf('data/full/%0.10f_%0.20f_%0.10f_%0.10f.dat', decay_bc, drive, detuning1, dephasing);
+ csvwrite(csv_name, eit_plot);
+ end
end
widths = [widths; width_row];
absorptions = [absorptions; absorption_row];