From 6510c76ce9d48b87036076abc5369c1e9e418a4f Mon Sep 17 00:00:00 2001 From: Aaron Brewster Date: Wed, 24 Apr 2019 10:10:30 -0700 Subject: [PATCH] Add underload to nexus.py, following resolution of nexusformat/definitions#656 --- format/nexus.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/format/nexus.py b/format/nexus.py index c0b76b4ab..603745d7c 100644 --- a/format/nexus.py +++ b/format/nexus.py @@ -1165,16 +1165,10 @@ def set_frame(pg, transformation): reversed(map(int, nx_detector_module.handle["data_size"][-2:])) ) - # Temporary check for unsupported term. AFAIK undefined_value isn't in any existing nexus files. - # See https://github.com/nexusformat/definitions/issues/656 for the proposed replacement. - assert ( - "undefined_value" not in nx_detector.handle - ), "undefined_value not an NXmx term. See nexusformat/definitions#656." - # Get the trusted range of pixel values underload = ( - float(nx_detector.handle["undefined_value"][()]) - if "undefined_value" in nx_detector.handle + float(nx_detector.handle["underload_value"][()]) + if "underload_value" in nx_detector.handle else -400 ) overload = (