summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compass.m17
-rw-r--r--compass_output_results.m74
-rw-r--r--output_results.m2
3 files changed, 62 insertions, 31 deletions
diff --git a/compass.m b/compass.m
index 8e5f2de..5562df7 100644
--- a/compass.m
+++ b/compass.m
@@ -78,13 +78,20 @@ E_field.linear = coord_transf_m(3,1)*E_field_lab.x + coord_transf_m(3,2)*E_field
fprintf (stderr, "tuning laser in forloop to set conditions vs detuning\n");
fflush (stderr);
-detuning_freq=[-.75, -.5, -.25, 0 , .25, .5 , .75, 1.0];
+detuning_freq=[-.075, -.05, -.025, 0 , .025, .05 , .075, .1];
problem_cntr=1;
-N_angle_steps=5;
+N_angle_steps=15;
min_angle=0; max_angle=pi/2;
-for theta=min_angle:((max_angle-min_angle)/N_angle_steps):max_angle;
+phis=min_angle:((max_angle-min_angle)/N_angle_steps):max_angle;
+for phi=phis;
for detuning_p_cntr=1:length(detuning_freq);
+ % we define light as linearly polarized
+ % where phi is angle between light polarization and axis x
+ E_field_lab.x=cos(phi)*E_field_lab.linear;
+ E_field_lab.y=sin(phi)*E_field_lab.linear;
+ E_field_lab.z=E_field_zero;
+ % now we transfor x,y,z, to x',y', and z' with respect to magnetic field az z' axis
coord_transf_m = lin2circ * oldlin2newlin(theta);
E_field.right = coord_transf_m(1,1)*E_field_lab.x + coord_transf_m(1,2)*E_field_lab.y + coord_transf_m(1,3)*E_field_lab.z;
E_field.left = coord_transf_m(2,1)*E_field_lab.x + coord_transf_m(2,2)*E_field_lab.y + coord_transf_m(2,3)*E_field_lab.z;
@@ -112,7 +119,7 @@ for theta=min_angle:((max_angle-min_angle)/N_angle_steps):max_angle;
endfor
endfor
-save 'problem_definition.mat' problems_cell_array atom_properties detuning_freq ;
+save '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
@@ -123,7 +130,7 @@ total_absorption_vs_detuning=parcellfun(2, @total_field_absorption, problems_cel
%save 'xi_vs_detuning.mat' detuning_freq xi_linear xi_left xi_right ;
problem_cntr--;
-save 'total_absorption_vs_detuning.mat' detuning_freq total_absorption_vs_detuning theta problem_cntr;
+save '/tmp/total_absorption_vs_detuning_and_angle_phi.mat' detuning_freq total_absorption_vs_detuning phis problem_cntr;
compass_output_results;
diff --git a/compass_output_results.m b/compass_output_results.m
index 38ae693..306f2ac 100644
--- a/compass_output_results.m
+++ b/compass_output_results.m
@@ -1,33 +1,57 @@
1;
-load 'total_absorption_vs_detuning.mat' ;
+load '/tmp/total_absorption_vs_detuning_and_angle_phi.mat' ;
+
+% let's create sideband transmission vs angle vectors
+% 1st of all we need to create matrix instead of a vector
+% with rows corresponding to absorption for each sideband
+% and columns to each phi angle
+
+N_detunings=length(detuning_freq);
+N_angles=length(phis);
+
+absorption_matrix=reshape(total_absorption_vs_detuning, N_detunings, N_angles);
+
+% the last sideband is not in two-photon resonance
+% we use it as a reference for background transmission
+background_vector=absorption_matrix(N_detunings,:);
+background_absorption=repmat( background_vector , N_detunings, 1);
+
+transmission_matrix=background_absorption-absorption_matrix;
+
+
+
+line_colors= [ ...
+ [ 0, 0, 1]; ...
+ [ 1, 0, 0]; ...
+ [ 0, 1, 0]; ...
+ [ 0, 0, 0]; ...
+ [ 0, 0.8, 0]; ...
+ [ 1, 0, 1]; ...
+ [ 0, 0, .8] ...
+ ];
figure(1);
+clf();
hold off;
-max_abs=max(total_absorption_vs_detuning);
-zoom_factor=1/max_abs;
-%plot(detuning_freq, zoom_factor*(max_abs- total_absorption_vs_detuning), '-');
-plot( zoom_factor*(max_abs- total_absorption_vs_detuning), '-');
+labels={};
+for i=1:N_detunings-1
+ %we will skip the very last row since it the reference transmission
+
+ zoom_factor=1;
+ %plot_style=strcat("-", num2str(i));
+ %plot( phis, zoom_factor*(transmission_matrix(i,:)), plot_style);
+ labels = {labels{:}, strcat("Sideband ", num2str(i-4))};
+ line( phis, zoom_factor*(transmission_matrix(i,:)), "color", line_colors(i,:) );
+ hold on;
+endfor
+
title("relative transmission");
-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;
+xlabel("angle");
+ylabel("amplitude");
+legend(labels);
+
+hold off;
+% vim: ts=2:sw=2:fdm=indent
diff --git a/output_results.m b/output_results.m
index fba2be1..0dc6555 100644
--- a/output_results.m
+++ b/output_results.m
@@ -6,7 +6,7 @@ load 'total_absorption_vs_detuning.mat' ;
figure(1);
hold off;
max_abs=max(total_absorption_vs_detuning);
-zoom_factor=1/max_abs;
+zoom_factor=1;
plot(detuning_freq, zoom_factor*(max_abs- total_absorption_vs_detuning), '-');
title("relative transmission");
xlabel("two photon detuning");