Skip to content
GitLab
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
b5ed10f4
Commit
b5ed10f4
authored
Jan 07, 2014
by
Andreas Freise
Browse files
some more errors with scale, maxtem and phase commands.
parent
fa438397
Changes
3
Hide whitespace changes
Inline
Side-by-side
pykat/commands.py
View file @
b5ed10f4
...
...
@@ -57,7 +57,7 @@ class xaxis(Command):
self
.
mx
=
putter
(
"mx1"
)
if
scale
==
"lin"
:
scale
=
cale
.
linear
scale
=
S
cale
.
linear
elif
scale
==
"log"
:
scale
=
Scale
.
logarithmic
elif
isinstance
(
scale
,
str
):
...
...
pykat/detectors.py
View file @
b5ed10f4
...
...
@@ -302,8 +302,8 @@ class photodiode(Detector):
else
:
rtn
.
append
(
"pd{0}{1} {2} {3} {4}*"
.
format
(
self
.
senstype
,
self
.
num_demods
,
self
.
name
,
__f_phi_str
,
self
.
node
.
name
))
if
self
.
scale
!=
1.0
and
self
.
scale
!=
None
:
rtn
.
append
(
"scale {
0
} {
1
}"
.
format
(
self
.
name
,
self
.
scale
))
if
self
.
scale
!=
None
and
self
.
scale
!=
''
:
rtn
.
append
(
"scale {
1
} {
0
}"
.
format
(
self
.
name
,
self
.
scale
))
if
self
.
noplot
:
rtn
.
append
(
"noplot {0}"
.
format
(
self
.
name
))
...
...
pykat/finesse.py
View file @
b5ed10f4
...
...
@@ -182,7 +182,7 @@ class kat(object):
@
property
def
noxaxis
(
self
):
return
self
.
__noxaxis
@
noxaxis
.
setter
def
noxaxis
(
self
,
value
):
self
.
__noxaxis
=
bool
(
value
)
def
noxaxis
(
self
,
value
):
self
.
__noxaxis
=
bool
(
value
)
def
logo
(
self
):
print
""" ..-
...
...
@@ -256,7 +256,6 @@ class kat(object):
first
=
line
.
split
(
" "
,
1
)[
0
]
obj
=
None
if
(
first
==
"m"
or
first
==
"m1"
or
first
==
"m2"
):
obj
=
pykat
.
components
.
mirror
.
parseFinesseText
(
line
)
elif
(
first
==
"s"
):
...
...
@@ -288,20 +287,25 @@ class kat(object):
elif
(
first
==
"phase"
):
v
=
line
.
split
(
" "
)
if
len
(
v
)
!=
2
:
raise
pkex
.
BasePyKatException
(
"
P
hase command `{0}` is incorrect."
.
format
(
line
))
raise
pkex
.
BasePyKatException
(
"
p
hase command `{0}` is incorrect."
.
format
(
line
))
else
:
self
.
phase
=
int
(
v
[
1
])
elif
(
first
==
"maxtem"
):
v
=
line
.
split
(
" "
)
if
len
(
v
)
!=
2
:
raise
pkex
.
BasePyKatException
(
"maxtem command `{0}` is incorrect."
.
format
(
line
))
else
:
self
.
maxtem
=
int
(
v
[
1
])
elif
(
first
==
"retrace"
):
v
=
line
.
split
(
" "
)
if
len
(
v
)
>
2
:
raise
pkex
.
BasePyKatException
(
"Retrace command `{0}` is incorrect."
.
format
(
line
))
elif
len
(
v
)
==
2
:
self
.
retrace
=
v
[
1
]
self
.
retrace
=
v
[
1
]
elif
(
first
==
"deriv_h"
):
v
=
line
.
split
(
" "
)
if
len
(
v
)
!=
2
:
raise
pkex
.
BasePyKatException
(
"
D
eriv_h command `{0}` is incorrect."
.
format
(
line
))
raise
pkex
.
BasePyKatException
(
"
d
eriv_h command `{0}` is incorrect."
.
format
(
line
))
else
:
self
.
deriv_h
=
float
(
v
[
1
])
else
:
...
...
@@ -626,8 +630,8 @@ class kat(object):
if
key
!=
NO_BLOCK
:
out
.
append
(
"%%% FTend "
+
key
+
"
\n
"
)
if
self
.
noxaxis
!=
None
and
self
.
noxaxis
==
True
:
if
self
.
noxaxis
==
True
:
out
.
append
(
"noxaxis
\n
"
)
# now loop through all the nodes and get any gauss commands
...
...
@@ -641,7 +645,7 @@ class kat(object):
out
.
append
(
txt
+
"
\n
"
)
if
self
.
scale
!=
None
and
self
.
scale
!=
1.0
:
out
.
append
(
"scale {0}
\n
"
.
format
(
self
.
scale
))
if
self
.
scale
!=
None
and
self
.
scale
!=
''
:
out
.
append
(
"scale {0}
\n
"
.
format
(
self
.
scale
))
if
self
.
phase
!=
None
:
out
.
append
(
"phase {0}
\n
"
.
format
(
self
.
phase
))
if
self
.
maxtem
!=
None
:
out
.
append
(
"maxtem {0}
\n
"
.
format
(
self
.
maxtem
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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