First NiPy coding sprint

Goals

CodingSprintOneGoals

CodingSprintOutcome

SVN Branch

svn co http://neuroimaging.scipy.org/svn/ni/ni ni

Logistics

JB:

Our base is at

Relais d'Information sur les Sciences de la Cognition Maison de la recherche - universite Paris-4-Sorbonne Pieces SE04, SE05 et SE06 (entresol) bâtiment Serpente (take a left when you enter, up one stair)

28 rue Serpente

75006 Paris (6e)

Tel : 01 53 10 58 87 - Fax : 01 53 10 58 89

metro : Saint-Michel (ligne 4) (exit place St André des arts) ou Odeon (ligne 10) (exit St Michel)

http://www.risc.cnrs.fr

General plan

  • Short discussion to begin each coding day
  • Object design done by Python coding of classes, and review
  • Sticking to DevelopmentGuidelines

Computing setup

Who will be dealing with this? I think we need, on every computer:

  • ipython
  • numarray
  • matplotlib
  • BrainSTAT
  • fff + python bindings
  • AIMS + python bindings
  • Anatomist

For those working on wrapping C libraries (such as the wavelets work):

  • Numpy (the successor to Numeric/numarray)
  • Pyrex (probably the easiest tool for wrapping C code - not C++)
  • SWIG, if you are going to look at C++ code (or Boost).

What else? SciPy? wx, wxPython? Qt? PyQt?

Network and code sharing

We need a wireless AP, and it would be best for everyone to pick static IPs for the week. Then, we can all share local code repositories using Bazaar NG and Twisted. Fernando can help with instructions on setup, but everyone should install current versions of both. The SprintCodeSharing page contains some instructions.

Overall goals

Close integration of BrainSTAT and fff / AIMS. Full analysis pathway - in skeleton - between raw data and final output. Skeleton possibly functional visualization. Development path for fff, AIMS, Python integration. Import of SPM models into BrainSTAT. Maybe export of models from BrainSTAT to matlab.

Whos working, and what they want to work on

  • Yann: yann_at_sapetnioc_dot_org

would like to see the ROI / referencial objects with Jonathan would like to discuss the visualization tools, has done a code with anatomist and matplotlib window Interactions: Fernando,

  • Alexis: alexis_dot_roche_at_gmail.com

(guess) linear model object, re-randomisation, fff bindings interactions: Jonathan,

  • Denis : riviere_at_shfj_dot_cea_dot_fr

(guess) would like some help to progress with the AIMS bindings interactions: Benjamin, Fernando

  • Philippe: philippe_dot_ciuciu_at_free_dot_fr

would like to design objects to help with the HRF estimations (spatial and temporal extensions) Interactions :Jonathan not present : monday and wednesday

  • Bertrand : bertrand_dot_thirion_at_wanadoo_dot_fr

(guess) object concerned with parcellisation/roi Interactions: Jonathan, Matthew

  • Edouard :

- standardized API (between brainstat & aims) for Volume I/O and ROI - standardized API (between brainstat & fff & Rpy) for model fitting (GLM or group analysis) Interactions: Alexis and most people

  • Alexis Barbot: (from LENA)

here to see what's going on with numpy/scipy and how this could help with EEG/MEG analyses; has worked on the MEEG toolbox of BrainVisa

  • Benjamin <bthyreau_at_decideur_dot_info>

- AIMS bindings, visualisation, ...

  • JB : jbpoline_at_gmail_dot_com

- design, contrasts and linear model objects would like to code a littel lib for playing with contrast Interactions: Jonathan

  • Jonathan : <jonathan.taylor@stanford.edu>

would like to merge BrainStat and fff; interaction with most of us ...

  • Matthew : <matthew.brett@gmail.com>

- wavelets with Fernando, integration with SPM, ROIs (maybe)

  • Fernando : Fernando.Perez@colorado.edu

wavelets, AIMS, ...

Please add / remove your name, and give an estimate of the time you will be able to devote, and what you want to work on.

Topics

Wavelets

SciPy wavelet project

Provisional plan to wrap code with pyrex:

http://new.scipy.org/Wiki/Cookbook/Pyrex_and_NumPy http://new.scipy.org/Wiki/Cookbook/ArrayStruct_and_Pyrex

Maybe using some interfaces from http://phiwave.sourceforge.net. See:

http://phiwave.sourceforge.net/doc/latest/phiwave/@phiw_wavelet/index.html

http://phiwave.sourceforge.net/doc/latest/phiwave/@phiw_wvimg/index.html

Some API discussions we've had with an MIT team who is willing to help along in March:

https://scipy.mit.edu/scipywiki/WaveletApiNotes

https://scipy.mit.edu/scipywiki/WaveletClassDesign

Parallel execution, ipython

Slides and audio from a recent talk on this topic (Feb'06):

http://modular.ucsd.edu/sage/days1/perez.pdf

http://modular.ucsd.edu/sage/days1/audio/day1/voice004.mp3

The source tree for this is in SVN, it can be browsed here, or checked out with:

svn co http://ipython.scipy.org/svn/ipython/ipython/branches/chainsaw ipython-chainsaw

Integration of NumPy, NiPy and AIMS

See NumericToNumpyTransitionsAtShfj

High level code fragments to get us thinking

Ay, there's the rub.

Informal meeting with Jonathan:

we made the following list of things that we would like to have defined in terms of object methods and API, if not working ! The list is probably incomplete. It is there to show what a nipy script should do.

Single subject

  • Read Data
  • preprocessing (motion correction, cf inrialign, slice timing, stereotactic normalisation, smoothing, functional brain segmentation, cf Guillaume's code, aso )
  • GLM set up (include scaling and detrending procedures ...,)
  • fit a GLM
  • contrast setting and computation, writting summary stats such as variance maps, AR maps, ...
  • statistical thresholding
  • results visualisation and interrogation
  • NB do the same on the cortical surface of the subject !

multi subject :

  • run parcellation,
  • run different robust / non parametric tests

other examples, user cases

  • get clusters above threshold after analysis
  • estimate hrf on those clusters (or parcel, or ROI)
  • visualize
  • plug hrf in a model, fit new data

other

  • bootstrapping procedures ?
  • cross validations ?
  • diagnosis techniques
  • experimental paradigm optimisation