AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
May 15, 2017 02:53PM
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.
Subject Author Posted

MEICA

pnajafi May 15, 2017 02:53PM

Re: MEICA

Peter Molfese May 15, 2017 05:02PM

Re: MEICA

pnajafi May 17, 2017 10:01AM