Skip to content

Error reading file with links in NXdata #18

@DanPorter

Description

@DanPorter

Example NXxas file downloaded from:

https://pynxxas.readthedocs.io/en/latest/

Reading the file with:

hdfmap.create_nexus_map('KEK_PFdata.h5')

Gives error:

Traceback (most recent call last):
  File "C:\Users\grp66007\OneDrive - Diamond Light Source Ltd\PythonProjects\hdfmap\examples\nxxas_error_may25.py", line 10, in <module>
    m = hdfmap.create_nexus_map(f)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\grp66007\OneDrive - Diamond Light Source Ltd\PythonProjects\hdfmap\src\hdfmap\file_functions.py", line 55, in create_nexus_map
    hdf_map.populate(hdf, groups=groups, default_entry_only=default_entry_only)
  File "C:\Users\grp66007\OneDrive - Diamond Light Source Ltd\PythonProjects\hdfmap\src\hdfmap\nexus.py", line 388, in populate
    self.generate_image_data_from_nxdetector()
  File "C:\Users\grp66007\OneDrive - Diamond Light Source Ltd\PythonProjects\hdfmap\src\hdfmap\nexus.py", line 309, in generate_image_data_from_nxdetector
    image_ndim = len(self.scannables_shape()) + 2 if self.scannables else 3
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\grp66007\OneDrive - Diamond Light Source Ltd\PythonProjects\hdfmap\src\hdfmap\hdfmap_class.py", line 379, in scannables_shape
    return self.datasets[path].shape
           ~~~~~~~~~~~~~^^^^^^
KeyError: '/fe010/plot/energy'

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