[pymvpa] ERNiftiDataset working slowly

Michael Hanke michael.hanke at gmail.com
Tue Jan 5 19:00:33 UTC 2010


Hey,

On Tue, Jan 05, 2010 at 04:02:12PM +0100, Jonas Kubilius wrote:
> Hey all,
> 
> I have been trying to use ERNiftiDataset but it seems to be working very
> slowly, by which I mean one minute to read in a single nifti file (shape =
> (168, 50, 69, 57)) as compared to an almost instant behavior of
> NiftiDataset. (My computer is a new Dell Optiplex 760 with Intel Core Quad
> running Vista; mvpa version is 0.4.2.)
> 
> The code I'm trying to run is trivial:
> 
> nim = ERNiftiDataset(samples = 'niftiFile.nii', events = myEvents),
> 
> where myEvents is a list with 168 dictionary entries like this:
> 
> {'chunk': 0, 'duration': 4, 'label': 0, onset: 0.0}
> 
> (If I reduce duration to 1, the time drops to 15 sec.)
> 
> This seems very slow to me, especially since NiftiDataset is so fast.

Yeah, that beast is slow as hell, but what's more of a problem is that
it also has a huge memory footprint. That that bad news.

The good news is that the next PyMVPA release comes with a replacement
that is both faster and leaner, and at the same time also more flexible.
However, the only thing I can do right now is to tell you that the
release is about 5-6 weeks from now.

> In principle, I could use NiftiDataset with 168 labels and that would
> match my current example with duration 1 in ERNiftiDataset, is that
> true?

Yes, that should be the same.

> Yet the NiftiDataset makes it, again, almost instantly. Am I doing
> something wrong here or is this the expected behavior?

No, nothing wrong -- we hate it too.

Michael

-- 
GPG key:  1024D/3144BE0F Michael Hanke
http://mih.voxindeserto.de



More information about the Pkg-ExpPsy-PyMVPA mailing list