Inheritance diagram for nipy.modalities.fmri.design_matrix:
This module implements fMRI Design Matrix creation.
The DesignMatrix object is just a container that represents the design matrix. Computations of the different parts of the design matrix are confined to the make_dmtx() function, that instantiates the DesignMatrix object. All the remainder are just ancillary functions.
Design matrices contain three different types of regressors:
Author: Bertrand Thirion, 2009-2011
This is a container for a light-weight class for design matrices
This class is only used to make IO and visualization.
Attributes
matrix: array of shape (n_scans, n_regressors) | the numerical specification of the matrix. |
names: list of len (n_regressors) | the names associated with the columns. |
frametimes: array of shape (n_scans), optional | the occurrence time of the matrix rows. |
Visualization of a design matrix
Parameters: | rescale: bool, optional :
ax: axis handle, optional :
cmap: colormap, optional :
|
---|---|
Returns: | ax: axis handle : |
Plot a contrast for a design matrix.
Parameters: | contrast : np.float
ax: axis handle, optional :
cmap: colormap, optional :
|
---|---|
Returns: | ax: axis handle : |
write self.matrix as a csv file with appropriate column names
Parameters: | path: string, path of the resulting csv file : |
---|
Notes
The frametimes are not written
Return a DesignMatrix instance from a csv file
Parameters: | path: string, path of the .csv file : |
---|---|
Returns: | A DesignMatrix instance : |
Make a design matrix while avoiding framework
Parameters: | see make_dmtx, plus : path: string, optional: a path to write the output : |
---|---|
Returns: | dmtx array of shape(nreg, nbframes): :
names list of strings of len (nreg) :
|
Generate a design matrix from the input parameters
Parameters: | frametimes: array of shape(nbframes), the timing of the scans : paradigm: Paradigm instance, optional :
hrf_model: string, optional, :
drift_model: string, optional :
hfcut: float, optional :
drift_order: int, optional :
fir_delays: array of shape(nb_onsets) or list, optional, :
add_regs: array of shape(nbframes, naddreg), optional :
add_reg_names: list of (naddreg) regressor names, optional :
min_onset: float, optional :
|
---|---|
Returns: | DesignMatrix instance : |