summaryrefslogtreecommitdiff
path: root/useful_functions.m
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2009-12-21 20:37:33 +0000
committerEugeniy Mikhailov <evgmik@gmail.com>2009-12-21 20:37:33 +0000
commit23dface6fc5ff3b0cf280846b8cacae26b1608cd (patch)
treebbf9ad1d64bbe702a3cf1a15d090d785f35e4733 /useful_functions.m
parent00ea4f7ef1631a0e7e52320cc9780607f5678722 (diff)
downloadmulti_mode_eit-23dface6fc5ff3b0cf280846b8cacae26b1608cd.tar.gz
multi_mode_eit-23dface6fc5ff3b0cf280846b8cacae26b1608cd.zip
susceptibility calculated by dividing polarization by field
Diffstat (limited to 'useful_functions.m')
-rw-r--r--useful_functions.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/useful_functions.m b/useful_functions.m
index 34f1155..22c54be 100644
--- a/useful_functions.m
+++ b/useful_functions.m
@@ -192,7 +192,7 @@ function [rhoLiouville_dot, L]=constrain_rho_and_match_L( ...
rhoLiouville_dot(1)=1;
endfunction
-function kappa=susceptibility(wi, rhoLiouville, dipole_elements)
+function kappa=susceptibility(wi, rhoLiouville, dipole_elements, E_field)
% calculate susceptibility for the field at given frequency index
Nlevels=( size(dipole_elements.linear)(1) );
rho=rhoOfFreq(rhoLiouville, wi, Nlevels);
@@ -203,6 +203,10 @@ function kappa=susceptibility(wi, rhoLiouville, dipole_elements)
kappa.linear = sum( sum( transpose(dipole_elements.linear) .* rho ) );
kappa.left = sum( sum( transpose(dipole_elements.left) .* rho ) );
kappa.right = sum( sum( transpose(dipole_elements.right) .* rho ) );
+
+ kappa.linear /= E_field.linear( wi );
+ kappa.left /= E_field.left( wi );
+ kappa.right /= E_field.right( wi );
endfunction
function index=freq2index(freq, modulation_freq)
@@ -248,7 +252,7 @@ function [xi_linear, xi_left, xi_right]=susceptibility_steady_state_at_freq( ato
freq_index = atom_field_problem.freq_index ;
rhoLiouville=rhoLiouville_steady_state(L0m, polarizability_m, E_field, modulation_freq);
- xi=susceptibility(freq_index, rhoLiouville, dipole_elements);
+ xi=susceptibility(freq_index, rhoLiouville, dipole_elements, E_field);
xi_linear = xi.linear;
xi_right = xi.right;
xi_left = xi.left;