Skip to content

Commit

Permalink
Fix recently added JF4M format class. Avoids matching to dataset h5 f…
Browse files Browse the repository at this point in the history
…iles
  • Loading branch information
jbeilstenedmands committed Mar 11, 2024
1 parent 1da5d45 commit 89a4d36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions newsfragments/XXX.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix recently added ESRF Jungfrau4M format class
4 changes: 4 additions & 0 deletions src/dxtbx/format/FormatHDF5ESRFJungfrau4M.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def understand(image_file):
if len(h5_handle) != 1:
return False
key = list(h5_handle.keys())[0]
if not isinstance(
h5_handle[key], h5py.Group
): # check we're not trying to read a 'dataset' object
return False
if "instrument" not in h5_handle[key]:
return False
# instrument name is of form jungfrau4m_rr[X]_smx where X is empty, 4 or another number
Expand Down

0 comments on commit 89a4d36

Please sign in to comment.