diff options
author | Matt Argao <mcargao@email.wm.edu> | 2013-03-02 10:14:05 -0500 |
---|---|---|
committer | Matt Argao <mcargao@email.wm.edu> | 2013-03-02 10:14:05 -0500 |
commit | c181a0d3181a7f5a24e9fdc712f2cdab38a928cb (patch) | |
tree | a1e8123f47b0e954c317a0012b73935b32f340f8 /mode_match.m | |
parent | 563330e918440fd6ef34ffac88706c0e19a0ba08 (diff) | |
download | mode_match-c181a0d3181a7f5a24e9fdc712f2cdab38a928cb.tar.gz mode_match-c181a0d3181a7f5a24e9fdc712f2cdab38a928cb.zip |
Fixed lens bug and added more accurate representation of lenses.
Diffstat (limited to 'mode_match.m')
-rw-r--r-- | mode_match.m | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mode_match.m b/mode_match.m index 3eed53f..dafe209 100644 --- a/mode_match.m +++ b/mode_match.m @@ -1,4 +1,4 @@ -function [ final_possible_lens_placement, initial_possible_lens_placement, possible_lens_set, possible_sample_energy] = mode_match( q0, qf, Ltot, lambda, lens_permutations ) +function [ final_possible_lens_placement, initial_possible_lens_placement, possible_lens_set, possible_sample_energy] = mode_match( q0, qf, Ltot, lambda, lens_permutations, lens_width ) %Shuffles lenses into random positions and stores possible solutions % Shuffles over entire lens permutation array for n_shuffles times. % Afterwards, solutions are sorted by Energy and truncated to n_truncate @@ -18,15 +18,13 @@ possible_lens_set = zeros(N,3); possible_sample_energy = zeros(N,1); initial_rand_lens_placement=zeros(N,3); -lens_size = .03; % physical size of the lens - for ip = 1:n_perms f3=lens_permutations(ip,3); x3=Ltot-f3; % last lense transfer collimated region to focused spot for is = 1:n_shuffles possible_lens_set((ip-1)*n_shuffles + is,:) = lens_permutations(ip,:); - initial_rand_lens_placement_tmp = sort(lens_size+(x3-2*lens_size)*rand(1,2)); + initial_rand_lens_placement_tmp = sort(lens_width+(x3-2*lens_width)*rand(1,2)); initial_rand_lens_placement((ip-1)*n_shuffles + is,:) = [initial_rand_lens_placement_tmp, x3]; end end |