summaryrefslogtreecommitdiff
path: root/compass_lin_extrema_vs_theta_output_results.m
blob: 44b20df60b762d442a72999eb392c5732aab63c2 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
1;


load './cached/total_lin_relative_transmission_vs_theta.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(thetas);

transmission_matrix=reshape(total_relative_transmission, N_detunings, N_angles);

% the last sideband is not in two-photon resonance
% we use it as a reference for background transmission
background_vector=transmission_matrix(N_detunings,:);
background_transmission=repmat( background_vector , N_detunings, 1);

transmission_matrix=-background_transmission+transmission_matrix;

% Resonances amplitude
am3 = (transmission_matrix(1,:)); % a_{-3}
am2 = (transmission_matrix(2,:)); % a_{-2}
am1 = (transmission_matrix(3,:)); % a_{-1}
a0  = (transmission_matrix(4,:)); % a0
ap1 = (transmission_matrix(5,:)); % a_1
ap2 = (transmission_matrix(6,:)); % a_2
ap3 = (transmission_matrix(7,:)); % a_3


line_colors= [ ...
	[ 0,   0,   1]; ...
	[ 1,   0,   0]; ...
	[ 0,   1,   0]; ...
	[ 0,   0,   0]; ...
	[ 0, 0.8,   0]; ...
	[ 1,   0,   1]; ...
	[ 0,   0,  .6] ...
	];

figure(1);
if (~exist('keep','var') || ~keep)
clf();
end
hold off;
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( thetas, zoom_factor*(transmission_matrix(i,:)), plot_style);  
	labels = {labels{:}, strcat("a_{", num2str(i-4), "}")};
	line( thetas, zoom_factor*(transmission_matrix(i,:)), "color", line_colors(i,:) );  
	hold on;
endfor
  
set(gca, 'XTick', [0,pi/4, pi/2, 3*pi/4, pi])
set(gca, 'XTickLabel', {'0', '\pi/4', '\pi/2', '3\pi/4', '\pi'})
title("Relative sidebands amplitudes");
xlabel('Angle \theta between B-field and light propagation direction');
ylabel("Amplitude");
legend(labels);
print('compass_lin_sidebands_vs_theta.png')

hold off;

figure(2)
if (~exist('keep','var') || ~keep)
clf();
end
%   resonance   -3   -2   -1   0   1   2   3
%   index        1    2    3   4   5   6   7
j=4; k= 3;
j=6; k= 7;
j=4; k= 7;
% plotting parametric line of a sideband amplitude (j) vs another one (k)
z = zeros(1,N_angles);
col = thetas;  % This is the color, vary with x in this case.
x_combo = ap3./(a0+ap3);
y_combo = ap2./(a0+ap2);
eps=2e-5;
ind= abs(a0+ap3)<eps;
x_combo(ind)=1;
%y_combo(ind)=0;
%x_combo = peak_1;
%y_combo = peak_2;
ind=(thetas<=pi/2);

surface([x_combo(ind);x_combo(ind)], ...
  [y_combo(ind);y_combo(ind)], ...
  [z(ind);z(ind)],[col(ind);col(ind)],...
  'facecol','no',...
  'edgecol','interp',...
  'linew',2);
%surface([x_combo;x_combo], ...
  %[y_combo;y_combo], ...
  %[z;z],[col;col],...
  %'facecol','no',...
  %'edgecol','interp',...
  %'linew',2);
%plot(zoom_factor*(transmission_matrix(j,:)), zoom_factor*(transmission_matrix(k,:)))
%xlabel( labels{j});
%ylabel( labels{k});
xlabel('Sideband ratio: a_3/(a_0+a_3)');
ylabel('Sideband ratio: a_2/(a_0+a_2)');
%clabel('\theta');
cbh=colorbar;
colormap('jet');
ceps=4e-2; % somehow it does not show if it is flashed
set(cbh,'YTick', [0,pi/4, pi/2-ceps]); % y octave uses YTick for colorbar?
set(cbh,'YTickLabel', {'0', '\pi/4', '\pi/2'})
title(cbh,'\theta')
%set(gca, 'ZTick', [0,pi/4, pi/2, 3*pi/4, pi])
%set(gca, 'ZTickLabel', {'0', '\pi/4', '\pi/2', '3\pi/4', '\pi'})

%colorbar('Ticks',[0, pi/2, pi], 'TicksLabels', ['0', '\pi/2', '\pi'])
%ctickslabel(['0', '\pi/2', '\pi'])
title('Phase diagram for different \theta');
print('compass_lin_sidebands_phase_diagram_vs_theta.png')

figure(3)
if (~exist('keep','var') || ~keep)
clf();
end
hold all;

plot(thetas, (x_combo))
set(gca, 'XTick', [0,pi/4, pi/2, 3*pi/4, pi])
set(gca, 'XTickLabel', {'0', '\pi/4', '\pi/2', '3\pi/4', '\pi'})
title('Sideband ratio: a_3/(a_0+a_3)');
xlabel('Angle \theta between B-field and light propagation direction');
ylabel('Ratio');
ylim([0:1]);
print('compass_lin_sidebands_ratio_vs_theta.png')


% vim: ts=2:sw=2:fdm=indent