Commit e3d445b8 authored by Andreas Freise's avatar Andreas Freise
Browse files

fixing gauss_param example, maybe should look into abcd.apply, whether this...

fixing gauss_param example, maybe should look into abcd.apply, whether this can take beam_params as input
parent fa2cff03
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from pykat.optics.ABCD import apply, mirror_trans
from pykat.optics.gaussian_beams import gauss_param
from pykat.optics.gaussian_beams import beam_param
nr1 = 1
nr2 = 1.44963098985906
q1 = gauss_param(q=5.96343 + 3.04713j)
q1 = beam_param(q=5.96343 + 3.04713j)
abcd = mirror_trans(nr1, nr2, float("inf"))
# into material
q2 = apply(abcd, q1, nr1, nr2)
q2 = apply(abcd, q1.q, nr1, nr2)
# and out again
q3 = apply(abcd, q2, nr2, nr1)
q3 = apply(abcd, q2.q, nr2, nr1)
print "q1 =", q1, " w0 =", q1.w0, " w =", q1.w, " z =", q1.z
print "q2 =", q2, " w0 =", q2.w0, " w =", q2.w, " z =", q2.z
print "q3 =", q3, " w0 =", q3.w0, " w =", q3.w, " z =", q3.z
print ("q1 =", q1, " w0 =", q1.w0, " w =", q1.w, " z =", q1.z)
print ("q2 =", q2, " w0 =", q2.w0, " w =", q2.w, " z =", q2.z)
print ("q3 =", q3, " w0 =", q3.w0, " w =", q3.w, " z =", q3.z)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment