From 3f65d36d10424e474d17e639c7c1c14859499db8 Mon Sep 17 00:00:00 2001 From: Alexander Urban Date: Tue, 12 Mar 2019 12:03:29 -0500 Subject: [PATCH 1/2] Omega scans round do the second decimal point --- bin/hveto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/hveto b/bin/hveto index ddd023b..10cd82a 100755 --- a/bin/hveto +++ b/bin/hveto @@ -813,7 +813,7 @@ if args.omega_scans: omegatimes = list(map(str, sorted(unique( [t['time'] for r in rounds for t in r.scans])))) logger.debug("Collected %d times to omega scan" % len(omegatimes)) - newtimes = [t for t in omegatimes if not + newtimes = [t for t in numpy.round(omegatimes, 2) if not os.path.exists(os.path.join(omegadir, str(t)))] logger.debug("%d scans already complete or in progress, %d remaining" % (len(omegatimes) - len(newtimes), len(newtimes))) From 2c13c87ea8df4d37abe0e72922fc1bd4fe4f166d Mon Sep 17 00:00:00 2001 From: Alexander Urban Date: Tue, 12 Mar 2019 12:04:29 -0500 Subject: [PATCH 2/2] Need to import numpy --- bin/hveto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/hveto b/bin/hveto index 10cd82a..a155f15 100755 --- a/bin/hveto +++ b/bin/hveto @@ -44,7 +44,7 @@ try: except ImportError: # python 2.x import ConfigParser as configparser -from numpy import unique +import numpy from matplotlib import use use('agg') @@ -810,7 +810,7 @@ logger.debug("Summary JSON written to %s" % f.name) # -- generate workflow for omega scans if args.omega_scans: - omegatimes = list(map(str, sorted(unique( + omegatimes = list(map(str, sorted(numpy.unique( [t['time'] for r in rounds for t in r.scans])))) logger.debug("Collected %d times to omega scan" % len(omegatimes)) newtimes = [t for t in numpy.round(omegatimes, 2) if not