Skip to content

Commit fa39787

Browse files
committed
Not NXmx if no VDS
1 parent 1c76800 commit fa39787

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/dxtbx/format/FormatNXmx.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,16 @@ class FormatNXmx(FormatNexus):
7474
@staticmethod
7575
def understand(image_file):
7676
with h5py.File(image_file) as handle:
77-
return bool(
78-
[
79-
entry
80-
for entry in nxmx.find_class(handle, "NXentry")
81-
if "definition" in entry
82-
and nxmx.h5str(entry["definition"][()]) == "NXmx"
83-
]
77+
return (
78+
bool(
79+
[
80+
entry
81+
for entry in nxmx.find_class(handle, "NXentry")
82+
if "definition" in entry
83+
and nxmx.h5str(entry["definition"][()]) == "NXmx"
84+
]
85+
)
86+
and "/entry/data/data" in handle
8487
)
8588

8689
def __init__(self, image_file, **kwargs):

0 commit comments

Comments
 (0)