diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2010-01-16 00:14:49 +0000 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2010-01-16 00:14:49 +0000 |
commit | 8cf18ef2c11ec787df4a670270235545bc191b8f (patch) | |
tree | 55a2443e57bf1cc9ebed544ab1a6b3fee2f65223 | |
parent | 1735eb271ff64b605b639b2f653821cbdfdaf428 (diff) | |
download | multi_mode_eit-8cf18ef2c11ec787df4a670270235545bc191b8f.tar.gz multi_mode_eit-8cf18ef2c11ec787df4a670270235545bc191b8f.zip |
i think this is better absorption calculation
-rw-r--r-- | useful_functions.m | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/useful_functions.m b/useful_functions.m index f799f90..2eef299 100644 --- a/useful_functions.m +++ b/useful_functions.m @@ -291,10 +291,20 @@ function total_absorption=total_field_absorption(atom_field_problem) % summed across all frequencies field absorption coefficient global atom_properties; [dEdz_linear, dEdz_left, dEdz_right]=dEdz( atom_field_problem); - dEdz_total= dEdz_linear .* conj(dEdz_linear) ... - +dEdz_left .* conj(dEdz_left) ... - +dEdz_right .* conj(dEdz_right); - total_absorption = sum(dEdz_total); + %dEdz_total= dEdz_linear .* conj(dEdz_linear) ... + %+dEdz_left .* conj(dEdz_left) ... + %+dEdz_right .* conj(dEdz_right); + %total_absorption = sum(dEdz_total); + + %total_absorption = |E|^2 - | E - dEdz | ^2 + E_field.linear = atom_field_problem.E_field.linear; + E_field.right = atom_field_problem.E_field.right; + E_field.left = atom_field_problem.E_field.left; + total_absorption_v = ... + abs(E_field.linear).^2 - abs(E_field.linear - (1i)*dEdz_linear).^2 ... + +abs(E_field.right).^2 - abs(E_field.right - (1i)*dEdz_right).^2 ... + +abs(E_field.left).^2 - abs(E_field.left - (1i)*dEdz_left).^2; + total_absorption=sum(total_absorption_v); endfunction |