Hi all,
I’m trying to concatenate two functional (.nii) data files to use in nilearn. Tried FSL, but kept getting errors with fslmerge.
Here’s the script I used in nilearn -------
output=nilearn.image.concat_imgs(basepath,‘cs_imagine_set1.nii.gz’, basepath,‘cs_imagine_set2.nii.gz’,
memory_level=0,
auto_resample=False, verbose=0)
When I run this, I get the following error -------
Traceback (most recent call last):
File “”, line 3, in
File “/Users/nibl/.local/lib/python2.7/site-packages/nilearn/_utils/niimg_conversions.py”, line 418, in concat_niimgs
ndim = ensure_ndim - 1
TypeError: unsupported operand type(s) for -: ‘str’ and ‘int’
Is the ensure_ndim option not optional? If so, do I set it to the expected number of volumes for my concatenated file?
thanks for helping!
jenny