Time average, other improvments

This commit is contained in:
Noe Brucy
2019-05-20 10:56:31 +02:00
parent 2f9bdf4bf9
commit aa8ba76162
2 changed files with 99 additions and 59 deletions
+22 -12
View File
@@ -238,14 +238,15 @@ if args.compare:
path = storage_out + path_suffix
if args.time_avg:
# Select output availables for all runs
output_ok = reduce(np.intersect1d, [run_succeded[run] for run in runs])
# Select output availables for at least on run
output_ok = reduce(np.union1d, [run_succeded[run] for run in runs]).astype(int)
print(output_ok)
if len(output_ok) >= 1:
dp.compare(
path,
runs,
output_ok,
path_out=path + "/comp",
force=args.force_redo,
interactive=args.interactive,
Q_in_name=(not args.pdf),
@@ -255,13 +256,22 @@ if args.compare:
for i in range(first, last + 1, step):
# Select usable runs
runs_ok = [run for run in runs if i in run_succeded[run]]
if len(runs_ok) > 1:
dp.compare(
path,
runs_ok,
i,
force=args.force_redo,
interactive=args.interactive,
Q_in_name=(not args.pdf),
pdf=args.pdf,
)
try:
if len(runs_ok) > 1:
dp.compare(
path,
runs_ok,
i,
path_out=path + "/comp",
force=args.force_redo,
interactive=args.interactive,
Q_in_name=(not args.pdf),
pdf=args.pdf,
)
except (KeyError, IOError) as e:
print(e)
if args.skip:
pass
else:
raise