aboutsummaryrefslogtreecommitdiff
path: root/cavity_design_demo.m
diff options
context:
space:
mode:
Diffstat (limited to 'cavity_design_demo.m')
-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);