From 5d70a184490e6e9aba45811b66d2849fc07c70dd Mon Sep 17 00:00:00 2001 From: Sam Jenkins <s.jenkins@stfc.ac.uk> Date: Wed, 8 Aug 2018 10:17:56 +0100 Subject: [PATCH] Re #23149 Fixed System test failure Fixed unit test failure due to not checking whether or not to attempt to perform vanadium before loading the vanadium file --- scripts/Diffraction/isis_powder/routines/focus.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/Diffraction/isis_powder/routines/focus.py b/scripts/Diffraction/isis_powder/routines/focus.py index a2c40738c39..e6af0a277f9 100644 --- a/scripts/Diffraction/isis_powder/routines/focus.py +++ b/scripts/Diffraction/isis_powder/routines/focus.py @@ -99,7 +99,10 @@ def _batched_run_focusing(instrument, perform_vanadium_norm, run_number_string, read_ws_list = common.load_current_normalised_ws_list(run_number_string=run_number_string, instrument=instrument) run_details = instrument._get_run_details(run_number_string=run_number_string) - vanadium_splines = mantid.LoadNexus(Filename=run_details.splined_vanadium_file_path) + vanadium_splines = None; + if perform_vanadium_norm: + vanadium_splines = mantid.LoadNexus(Filename=run_details.splined_vanadium_file_path) + output = None for ws in read_ws_list: output = _focus_one_ws(input_workspace=ws, run_number=run_number_string, instrument=instrument, @@ -139,7 +142,9 @@ def _individual_run_focusing(instrument, perform_vanadium_norm, run_number, abso # Load and process one by one run_numbers = common.generate_run_numbers(run_number_string=run_number) run_details = instrument._get_run_details(run_number_string=run_number) - vanadium_splines = mantid.LoadNexus(Filename=run_details.splined_vanadium_file_path) + vanadium_splines = None; + if perform_vanadium_norm: + vanadium_splines = mantid.LoadNexus(Filename=run_details.splined_vanadium_file_path) output = None for run in run_numbers: ws = common.load_current_normalised_ws_list(run_number_string=run, instrument=instrument) -- GitLab