forked from frankNiessen/crystalAligner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exampleHeaders.m
212 lines (208 loc) · 22.5 KB
/
exampleHeaders.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
%% Example E1
%Single alignments of the {111} and {100} plane normals in a single cubic
%crystal with the z-Axis of the microscope
% *** Crystal Alignment Objective 1
crys.o(1,:) = [313 15 137]; %Crystal orientation in Euler angles [pih1 Phi phi2]
crys.cs{1} = 'cubic'; %Crystal structure string (follow MTEX convention)
crys.alignAx(1) = zvector; %Microscope axis for alignment with crystal direction/plane; Examples: zvector; [.5 .5 1]; xvector; ...
crys.Miller{1} = [1 1 1; 1 0 0]; %Miller indices for alignment (in Multiobjective Optimization several Miller-sets will start several optimizations); Examples: [1 0 0; 1 1 0]; [-1 2 1]; ...
crys.type{1} = 'hkl'; %Type of Miller: 'hkl': Crystal plane; 'uvw': Crystal direction
crys.sym(1) = 1; %Apply crystal symmetry: 1: yes 0: no
% ******************************* Stage ***********************************
stg.rot = [xvector; zvector]; %Stage rotation axes
stg.LB = [ 0 -180 ]; %Lower bound [°]
stg.UB = [ 20 180 ]; %Upper bound [°]
stg.sign = [ 1 -1 ]; %Sign 1: Right hand rule convention; -1: Left hand rule convention
stg.order = [ 2 1 ]; %Hierarchy / order of rotation: Rotation 1 before 2 before 3; Example: [3 1 2];
% ************************* Genetic algorithm *****************************
%Genetic algorithm
optim.popSz = 100; %Population size
optim.funcTol = 0.1; %FunctionTolerance
optim.maxStallGen = 10; %Maximum stall generations
optim.iterOut = 0; %Writing output for each iteration in subFolder 'iterOut'
%Multiobjective genetic algorithm settings
optim.wghtFac = [1,1]; %Weighting factors for TOPSIS multiobjective decision making method
optim.multiCore = 0; %Flag: Utilization of parallel processing (switch off if errors ocur) [1|0]
optim.hybridFcn = 0; %Flag: Use a hybrid function to (may speed op convergence but compromise diversity of solution space) [1|0]
optim.autoSol = 1; %Flag: Pick optimum solution automatically by distance of Pareto solution from the optimal solution [1|0]
% ***************************** Optional **********************************
%FIB liftout calculations
FIB.mode = 0; %Flag: FIB liftout output [1|0]
FIB.trench.ang = 52; %Trenching - or look-in - angle of Trench [°]
FIB.trench.z = 15; %Trench depth 'z' [µm]
FIB.axs.tilt = 1; %Index of tilt axis in 'axs.rot'
FIB.axs.rot = 2; %Index of rotation axis in 'axs.rot'
%Output
optim.plot = 1; %Plotting 1: On 0: Off
%% Example E2
%Concurrent alignment of the <113> and <110> directions in a single cubic
%crystal with the y-Axis and z-Axis of the microscope, respectively.
% ****************************** Crystals *********************************
% *** Crystal Alignment Objective 1
crys.o(1,:) = [61 42 9]; %Crystal orientation in Euler angles [pih1 Phi phi2]
crys.cs{1} = 'cubic'; %Crystal structure string (follow MTEX convention)
crys.alignAx(1) = yvector; %Microscope axis for alignment with crystal direction/plane; Examples: zvector; [.5 .5 1]; xvector; ...
crys.Miller{1} = [1 1 3]; %Miller indices for alignment (in Multiobjective Optimization several Miller-sets will start several optimizations); Examples: [1 0 0; 1 1 0]; [-1 2 1]; ...
crys.type{1} = 'uvw'; %Type of Miller: 'hkl': Crystal plane; 'uvw': Crystal direction
crys.sym(1) = 1; %Apply crystal symmetry: 1: yes 0: no
% *** Crystal Alignment Objective 2
crys.o(2,:) = [61 42 9]; %Crystal orientation in Euler angles [pih1 Phi phi2]
crys.cs{2} = 'cubic'; %Crystal structure string (follow MTEX convention)
crys.alignAx(2) = zvector; %Microscope axis for alignment with crystal direction/plane; Examples: zvector; [.5 .5 1]; xvector; ...
crys.Miller{2} = [1 1 0]; %Miller indices for alignment (in Multiobjective Optimization several Miller-sets will start several optimizations); Examples: [1 0 0; 1 1 0]; [-1 2 1]; ...
crys.type{2} = 'uvw'; %Type of Miller: 'hkl': Crystal plane; 'uvw': Crystal direction
crys.sym(2) = 1; %Apply crystal symmetry: 1: yes 0: no
% ******************************* Stage ***********************************
stg.rot = [xvector; zvector]; %Stage rotation axes
stg.LB = [ 0 -180 ]; %Lower bound [°]
stg.UB = [ 20 180 ]; %Upper bound [°]
stg.sign = [ 1 -1 ]; %Sign 1: Right hand rule convention; -1: Left hand rule convention
stg.order = [ 2 1 ]; %Hierarchy / order of rotation: Rotation 1 before 2 before 3; Example: [3 1 2];
% ************************* Genetic algorithm *****************************
%Genetic algorithm
optim.popSz = 100; %Population size
optim.funcTol = 0.1; %FunctionTolerance
optim.maxStallGen = 10; %Maximum stall generations
optim.iterOut = 0; %Writing output for each iteration in subFolder 'iterOut'
%Multiobjective genetic algorithm settings
optim.wghtFac = [1,1]; %Weighting factors for TOPSIS multiobjective decision making method
optim.multiCore = 0; %Flag: Utilization of parallel processing (switch off if errors ocur) [1|0]
optim.hybridFcn = 0; %Flag: Use a hybrid function to (may speed op convergence but compromise diversity of solution space) [1|0]
optim.autoSol = 1; %Flag: Pick optimum solution automatically by distance of Pareto solution from the optimal solution [1|0]
% ***************************** Optional **********************************
%FIB liftout calculations
FIB.mode = 1; %Flag: FIB liftout output [1|0]
FIB.trench.ang = 52; %Trenching - or look-in - angle of Trench [°]
FIB.trench.z = 15; %Trench depth 'z' [µm]
FIB.axs.tilt = 1; %Index of tilt axis in 'axs.rot'
FIB.axs.rot = 2; %Index of rotation axis in 'axs.rot'
%Output
optim.plot = 1; %Plotting 1: On 0: Off
%% Example E3
%Concurrent alignment of the <011> and [001] directions in a cubic and
%an orthorhombic crystal with the x-Axis and z-Axis of the microscope,
%respectively.
% ****************************** Crystals *********************************
% *** Crystal Alignment Objective 1
crys.o(1,:) = [261 43 28]; %Crystal orientation in Euler angles [pih1 Phi phi2]
crys.cs{1} = 'cubic'; %Crystal structure string (follow MTEX convention)
crys.alignAx(1) = xvector; %Microscope axis for alignment with crystal direction/plane; Examples: zvector; [.5 .5 1]; xvector; ...
crys.Miller{1} = [0 1 1]; %Miller indices for alignment (in Multiobjective Optimization several Miller-sets will start several optimizations); Examples: [1 0 0; 1 1 0]; [-1 2 1]; ...
crys.type{1} = 'uvw'; %Type of Miller: 'hkl': Crystal plane; 'uvw': Crystal direction
crys.sym(1) = 1; %Apply crystal symmetry: 1: yes 0: no
% *** Crystal Alignment Objective 2
crys.o(2,:) = [175 20 102]; %Crystal orientation in Euler angles [pih1 Phi phi2]
crys.cs{2} = 'orthorhombic'; %Crystal structure string (follow MTEX convention)
crys.alignAx(2) = zvector; %Microscope axis for alignment with crystal direction/plane; Examples: zvector; [.5 .5 1]; xvector; ...
crys.Miller{2} = [0 0 1]; %Miller indices for alignment (in Multiobjective Optimization several Miller-sets will start several optimizations); Examples: [1 0 0; 1 1 0]; [-1 2 1]; ...
crys.type{2} = 'uvw'; %Type of Miller: 'hkl': Crystal plane; 'uvw': Crystal direction
crys.sym(2) = 0; %Apply crystal symmetry: 1: yes 0: no
% ******************************* Stage ***********************************
stg.rot = [xvector; zvector]; %Stage rotation axes
stg.LB = [ 0 -180 ]; %Lower bound [°]
stg.UB = [ 20 180 ]; %Upper bound [°]
stg.sign = [ 1 -1 ]; %Sign 1: Right hand rule convention; -1: Left hand rule convention
stg.order = [ 2 1 ]; %Hierarchy / order of rotation: Rotation 1 before 2 before 3; Example: [3 1 2];
% ************************* Genetic algorithm *****************************
%Genetic algorithm
optim.popSz = 500; %Population size
optim.funcTol = 0.1; %FunctionTolerance
optim.maxStallGen = 10; %Maximum stall generations
optim.iterOut = 0; %Writing output for each iteration in subFolder 'iterOut'
%Multiobjective genetic algorithm settings
optim.wghtFac = [1,1]; %Weighting factors for TOPSIS multiobjective decision making method
optim.multiCore = 0; %Flag: Utilization of parallel processing (switch off if errors ocur) [1|0]
optim.hybridFcn = 0; %Flag: Use a hybrid function to (may speed op convergence but compromise diversity of solution space) [1|0]
optim.autoSol = 1; %Flag: Pick optimum solution automatically by distance of Pareto solution from the optimal solution [1|0]
% ***************************** Optional **********************************
%FIB liftout calculations
FIB.mode = 0; %Flag: FIB liftout output [1|0]
FIB.trench.ang = 52; %Trenching - or look-in - angle of Trench [°]
FIB.trench.z = 15; %Trench depth 'z' [µm]
FIB.axs.tilt = 1; %Index of tilt axis in 'axs.rot'
FIB.axs.rot = 2; %Index of rotation axis in 'axs.rot'
%Output
optim.plot = 1; %Plotting 1: On 0: Off
%% Example E4
%Extension to example E1 by adding an additional rotational stage axis to
%achieve a better alignment.
%Single alignments of the {111} and {100} plane normals in a single cubic
%crystal with the z-Axis of the microscope
% *** Crystal Alignment Objective 1
crys.o(1,:) = [313 15 137]; %Crystal orientation in Euler angles [pih1 Phi phi2]
crys.cs{1} = 'cubic'; %Crystal structure string (follow MTEX convention)
crys.alignAx(1) = zvector; %Microscope axis for alignment with crystal direction/plane; Examples: zvector; [.5 .5 1]; xvector; ...
crys.Miller{1} = [1 1 1; 1 0 0]; %Miller indices for alignment (in Multiobjective Optimization several Miller-sets will start several optimizations); Examples: [1 0 0; 1 1 0]; [-1 2 1]; ...
crys.type{1} = 'hkl'; %Type of Miller: 'hkl': Crystal plane; 'uvw': Crystal direction
crys.sym(1) = 1; %Apply crystal symmetry: 1: yes 0: no
% ******************************* Stage ***********************************
stg.rot = [xvector; yvector; zvector]; %Stage rotation axes
stg.LB = [ 0 -45 -180 ]; %Lower bound [°]
stg.UB = [ 20 45 180 ]; %Upper bound [°]
stg.sign = [ 1 1 -1 ]; %Sign 1: Right hand rule convention; -1: Left hand rule convention
stg.order = [ 3 1 2 ]; %Hierarchy / order of rotation: Rotation 1 before 2 before 3; Example: [3 1 2];
% ************************* Genetic algorithm *****************************
%Genetic algorithm
optim.popSz = 100; %Population size
optim.funcTol = 0.1; %FunctionTolerance
optim.maxStallGen = 10; %Maximum stall generations
optim.iterOut = 0; %Writing output for each iteration in subFolder 'iterOut'
%Multiobjective genetic algorithm settings
optim.wghtFac = [1,1]; %Weighting factors for TOPSIS multiobjective decision making method
optim.multiCore = 0; %Flag: Utilization of parallel processing (switch off if errors ocur) [1|0]
optim.hybridFcn = 0; %Flag: Use a hybrid function to (may speed op convergence but compromise diversity of solution space) [1|0]
optim.autoSol = 1; %Flag: Pick optimum solution automatically by distance of Pareto solution from the optimal solution [1|0]
% ***************************** Optional **********************************
%FIB liftout calculations
FIB.mode = 0; %Flag: FIB liftout output [1|0]
FIB.trench.ang = 52; %Trenching - or look-in - angle of Trench [°]
FIB.trench.z = 15; %Trench depth 'z' [µm]
FIB.axs.tilt = 1; %Index of tilt axis in 'axs.rot'
FIB.axs.rot = 2; %Index of rotation axis in 'axs.rot'
%Output
optim.plot = 1; %Plotting 1: On 0: Off
%% Example E5
%Concurrent alignment of the {011} plane normals and <11-20> crystal
%directions in a cubic and a hexagonal crystal with the x-Axis and z-Axis
%of the microscope, respectively.
% ****************************** Crystals *********************************
% *** Crystal Alignment Objective 1
crys.o(1,:) = [246 36 75]; %Crystal orientation in Euler angles [pih1 Phi phi2]
crys.cs{1} = 'm-3m'; %Crystal structure string (follow MTEX convention)
crys.alignAx(1) = xvector; %Microscope axis for alignment with crystal direction/plane; Examples: zvector; [.5 .5 1]; xvector; ...
crys.Miller{1} = [0 1 1]; %Miller indices for alignment (in Multiobjective Optimization several Miller-sets will start several optimizations); Examples: [1 0 0; 1 1 0]; [-1 2 1]; ...
crys.type{1} = 'hkl'; %Type of Miller: 'hkl': Crystal plane; 'uvw': Crystal direction
crys.sym(1) = 1; %Apply crystal symmetry: 1: yes 0: no
% *** Crystal Alignment Objective 2
crys.o(2,:) = [91 94 13]; %Crystal orientation in Euler angles [pih1 Phi phi2]
crys.cs{2} = 'P63/mmc'; %Crystal structure string (follow MTEX convention)
crys.alignAx(2) = zvector; %Microscope axis for alignment with crystal direction/plane; Examples: zvector; [.5 .5 1]; xvector; ...
crys.Miller{2} = [1 1 -2 0]; %Miller indices for alignment (in Multiobjective Optimization several Miller-sets will start several optimizations); Examples: [1 0 0; 1 1 0]; [-1 2 1]; ...
crys.type{2} = 'uvtw'; %Type of Miller: 'hkl': Crystal plane; 'uvw': Crystal direction
crys.sym(2) = 1; %Apply crystal symmetry: 1: yes 0: no
% ******************************* Stage ***********************************
stg.rot = [xvector; zvector]; %Stage rotation axes
stg.LB = [ 0 -180 ]; %Lower bound [°]
stg.UB = [ 20 180 ]; %Upper bound [°]
stg.sign = [ 1 -1 ]; %Sign 1: Right hand rule convention; -1: Left hand rule convention
stg.order = [ 2 1 ]; %Hierarchy / order of rotation: Rotation 1 before 2 before 3; Example: [3 1 2];
% ************************* Genetic algorithm *****************************
%Genetic algorithm
optim.popSz = 200; %Population size
optim.funcTol = 0.1; %FunctionTolerance
optim.maxStallGen = 10; %Maximum stall generations
optim.iterOut = 0; %Writing output for each iteration in subFolder 'iterOut'
%Multiobjective genetic algorithm settings
optim.wghtFac = [1,1]; %Weighting factors for TOPSIS multiobjective decision making method
optim.multiCore = 0; %Flag: Utilization of parallel processing (switch off if errors ocur) [1|0]
optim.hybridFcn = 0; %Flag: Use a hybrid function to (may speed op convergence but compromise diversity of solution space) [1|0]
optim.autoSol = 1; %Flag: Pick optimum solution automatically by distance of Pareto solution from the optimal solution [1|0]
% ***************************** Optional **********************************
%FIB liftout calculations
FIB.mode = 0; %Flag: FIB liftout output [1|0]
FIB.trench.ang = 52; %Trenching - or look-in - angle of Trench [°]
FIB.trench.z = 15; %Trench depth 'z' [µm]
FIB.axs.tilt = 1; %Index of tilt axis in 'axs.rot'
FIB.axs.rot = 2; %Index of rotation axis in 'axs.rot'
%Output
optim.plot = 1; %Plotting 1: On 0: Off%