diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-09-27 10:19:07 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-09-27 10:19:07 -0400 |
commit | 46401075a95e758a946ca2abb5fbe0cf9219a744 (patch) | |
tree | ca1549922523d9b7906bd721aa455ae38a0bf5f5 /cavity_abcd2its_waist_and_position.m | |
parent | 6521fed02d68df8786977f67c43fe47c5d1b29b9 (diff) | |
download | mode_match-46401075a95e758a946ca2abb5fbe0cf9219a744.tar.gz mode_match-46401075a95e758a946ca2abb5fbe0cf9219a744.zip |
cavity waist calculation in separate function
Diffstat (limited to 'cavity_abcd2its_waist_and_position.m')
-rw-r--r-- | cavity_abcd2its_waist_and_position.m | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/cavity_abcd2its_waist_and_position.m b/cavity_abcd2its_waist_and_position.m new file mode 100644 index 0000000..ac6f2a2 --- /dev/null +++ b/cavity_abcd2its_waist_and_position.m @@ -0,0 +1,39 @@ +function [w0, z0] = cavity_abcd2its_waist_and_position( abcd_cavity, lambda, cavity_length ) +display('WARNING: cavity_abcd2its_waist_and_position sometimes it gives crazy results'); +display('WARNING: it is sensitive to lens, mirrors order.'); +display('WARNING: You better double check results or better fix the logic of this code'); + + +% Notation follows +% +% "Laser resonators with several mirrors and lenses with the bow-tie laser +% resonator with compensation for astigmatism and thermal lens effects as an +% example" by Haim Abitan and Torben Skettrup 2005 J. Opt. A: Pure Appl. Opt. 7 7 +% doi:10.1088/1464-4258/7/1/002 +% http://dx.doi.org/10.1088/1464-4258/7/1/002 + +% spelling out abcd coefficients +[A, B, C, D] = abcd2ABCD( abcd_cavity ); + +if ~isCavityStable(abcd_cavity) + display('Cavity is unstable !'); + display('We should stop now. There is no stable mode in this cavity'); + error('Not possible to calculate a cavity mode in the unstable cavity'); +end + +% stability parameter see eq.4 +u = (A+D+2)/4; + +% resonator waist eq.10 +w0 = sqrt ( 2*lambda/(pi*abs(C))*sqrt(u*(1-u)) ); + +% resonator waist location along 1st arm eq.11 +z0 = (A-D)/(2*C); + +% Everything is periodic with respect to cavity length +% so by taking modulus with respect to its length +% we get rid of nasty virtual waist condition +z0 = mod(z0, cavity_length); + +end + |