From e3d445b8cbb068bffce00b56da154827a02970df Mon Sep 17 00:00:00 2001 From: Andreas Freise <adf@star.bham.ac.uk> Date: Wed, 27 Apr 2016 23:23:25 +0100 Subject: [PATCH] fixing gauss_param example, maybe should look into abcd.apply, whether this can take beam_params as input --- examples/gauss_param.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/examples/gauss_param.py b/examples/gauss_param.py index bd30d08..d3ba439 100644 --- a/examples/gauss_param.py +++ b/examples/gauss_param.py @@ -1,15 +1,19 @@ +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) -- GitLab