Added extror from logs and namelist
This commit is contained in:
+24
-13
@@ -27,6 +27,9 @@ input_args.add_argument("-p", "--project",
|
||||
help="specify project name (directory within the input directory)",
|
||||
default="disk")
|
||||
|
||||
input_args.add_argument("-c", "--config",
|
||||
help="Path of a default config file",
|
||||
default=None)
|
||||
|
||||
input_args.add_argument("-wo", "--which_inputs",
|
||||
choices=['all', 'id', 'time'],
|
||||
@@ -77,15 +80,19 @@ output_args.add_argument("--tag",
|
||||
help="Add a special tag on output filemanes",
|
||||
default='')
|
||||
|
||||
output_args.add_argument("--interactive",
|
||||
help="Interactive mode : do not save data",
|
||||
action='store_true')
|
||||
|
||||
output_args.add_argument("-owr", "--overwrite",
|
||||
help="Overwrite outputs",
|
||||
action='store_true')
|
||||
|
||||
|
||||
output_args.add_argument("-owrd", "--overwrite_dependencies",
|
||||
help="Overwrite outputs for dependencies",
|
||||
action='store_true',
|
||||
default=None)
|
||||
default=False)
|
||||
|
||||
|
||||
pp_args = parser.add_argument_group('postproc', "Post Processing configuration")
|
||||
|
||||
@@ -118,7 +125,7 @@ pp_args.add_argument("--plot",
|
||||
|
||||
pp_args.add_argument("-plargs", "--plot_args",
|
||||
help="Args to give to plot rules",
|
||||
default=['x', 'y', 'z'],
|
||||
default=[None],
|
||||
nargs='*')
|
||||
|
||||
pp_args.add_argument("-d", "--disk",
|
||||
@@ -174,11 +181,15 @@ runs = args.runs
|
||||
storage_in = args.input_path
|
||||
storage_out = args.output_path
|
||||
|
||||
pp_params = Params()
|
||||
if args.config is None:
|
||||
pp_params = default_params()
|
||||
else:
|
||||
pp_params = load_params(args.config)
|
||||
|
||||
pp_params.out.zoom = args.zoom
|
||||
pp_params.out.tag = args.tag
|
||||
pp_params.out.map_size = args.map_size
|
||||
pp_params.out.interactive = args.interactive
|
||||
|
||||
pp_params.pymses.fft = args.fft
|
||||
|
||||
@@ -208,7 +219,6 @@ P.rcParams["errorbar.capsize"] = 4
|
||||
# List of id that were successfully computed
|
||||
nums_success = dict()
|
||||
|
||||
|
||||
# Go through all runs
|
||||
for run in runs:
|
||||
path_suffix = project + '/' + run
|
||||
@@ -249,15 +259,11 @@ for run in runs:
|
||||
|
||||
while not success:
|
||||
try:
|
||||
if len(args.process) > 0 and len(args.plot) > 0:
|
||||
if len(args.process) > 0 :
|
||||
pp = PostProcessor(run, num, pp_params=pp_params)
|
||||
pp.process(args.process, args.process_args,
|
||||
overwrite=args.overwrite, overwrite_dep=args.overwrite_dependencies)
|
||||
|
||||
pltter = Plotter(filename=pp.filename)
|
||||
pltter.plot(args.plot, args.plot_args,
|
||||
overwrite=args.overwrite, overwrite_dep=args.overwrite_dependencies)
|
||||
|
||||
# If we are here, success !
|
||||
success = True
|
||||
nums_success[run].append(num)
|
||||
@@ -274,10 +280,15 @@ for run in runs:
|
||||
else:
|
||||
raise
|
||||
|
||||
if len(args.compare) > 0:
|
||||
path_in = storage_in + project
|
||||
path_out = storage_out + project
|
||||
path_in = storage_in + project
|
||||
path_out = storage_out + project
|
||||
|
||||
if len(args.plot) > 0:
|
||||
pl = Plotter(path_in, runs, nums_success, path_out=path_out, pp_params=pp_params)
|
||||
pl.process(args.plot, args.plot_args,
|
||||
overwrite=args.overwrite, overwrite_dep=args.overwrite_dependencies)
|
||||
|
||||
if len(args.compare) > 0:
|
||||
cc = Comparator(path_in, runs, nums_success, path_out=path_out, pp_params=pp_params)
|
||||
cc.process(args.compare, args.compare_args,
|
||||
overwrite=args.overwrite, overwrite_dep=args.overwrite_dependencies)
|
||||
|
||||
Reference in New Issue
Block a user