Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
429a3cf7
Commit
429a3cf7
authored
2 months ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rm parse_args from ba_plot
parent
3d93ded1
No related branches found
Branches containing commit
No related tags found
1 merge request
!2824
replace bp.parse_args by bp.parse_commandline plus direct manipulation of plotargs (#1065,#1071)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Wrap/Python/src/bornagain/ba_plot.py
+1
-25
1 addition, 25 deletions
Wrap/Python/src/bornagain/ba_plot.py
with
1 addition
and
25 deletions
Wrap/Python/src/bornagain/ba_plot.py
+
1
−
25
View file @
429a3cf7
...
...
@@ -64,8 +64,7 @@ def parse_any(tmp:dict):
for
key
in
list
(
tmp
.
keys
()):
if
key
[
0
:
4
]
==
'
sim_
'
:
simargs
[
key
[
4
:]]
=
tmp
[
key
]
print
(
f
"
Warning from bp.parse_args, called from
{
sys
.
argv
[
0
]
}
:
"
"
Obsolete argument
'
{key}
'
.
"
print
(
f
"
Obsolete argument
'
{
key
}
'
.
"
"
All arguments starting with
'
sim_
'
are obsolete since BornAgain 21.
"
"
Support for bp.simargs will be removed in BornAgain 23.
"
"
Replace
'
bp.simargs[
'
{key[4:]}
'
]
'
by a hard-coded value
"
...
...
@@ -434,29 +433,6 @@ def plot_simres(result, **kwargs):
# standard user calls
# ************************************************************************** #
def
parse_args
(
**
kwargs
):
"""
Ingests plot options:
:param intensity_min: Min value on amplitude
'
s axis or color legend
:param intensity_max: Max value on amplitude
'
s axis or color legend
:param legendloc: Where to place the legend (default:
'
upper right
'
)
:param ymin: minimal y-axis value to show
:param ymax: maximum y-axis value to show
:param zmin: Min value on amplitude
'
s color legend
:param zmax: Max value on amplitude
'
s color legend
and instrumentation parameters:
:param datfile: save result to data file
:param figfile: save figure to image file (with extension .pdf .png or similar)
:param show: if
'
n
'
than do not show the plot
:param tolerance: maximum relative error when checking against reference
:param reference: data file (without extension .int) to check against
"""
plotargs
=
parse_commandline
()
# command line overwrites options in script
plotargs
.
update
(
parse_any
(
kwargs
))
return
plotargs
def
export
(
**
plotargs
):
_figfile
=
plotargs
.
pop
(
'
figfile
'
,
None
)
if
_figfile
:
...
...
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