summaryrefslogtreecommitdiff
path: root/abcd.m
diff options
context:
space:
mode:
Diffstat (limited to 'abcd.m')
-rw-r--r--abcd.m9
1 files changed, 2 insertions, 7 deletions
diff --git a/abcd.m b/abcd.m
index bc7466a..4b4739e 100644
--- a/abcd.m
+++ b/abcd.m
@@ -31,21 +31,16 @@ end
-function waste =q2waste(q, lambda)
- waste=sqrt (-lambda./pi./imag(1./q));
-endfunction
-
-function radius =q2radius(q, lambda)
- radius=(1./real(1./q));
-endfunction
function [waste,radius] =q2wr(q, lambda)
+% convert Gaussian beam q parameter to waste and radius
waste=sqrt (-lambda./pi./imag(1./q));
radius=(1./real(1./q));
endfunction
function q=waste_r2q(waste,R,lambda)
+% convert Gaussian beam waste and radius to q parameter
q=1./(1./R-1i.*lambda./pi./(waste.^2));
endfunction