aboutsummaryrefslogtreecommitdiff
path: root/fitter_check.m
diff options
context:
space:
mode:
authorMatt Argao <mcargao@email.wm.edu>2013-03-02 10:14:05 -0500
committerMatt Argao <mcargao@email.wm.edu>2013-03-02 10:14:05 -0500
commitc181a0d3181a7f5a24e9fdc712f2cdab38a928cb (patch)
treea1e8123f47b0e954c317a0012b73935b32f340f8 /fitter_check.m
parent563330e918440fd6ef34ffac88706c0e19a0ba08 (diff)
downloadmode_match-c181a0d3181a7f5a24e9fdc712f2cdab38a928cb.tar.gz
mode_match-c181a0d3181a7f5a24e9fdc712f2cdab38a928cb.zip
Fixed lens bug and added more accurate representation of lenses.
Diffstat (limited to 'fitter_check.m')
-rw-r--r--fitter_check.m21
1 files changed, 13 insertions, 8 deletions
diff --git a/fitter_check.m b/fitter_check.m
index 1796cce..f70ded6 100644
--- a/fitter_check.m
+++ b/fitter_check.m
@@ -1,6 +1,5 @@
%Permute all possible lens combinations out of set of lenses
-lens_set = [.075, .203, .05, .03];
-lens_set = [.075,.203];
+lens_set = [.075, .203];
lens_permutations = pick(lens_set,3,'or');
%Pre-defined Constants
@@ -14,20 +13,26 @@ rf= 1.0E+100 ;
xf= Ltot;
q0=wr2q(w0,r0,lambda);
qf=wr2q(wf,rf,lambda);
+lens_width = .03;
+show_lens_width = 1;
+show_lens_position = 1;
+display_prop = [show_lens_width, show_lens_position];
%End list
%Mode match
-[ possible_lens_placement, initial_lens_placement, possible_lens_set, possible_sample_energy] = mode_match( q0, qf, Ltot, lambda, lens_permutations );
+[ possible_lens_placement, initial_lens_placement, possible_lens_set, possible_sample_energy] = mode_match( q0, qf, Ltot, lambda, lens_permutations, lens_width );
%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 = 20; %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]= stability_visualization( possible_lens_placement_uniq, q0, qf, xf, possible_lens_placement, possible_lens_set, lambda, n_visualizations, n_hist, index )
-energy_vs_stability( possible_sample_energy, stability, index)
+n_visualizations = 5; %number of best solutions to visualize
+n_hist = 10000; %number of sample points in histogram
+stability_max = 1; %max stability (y-axis) shown on energy vs. stability graph
+
+pick_visualization( possible_sample_energy, possible_lens_placement_uniq, possible_lens_placement, possible_lens_set, index, n_visualizations, q0, qf, Ltot, lambda, lens_width, display_prop );
+[stability] = stability_visualization( possible_lens_placement_uniq, q0, qf, xf, possible_lens_placement, possible_lens_set, lambda, n_visualizations, n_hist, index );
+energy_vs_stability( possible_sample_energy, stability, index, stability_max)
% %Visualize fitness function for fixed f2 and f3
% lens_set = [.075, .075, .203];