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
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[5], line 1
----> 1 loader = SpikeSortingLoader(one=one, pid=pids[0], eid=eid)
File <string>:18, in __init__(self, one, atlas, pid, eid, pname, session_path, collections, datasets, files, raw_data_files, collection, histology, spike_sorter, spike_sorting_path, _sync)
File ~/.miniconda3/envs/iblenv/lib/python3.10/site-packages/brainbox/io/one.py:839, in SpikeSortingLoader.__post_init__(self)
837 self.datasets = self.one.list_datasets(self.eid)
838 if self.atlas is None:
--> 839 self.atlas = AllenAtlas()
840 self.files = {}
841 self.raw_data_files = []
File ~/.miniconda3/envs/iblenv/lib/python3.10/site-packages/iblatlas/atlas.py:1388, in AllenAtlas.__init__(self, res_um, scaling, mock, hist_path)
1386 # loads the files
1387 label = self._read_volume(file_label_remap)
-> 1388 image = self._read_volume(hist_path)
1390 super().__init__(image, label, dxyz, regions, ibregma, dims2xyz=dims2xyz, xyz2dims=xyz2dims)
File ~/.miniconda3/envs/iblenv/lib/python3.10/site-packages/iblatlas/atlas.py:1395, in AllenAtlas._read_volume(file_volume)
1392 @staticmethod
1393 def _read_volume(file_volume):
1394 if file_volume.suffix == '.nrrd':
-> 1395 volume, _ = nrrd.read(file_volume, index_order='C') # ml, dv, ap
1396 # we want the coronal slice to be the most contiguous
1397 volume = np.transpose(volume, (2, 0, 1)) # image[iap, iml, idv]
File ~/.miniconda3/envs/iblenv/lib/python3.10/site-packages/nrrd/reader.py:526, in read(filename, custom_field_map, index_order)
524 with open(filename, 'rb') as fh:
525 header = read_header(fh, custom_field_map)
--> 526 data = read_data(header, fh, filename, index_order)
528 return data, header
File ~/.miniconda3/envs/iblenv/lib/python3.10/site-packages/nrrd/reader.py:465, in read_data(header, fh, filename, index_order)
461 del compressed_data
463 # Byte skip is applied AFTER the decompression. Skip first x bytes of the decompressed data and parse it using
464 # NumPy
--> 465 data = np.frombuffer(decompressed_data[byte_skip:], dtype)
467 # Close the file if we opened it
468 if data_filename is not None:
ValueError: buffer size must be a multiple of element size
To Reproduce
A fresh install of iblenv
Run the code snippet above
Expected behavior
A spike loader created without errors.
I did a fresh install of
iblenv
on a M2 MacBook running MacOS 15.3 but got an error when loading spikes:The code above produced the following error:
To Reproduce
iblenv
Expected behavior
A spike loader created without errors.
Hardware info
pip freeze
outputsThe text was updated successfully, but these errors were encountered: