Skip to content

Commit

Permalink
update utility docs
Browse files Browse the repository at this point in the history
  • Loading branch information
clmould authored and jonmaddock committed Oct 12, 2023
1 parent 3e11b37 commit e9af3f0
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 722 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
843 changes: 144 additions & 699 deletions documentation/proc-pages/io/utilities.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions process/io/mfile_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ def main(arg):
parser = argparse.ArgumentParser(
description="Produce a comparison "
"between two PROCESS "
"MFILEs. User Can speicify "
"level of differences to show"
"MFILEs. User Can specify "
"level of differences to show. "
"For info contact "
"[email protected]"
)
Expand Down
7 changes: 2 additions & 5 deletions process/io/plot_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2826,9 +2826,7 @@ def parse_args(args):
help="specify PLASMOD profile file",
)

parser.add_argument(
"-s", "--show", help="show plot as well as saving figure", action="store_true"
)
parser.add_argument("-s", "--show", help="show plot", action="store_true")

parser.add_argument("-n", type=int, help="Which scan to plot?")

Expand Down Expand Up @@ -3117,8 +3115,7 @@ def main(args=None):

# show fig if option used
if args.show:
plt.show(page1)
plt.show(page2)
plt.show(block=True)

# This bit doesn't work - the argument is not recognised for some reason.:
# if args.svg:
Expand Down
12 changes: 3 additions & 9 deletions process/io/plot_sankey.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import matplotlib
import argparse
from pylab import show, savefig
from process.io.sankey_funcs import plot_full_sankey, plot_sankey
from process.io.sankey_funcs import plot_sankey

matplotlib.use("Agg")

Expand All @@ -32,19 +32,13 @@ def main(args=None):
"-m", "--mfile", default="MFILE.DAT", help="mfile name, default = MFILE.DAT"
)

PARSER.add_argument("-f", "--full", action="store_true", help="Plot full version")

ARGS = PARSER.parse_args(args)

#########################################################
# main program

if ARGS.full:
plot_full_sankey(ARGS.mfile)
savefig("SankeyPowerFlow_full." + ARGS.end)
else:
plot_sankey(ARGS.mfile)
savefig("SankeyPowerFlow." + ARGS.end)
plot_sankey(ARGS.mfile)
savefig("SankeyPowerFlow." + ARGS.end)

show()

Expand Down
4 changes: 1 addition & 3 deletions utilities/costs_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,7 @@ def comp_step():
"-f", metavar="f", type=str, nargs="+", help="specify the MFILE(s) to plot"
)

parser.add_argument(
"-s", "--save", help="save as well as displaying figure", action="store_true"
)
parser.add_argument("-s", "--save", help="save figure", action="store_true")

parser.add_argument("-inf", type=float, help="Inflation Factor (multiplies costs)")

Expand Down
4 changes: 1 addition & 3 deletions utilities/costs_pie.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,7 @@ def step_cost_model():
help="specify the MFILE (default=MFILE.DAT)",
)

parser.add_argument(
"-s", "--save", help="save as well as displaying figure", action="store_true"
)
parser.add_argument("-s", "--save", help="save figure", action="store_true")

args = parser.parse_args()

Expand Down
2 changes: 1 addition & 1 deletion utilities/plot_stress_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"--plot_selec",
nargs="?",
default="all",
help="Plot selection string :\n - If it containts 'sig' -> Stress radial dependency \n - If it containts 'strain' -> Strain \n - If it containts 'disp' -> Displacement \n - If it containts 'all' -> all the mentionned plots (default value)",
help="Plot selection string :\n - If it containts 'sig' -> Stress radial dependency \n - If it containts 'strain' -> Strain \n - If it containts 'disp' -> Displacement \n - If it containts 'all' -> all the mentioned plots (default value)",
)
parser.add_argument(
"-sf",
Expand Down

0 comments on commit e9af3f0

Please sign in to comment.