From 2ef3d95ed15d3ae7ba2112cacc3c1ec199636167 Mon Sep 17 00:00:00 2001 From: thayer Date: Tue, 16 Jan 2024 15:22:18 -0500 Subject: [PATCH] raise an exception if there's no data for eval --- src/eval.py | 3 ++- src/utils.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/eval.py b/src/eval.py index 6863b53e..68d1595f 100644 --- a/src/eval.py +++ b/src/eval.py @@ -2777,6 +2777,7 @@ def evaluate_object_sizes( x_voxel_size=.097, y_voxel_size=.097, z_voxel_size=.2, + use_theoretical_widefield_simulator=False, ) w = Wavefront(np.zeros(15)) @@ -2865,7 +2866,7 @@ def evaluate_object_sizes( np.save(f"{savepath}_predictions", preds) residuals = ys - preds - + sizes = [s * samplegen.x_voxel_size for s in sizes] df = pd.DataFrame([w for w in sizes], columns=['size']) df['prediction'] = [Wavefront(i, lam_detection=modelgen.lam_detection).peak2valley(na=na) for i in preds] df['residuals'] = [Wavefront(i, lam_detection=modelgen.lam_detection).peak2valley(na=na) for i in residuals] diff --git a/src/utils.py b/src/utils.py index 8041b491..af3d1b56 100644 --- a/src/utils.py +++ b/src/utils.py @@ -92,8 +92,7 @@ def multiprocess( file=sys.stdout, )) else: - logging.error('Jobs must be a positive integer') - return False + raise Exception(f'No data found in {jobs=}') return np.array(results)