Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Steinlechner
pykat
Commits
df887d61
Commit
df887d61
authored
Dec 16, 2013
by
Daniel Brown
Browse files
adding more options and parsing, removing extra lines
parent
ae1b63cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
df887d61
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment