Dear colleges
Currently I am facing a problem. I am trying to apply the MEICA on the demo data which AFNI provides through
@Install_MEICA_Demo command.
After downloading the data I am applying flowing command. Which have been specified in the readme file.
meica.py -d "mo1_e[1,2,3,4].nii.gz" -e 12,28,44,60 --tpattern=alt+z2 --MNI -a mo1_brainmask.nii.gz --no_skullstrip --align_args='--cmass'
After applying the command. I have this error.
++ Computing T2* map
Traceback (most recent call last):
File "/home/peyman/abin/meica.libs/t2smap.py", line 266, in <module>
s0_maskmin = scoreatpercentile(np.unique(s0),98)/10
File "/home/peyman/abin/meica.libs/t2smap.py", line 41, in scoreatpercentile
score = values[np.floor(idx)]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
I trace back the problem to a error in
scoreatpercentile function in
t2smap.py file. (line 41)
score = values[np.floor(idx)]
This problem happens due to the fact that output of the floor and ceil functions of numpy is not integer ;and indexes by definition should be integer. Therefore it should rewritten like this :
score = values[int(np.floor(idx))]
I cheeked the original scoreatpercentile in scipy repositories and they are using the
int too.
Scoreatpercentile in scipy repositories
Noted that the same scoreatpercentile function hase been used in tedana.py too.