From ee226ff689f7edd75a10c2fbd44da65575bb9621 Mon Sep 17 00:00:00 2001 From: Joe Ramsay <joseph.ramsay@stfc.ac.uk> Date: Fri, 23 Feb 2018 11:18:53 +0000 Subject: [PATCH] RE #21805 Display warning when 0 current run is loaded indiviually --- scripts/Diffraction/isis_powder/routines/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/Diffraction/isis_powder/routines/common.py b/scripts/Diffraction/isis_powder/routines/common.py index 369d4297d9b..78adea956e9 100644 --- a/scripts/Diffraction/isis_powder/routines/common.py +++ b/scripts/Diffraction/isis_powder/routines/common.py @@ -1,5 +1,6 @@ from __future__ import (absolute_import, division, print_function) from six import iterkeys +import warnings import mantid.kernel as kernel import mantid.simpleapi as mantid @@ -385,6 +386,10 @@ def run_normalise_by_current(ws): """ if workspace_has_current(ws): ws = mantid.NormaliseByCurrent(InputWorkspace=ws, OutputWorkspace=ws) + else: + warnings.warn( + "Run {} had no current. NormaliseByCurrent will not be run on it, and empty will not be subtracted". + format(ws.getRunNumber())) return ws -- GitLab