summaryrefslogtreecommitdiff
path: root/self_gbeam_propagation.m
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2013-03-20 16:53:39 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2013-03-20 16:53:39 -0400
commit99f39dc1423adc360a04344689a83d2f788aae33 (patch)
tree2731d3687b663d27fad56d97c3e20fe05a5949f9 /self_gbeam_propagation.m
parent4943c1cb5d453dd08aab0ec7000f094779178c94 (diff)
downloadmode_match-99f39dc1423adc360a04344689a83d2f788aae33.tar.gz
mode_match-99f39dc1423adc360a04344689a83d2f788aae33.zip
Matt's changes to use faster beam propagator
Diffstat (limited to 'self_gbeam_propagation.m')
-rw-r--r--self_gbeam_propagation.m49
1 files changed, 23 insertions, 26 deletions
diff --git a/self_gbeam_propagation.m b/self_gbeam_propagation.m
index 807303c..10bcf05 100644
--- a/self_gbeam_propagation.m
+++ b/self_gbeam_propagation.m
@@ -1,4 +1,4 @@
-function [ output_args ] = self_gbeam_propagation( w0, x_lens, f, x0, lambda )
+function [ w, w_pos ] = self_gbeam_propagation( w0, x_lens, f, x0, lambda )
%SELF_GBEAM_PROPAGATION Summary of this function goes here
% Detailed explanation goes here
@@ -14,31 +14,28 @@ for i = 1:n_lens
w_pos(i+1) = x_lens(i) + s_new;
end
-x_pos= x_lens;
-x(1)=w_pos(1);
-waist_prop(1)=w(1);
-
-x_temp=linspace(x0 ,x_pos(1));
-waist_prop=[waist_prop w(1)*sqrt(1+((x_temp-w_pos(1))/(pi*w(1)^2/lambda)).^2)];
-x=[x x_temp];
-
-for i=1:n_lens
- if i == 3
- break
- end
- x_temp=linspace(x_pos(i),x_pos(i+1));
- waist_prop=[waist_prop w(i)*sqrt(1+((x_temp-w_pos(i))/(pi*w(i)^2/lambda)).^2)];
- x=[x x_temp];
-end
-
-x_temp=linspace(x_pos(end),x_pos(end)+abs(f(end)));
-waist_prop=[waist_prop w(end)*sqrt(1+((x_temp-w_pos(end))/(pi*w(end)^2/lambda)).^2)];
-x=[x x_temp];
-
-
-figure(1)
-plot(x,waist_prop,'r',x,-waist_prop,'r');
-
+% x_pos= x_lens;
+% x(1)=w_pos(1);
+% waist_prop(1)=w(1);
+%
+% x_temp=linspace(x0 ,x_pos(1));
+% waist_prop=[waist_prop, w(1)*sqrt(1+((x_temp-w_pos(1))/(pi*w(1)^2/lambda)).^2)];
+% x=[x x_temp];
+%
+% for i=1:n_lens
+% x_temp=linspace(x_pos(i),x_pos(i+1));
+% waist_prop=[waist_prop, w(i)*sqrt(1+((x_temp-w_pos(i))/(pi*w(i)^2/lambda)).^2)];
+% x=[x x_temp];
+% end
+%
+% x_temp=linspace(x_pos(end),x_pos(end)+abs(f(end)));
+% waist_prop=[waist_prop, w(end)*sqrt(1+((x_temp-w_pos(end))/(pi*w(end)^2/lambda)).^2)];
+% x=[x x_temp];
+%
+%
+% figure(1)
+% plot(x,waist_prop,'r',x,-waist_prop,'r');
+%