From 025df36dde29d913c5f43456ee5da2a9418d242d Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Fri, 2 Oct 2020 12:08:14 -0400 Subject: streamlined and cache change --- compass_lin.m | 17 +++++++++-------- compass_lin_extrema_vs_theta.m | 4 ++-- compass_lin_output_results.m | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/compass_lin.m b/compass_lin.m index 3fdad6b..b4bdb48 100644 --- a/compass_lin.m +++ b/compass_lin.m @@ -67,8 +67,9 @@ E_field_lab_pos_freq.linear = E_field_zero + (1.00000+0.00000i)*E_field_probe + % phi is angle between linear polarization and axis x phi=pi*2/8; % theta is angle between lab z axis (light propagation direction) and magnetic field axis (z') -theta=0/4; -theta=pi/2; +%theta=0/4; +%theta=pi/2; +theta=pi/4; %theta=65/180*pi; %small ellipticity angle psi (0 to pi/2) @@ -88,9 +89,9 @@ fflush (stderr); detuning_freq=[-.075, -.05, -.025, 0 , .025, .05 , .075, .1]; problem_cntr=1; -N_angle_steps=31; +N_angle_steps=101; min_angle=0; max_angle=pi; -phis=min_angle:((max_angle-min_angle)/N_angle_steps):max_angle; +phis=linspace(min_angle,max_angle, N_angle_steps); for phi=phis; for detuning_p_cntr=1:length(detuning_freq); @@ -112,10 +113,10 @@ for phi=phis; E_field_lab_pos_freq.z=E_field_zero; - % now we transfor x,y,z, to x',y', and z' with respect to magnetic field az z' axis + % now we transform x,y,z, to x',y', and z' with respect to magnetic field az z' axis E_field_pos_freq=xyz_lin2atomic_axis_polarization(theta, E_field_lab_pos_freq); - % we calculate dc and negative frequiencies as well as amplitudes + % we calculate dc and negative frequencies as well as amplitudes [modulation_freq, E_field] = ... light_positive_frequencies_and_amplitudes2full_set_of_modulation_frequencies_and_amlitudes(... light_positive_freq, E_field_pos_freq); @@ -134,7 +135,7 @@ for phi=phis; endfor endfor -save '/tmp/problem_definition.mat' problems_cell_array atom_properties detuning_freq theta; +%save '/tmp/problem_definition.mat' problems_cell_array atom_properties detuning_freq theta; fprintf (stderr, "now really hard calculations begin\n"); fflush (stderr); % once we define all problems the main job is done here @@ -147,7 +148,7 @@ total_relative_transmission_vs_phi=cellfun(@total_relative_transmission, problem %save 'xi_vs_detuning.mat' detuning_freq xi_linear xi_left xi_right ; problem_cntr--; -save '/tmp/total_relative_transmission_vs_phi.mat' detuning_freq total_relative_transmission_vs_phi phis problem_cntr; +save './cached/total_lin_relative_transmission_vs_phi.mat' detuning_freq total_relative_transmission_vs_phi phis problem_cntr theta psi_el; compass_lin_output_results; diff --git a/compass_lin_extrema_vs_theta.m b/compass_lin_extrema_vs_theta.m index 80f5b02..09f56b3 100644 --- a/compass_lin_extrema_vs_theta.m +++ b/compass_lin_extrema_vs_theta.m @@ -134,7 +134,7 @@ for theta=thetas; endfor endfor -save '/tmp/problem_definition.mat' problems_cell_array atom_properties detuning_freq theta; +%save '/tmp/problem_definition.mat' problems_cell_array atom_properties detuning_freq theta; fprintf (stderr, "now really hard calculations begin\n"); fflush (stderr); % once we define all problems the main job is done here @@ -147,7 +147,7 @@ total_relative_transmission=cellfun(@total_relative_transmission, problems_cell_ %save 'xi_vs_detuning.mat' detuning_freq xi_linear xi_left xi_right ; problem_cntr--; -save './cached/total_lin_relative_transmission_vs_theta.mat' detuning_freq total_relative_transmission thetas problem_cntr; +save './cached/total_lin_relative_transmission_vs_theta.mat' detuning_freq total_relative_transmission thetas problem_cntr phi psi_el; compass_lin_extrema_vs_theta_output_results; diff --git a/compass_lin_output_results.m b/compass_lin_output_results.m index dc840c6..b75788f 100644 --- a/compass_lin_output_results.m +++ b/compass_lin_output_results.m @@ -1,7 +1,7 @@ 1; -load '/tmp/total_relative_transmission_vs_phi.mat' ; +load './cached/total_lin_relative_transmission_vs_phi.mat' % let's create sideband transmission vs angle vectors % 1st of all we need to create matrix instead of a vector -- cgit v1.2.3