diff options
-rw-r--r-- | liouville.m | 6 | ||||
-rw-r--r-- | output_results.m | 44 | ||||
-rw-r--r-- | useful_functions.m | 40 |
3 files changed, 71 insertions, 19 deletions
diff --git a/liouville.m b/liouville.m index 29b07f9..fd991a5 100644 --- a/liouville.m +++ b/liouville.m @@ -87,9 +87,11 @@ fflush (stderr); % once we define all problems the main job is done here %kappa_p=cellfun( @susceptibility_steady_state_at_freq, problems_cell_array); %kappa_p=parcellfun(2, @susceptibility_steady_state_at_freq, problems_cell_array); -[xi_linear, xi_left, xi_right]=parcellfun(2, @susceptibility_steady_state_at_freq, problems_cell_array); +%[xi_linear, xi_left, xi_right]=parcellfun(2, @susceptibility_steady_state_at_freq, problems_cell_array); +total_absorption_vs_detuning=parcellfun(2, @total_field_absorption, problems_cell_array); -save 'xi_vs_detuning.mat' detuning_freq xi_linear xi_left xi_right ; +%save 'xi_vs_detuning.mat' detuning_freq xi_linear xi_left xi_right ; +save 'total_absorption_vs_detuning.mat' detuning_freq total_absorption_vs_detuning; output_results; diff --git a/output_results.m b/output_results.m index a743707..22bab0b 100644 --- a/output_results.m +++ b/output_results.m @@ -1,21 +1,31 @@ 1; -load 'xi_vs_detuning.mat' ; -figure(1); - hold off; - plot(detuning_freq, imag(xi_linear), '-1;linear;'); - hold on; - plot(detuning_freq, imag(xi_left), '-2;left;'); - plot(detuning_freq, imag(xi_right), '-3;right;'); - title("probe absorption"); - hold off; -figure(2); - hold off; - plot(detuning_freq, real(xi_linear), '-1;linear;'); - hold on; - plot(detuning_freq, real(xi_left), '-2;left;'); - plot(detuning_freq, real(xi_right), '-3;right;'); - title("probe dispersion"); - hold off; +load 'total_absorption_vs_detuning.mat' ; + +zoom_factor=1e3; +figure(1); +hold off; +plot(detuning_freq, zoom_factor*total_absorption_vs_detuning, '-'); +title("total absorption"); +xlabel("two photon detuning"); + +%load 'xi_vs_detuning.mat' ; + +%figure(1); + %hold off; + %plot(detuning_freq, imag(xi_linear), '-1;linear;'); + %hold on; + %plot(detuning_freq, imag(xi_left), '-2;left;'); + %plot(detuning_freq, imag(xi_right), '-3;right;'); + %title("probe absorption"); + %hold off; +%figure(2); + %hold off; + %plot(detuning_freq, real(xi_linear), '-1;linear;'); + %hold on; + %plot(detuning_freq, real(xi_left), '-2;left;'); + %plot(detuning_freq, real(xi_right), '-3;right;'); + %title("probe dispersion"); + %hold off; diff --git a/useful_functions.m b/useful_functions.m index 22c54be..f799f90 100644 --- a/useful_functions.m +++ b/useful_functions.m @@ -258,4 +258,44 @@ function [xi_linear, xi_left, xi_right]=susceptibility_steady_state_at_freq( ato xi_left = xi.left; endfunction +function [dEdz_coef_linear, dEdz_coef_left, dEdz_coef_right] =dEdz_at_freq(wi, rhoLiouville, dipole_elements, E_field) +% complex absorption coefficient +% at given E_field frequency component + Nlevels=( size(dipole_elements.linear)(1) ); + rho=rhoOfFreq(rhoLiouville, wi, Nlevels); + + dEdz_coef_linear = sum( sum( transpose(dipole_elements.linear) .* rho ) ); + dEdz_coef_left = sum( sum( transpose(dipole_elements.left) .* rho ) ); + dEdz_coef_right = sum( sum( transpose(dipole_elements.right) .* rho ) ); + +endfunction + +function [dEdz_linear, dEdz_left, dEdz_right]=dEdz( atom_field_problem) +% complex absorption coefficient for each field + 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 ; + Nfreq=length(modulation_freq); + + rhoLiouville=rhoLiouville_steady_state(L0m, polarizability_m, E_field, modulation_freq); + for wi=1:Nfreq + [dEdz_linear(wi), dEdz_left(wi), dEdz_right(wi)] = dEdz_at_freq(wi, rhoLiouville, dipole_elements, E_field); + endfor +endfunction + +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); +endfunction + + % vim: ts=2:sw=2:fdm=indent |