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

adding more options and parsing, removing extra lines

parent ae1b63cb
......@@ -129,7 +129,6 @@ class kat(object):
self.__components = {} # dictionary of optical components
self.__detectors = {} # dictionary of detectors
self.__commands = {} # dictionary of commands
self.__extra_lines = [] # an array of strings which are just normal finesse code to include when running
self.__gui = None
self.nodes = NodeNetwork(self)
self.__katdir = katdir
......@@ -140,6 +139,8 @@ class kat(object):
# Various options for running finesse, typicaly the commands with just 1 input
# and have no name attached to them.
self.retrace = None
self.deriv_h = None
self.__phase = None
self.__maxtem = None
self.__noxaxis = None
......@@ -276,6 +277,24 @@ class kat(object):
after_process.append(line)
elif(first == "noxaxis"):
self.noxaxis = True
elif(first == "phase"):
v = line.split(" ")
if len(v) != 2:
raise pkex.BasePyKatException("Phase command `{0}` is incorrect.".format(line))
else:
self.phase = int(v[1])
elif(first == "retrace"):
v = line.split(" ")
if len(v) != 2:
raise pkex.BasePyKatException("Retrace command `{0}` is incorrect.".format(line))
else:
self.retrace = int(v[1])
elif(first == "deriv_h"):
v = line.split(" ")
if len(v) != 2:
raise pkex.BasePyKatException("Deriv_h command `{0}` is incorrect.".format(line))
else:
self.deriv_h = float(v[1])
else:
if self.verbose:
print "Parsing `{0}` into pykat object not implemented yet, added as extra line.".format(line)
......
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