diff options
Diffstat (limited to 'psr')
-rw-r--r-- | psr/psr_vs_detuning.m (renamed from psr/psr.m) | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/psr/psr.m b/psr/psr_vs_detuning.m index 5631791..3e1b956 100644 --- a/psr/psr.m +++ b/psr/psr_vs_detuning.m @@ -1,5 +1,12 @@ -1; -clear all; +function [psr_rad]=psr_vs_detuning(detuning_freq, Ep, psi_el, B_field, theta, phi) +% calculates psr in rad vs detunings of the probe field +% for given laser probe and B field. +% Probe field defined by field strength (Ep) and ellipticity angle (pse_el) +% Magnetic field defined by magnitude (B_field) and angles theta and phi. +% +% Note: it is expensive to recalculate atom property for each given B_field strength +% so run as many calculation for constant magnetic field as possible + t0 = clock (); % we will use this latter to calculate elapsed time @@ -19,7 +26,7 @@ rb87_D1_line; %two_levels; % load EM field description -field_description; +%field_description; %Nfreq=length(modulation_freq); @@ -27,16 +34,12 @@ field_description; %tune probe frequency detuning_p=0; -N_detun_steps=100; %detuning_p_min=-B_field*gmg*4; % span +/-4 Zeeman splitting -detuning_p_min=-200.0; -detuning_p_max=-detuning_p_min; -detuning_p_max=1000; -detuning_freq=linspace(detuning_p_min,detuning_p_max,N_detun_steps); %detuning_freq=zeros(1,N_detun_steps+1); +N_detun_steps=length(detuning_freq); kappa_p =zeros(1,N_detun_steps+1); kappa_m =zeros(1,N_detun_steps+1); -detun_step=(detuning_p_max-detuning_p_min)/N_detun_steps; +%detun_step=(detuning_p_max-detuning_p_min)/N_detun_steps; fprintf (stderr, "calculating atom properties\n"); fflush (stderr); @@ -89,11 +92,11 @@ E_field_lab_pos_freq.linear = E_field_zero + (1.00000+0.00000i)*E_field_probe + %E_field_lab_pos_freq.left = E_field_zero + (0.00000+0.00000i)*E_field_probe + (0.00000+0.00000i)*E_field_drive; % phi is angle between linear polarization and axis x -phi=pi*2/8; +%phi=pi*2/8; % theta is angle between lab z axis (light propagation direction) and magnetic field axis (z') -theta=0; +%theta=0; % psi_el is the ellipticity parameter (phase difference between left and right polarization) -psi_el=-5/180*pi; +%psi_el=-30/180*pi; % we define light as linearly polarized % where phi is angle between light polarization and axis x @@ -142,10 +145,11 @@ fflush (stderr); %[xi_linear, xi_left, xi_right]=cellfun( @susceptibility_steady_state_at_freq, problems_cell_array); %save '/tmp/relative_transmission_vs_detuning.mat' detuning_freq relative_transmission_vs_detuning; -save '/tmp/xi_vs_detuning.mat' detuning_freq xi_linear xi_left xi_right E_field_pos_freq E_field_probe ; +save '/tmp/xi_vs_detuning.mat' detuning_freq xi_linear xi_left xi_right E_field_pos_freq E_field_probe B_field psi_el; -output_psr_results_vs_detuning; +psr_rad=output_psr_results_vs_detuning; elapsed_time = etime (clock (), t0) +return % vim: ts=2:sw=2:fdm=indent |