From 67f45323f82c839d230bdb642781dd117c35b841 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 28 Oct 2024 19:42:07 +0000 Subject: [PATCH] earlier PETRIC_SKIP_DATA - fixes #117 --- petric.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/petric.py b/petric.py index 59c302a..debf617 100755 --- a/petric.py +++ b/petric.py @@ -298,7 +298,7 @@ def get_image(fname): 'Mediso_NEMA_IQ_lowcounts': {'transverse_slice': 22, 'coronal_slice': 74, 'sagittal_slice': 70}, 'GE_DMI4_NEMA_IQ': {'transverse_slice': 27, 'coronal_slice': 109, 'sagittal_slice': 78}} -if SRCDIR.is_dir(): +if SRCDIR.is_dir() and not os.getenv("PETRIC_SKIP_DATA", False): # create list of existing data # NB: `MetricsWithTimeout` initialises `SaveIters` which creates `outdir` data_dirs_metrics = [ @@ -335,7 +335,7 @@ def get_image(fname): if __name__ != "__main__": # load up first data-set for people to play with srcdir, outdir, metrics = data_dirs_metrics[0] - if srcdir is None or os.getenv("PETRIC_SKIP_DATA", False): + if srcdir is None: data = None else: data = get_data(srcdir=srcdir, outdir=outdir)