Skip to content

HDF5 data with uint32_t type unreadable and > 1000 frames fails with NXmx #834

@graeme-winter

Description

@graeme-winter
ethics-gradient:EP graeme$ dials.image_viewer imported.expt 
DIALS (2018) Acta Cryst. D74, 85-97. https://doi.org/10.1107/S2059798317017235
The following parameters have been modified:

input {
  experiments = imported.expt
}

Traceback (most recent call last):
  File "/Users/graeme/git/dials/conda_base/bin/dials.image_viewer", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/Users/graeme/git/dials/conda_base/lib/python3.12/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/graeme/git/dials/modules/dials/src/dials/command_line/image_viewer.py", line 209, in run
    show_image_viewer(params=params, reflections=reflections, experiments=experiments)
  File "/Users/graeme/git/dials/modules/dials/src/dials/command_line/image_viewer.py", line 174, in show_image_viewer
    wrapper.display(experiments=experiments, reflections=reflections)
  File "/Users/graeme/git/dials/modules/dials/src/dials/util/image_viewer/spotfinder_wrap.py", line 86, in display
    self.frame.load_image(chooser_wrapper(imagesets[0], 0))
  File "/Users/graeme/git/dials/modules/dials/src/dials/util/image_viewer/spotfinder_frame.py", line 657, in load_image
    super().load_image(
  File "/Users/graeme/git/dials/modules/dials/src/dials/util/image_viewer/slip_viewer/frame.py", line 438, in load_image
    self.pyslip.tiles.set_image(
  File "/Users/graeme/git/dials/modules/dials/src/dials/util/image_viewer/slip_viewer/tile_generation.py", line 70, in set_image
    self.raw_image.set_image_data(get_image_data(self.raw_image))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/graeme/git/dials/modules/dials/src/dials/util/image_viewer/spotfinder_frame.py", line 851, in get_image_data
    image_data = image.get_image_data()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/graeme/git/dials/modules/dials/src/dials/util/image_viewer/slip_viewer/frame.py", line 57, in get_image_data
    return self.image_set.get_corrected_data(self.index)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/graeme/git/dials/modules/dxtbx/src/dxtbx/format/FormatMultiImage.py", line 47, in read
    return format_instance.get_raw_data(index)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/graeme/git/dials/modules/dxtbx/src/dxtbx/format/FormatNXmx.py", line 164, in get_raw_data
    raw_data = dxtbx.nexus.get_raw_data(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/graeme/git/dials/modules/dxtbx/src/dxtbx/nexus/__init__.py", line 587, in get_raw_data
    data_as_flex = _dataset_as_flex(
                   ^^^^^^^^^^^^^^^^^
  File "/Users/graeme/git/dials/modules/dxtbx/src/dxtbx/nexus/__init__.py", line 548, in _dataset_as_flex
    raise TypeError(f"Unsupported integer dtype {data_np.dtype}")
TypeError: Please report this error at https://github.com/dials/dials/issues or to dials-user-group@jiscmail.ac.uk: Unsupported integer dtype uint32

from

/entry/data/data         Dataset {1000/Inf, 1630/1630, 1553/1553}
    Attribute: image_nr_high scalar
        Type:      native int
    Attribute: image_nr_low scalar
        Type:      native int
    Location:  1:3024
    Links:     1
    Chunks:    {1, 1630, 1553} 10125560 bytes
    Storage:   10125560000 logical bytes, 1078062909 allocated bytes, 939.24% utilization
    Filter-0:  bitshuffle; see https://github.com/kiyo-masui/bitshuffle-32008  {0, 4, 4, 4096, 2}
    Type:      native unsigned int

This feels like something which really should work

The issue could be that this is Pilatus 4 data and for Eiger we may have a magic work around?

ethics-gradient:EP graeme$ cat dials.import.log 
DIALS (2018) Acta Cryst. D74, 85-97. https://doi.org/10.1107/S2059798317017235
DIALS 3.dev.1345-g26ce668e5
The following parameters have been modified:

input {
  experiments = <image files>
}

--------------------------------------------------------------------------------
  format: <class 'dxtbx.format.FormatNXmx.FormatNXmx'>
  template: /Users/graeme/Downloads/EP_cs_01-7_003_master.h5:1:1800
  num images: 1800
  sequences:
    still:    0
    sweep:    1
  num stills: 0
--------------------------------------------------------------------------------
Writing experiments to imported.expt

I will explore that

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions