-
Notifications
You must be signed in to change notification settings - Fork 3
/
gmtAsm.m
executable file
·89 lines (80 loc) · 1.62 KB
/
gmtAsm.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
function zActuator = gmtAsm(norm)
if nargin<0
norm = 1;
end
radialPitchOnAxis = [...
53.03;
35.35;
35.34;
35.33;
35.32;
35.31;
35.29;
35.27;
35.25;
35.23;
35.20;
35.17;
35.14;
35.11];
radialPitchOffAxis = [...
52.86;
35.49;
35.49;
35.48;
35.47;
35.46;
35.44;
35.43;
35.41;
35.39;
35.37;
35.34;
35.31;
35.28];
nActuatorRing = [...
9;
15;
21;
27;
33;
39;
45;
51;
57;
63;
69;
75;
81;
87];
nRing = length(nActuatorRing);
nActuator = sum(nActuatorRing);
% asmD = 1.06;
gmt = giantMagellanTelescope;
sumRadialPitchOnAxis = 1e-3*cumsum(radialPitchOnAxis)*gmt.segmentD/1062.80e-3;
sumRadialPitchOffAxis = 1e-3*cumsum(radialPitchOffAxis)*gmt.segmentD/1053.77e-3;
% diff(sumRadialPitchOnAxis)
% diff(sumRadialPitchOffAxis)
zActuator = zeros(nActuator,7);
for kSegment=1:7
u = 0;
for kRing = 1:nRing
u = (1:nActuatorRing(kRing)) + u(end);
o = 2*pi*(0:nActuatorRing(kRing)-1)/nActuatorRing(kRing);
if kRing==1
r = ones(1,nActuatorRing(kRing))*sumRadialPitchOnAxis(kRing);
else
r = ones(1,nActuatorRing(kRing))*sumRadialPitchOffAxis(kRing);
end
zActuator(u,kSegment) = r.*exp(1i*o) + gmt.segmentCoordinate(kSegment);
end
end
% zActuator = zActuator(:);
% zActuator(abs(zActuator)<giantMagellanTelescope.centralObscurationD/2) = [];
zActuator = zActuator/norm;
figure
h = polar(angle(zActuator),abs(zActuator),'r.');
set(h,'markersize',10)
% polar(o,rOnAxis,'rx')
% hold
% polar(o,rOffAxis,'b+')