-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjones_waveplate_thickness_main_2.m
147 lines (101 loc) · 3.07 KB
/
jones_waveplate_thickness_main_2.m
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
141
142
143
144
145
146
147
%jones_waveplate_thickness_main_2.m
close all;
wavel1 = 1e-6; %wavelength[m]
no = double(1.5); % index of refraction for ordinary ray
ne = double(1.51); % index of refraction for extraordinary ray
is = [1;0]; % input polarization status. holizontal liear polarization
%wp_thickness = [0,0,0]; %[m]
%wp_thickness = [6.25e-6,6.25e-6,6.25e-6]; %[m]
%wp_thickness = [12.5e-6,12.5e-6,12.5e-6]; %[m]
%wp_thickness = [18.75e-6,18.75e-6,18.75e-6]; %[m]
%wp_thickness = [25e-6,25e-6,25e-6]; %[m] 1/2 WP
%wp_thickness = [37.5e-6,37.5e-6,37.5e-6]; %[m]
%wp_thickness = [50e-6,50e-6,50e-6]; %[m]
%wp_thickness = [62.5e-6,62.5e-6,62.5e-6]; %[m]%
%wp_thickness = [75e-6,75e-6,75e-6]; %[m] 3/2 WP
%wp_thickness = [87.5e-6,87.5e-6,87.5e-6]; %[m]
%wp_thickness = [100e-6,100e-6,100e-6]; %[m]
wp_thickness = [0.0e-6, 23e-6, 75e-6]; %[m]
[sizem, sizen] = size(wp_thickness);
%---
% Inplane angle of Waveplate
theta1 = 45;
Ea_matrix = zeros(2,sizen);
for ii = 1:sizen
Ea_matrix(:,ii) = jones_waveplate_func(wavel1,no,ne,wp_thickness(1,ii),theta1, is);
% wavel1, no,ne, octwp,theta1,in
end
%---
% Rotation angle : theta2
theta2 = 0;
Eb_matrix = zeros(2,sizen);
for ii = 1:sizen;
Eb_matrix(:,ii) = jones_faradayrotator_func(theta2, Ea_matrix(:,ii));
% theta1,in
end
%---
s = 720;
Eb_x = zeros(s,sizen); Eb_y = zeros(s,sizen);
for ii = 1:sizen
for c = 1:s
d1 = 0.000000001*c;
Eb_x(c,ii)=jones_propagate_func(wavel1,1.5,d1,Eb_matrix(1,ii));
Eb_y(c,ii)= jones_propagate_func(wavel1,1.5,d1,Eb_matrix(2,ii));
end
end
hFig1 = figure(1);
set(hFig1, 'Position', [1300 700 500 300])
p1 = plot(real(Eb_x(:,1)),real(Eb_y(:,1)),...
real(Eb_x(:,2)),real(Eb_y(:,2)),...
real(Eb_x(:,3)),real(Eb_y(:,3)));
xlim([-1 1]); ylim([-1 1]);
%---
% Polarimeter is composed of rotating QWP, fixed polarizer and detector.
Px = zeros(s,sizen); % P: Power
angle1_col=zeros(s,1); % Angle of QWP
qwp_thickness = 25e-6;
for ii = 1:sizen
for cc = 1:s
%
angle1 = 2*cc;
angle1_col(cc,1)= angle1;
Ec=jones_waveplate_func(wavel1,no,ne,qwp_thickness,angle1,Eb_matrix(:,ii));
Px(cc,ii) = (abs(Ec(1,1)))^2; % X axis
%
end
end
%
hFig2 = figure(2);
set(hFig2, 'Position', [1300 400 500 300])
p2=plot(angle1_col, Px(:,1),angle1_col, Px(:,2),angle1_col, Px(:,3));
%xlim([0 360])
ylim([0 1])
%---
fftPx = fft(Px);
absfftPx = abs(fftPx);
realfftPx = real(fftPx);
imagfftPx = imag(fftPx);
anglefftPx = zeros(s,sizen);
for ii = 1:sizen
for jj = 1:s
if absfftPx(jj,ii) > 1
anglefftPx(jj,ii) = angle(fftPx(jj,ii)).*180/pi;
else
anglefftPx(jj,ii) = 0;
end
end
end
hfig3 = figure(3);
set(hfig3, 'Position', [800 400 500 300])
p3 = plot(absfftPx);
%p3=plot(f,P1);
p3(1).Marker = '*'; p3(2).Marker = 'o'; p3(3).Marker = '+';
xlim([0 50])
ylabel('Absolute Intensity')
%---
hfig4 = figure(4);
set(hfig4, 'Position', [800 100 500 300])
p4 = plot(anglefftPx);
p4(1).Marker = '*'; p4(2).Marker = 'o'; p4(3).Marker = '+';
xlim([0 50])
ylabel('Phase/Degree')