From eecc39238ef04c61510a80c1545c9178c234f89d Mon Sep 17 00:00:00 2001 From: Lior Golgher Date: Sun, 2 Feb 2020 15:22:57 +0200 Subject: [PATCH] support list files with PMT2 and without PMT1 Allowing list files to contain any PMT channel, even if PMT1 channel is missing. --- src/pysight/gui/gui_helpers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pysight/gui/gui_helpers.py b/src/pysight/gui/gui_helpers.py index e83db58..b46cdd0 100755 --- a/src/pysight/gui/gui_helpers.py +++ b/src/pysight/gui/gui_helpers.py @@ -37,8 +37,9 @@ def verify_input(config: Dict[str, Any]): config["inputs"]["stop4"], config["inputs"]["stop5"], ] - if "PMT1" not in list_of_keys: - raise BrokenPipeError("PMT1 value has to be entered in inputs.") + short_list_of_keys = [x[:-1] for x in list_of_keys] + if "PMT" not in short_list_of_keys: + raise BrokenPipeError("At least one PMT value has to be entered in inputs.") if config["image"]["num_of_frames"] == None: if "Frames" not in data_sources: