summaryrefslogtreecommitdiff
path: root/axial/prop2.m
diff options
context:
space:
mode:
Diffstat (limited to 'axial/prop2.m')
-rw-r--r--axial/prop2.m27
1 files changed, 27 insertions, 0 deletions
diff --git a/axial/prop2.m b/axial/prop2.m
new file mode 100644
index 0000000..eaa4db6
--- /dev/null
+++ b/axial/prop2.m
@@ -0,0 +1,27 @@
+%--------------------------------------------------------------------
+% Propagates a Gaussian beam with complex radius of curvature q1
+% using the ABCD parameters supplied. Returns the new q and the
+% new amplitude factor p = 1/(A+B/q1)^(1+l+m) by which the field is
+% multiplied. (See eqn 4.7.30 in Principles of Lasers by O. Svelto.)
+% If q1 is a vector or matrix, q and p will be vectors or matrixes
+% of the same size. If the ABCD parameters are vectors or matrixes
+% (while q1 is a scalar) then q an d p will be vectors or matrixes
+% of the same size. This last feature is the main difference
+% between this function and "prop.m".
+%
+% For a Hermite Gaussian l,m are the mode designators.
+% For a Laguerre Gaussian l=2p and m is the usual m.
+%
+% SYNTAX: [q,p]=prop2(q1,A,B,C,D,<,[l,m]>);
+% <...> indicates optional arguments
+%--------------------------------------------------------------------
+
+function [q,p]=prop2(q1,A,B,C,D,varargin)
+
+if nargin>=6, mode=varargin{1}; else mode=[0,0]; end
+
+ell=mode(1);
+emm=mode(2);
+
+q = (A*q1 + B)./(C*q1 + D);
+p = 1./(A+B./q1).^(1+ell+emm); \ No newline at end of file