[pymvpa] Ignore volumes in 4d file?

Nick Oosterhof nikolaas.oosterhof at unitn.it
Mon Sep 16 02:53:26 UTC 2013

On Sep 15, 2013, at 10:45 PM, Shane Hoversten wrote:

> it would be easier if I
> could just have one "master" 4d file, and specify my targets within
> that master file, and just ignore the volumes for conditions I don't
> care about.
> In essence, I'd like to specify the targets as something like
> ['concA', 'concB', None, 'concA', None, 'concB'] and so on, where the
> "None"s correspond to volumes that should be ignored.  Is there a way
> to do this, or something like it?

You just want to slice the dataset to contain only samples where the target is 'concA' or 'concB'?

If so, see for example the searchlight example, where one step is:

dataset = dataset[np.array([l in ['rest', 'house', 'scrambledpix'] for l in dataset.targets], dtype='bool')]

to get only the samples in the 'rest', 'house' and 'scrambledpix' condition.

More information about the Pkg-ExpPsy-PyMVPA mailing list