Float roi indexes in kmap_2_qspace result in chunk size error
Supplying a ROI with float positions to the kmap_2_qspace
function results in an error - same in the GUI application. No error if the ROI indexes are integer numbers.
For example, this script:
from xsocs.process.qspace import kmap_2_qspace, QSpaceConverter
# output and input files
output_f = '/data/id01/inhouse/edo/20180406_HC3505_ID01/id01/analysis/3dkmaps/test/my_qspace.h5'
xsocs_h5 = '/data/id01/inhouse/edo/20180406_HC3505_ID01/id01/analysis/3dkmaps/test/kmap.h5'
# conversion parameters
qspace_dims = (25, 100, 100)
QSpaceConverter.disp_times = True
rect_roi = [43,63,52.3,54.3]
overwrite = True
n_proc = None
# code
kmap_2_qspace(xsocs_h5,
output_f,
qspace_dims,
roi=rect_roi,
n_proc=n_proc,
overwrite=overwrite)
Results in:
Traceback (most recent call last):
File "id01_qspace.py", line 40, in <module>
overwrite=overwrite)
File "/users/zatterin/Envs/py3/lib/python3.5/site-packages/xsocs/process/qspace/helpers.py", line 88, in kmap_2_qspace
''.format(converter.status, converter.status_msg))
ValueError: Conversion failed with CODE=3 :
Chunk shape must not be greater than data shape in any dimension. (1, 6, 25, 25) is not compatible with (0, 25, 100, 100)
You can use the same script / data to replicate the error if you like.