diff options
author | Matt Argao <mcargao@email.wm.edu> | 2012-10-23 15:40:28 -0400 |
---|---|---|
committer | Matt Argao <mcargao@email.wm.edu> | 2012-10-23 15:40:28 -0400 |
commit | 29f10e82fcff18e60bdb42cc824b2e18a40887bf (patch) | |
tree | 555904561cf28b736089bc088cd2a4311cb9125a /fitness.m | |
parent | 80b72a51a3f8f0e33bf79a20a4d5fbaca050d920 (diff) | |
download | mode_match-29f10e82fcff18e60bdb42cc824b2e18a40887bf.tar.gz mode_match-29f10e82fcff18e60bdb42cc824b2e18a40887bf.zip |
Improved optimization
Removes repeating optic sets
Stores possible solutions
Returns waist from fitness function
Solutions with same significant digits are truncated
Visualize possible solutions
Outputs solutions with a fitness threshold
Diffstat (limited to 'fitness.m')
-rw-r--r-- | fitness.m | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,9 +1,10 @@ -function Energy = fitness( q_0, q_final, x_final, optics_positions, optics_focal_length )
+function [Energy, Waist] = fitness( q_0, q_final, x_final, optics_positions, optics_focal_length, lambda )
%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, optics_focal_length));
-
+ [Waist, Radius] = q2wr(q_f_trial, lambda);
+
Energy = abs(q_final-q_f_trial);
% penalty calculation
|