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
|
%Permute all possible lens combinations out of set of lenses
lens_set = [.075, .203, .05, .03];
lens_set = [.075,.203];
lens_permutations = pick(lens_set,3,'or');
%Pre-defined Constants
lambda= 1.064E-6 ;
Ltot= 1.010675025828971 ;
r0= 1.0E+100 ;
w0= 2.563E-5 ;
x0= 0 ;
wf= 3.709E-5 ;
rf= 1.0E+100 ;
xf= Ltot;
q0=wr2q(w0,r0,lambda);
qf=wr2q(wf,rf,lambda);
%End list
%Mode match
[ possible_lens_placement, initial_lens_placement, possible_lens_set, possible_sample_energy] = mode_match( q0, qf, Ltot, lambda, lens_permutations );
%Remove similar solutions
n_truncate = 3; %number of digits in truncated solution
[ possible_lens_placement_uniq, possible_lens_placement, possible_sample_energy, possible_lens_set, index ] = remove_similar_soln( possible_sample_energy, possible_lens_placement, possible_lens_set, n_truncate );
n_visualizations = 5; %number of best solutions to visualize
n_hist = 10000;
pick_visualization( possible_sample_energy, possible_lens_placement_uniq, possible_lens_placement, possible_lens_set, index, n_visualizations, q0, qf, Ltot, lambda );
stability_visualization( possible_lens_placement_uniq, q0, qf, xf, possible_lens_placement, possible_lens_set, lambda, n_visualizations, n_hist, index )
% %Visualize fitness function for fixed f2 and f3
% lens_set = [.075, .075, .203];
% f2= 0.40361319425309 ;
% f3= 0.80361319425309 ;
%
% fitness_simplified=@(x) fitness(q0, qf, Ltot, [x, f2, f3], lens_set, lambda );
% figure(6)
% ezplot(fitness_simplified, [0,Ltot])
|