-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hello,
I came across spec2nii, and we are interested to use it in order to extract the MRS voxel into the nifti format. Trying to use it I have stumbled along the following errors:
spec2nii bruker -m FID 8/fid
Traceback (most recent call last):
File "/home/spectro/anaconda3/bin/spec2nii", line 10, in
sys.exit(main())
File "/home/spectro/anaconda3/lib/python3.7/site-packages/spec2nii/spec2nii.py", line 666, in main
spec2nii(*args)
File "/home/spectro/anaconda3/lib/python3.7/site-packages/spec2nii/spec2nii.py", line 283, in init
args.func(args)
File "/home/spectro/anaconda3/lib/python3.7/site-packages/spec2nii/spec2nii.py", line 635, in bruker
self.imageOut, self.fileoutNames = read_bruker(args)
File "/home/spectro/anaconda3/lib/python3.7/site-packages/spec2nii/bruker.py", line 44, in read_bruker
for data, orientation, dwelltime, meta, name in yield_bruker(args):
File "/home/spectro/anaconda3/lib/python3.7/site-packages/spec2nii/bruker.py", line 79, in yield_bruker
parameter_files=['method'])
File "/home/spectro/anaconda3/lib/python3.7/site-packages/brukerapi/dataset.py", line 199, in init
self.load()
File "/home/spectro/anaconda3/lib/python3.7/site-packages/brukerapi/dataset.py", line 273, in load
self.load_data()
File "/home/spectro/anaconda3/lib/python3.7/site-packages/brukerapi/dataset.py", line 521, in load_data
self._data = self._read_data()
File "/home/spectro/anaconda3/lib/python3.7/site-packages/brukerapi/dataset.py", line 531, in _read_data
return self._schema.deserialize(data, self._schema.layouts)
File "/home/spectro/anaconda3/lib/python3.7/site-packages/brukerapi/schemas.py", line 162, in deserialize
data = self._acquisitions_to_encode(data, layouts)
File "/home/spectro/anaconda3/lib/python3.7/site-packages/brukerapi/schemas.py", line 200, in _acquisitions_to_encode
return np.reshape(data, layouts['encoding_space'], order='F')
File "<array_function internals>", line 6, in reshape
File "/home/spectro/anaconda3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 299, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/home/spectro/anaconda3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc
return bound(*args, **kwds)
ValueError: cannot reshape array of size 16384 into shape (4096,1)
On another dataset the last line of the message was:
ValueError: cannot reshape array of size 8192 into shape (2048,1)
The other lines being similar. Any hint?
Thank you,
Benoit