Table Of Contents

Previous topic

modalities.fmri.fmristat.invert

Next topic

modalities.fmri.fmristat.npzimage

This Page

modalities.fmri.fmristat.model

Module: modalities.fmri.fmristat.model

Inheritance diagram for nipy.modalities.fmri.fmristat.model:

This module defines the two default GLM passes of fmristat

Classes

AR1

class nipy.modalities.fmri.fmristat.model.AR1(fmri_image, formula, rho, outputs=[], volume_start_times=None)

Second pass through fmri_image.

Parameters:

fmri_image : FmriImageList

formula : nipy.modalities.fmri.protocol.Formula

rho : Image of AR(1) coefficients.

__init__(fmri_image, formula, rho, outputs=[], volume_start_times=None)
execute()

ModelOutputImage

class nipy.modalities.fmri.fmristat.model.ModelOutputImage(filename, coordmap, shape, clobber=False)

These images have their values filled in as the model is fit, and are saved to disk after being completely filled in.

They are saved to disk by calling the ‘save’ method.

The __getitem__ and __setitem__ calls are delegated to a private Image. An exception is raised if trying to get/set data after the data has been saved to disk.

__init__(filename, coordmap, shape, clobber=False)
save()
Save current Image data to disk as a .nii file.

OLS

class nipy.modalities.fmri.fmristat.model.OLS(fmri_image, formula, outputs=[], volume_start_times=None)

First pass through fmri_image.

Parameters:

fmri_image : FmriImageList

formula : nipy.modalities.fmri.protocol.Formula

__init__(fmri_image, formula, outputs=[], volume_start_times=None)
execute()

Functions

nipy.modalities.fmri.fmristat.model.estimateAR(resid, design, order=1)
Estimate AR parameters using bias correction from fMRIstat.
nipy.modalities.fmri.fmristat.model.generate_output(outputs, iterable, reshape=<function <lambda> at 0xb568bc4>)

Write out results of a given output.

In the regression setting, results is generally going to be a scipy.stats.models.model.LikelihoodModelResults instance.

nipy.modalities.fmri.fmristat.model.model_generator(formula, data, volume_start_times, iterable=None, slicetimes=None, model_type=<class 'nipy.fixes.scipy.stats.models.regression.OLSModel'>, model_params=<function <lambda> at 0xb568454>)
Generator for the models for a pass of fmristat analysis.
nipy.modalities.fmri.fmristat.model.output_AR1(outfile, fmri_image, clobber=False)

Create an output file of the AR1 parameter from the OLS pass of fmristat.

image: FmriImageList

nipy.modalities.fmri.fmristat.model.output_F(outfile, contrast, fmri_image, clobber=False)
nipy.modalities.fmri.fmristat.model.output_T(outbase, contrast, fmri_image, effect=True, sd=True, t=True, clobber=False)
Parameters:

outbase : string

Base filename that will be used to construct a set of files for the TContrast. For example, outbase=’output.nii’ will result in the following files (assuming defaults for all other params): output_effect.nii, output_sd.nii, output_t.nii

contrast : a TContrast

nipy.modalities.fmri.fmristat.model.output_resid(outfile, fmri_image, clobber=False)

Create an output file of the residuals parameter from the OLS pass of fmristat.

Uses affine part of the first image to output resids unless fmri_image is an Image.

nipy.modalities.fmri.fmristat.model.results_generator(model_iterable)

Generator for results from an iterator that returns (index, data, model) tuples.

See model_generator.