[pymvpa] Mask in from_wizard generates no data.

Thomas Nickson thomas.nickson at gmail.com
Mon Dec 1 09:56:03 UTC 2014


Hmmmm, not sure how to answer that. They are the same shape but there are
not 133 copies of the mask but there are of the dataset is that the
problem? It automatically applies the flattening as well. Is that going to
be a problem?

Mask and data are of the following types

<type 'numpy.ndarray'>
<type 'numpy.ndarray'>

There are 217387 elements in the mask.
There are 902629 elements in one element of the array but the array is 133
elements long.

I have not tried fmri_dataset. Is this compatible with structural scans?

Tom

On Sat, Nov 29, 2014 at 12:18 PM, Nick Oosterhof <
n.n.oosterhof at googlemail.com> wrote:

>
> On 28 Nov 2014, at 14:35, Thomas Nickson <thomas.nickson at gmail.com> wrote:
>
> > When I construct a dataset using Dataset.from_wizard() and supply a
> brain mask all I get in return is a dataset that's all 0.
> >
> > I show the code below:
> >
> > #get image data reshape and flatten
> > rotatedImageData = rotateShape(getImageData(DATA_LOCATION))
> >
> > #Get mask data
> > mask = getImageData(MASK)#.nonzero()[0]
> >
> > #Load dataset
> > ds = Dataset.from_wizard(rotatedImageData,
> targets=metaData['diagnosesT1'], mask=mask)
>
> Some ideas:
> - are the mask and rotatedImageData of compatible shape?
> - what is the datatype of mask?
> - how many voxels are non-zero in the mask?
> - how many voxels are non-zero in rotatedImageData?
> - have you tried using fmri_dataset instead?
>
> If that doesn’t help in resolving the issue, could you provide the data
> you are using somewhere online so we can try to reproduce the issue.
>
>
>
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20141201/806eec96/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list