Skip to content
Snippets Groups Projects
Commit 429a3cf7 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm parse_args from ba_plot

parent 3d93ded1
No related branches found
No related tags found
1 merge request!2824replace bp.parse_args by bp.parse_commandline plus direct manipulation of plotargs (#1065,#1071)
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment