aboutsummaryrefslogtreecommitdiff
path: root/fitness.m
diff options
context:
space:
mode:
authorMatt Argao <mcargao@email.wm.edu>2012-10-18 17:42:16 -0400
committerMatt Argao <mcargao@email.wm.edu>2012-10-18 17:42:16 -0400
commit80b72a51a3f8f0e33bf79a20a4d5fbaca050d920 (patch)
tree50b45f2d8d10ee378f32e00530c5b2349fd8232e /fitness.m
parente7699104e7439eacf3135515df320ee15aea0929 (diff)
downloadmode_match-80b72a51a3f8f0e33bf79a20a4d5fbaca050d920.tar.gz
mode_match-80b72a51a3f8f0e33bf79a20a4d5fbaca050d920.zip
Added possible permutations of lens choices
Diffstat (limited to 'fitness.m')
-rw-r--r--fitness.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/fitness.m b/fitness.m
index 6c0026b..80835e5 100644
--- a/fitness.m
+++ b/fitness.m
@@ -1,8 +1,8 @@
-function Energy = fitness( q_0, q_final, x_final, optics_positions )
+function Energy = fitness( q_0, q_final, x_final, optics_positions, optics_focal_length )
%FITNESS Summary of this function goes here
% Detailed explanation goes here
x0 = 0;
- q_f_trial = gbeam_propagation(x_final,q_0,x0,optics_placer(optics_positions));
+ q_f_trial = gbeam_propagation(x_final,q_0,x0,optics_placer(optics_positions, optics_focal_length));
Energy = abs(q_final-q_f_trial);
@@ -46,7 +46,7 @@ function Energy = fitness( q_0, q_final, x_final, optics_positions )
% make collimated region between 2nd and 3rd lens
%intialize intermediate points between lenses
intermediate_positions = linspace(optics_positions(2), optics_positions(3),10);
- f_q_x = @(x) gbeam_propagation(x,q_0,x0,optics_placer(optics_positions));
+ f_q_x = @(x) gbeam_propagation(x,q_0,x0,optics_placer(optics_positions, optics_focal_length));
q_intermediate = arrayfun(f_q_x,intermediate_positions);
lambda_over_waist_sq = (-imag(1./q_intermediate)); %with numerical factor