summaryrefslogtreecommitdiff
path: root/abcd.m
diff options
context:
space:
mode:
Diffstat (limited to 'abcd.m')
-rw-r--r--abcd.m51
1 files changed, 0 insertions, 51 deletions
diff --git a/abcd.m b/abcd.m
deleted file mode 100644
index 20ae061..0000000
--- a/abcd.m
+++ /dev/null
@@ -1,51 +0,0 @@
-function fs_abcd = abcd_free_space( distance)
- fs_abcd=[1, distance; 0,1];
-endfunction
-
-function lens_abcd =abcd_lens(focal_distance)
- lens_abcd = [1, 0; -1/focal_distance, 1];
-endfunction
-
-function qnew=q_after_abcd(q_old,abcd)
- qnew=(q_old*abcd(1,1)+abcd(1,2))/(q_old*abcd(2,1)+abcd(2,2));
-endfunction
-
-
-function optics = arrange_optics_along_x(optics_unsorted)
-% arrange optics in proper order so its x position increases with consequent index
- N=length(optics_unsorted);
-
- % assign x positions
- x=zeros(1,N);
- for i=1:N
- x(i)=optics_unsorted{i}.x;
- end
-
- [xs,indx]=sort(x);
- cntr=1;
- for i=indx
- optics{cntr}=optics_unsorted{i};
- cntr=cntr+1;
- end
-end
-
-
-
-
-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=wr2q(waste,R,lambda)
-% convert Gaussian beam waste and radius to q parameter
- q=1./(1./R-1i.*lambda./pi./(waste.^2));
-endfunction
-
-
-
-
-
-