MEICA

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.

Individuals in my group have found some changes in numpy seem to be causing some issues. Would you mind posting the following outputs?

From terminal:


afni_system_check.py -check_all

From a python shell:


import python
numpy.version.version

import scipy
scipy.__version__

Dear Peter
Thanks a lot for your response. Based on your suggestion I downgraded my numpy from 1.12 to 1.10.1 ,and now MEICA seems to work :). This seems to be compatibility problem. Although this works fine for me now ,but I just I swept the problem under the carpet, and someone should adresse the this problem properly before it gets out of hand. I am sending you the things you have asked. Finally if there is a way that I could be a help , please let me know; I would be glad.


-------------------------------- general ---------------------------------
architecture:         64bit ELF
system:               Linux
release:              4.8.0-49-generic
version:              #52~16.04.1-Ubuntu SMP Thu Apr 20 10:55:59 UTC 2017
distribution:         Ubuntu 16.04 xenial
number of CPUs:       8
apparent login shell: tcsh
shell RC file:        .cshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /home/peyman/abin/afni
afni version         : Precompiled binary linux_openmp_64: Mar 29 2017 
                     : AFNI_17.0.18
AFNI_version.txt     : AFNI_17.0.18, linux_openmp_64, Mar 29 2017
which python         : /usr/bin/python
python version       : 2.7.12
which R              : /usr/bin/R
R version            : R version 3.3.3 (2017-03-06) -- "Another Canoe"
which tcsh           : /usr/bin/tcsh

instances of various programs found in PATH:
    afni    : 1   (/home/peyman/abin/afni)
    R       : 1   (/usr/bin/R)
    python  : 1   (/usr/bin/python2.7)
    python2 : 1   (/usr/bin/python2.7)
    python3 : 1   (/usr/bin/python3.5)


testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : success
    uber_subject.py      : success
    3dAllineate          : success
    3dRSFC               : success
    SurfMesh             : success

checking for R packages...
    rPkgsInstall -pkgs ALL -check : success

checking for $HOME files...
    .afnirc                   : found
    .sumarc                   : found
    .afni/help/all_progs.COMP : found

------------------------------ python libs -------------------------------
++ module 'PyQt4' found at /usr/lib/python2.7/dist-packages/PyQt4
++ module loaded: PyQt4

-------------------------------- env vars --------------------------------
PATH = /home/peyman/bin:/home/peyman/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/peyman/abin

PYTHONPATH = 
R_LIBS = /home/peyman/R

LD_LIBRARY_PATH = 
DYLD_LIBRARY_PATH = 
DYLD_FALLBACK_LIBRARY_PATH = 

------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas    : found TT_N27+tlrc  under /home/peyman/abin

------------------------------ OS specific -------------------------------
which apt-get        : /usr/bin/apt-get
apt-get version      : apt 1.2.19 (amd64)

have Ubuntu system: Ubuntu 16.04 xenial

=========================  summary, please fix:  =========================
*  insufficient data for AFNI bootcamp

peyman-Precision-Tower-3620:~> python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

In the past I was using numpy 1.12 but now my numpy version


'1.10.1'


'0.19.0'