Commit 7bfb9432 authored by Andreas Freise's avatar Andreas Freise
Browse files

renaming gauss.wz to gauss.w, this is more common.

parent 58032632
from pykat.utilities.optics.ABCD import apply, mirror_trans from pykat.utilities.optics.ABCD import apply, mirror_trans
from pykat.utilities.optics.gaussian_beams import gauss_param from pykat.utilities.optics.gaussian_beams import gauss_param
nr1 = 1 nr1 = 1
nr2 = 1.44963098985906 nr2 = 1.44963098985906
q1 = gauss_param(q=5.96343 + 3.04713j) q1 = gauss_param(q=5.96343 + 3.04713j)
abcd = mirror_trans(nr1, nr2, float("inf")) abcd = mirror_trans(nr1, nr2, float("inf"))
# into material # into material
q2 = apply(abcd, q1, nr1, nr2) q2 = apply(abcd, q1, nr1, nr2)
# and out again # and out again
q3 = apply(abcd, q2, nr2, nr1) q3 = apply(abcd, q2, nr2, nr1)
print "q1 =", q1, " w0 =", q1.w0, " wz =", q1.wz, " z =", q1.z print "q1 =", q1, " w0 =", q1.w0, " w =", q1.w, " z =", q1.z
print "q2 =", q2, " w0 =", q2.w0, " wz =", q2.wz, " z =", q2.z print "q2 =", q2, " w0 =", q2.w0, " w =", q2.w, " z =", q2.z
print "q3 =", q3, " w0 =", q3.w0, " wz =", q3.wz, " z =", q3.z print "q3 =", q3, " w0 =", q3.w0, " w =", q3.w, " z =", q3.z
...@@ -68,7 +68,7 @@ class gauss_param(object): ...@@ -68,7 +68,7 @@ class gauss_param(object):
def zr(self): return self.__q.imag def zr(self): return self.__q.imag
@property @property
def wz(self): def w(self):
return self.w0 * math.sqrt(1 + (self.__q.real/self.__q.imag)**2) return self.w0 * math.sqrt(1 + (self.__q.real/self.__q.imag)**2)
@property @property
...@@ -188,4 +188,4 @@ class HG_gauss_beam(object): ...@@ -188,4 +188,4 @@ class HG_gauss_beam(object):
# need to finish... # need to finish...
return self.__xpre_const return self.__xpre_const
\ No newline at end of file
Supports Markdown
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