summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2009-12-14 21:55:54 +0000
committerEugeniy Mikhailov <evgmik@gmail.com>2009-12-14 21:55:54 +0000
commit4a004205484cdd9340b1b8554efbb323e96a9b86 (patch)
treebcd314cc2b63a24e7141cf2dc94ebe32164a5466
parentf585ad0d4d495312d41d759e8695c46d1c7162ef (diff)
downloadmulti_mode_eit-4a004205484cdd9340b1b8554efbb323e96a9b86.tar.gz
multi_mode_eit-4a004205484cdd9340b1b8554efbb323e96a9b86.zip
atom properties moved to global variable, this no need to load unload it from file
-rw-r--r--liouville.m10
-rw-r--r--useful_functions.m11
2 files changed, 9 insertions, 12 deletions
diff --git a/liouville.m b/liouville.m
index fe49313..9bf5753 100644
--- a/liouville.m
+++ b/liouville.m
@@ -42,8 +42,10 @@ rhoLiouville=zeros(N,1);
H0, g_decay, g_dephasing, dipole_elements ...
);
-atom_properties_fname='atom_properties.mat';
-save( atom_properties_fname, 'L0m', 'polarizability_m', 'dipole_elements' ) ;
+global atom_properties;
+atom_properties.L0m=L0m;
+atom_properties.polarizability_m=polarizability_m;
+atom_properties.dipole_elements=dipole_elements;
for detuning_p_cntr=1:N_detun_steps+1;
wp0=w12;
@@ -56,10 +58,6 @@ for detuning_p_cntr=1:N_detun_steps+1;
E_field =[0, Ep, Ed, Epc, Edc, 0, 0 ];
freq_index=freq2index(wp,modulation_freq);
- atom_field_problem.atom_properties_fname = atom_properties_fname;
- %atom_field_problem.L0m = L0m;
- %atom_field_problem.polarizability_m = polarizability_m;
- %atom_field_problem.dipole_elements = dipole_elements;
atom_field_problem.E_field = E_field;
atom_field_problem.modulation_freq = modulation_freq;
atom_field_problem.freq_index = freq_index;
diff --git a/useful_functions.m b/useful_functions.m
index bc8f709..74dd9a5 100644
--- a/useful_functions.m
+++ b/useful_functions.m
@@ -236,16 +236,15 @@ endfunction
function xi=susceptibility_steady_state_at_freq( atom_field_problem)
% find steady state susceptibility at particular modulation frequency element
% at given E_field
- %L0m = atom_field_problem.L0m ;
- %polarizability_m = atom_field_problem.polarizability_m ;
- %dipole_elements = atom_field_problem.dipole_elements ;
+ global atom_properties;
+ L0m = atom_properties.L0m ;
+ polarizability_m = atom_properties.polarizability_m ;
+ dipole_elements = atom_properties.dipole_elements ;
+
E_field = atom_field_problem.E_field ;
modulation_freq = atom_field_problem.modulation_freq ;
freq_index = atom_field_problem.freq_index ;
- % load from file values of 'L0m', 'polarizability_m', 'dipole_elements';
- load( atom_field_problem.atom_properties_fname );
-
rhoLiouville=rhoLiouville_steady_state(L0m, polarizability_m, E_field, modulation_freq);
xi=susceptibility(freq_index, rhoLiouville, dipole_elements);
endfunction