[pymvpa] Mask in from_wizard generates no data.

Yaroslav Halchenko debian at onerussian.com
Wed Dec 10 16:25:00 UTC 2014


On Wed, 10 Dec 2014, Thomas Nickson wrote:

>    :O My hero. It works!
>    But then why does fmri_dataset work without this step?

well... it is smarter? ;)  not really -- just more "restricted" use-case where
mask could be only:

    mask : str or NiftiImage
      Filename or image instance of a 3D volume mask. Voxels corresponding to
      non-zero elements in the mask will be selected. The mask has to be in the
      same space (orientation and dimensions) as the timeseries image

so no array of indexes... that is why we can do smth like:

    # now apply the mask if any
    if not mask is None:
        flatmask = ds.a.mapper.forward1(mask)
        ds = ds[:, flatmask != 0]

which actually disallows mask to be an array of indices, and we never had such
a use case for fmri dataset, thus not even allowed ;)

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist,            Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        



More information about the Pkg-ExpPsy-PyMVPA mailing list