WorkingOutNipy - Methods
location: WorkingOutNipy

Working out NIPY

For a web interface to the code tree:

Useful examples (not quite quick start):

For a basic introduction to setting up designs:

To run an example script where we are, start ipython --pylab, then:

run /home/ian/devel_trees/nipy/examples/quickstart/

(you need the ipython --pylab option to allow matplotlib to keep producing figures without locking the console).

The generic models code is in scipy.sandbox.models - to find where this is on the system (ipython):

import scipy.sandbox.models

How to estimate a model on data

See: for an example, and the models directory in general for the models code.

At interactive prompt, after running the example script above, you have a 'design' variable - which is just a design matrix:

import numpy as N
import scipy.sandbox.models as SSM

# Make some random data
n_time_points = design.shape[1]
rY = N.random.normal(size=(n_time_points,))

# Estimate the model
# Note FMRI design needs transpose to standard rows = timepoints orientation
pain_glm = SSM.glm(design.T)
pain_results =

See also: for live data example.

None: WorkingOutNipy (last edited 2013-03-08 10:28:28 by localhost)