summaryrefslogtreecommitdiff
path: root/faraday/tasks_builder.m
blob: 3cc76b99bf2e978db88585e6ad783fd7eaf076f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/octave -qf

task_dir='tasks/';
task_base_name='task_';
task_ext='.mat';
data_dir='results/';
output_dir='results/';
detuning_freq=0;


% assign some defaults
gmg=.7; % gyro magnetic ration for ground level

%[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=pi/2;
% 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=0/180*pi*e-8;

Ep=sqrt(0.1);

% we are going to sweep B so parts related to sweep paramer(s)
zeeman_splitting=+0.1;
Nsteps=100;
B_fields=linspace(-zeeman_splitting/gmg, zeeman_splitting/gmg, Nsteps);

for i=1:Nsteps
	filename_task=strcat(task_dir, task_base_name);
	i_str=num2str(i, "%04d");
	filename_task=strcat(filename_task,i_str, task_ext);
	B_field = B_fields(i);
	save(filename_task, 'detuning_freq', 'Ep', 'psi_el', 'B_field', 'theta', 'phi');
endfor

disp("Tasks creation done");