You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice how in hdmf, if the data has a compound dtype, the shape is (len(data),), but in neuroconv the shape is always get_data_shape(data).
This throws an error when they mismatch in the case of a Caiman pixel_mask, which is a compound dtype in NWB.
The initial solution that I came up with was to load the NWB schema to figure out if a dataset is compound or not, but I was having some trouble finding the right code to load in the schema...
Update:
I figured out that I can use the builder's dtype (from io.get_builder(dataset)) to appropriately check for compound dtypes, BUT io.get_builder only works when the nwbfile is being read from disk -- it returns None when the nwbfile is in memory.
What happened?
Dev tests are failing: https://github.com/catalystneuro/neuroconv/actions/runs/11567195585/job/32197117750
Tracked this down to an update with hdmf that uncovered these lines: https://github.com/hdmf-dev/hdmf/blob/dev/src/hdmf/backends/hdf5/h5tools.py#L1476-L1483
And our chunking recommendation based on the data shape here: https://github.com/catalystneuro/neuroconv/blob/main/src/neuroconv/tools/nwb_helpers/_configuration_models/_base_dataset_io.py#L263
Notice how in hdmf, if the data has a compound dtype, the shape is
(len(data),)
, but in neuroconv the shape is alwaysget_data_shape(data)
.This throws an error when they mismatch in the case of a Caiman pixel_mask, which is a compound dtype in NWB.
The initial solution that I came up with was to load the NWB schema to figure out if a dataset is compound or not, but I was having some trouble finding the right code to load in the schema...
Steps to Reproduce
Traceback
No response
Operating System
Linux
Python Executable
Conda
Python Version
3.9
Package Versions
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: