summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2011-11-16 14:49:14 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2020-09-21 16:29:52 -0400
commit46ed078564656957a69e52b69922bfa6a52488ad (patch)
treeffa5538adc6b2cfc9d8bff7602c8583e9c307f96
parent4c4d562bc5c87deb828ede01a27b3fa9132f580e (diff)
downloadmulti_mode_eit-46ed078564656957a69e52b69922bfa6a52488ad.tar.gz
multi_mode_eit-46ed078564656957a69e52b69922bfa6a52488ad.zip
faraday works now
-rw-r--r--faraday/faraday_vs_B.m23
-rw-r--r--faraday/output_faraday_results_vs_B.m16
-rw-r--r--faraday/run_me.m25
3 files changed, 47 insertions, 17 deletions
diff --git a/faraday/faraday_vs_B.m b/faraday/faraday_vs_B.m
index 11ba11b..733657e 100644
--- a/faraday/faraday_vs_B.m
+++ b/faraday/faraday_vs_B.m
@@ -14,6 +14,9 @@ detuning_p=0;
N_steps=length(B_fields)
kappa_p =zeros(1,N_steps+1);
kappa_m =zeros(1,N_steps+1);
+xi_linear=zeros(1,N_steps);
+xi_left =zeros(1,N_steps);
+xi_right =zeros(1,N_steps);
% load useful functions;
useful_functions;
@@ -26,7 +29,7 @@ basis_transformation; % load subroutines
fprintf (stderr, "tuning laser in forloop to set conditions vs detuning\n");
fflush (stderr);
for B_field_cntr=1:N_steps;
- B_field=B_fields(B_field_cntr);
+ B_field=B_fields(B_field_cntr)
% load atom energy levels and decay description
rb87_D1_line;
@@ -121,18 +124,20 @@ for B_field_cntr=1:N_steps;
atom_field_problem.modulation_freq = modulation_freq;
atom_field_problem.freq_index = freq_index;
- problems_cell_array{B_field_cntr}=atom_field_problem;
-
-endfor
-
+ problems_cell_array=atom_field_problem;
+
save '/tmp/problem_definition.mat' problems_cell_array atom_properties detuning_freq ;
fprintf (stderr, "now really hard calculations begin\n");
fflush (stderr);
-% once we define all problems the main job is done here
-[xi_linear, xi_left, xi_right]=parcellfun(2, @susceptibility_steady_state_at_freq, problems_cell_array);
-%[xi_linear, xi_left, xi_right]=cellfun( @susceptibility_steady_state_at_freq, problems_cell_array);
+ [xi_linear_i, xi_left_i, xi_right_i]=susceptibility_steady_state_at_freq( problems_cell_array);
+ %[xi_linear, xi_left, xi_right]=cellfun( @susceptibility_steady_state_at_freq, problems_cell_array);
+ xi_left(B_field_cntr)=xi_left_i;
+ xi_right(B_field_cntr)=xi_right_i;
+ xi_linear(B_field_cntr)=xi_linear_i;
+
+endfor
-save '/tmp/xi_vs_B.mat' detuning_freq xi_linear xi_left xi_right E_field_pos_freq E_field_probe B_field psi_el;
+save '/tmp/xi_vs_B.mat' detuning_freq xi_linear xi_left xi_right E_field_pos_freq E_field_probe B_fields psi_el;
psr_rad=output_faraday_results_vs_B;
diff --git a/faraday/output_faraday_results_vs_B.m b/faraday/output_faraday_results_vs_B.m
index 96e0a5e..8387a92 100644
--- a/faraday/output_faraday_results_vs_B.m
+++ b/faraday/output_faraday_results_vs_B.m
@@ -19,25 +19,25 @@ Ineg=(abs(Ex).^2)/2;
figure(1);
hold off;
-plot(detuning_freq, real(xi_left-xi_right), '-');
+plot(B_fields, real(xi_left-xi_right), '-');
title("differential real xi");
xlabel("two photon detuning (MHz)");
figure(2);
hold off;
-plot(detuning_freq, imag(xi_left-xi_right), '-');
+plot(B_fields, imag(xi_left-xi_right), '-');
title("differential imag xi");
xlabel("two photon detuning (MHz)");
figure(3);
hold off;
-plot(detuning_freq, real(xi_left), '-', detuning_freq, real(xi_right), '-');
+plot(B_fields, real(xi_left), '-', detuning_freq, real(xi_right), '-');
title("real xi");
xlabel("two photon detuning (MHz)");
figure(4);
hold off;
-plot(detuning_freq, imag(xi_left), '-', detuning_freq, imag(xi_right), '-');
+plot(B_fields, imag(xi_left), '-', detuning_freq, imag(xi_right), '-');
title("imag xi");
xlabel("two photon detuning (MHz)");
@@ -45,15 +45,15 @@ figure(5);
hold off;
I_probe=E_field_probe^2;
psr_rad=(Ipos-Ineg)/(2*I_probe);
-plot(detuning_freq, psr_rad, '-');
-subt_str=sprintf("Laser Rabi freq normalized to upper state decay %.3f, ellipticity %.1f degree, \n B field ground level splitting %.3f Gauss", I_probe, psi_el*180/pi, B_field);
+plot(B_fields, psr_rad, '-');
+subt_str=sprintf("Laser Rabi freq normalized to upper state decay %.3f, ellipticity %.1f degree, \n B field ground level splitting %.3f Gauss", I_probe, psi_el*180/pi, detuning_freq);
title(cstrcat("BPD normilized PSR signal at F_g=2 to F_e=1,2.\n ",subt_str) );
xlabel("two photon detuning (MHz)");
ylabel("PSR (radians)");
print("psr_vs_detuning.ps");
-fname= sprintf("psr_vs_detuning_Fg=2toFe=1,2_Ip=%.3f_el_%.1f_B=%.3fG.mat", I_probe, psi_el*180/pi,B_field);
-save(fname,'detuning_freq', 'psr_rad');
+fname= sprintf("psr_vs_B_Fg=2toFe=1,2_Ip=%.3f_el_%.1f_detun=%.3fMHz.mat", I_probe, psi_el*180/pi,detuning_freq);
+save(fname,'B_fields', 'psr_rad', 'xi_left', 'xi_right', 'xi_linear');
return;
diff --git a/faraday/run_me.m b/faraday/run_me.m
new file mode 100644
index 0000000..8a29973
--- /dev/null
+++ b/faraday/run_me.m
@@ -0,0 +1,25 @@
+data_dir='results/';
+output_dir='results/';
+detuning_freq=0;
+
+gmg=.7; % gyro magnetic ration for ground level
+zeeman_splitting=+0.1;
+Nsteps=100;
+B_fields=linspace(-zeeman_splitting/gmg, zeeman_splitting/gmg, Nsteps);
+
+%[psr_rad]=psr_vs_detuning(Ep, psi_el, B_field, theta, phi)
+
+% phi is angle between linear polarization and axis x
+%phi=pi/4;
+phi=0;
+% theta is angle between lab z axis (light propagation direction) and magnetic field axis (z')
+theta=0;
+% psi_el is the ellipticity parameter (phase difference between left and right polarization)
+psi_el=-30/180*pi*e-8;
+
+Ep=sqrt(0.1);
+
+%[psr_rad_smEp_pos_el]=psr_vs_detuning(detuning_freq, Ep, psi_el, B_field, theta, phi) ;
+[psr_rad_smEp_pos_el]=faraday_vs_B(detuning_freq, Ep, psi_el, B_fields, theta, phi) ;
+
+plot(B_fields, psr_rad_smEp_pos_el)