[Nipy-devel] PBAIC contest, latest news
Emanuele Olivetti
emanuele@relativita....
Wed Mar 14 10:58:21 CDT 2007
Jonathan Taylor wrote:
> Hi Emanuele,
>
> What do you need as far as code?
>
Here is a first list (forgive my newbiness) of things
useful for a python competitors (me included):
1) code to access Analyze or AFNI or BV formats: nipy has
already some of these facilities but they are based (AFAIK)
mostly on memory mapped file. Usually having all the data in RAM
would be much better due to the lengthy computations that has to
be done. This means that 1Gb of RAM is not so much to handle
the usual 20 minutes recording (~900 volumes) but anyway it's clear
that working with fMRI data implies the need of a large amount of
RAM. For example I test some basic idea on my laptop or workstation
(~1Gb Ram) on a little portion of the dataset and run the
full computation on a 4Gb linux box. In one of my last thread on
this list there were few lines of code to read a list of files (single
volumes in anz format, that's one of the PBAIC formats) to an array in
RAM. That's good. It's easy to save in a single file (anz or nifty),
but I don't know how to reload later and _keep all data just in RAM_
(no mmap).
Note: PBAIC surface data is not available in ANZ format, as far as
i know; is it possible to read afni surface data with the current nipy
and get a 2D x time array out of it?
2) code to access PBAIC feature-rating files (I don't know how this
community calls 'feature-ratings': we call it 'labels' since it's the stuff
to predict for the competition) that describes the scenes that the
subject sees/hears/feels (stimuli). I have some code for this: the
format of feature-ratings files is pretty simple (ASCII files with tab
separated values and a pretty long header). But it worth sharing
if someone can host :)
3) visualization. I had some simple script that generates 34 slices of
a volume (PBAIC volumes are 34x64x64) in a single window
using matplotlib (pylab.imshow()) and setting a global color scal
through all slices. Nipy should have something similar (I saw it
in the pca example). So the basic facility would be displaying a
volume in some way (slice by slice or in 3D). Another common problem is
to show a volume and overlap colored spots to indicate hot areas.
Is there some function that given 2 volumes (a 'background' image
usually in grey levels and another volumes with hot spots only, to be
plotted in hot-red colormap) displays them overlapped that manages
the two different colormaps? I still have troubles doing this in
matplotlib (it's my ignorance, obviously). It would be nice to
have a medium-sized pylab.colorbar() on the right of the window
describing the (global) color values of all slices when displaying
a volume.
4) Basically every analysis tool would be useful :) but maybe
this can be outside the scope of nipy and inside the one of
other libraries (scipy etc.). I usually perform correlation, mutual
information, low-pass filtering, clustering, and use some classifiers/
regressors. I also investigate PCA/ICA and some other (less usual
tools). I think the best solution here is to provide pointers to
already existing tools (scipy, MDP, PyML, pycluster etc.) and
try to focus later on fMRI specific needs.
OK, it's a huge list :) . I belive that accessing functional data
(point 1) and visualization (point 3) are the top priorities.
Thanks in advance if you or other can give help/code to solve
these issues. Probably many of this things are already available
in nipy. In this case, some very simple example code would be
much appreciated.
Emanuele
More information about the Nipy-devel
mailing list