summaryrefslogtreecommitdiff
path: root/gbeam_propagation.m
diff options
context:
space:
mode:
authorMatt Argao <mcargao@email.wm.edu>2013-02-20 14:15:44 -0500
committerMatt Argao <mcargao@email.wm.edu>2013-02-20 14:15:44 -0500
commit12948ff5436c6c385d239572f5eb20ed19f93392 (patch)
treeb958bf4ecc977050f18fe8da5bd62084168cd9cb /gbeam_propagation.m
parentfebb98c32e259ca4f4e574faef4b157c8d1f2830 (diff)
downloadmode_match-12948ff5436c6c385d239572f5eb20ed19f93392.tar.gz
mode_match-12948ff5436c6c385d239572f5eb20ed19f93392.zip
Displays lenses in beam propogation graph.
Diffstat (limited to 'gbeam_propagation.m')
-rw-r--r--gbeam_propagation.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/gbeam_propagation.m b/gbeam_propagation.m
index d81f70e..eeb6a3d 100644
--- a/gbeam_propagation.m
+++ b/gbeam_propagation.m
@@ -1,4 +1,4 @@
-function q = gbeam_propagation(x_pos, q_in, x_in, optics_elements)
+function [q, q_lens] = gbeam_propagation(x_pos, q_in, x_in, optics_elements)
% calculate the 'q' parameter of the Gaussian beam propagating through optical
% 'optics_elements' array along 'x' axis at points 'x_pos'
% takes the gaussian beam with initial q_in parameter at x_in
@@ -8,7 +8,7 @@ function q = gbeam_propagation(x_pos, q_in, x_in, optics_elements)
if any(x_pos >= x_in)
% Forward propagation to the right of x_in
- q(x_pos >= x_in) = gbeam_propagation_froward_only(x_pos(x_pos>=x_in), q_in, x_in, optics_elements);
+ [q(x_pos >= x_in), q_lens] = gbeam_propagation_froward_only(x_pos(x_pos>=x_in), q_in, x_in, optics_elements);
end
if any(x_pos < x_in)
@@ -45,8 +45,10 @@ function q = gbeam_propagation(x_pos, q_in, x_in, optics_elements)
% final assignment of the backwards propagating beam
% which we need to flip back
q(x_pos<x_in) = fliplr(q_backw);
- end
+ end
+
+
end
%!test