Table Of Contents

Previous topic

misc.exceptions

Next topic

misc.fsl.flobs

This content refers to the previous stable release of PyMVPA. Please visit www.pymvpa.org for the most recent version of PyMVPA and its documentation.

misc.fsl.base

Module: misc.fsl.base

Inheritance diagram for mvpa.misc.fsl.base:

Tiny snippets to interface with FSL easily.

Classes

FslEV3

class mvpa.misc.fsl.base.FslEV3(source)

Bases: mvpa.misc.io.base.ColumnData

IO helper to read FSL’s EV3 files.

This is a three-column textfile format that is used to specify stimulation protocols for fMRI data analysis in FSL’s FEAT module.

Data is always read as float.

Read and write FSL EV3 files.

Parameters:source (filename of an EV3 file) –
durations
getEV(evid)

Returns a tuple of (onset time, simulus duration, intensity) for a certain EV.

getNEVs()

Returns the number of EVs in the file.

intensities
nevs

Returns the number of EVs in the file.

onsets
toEvents(**kwargs)

Convert into a list of Event instances.

Parameters:kwargs – Any keyword arugment provided would be replicated, through all the entries. Useful to specify label or even a chunk
tofile(filename)

Write data to a FSL EV3 file.

FslGLMDesign

class mvpa.misc.fsl.base.FslGLMDesign(source)

Bases: object

Load FSL GLM design matrices from file.

Be aware that such a desig matrix has its regressors in columns and the samples in its rows.

Parameters:source (filename) – Compressed files will be read as well, if their filename ends with ‘.gz’.
plot(style='lines', **kwargs)

Visualize the design matrix.

Parameters:
  • style (‘lines’, ‘matrix’) –
  • **kwargs – Additional arguments will be passed to the corresponding matplotlib plotting functions ‘plot()’ and ‘pcolor()’ for ‘lines’ and ‘matrix’ plots respectively.

McFlirtParams

class mvpa.misc.fsl.base.McFlirtParams(source)

Bases: mvpa.misc.io.base.ColumnData

Read and write McFlirt’s motion estimation parameters from and to text files.

Initialize McFlirtParams

Parameters:source (str) – Filename of a parameter file.
header_def = ['rot1', 'rot2', 'rot3', 'x', 'y', 'z']
plot()

Produce a simple plot of the estimated translation and rotation parameters using.

You still need to can pylab.show() or pylab.savefig() if you want to see/get anything.

toarray()

Returns the data as an array with six columns (same order as in file).

tofile(filename)

Write motion parameters to file.

Function

mvpa.misc.fsl.base.read_fsl_design(fsf_file)

Reads an FSL FEAT design.fsf file and return the content as a dictionary.

Parameters:fsf_file (filename, file-like) –