summaryrefslogtreecommitdiff
path: root/fitter_check.m
diff options
context:
space:
mode:
Diffstat (limited to 'fitter_check.m')
-rw-r--r--fitter_check.m51
1 files changed, 25 insertions, 26 deletions
diff --git a/fitter_check.m b/fitter_check.m
index 3e0a1df..d28b7f3 100644
--- a/fitter_check.m
+++ b/fitter_check.m
@@ -1,22 +1,27 @@
+lens_set = [.075, .203, .05, .03];
+lens_set = [.075, .203];
+lens_permutations = pick(lens_set,3,'or');
+n_perms = size(lens_permutations,1);
+n_shuffles=10; %number of random placements of lenses
+
% ##########################################
% Sample Solution
-clear;
lambda= 1.064E-6 ;
Ltot= 1.010675025828971 ;
r0= 1.0E+100 ;
w0= 2.563E-5 ;
x0= 0 ;
-focal_length1 = .075;
-focal_length2 = .075;
-focal_length3 = .203;
-
-lns1.abcd=abcd_lens( focal_length1 ) ;
-lns1.x= 0.21358727296049 ;
-lns2.abcd=abcd_lens( focal_length2 ) ;
-lns2.x= 0.40361319425309 ;
-lns3.abcd=abcd_lens( focal_length3 ) ;
-lns3.x= 0.80361319425309 ;
+% focal_length1 = .075;
+% focal_length2 = .075;
+% focal_length3 = .203;
+%
+% lns1.abcd=abcd_lens( focal_length1 ) ;
+% lns1.x= 0.21358727296049 ;
+% lns2.abcd=abcd_lens( focal_length2 ) ;
+% lns2.x= 0.40361319425309 ;
+% lns3.abcd=abcd_lens( focal_length3 ) ;
+% lns3.x= 0.80361319425309 ;
wf= 3.709E-5 ;
rf= 1.0E+100 ;
xf= Ltot;
@@ -25,12 +30,12 @@ q0=wr2q(w0,r0,lambda);
x0=0;
qf=wr2q(wf,rf,lambda);
xf=Ltot;
-
-optics={lns1,lns2,lns3};
-figure(1)
-w_final_handmade = solution_visualization(q0,x0, qf, xf, optics, lambda);
-title('Hand made');
-% ##########################################
+%
+% optics={lns1,lns2,lns3};
+% figure(1)
+% w_final_handmade = solution_visualization(q0,x0, qf, xf, optics, lambda);
+% title('Hand made');
+%% ##########################################
%Initialize sample arrays
@@ -41,13 +46,6 @@ possible_lens_pos = [];
possible_sample_energy = [];
lens_size = .03;
-%Lens permutations
-lens_permutations = perms( [ focal_length1, focal_length2, focal_length3 ]);
-n_shuffles=10;
-
-%Check if permutation has duplicates
-lens_permutations = unique(lens_permutations,'rows');
-n_perms = size(lens_permutations,1);
for i = 1:n_perms
@@ -111,5 +109,6 @@ for n_graph = 1:n_possible_soln
title('Other Solutions');
end
-w_final_handmade;
-x_sol
+possible_soln(index(1:n_graph),:)
+possible_lens_pos(index(1:n_graph),:)
+possible_sample_energy(index(1:n_graph),:) \ No newline at end of file