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
939d328e
Commit
939d328e
authored
Dec 02, 2015
by
Daniel Brown
Browse files
adding out.info()
parent
36f3b074
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/test_plot.py
View file @
939d328e
...
...
@@ -42,6 +42,7 @@ kat.m2.Rcy = 1000.0
kat
.
maxtem
=
0
out
=
kat
.
run
()
fig
=
out
.
plot
(
yaxis
=
"log abs:deg"
)
#
fig = out.plot(yaxis="log abs:deg")
#fig.savefig("test_plot.pdf")
out
.
info
()
\ No newline at end of file
pykat/finesse.py
View file @
939d328e
...
...
@@ -240,6 +240,25 @@ class katRun(object):
self
.
katVersion
=
None
self
.
yaxis
=
None
def
info
(
self
):
kat
=
pykat
.
finesse
.
kat
()
kat
.
verbose
=
False
kat
.
parseCommands
(
self
.
katScript
)
detectors
=
list
(
set
([
lbl
.
split
()[
0
]
for
lbl
in
self
.
ylabels
]))
detectors
.
sort
()
print
(
"--- Output info ---"
)
print
(
"Run date and time: %s"
%
self
.
StartDateTime
)
print
(
"Detectors used: %s"
%
(
", "
.
join
(
detectors
)))
if
kat
.
noxaxis
:
print
(
"No xaxis used"
)
else
:
print
(
"One xaxis used: %s"
%
kat
.
xaxis
.
getFinesseText
())
def
plot
(
self
,
detectors
=
None
,
filename
=
None
,
show
=
True
,
yaxis
=
None
,
legend
=
True
,
loc
=
0
,
title
=
None
):
"""
This will generate a plot for the output data of this particular pykat run.
...
...
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