Commit d612ed3d authored by Daniel Brown's avatar Daniel Brown
Browse files

updating version and changes to beam tracing

parent b0d450a8
Pipeline #1799 passed with stage
in 23 seconds
......@@ -3,7 +3,7 @@ from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__version__ = "1.0.17"
__version__ = "1.0.18"
# This flag is used to switch on the gui features in pkat at import time
USE_GUI = False
......
......@@ -478,9 +478,9 @@ class AbstractMirrorComponent(Component):
self.Rc = value
elif key in ["M","m", "Mass", "mass"]:
self.mass = value
elif key in ["xbeta", "xBeta"]:
elif key in ["xbeta", "xBeta", "yaw"]:
self.xbeta = value
elif key in ["ybeta","yBeta"]:
elif key in ["ybeta", "yBeta", "pitch"]:
self.ybeta = value
elif key in ["x_off"]:
self.x_offset = value
......@@ -504,7 +504,8 @@ class AbstractMirrorComponent(Component):
return True
class mirror(AbstractMirrorComponent):
def __init__(self,name,node1,node2,R=None,T=None,L=None,phi=0,Rcx=None,Rcy=None,xbeta=None,ybeta=None,mass=None, r_ap=None):
def __init__(self, name, node1, node2, R=None, T=None, L=None,
phi=0, Rcx=None, Rcy=None, xbeta=None, ybeta=None, mass=None, r_ap=None):
super(mirror, self).__init__(name, R, T, L, phi, Rcx, Rcy, xbeta, ybeta, mass, r_ap)
self._requested_node_names.append(node1)
......
......@@ -646,6 +646,7 @@ class KatRun2D(object):
def __init__(self):
self._unfreeze()
self.runtime = None
self.runDateTime = None
self.startDateTime = datetime.datetime.now()
self.x = None
self.y = None
......
......@@ -85,7 +85,7 @@ class BeamParam(object):
def zr(self): return self.__q.imag
@property
def w(self):
def w(self, z=None):
return np.abs(self.__q)* np.sqrt(self.__lambda / (self.__nr * math.pi * self.__q.imag))
def beamsize(self, z=None, wavelength=None, nr=None, w0=None):
......
......@@ -65,7 +65,7 @@ def plot_beam_trace(_kat, from_node, to_node):
for n in range(len(spaces)):
s = spaces[n]
Lmax = s.L
N = 1000
N = 100
node = None
cmds = """
......
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