Skip to content
Snippets Groups Projects
Commit f29204f5 authored by Daniel Toyra's avatar Daniel Toyra
Browse files

Merge branch 'master' of gitmaster.atlas.aei.uni-hannover.de:pykat/pykat

parents 269e5751 99150d96
No related branches found
No related tags found
No related merge requests found
......@@ -412,7 +412,7 @@ class Signals(object):
self._default_name = "fsignal"
self.targets = []
self._params = []
self.__f = Param("f", self, 1)
self.__f = Param("f", self, 0)
self._kat = kat
def _register_param(self, param):
......@@ -431,7 +431,7 @@ class Signals(object):
def getFinesseText(self):
rtn = []
if len(self.targets) == 0 and self.f != 0:
if len(self.targets) == 0 and (self.f != 0 and self.f is not None):
rtn.append("fsig {name} {frequency}"
.format(name = self.name,
frequency=str(self.f)))
......@@ -1316,6 +1316,7 @@ class kat(object):
for file in traceFiles:
traceData.append({})
try:
ifile = fileinput.input(os.path.join(path, file))
for line in ifile:
......@@ -1331,16 +1332,22 @@ class kat(object):
node_name = values[1].split("(")[0]
line1x = ifile.readline()
line2x = ifile.readline()
line1y = ifile.readline()
line2y = ifile.readline()
line1x = ifile.readline().replace('(','').replace(')','')
line2x = ifile.readline().replace('(','').replace(')','')
line1y = ifile.readline().replace('(','').replace(')','')
line2y = ifile.readline().replace('(','').replace(')','')
spqx = line2x.strip().split("gamma")
spqy = line2y.strip().split("gamma")
qx = line2x.strip().split()[0].split("=")[1]
qy = line2y.strip().split()[0].split("=")[1]
qx = spqx[0].split("=")[1].replace('i','j').replace(' ','')
qy = spqy[0].split("=")[1].replace('i','j').replace(' ','')
traceData[-1][node_name] = (pykat.beam_param(q=complex(qx)), pykat.beam_param(q=complex(qy)))
finally:
ifile.close()
if save_output:
newoutfile = "{0}.out".format(base)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment