Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Steinlechner
pykat
Commits
a76f88c1
Commit
a76f88c1
authored
11 years ago
by
Andreas Freise
Browse files
Options
Downloads
Patches
Plain Diff
adding the possibility to run finesse with plotting.
parent
97fb34f9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pykat/finesse.py
+10
-7
10 additions, 7 deletions
pykat/finesse.py
with
10 additions
and
7 deletions
pykat/finesse.py
+
10
−
7
View file @
a76f88c1
...
@@ -704,7 +704,7 @@ class kat(object):
...
@@ -704,7 +704,7 @@ class kat(object):
return
Process
(
target
=
f__lkat_process
,
args
=
(
callback
,
cmd
,
kwargs
))
return
Process
(
target
=
f__lkat_process
,
args
=
(
callback
,
cmd
,
kwargs
))
def
run
(
self
,
printout
=
0
,
printerr
=
0
,
save_output
=
False
,
save_kat
=
False
,
kat_name
=
None
)
:
def
run
(
self
,
printout
=
0
,
printerr
=
0
,
plot
=
None
,
save_output
=
False
,
save_kat
=
False
,
kat_name
=
None
)
:
"""
"""
Runs the current simulation setup that has been built thus far.
Runs the current simulation setup that has been built thus far.
It returns a katRun or katRun2D object which is populated with the various
It returns a katRun or katRun2D object which is populated with the various
...
@@ -751,6 +751,14 @@ class kat(object):
...
@@ -751,6 +751,14 @@ class kat(object):
r
.
katScript
=
""
.
join
(
self
.
generateKatScript
())
r
.
katScript
=
""
.
join
(
self
.
generateKatScript
())
if
(
plot
==
None
):
# ensure we don't do any plotting. That should be handled
# by user themselves
r
.
katScript
+=
(
"
gnuterm no
\n
"
)
r
.
katScript
+=
(
"
pyterm no
\n
"
)
else
:
r
.
katScript
+=
(
plot
+
"
\n
"
)
# create a kat file which we will write the script into
# create a kat file which we will write the script into
if
self
.
__tempname
==
None
:
if
self
.
__tempname
==
None
:
katfile
=
tempfile
.
NamedTemporaryFile
(
suffix
=
"
.kat
"
,
dir
=
self
.
__tempdir
)
katfile
=
tempfile
.
NamedTemporaryFile
(
suffix
=
"
.kat
"
,
dir
=
self
.
__tempdir
)
...
@@ -761,7 +769,7 @@ class kat(object):
...
@@ -761,7 +769,7 @@ class kat(object):
katfile
.
writelines
(
r
.
katScript
)
katfile
.
writelines
(
r
.
katScript
)
katfile
.
flush
()
katfile
.
flush
()
if
printout
==
1
:
if
printout
==
1
or
plot
!=
None
:
cmd
=
[
kat_exec
]
cmd
=
[
kat_exec
]
else
:
else
:
cmd
=
[
kat_exec
,
'
--perl1
'
]
cmd
=
[
kat_exec
,
'
--perl1
'
]
...
@@ -1112,11 +1120,6 @@ class kat(object):
...
@@ -1112,11 +1120,6 @@ class kat(object):
if
self
.
noxaxis
==
True
:
if
self
.
noxaxis
==
True
:
out
.
append
(
"
noxaxis
\n
"
)
out
.
append
(
"
noxaxis
\n
"
)
# ensure we don't do any plotting. That should be handled
# by user themselves
out
.
append
(
"
gnuterm no
\n
"
)
out
.
append
(
"
pyterm no
\n
"
)
return
out
return
out
def
openGUI
(
self
):
def
openGUI
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment