Runs the current simulation setup that has been built thus far.
It returns a katRun or katRun2D object which is populated with the various
...
...
@@ -1480,6 +1480,9 @@ class kat(object):
are the x and y beam parameters. If no tracing is done a None
is returned.
usePipe - Version of Finesse 2.1 allow piping between kat and pykat for transfer data an progress.
Switching this off means some data and variables won't be populated, but it will work with
older versions of Finesse.
rethrowExceptions - if true exceptions will be thrown again rather than being excepted and calling sys.exit()
"""
start=time.time()
...
...
@@ -1545,7 +1548,10 @@ class kat(object):
pipe_name=katfile.name+str(uuid.uuid4())
ifusePipe:
cmd=[kat_exec,"--pykat="+pipe_name]
else:
cmd=[kat_exec,"--perl1"]
ifself.__time_code:
cmd.append('--perf-timing')
...
...
@@ -1586,6 +1592,7 @@ class kat(object):
duration=2# Duration for searching for open pipe
try:
ifusePipe==True:
whilefifoisNone:
try:
iftime.time()<_start_kat+duration:
...
...
@@ -1593,13 +1600,14 @@ class kat(object):
fifo=codecs.open(pipe_name,"r","utf-8")
self.__looking=False
else:
raisepkex.BasePyKatException("Could not connect to pykat pipe in {0} seconds. Ensure you are using Finesse >= v2.1 and Pykat >= v1.0.0.".format(duration))
raisepkex.BasePyKatException("Could not connect to pykat pipe in {0} seconds. Ensure you are using Finesse >= v2.1 and Pykat >= v1.0.0. Or set usePipe=False when making kat object.".format(duration))