From fcfe9fd0f6ba7af3f23f6040814b03cbdfdb0c5c Mon Sep 17 00:00:00 2001 From: Sam Jenkins <s.jenkins@stfc.ac.uk> Date: Tue, 26 Feb 2019 09:27:00 +0000 Subject: [PATCH] Re #24850 fixed vanadium and calibration running unnesecarily --- scripts/Engineering/EnginX.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/Engineering/EnginX.py b/scripts/Engineering/EnginX.py index 4df7c7da246..09d656cd8b5 100644 --- a/scripts/Engineering/EnginX.py +++ b/scripts/Engineering/EnginX.py @@ -108,8 +108,8 @@ def run(ceria_run, do_cal, do_van, van_run, calibration_directory, calibration_g """ # check whether creating a vanadium is required or requested - vanadium = _gen_filename(van_run) - if not os.path.isfile(vanadium) or do_van: + if (not os.path.isfile(_get_van_names(van_run, calibration_directory)[0])) or do_van: + print("create vanadium") create_vanadium(van_run, calibration_directory) # find the file names of calibration files that would be created by this run @@ -123,6 +123,7 @@ def run(ceria_run, do_cal, do_van, van_run, calibration_directory, calibration_g # if the calibration files that this run would create are not present, or the user has requested it, create the # calibration files if not all(expected_cals_present) or do_cal: + print("create calibration") create_calibration(ceria_run, van_run, calibration_directory, calibration_general, cropped, crop_name, crop_on) # if a focus is requested, run the focus -- GitLab