aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2013-09-27 17:27:18 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2013-09-27 17:27:18 -0400
commitbc926ca403db6682a439760b22e05082443b2aff (patch)
tree28fa78bc8c1276452af7150cc2d526a5ec7c7b67
parent5c764b58723425122274b4576ce95df329609603 (diff)
downloadmode_match-bc926ca403db6682a439760b22e05082443b2aff.tar.gz
mode_match-bc926ca403db6682a439760b22e05082443b2aff.zip
cavity design uses proper function to find a cavity waist
-rw-r--r--cavity_design_demo.m19
1 files changed, 10 insertions, 9 deletions
diff --git a/cavity_design_demo.m b/cavity_design_demo.m
index 1108f11..b81864c 100644
--- a/cavity_design_demo.m
+++ b/cavity_design_demo.m
@@ -20,6 +20,14 @@ d1=0.2;
d2=1;
Ltot = d1+d2; % total resonator length
+% time to build the optics set
+mirror1.abcd = abcd_mirror( R1 ) ;
+mirror1.x = d1;
+mirror2.abcd = abcd_mirror( R2 ) ;
+mirror2.x = d1 + d2;
+optics={mirror1, mirror2};
+
+
% operational wavelength
lambda = 795e-9;
@@ -27,7 +35,7 @@ lambda = 795e-9;
% follow figure 4: elements goes as d1, f1, d3, f2
% where f1 and f2 lens mirror equivalent with f_i=R_i/2
-abcd_cavity = abcd_mirror(R2)*abcd_free_space(d2)*abcd_mirror(R1)* abcd_free_space(d1);
+abcd_cavity = optics2abcd( optics );
if ~isCavityStable(abcd_cavity)
display('Cavity is unstable !');
@@ -54,13 +62,6 @@ end
%% Preparing for the graphical mode output
-% time to build the optics set
-mirror1.abcd = abcd_mirror( R1 ) ;
-mirror1.x = d1;
-mirror2.abcd = abcd_mirror( R2 ) ;
-mirror2.x = d1 + d2;
-optics={mirror1, mirror2};
-
% display properties setup
lens_width = .03; %Lens width
show_lens_width = 1; %Set to 1 to enable display of lens width on solution propagation plot
@@ -74,7 +75,7 @@ display_prop = [show_lens_width, show_lens_position];
waist_at_mirrors
display('Presumed size and location of the cavity waist');
-[w0, z0] = cavity_abcd2its_waist_and_position( abcd_cavity, lambda, Ltot )
+[w0, z0] = cavity_optics2its_waist_and_position( optics, lambda )
q0_via_propagation = gbeam_propagation ( z0, qstart, zstart, optics );
[w0prop, R0prop] = q2wr(q0_via_propagation, lambda);