aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mode_match_demo.m30
1 files changed, 23 insertions, 7 deletions
diff --git a/mode_match_demo.m b/mode_match_demo.m
index 6d93de0..af823c1 100644
--- a/mode_match_demo.m
+++ b/mode_match_demo.m
@@ -1,25 +1,41 @@
%Permute all possible lens combinations out of set of lenses
% keep this list short - computation time goes as factorial of lens set size
-lens_set = [0.025, 0.035, 0.05, .075, 0.10, .125, 0.150, 0.20, 0.25, 0.300, 0.50, 0.75, -.05, -0.10 ]; %Given lenses of unique focal lengths
+lens_set = [.05, 0.025, 0.50 ]; %Given lenses of unique focal lengths
+%lens_set = [0.025, 0.035, 0.05, .075, 0.10, .125, 0.150, 0.20, 0.25, 0.300, 0.50, 0.75, -.05, -0.10 ]; % Thorlabs lenses set
+%lens_set = [0.025, 0.05, .075, 0.10, .125, 0.20, 0.25, 0.300, 0.50, 0.75, 1.00 ]; % Available in the lab
lens_permutations = pick(lens_set,3,'or'); %3 lens solutions
%Pre-defined Constants
lambda= .795e-6 ; %Wavelength of beam
extra_space = 0.05; % to allow lens holder placement
-Ltot= .51 - 2*extra_space ; %Length of optical system
+
+
+Ltot=0.63+0.055+0.09 ; %Length of optical system
+
+%% Fiber output parameters
r0= 1.0E+100 ; %Initial radius of curvature
w0= 5.65e-4 ; %Initial waist
+x0= 0 ; %Starting position of beam
+q0 = wr2q(w0, r0, lambda);
+%% this will be used to propagate beam in free space
dummy_lens.abcd = abcd_lens(inf);
dummy_lens.x = 10000;
dummy_optic = {dummy_lens};
-q0 = gbeam_propagation ( 0, wr2q(w0, r0, lambda), (-1.54 + extra_space), dummy_optic );
-x0= 0 ; %Starting position of beam
-wf= 2.6983e-4 ; %Desired final waist
-rf= 1.0E+100 ; %Desired final radius
-qf = gbeam_propagation ( 0, wr2q(wf, rf, lambda), (-0.4813 - extra_space), dummy_optic );
+%% Cavity parameters calculated by cavity_design_demo.m
+Lcav = 0.8025;
+zc = 0.5062; % with respect to front mirror
+% cavity waist
+wc=2.6732e-04;
+rc=Inf;
+% however this inside of the cavity so we need to propagate it to the front mirror
+dist = Lcav - zc;
+% calculate beam parameter at the front mirror
+% watch out that indeed there is only free space
+qf = gbeam_propagation ( dist, wr2q(wc, rc, lambda), 0, dummy_optic );
+%% some parameters for visualizer and solution search
lens_width = .03; %Lens width
show_lens_width = 1; %Set to 1 to enable display of lens width on solution propagation plot
show_lens_position = 1; %Set to 1 to enable display of position of center of lens on solution propagation plot