fmri
index
fmri.py

A package for storing and reformatting the parameters of an fMRI experiment

 
Modules
       
os
re

 
Classes
       
experiment
trial

 
class experiment
    Generic class for an fMRI experiment and its metadata.  Used for extracting timings from logfiles
and spitting them out in various formats
 
  Methods defined here:
__delitem__(self, key)
__getitem__(self, key)
__init__(self, subject=None, logfiledir='', trialduration=5.0, TR=2.0, name=None, parser='genericParser')
__repr__(self)
__setitem__(self, key, item)
#methods to allow dictionary-like behavior
genericParser(self)
Reads in the logfiles and converts them to a list of events.
setLogfiles(self, logfiles=None)
Looks in the logfile directory and makes a list of all files that are associated with this subject.
showAttributes(self)
Show columns of targets and chunks.  Only works after one of the toMVPA methods have been called.
toFSL(self, outputdir='.', bytrial=False)
Prints out 3-column format files for FSL. By default trials in each session with the same trialtype
are grouped into one file.  If you want one file for each trial, set bytrial to True
toMVPA_continuous(self, outputdir='.', hrfdelay=4.0)
Prints out 2-column attributes file for PyMVPA for continuous designs with every volume in a given trial marked.
Set hrfdelay in seconds to shift labels forward in time from trial onset.
toMVPA_sparse(self, outputdir='.', leadingzero=True)
Prints out 2-column attributes file for PyMVPA for sparse designs. Default includes 0 trial at the start
of each session, but you can set leadingzero to False to bypass this
toMVPA_trialstarts(self, outputdir='.')
Prints out 2-column attributes file for PyMVPA with just the starting volume of each trial marked.

 
class trial
     Methods defined here:
__init__(self, trialnum=0, onset=0.0, duration=0.0, height=1.0, session=0.0, trialtype=None)
__repr__(self)