Skip to content

Commit

Permalink
Temporary check for unsupported NXmx term, undefined_value
Browse files Browse the repository at this point in the history
AFAIK undefined_value isn't in any existing nexus files.

See nexusformat/definitions#656 for the proposed replacement.
  • Loading branch information
phyy-nx committed Apr 16, 2019
1 parent b6605ad commit 9efa103
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions format/nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,11 @@ 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"][()])
Expand Down

0 comments on commit 9efa103

Please sign in to comment.