diff options
Diffstat (limited to 'faraday/faraday_vs_B.m')
-rw-r--r-- | faraday/faraday_vs_B.m | 23 |
1 files changed, 14 insertions, 9 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; |