Inheritance diagram for nipy.neurospin.utils.design_matrix:
fMRI Design Matrix creation functions.
Bases: nipy.neurospin.utils.design_matrix.Paradigm
Class to handle block paradigms
| Parameters: | index: array of shape (n_events), type = int, optional :
onset: array of shape (n_events), type = float, optional :
amplitude: array of shape (n_events), type = float, optional, :
|
|---|
Bases: object
Class to handle design matrices
Methods
| estimate | |
| read_from_csv | |
| show | |
| write_csv |
| Parameters: | frametimes: array of shape(nbframes), optional :
paradigm: Paradigm instance, optional :
hrf_model, string, optional, :
drift_model, string :
hfcut=128: float , :
drift_order=1, int, :
fir_delays=[0], optional, :
fir_duration=1., float, duration of the FIR block; :
cond_ids=None, list of strin of length (ncond), :
add_regs=None, array of shape(naddreg, nbframes) :
add_reg_names=None: list of (naddreg) regressor names :
|
|---|
load self.matrix and self.names from a csv file Parameter ——— path: string,
path of the .csv file that includes the matriox and related information
Vizualization of a design matrix
| Parameters: | rescale: bool, optional :
ax: figure handle, optional : |
|---|---|
| Returns: | ax, figure handle : |
write oneselfs as a csv
| Parameters: | path: string, path of the resulting csv file : |
|---|
Bases: object
Simple class to hanle the experimental paradigm in one session
| Parameters: | index: array of shape (n_events), type = int, optional :
onset: array of shape (n_events), type = float, optional, :
amplitude: array of shape (n_events), type = float, optional, :
|
|---|
This is a work arount to control the order of the regressor in the design matrix construction
| Parameters: | form, the formula that describes the design matrix : frametimes, array of shape (nb_time_samples), the time sampling grid : |
|---|---|
| Returns: | X array of shape (nrows,nb_time_samples) the sdesign matrix : |
Creation of a formula that represents the convolution of the conditions onset witha certain hrf model
| Parameters: | paradigm: paradigm instance : hrf_model, string that can be ‘Canonical’, :
names=None, list of strings corresponding to the condition names :
fir_delays=[0], optional, array of shape(nb_onsets) or list :
fir_duration=1., float, duration of the FIR block; :
|
|---|---|
| Returns: | f a formula object that contains the convolved regressors :
names list of strings corresponding to the condition names :
fixme: : normalization of the columns of the design matrix ? : |
Make a design matrix while avoiding framework
| Parameters: | frametimes: array of shape(nbframes), :
paradigm: Paradigm instance, optional :
hrf_model, string, optional, :
drift_model, string that specifies the desired drift model, :
hfcut=128 float , cut frequency of the low-pass filter : drift_order=1, int, order of the dirft model (in case it is polynomial) : fir_delays=[0], optional, array of shape(nb_onsets) or list :
fir_duration=1., float, duration of the FIR block; :
cond_ids=None, list of strin of length (ncond), :
add_regs=None, array of shape(naddreg, nbframes) :
add_reg_names=None, list of (naddreg) regressor names :
path: string, optional :
|
|---|---|
| Returns: | dmtx array of shape(nreg, nbframes): :
names list of strings of len (nreg) :
|
This function possibly adds a scalar matrix to X to guarantee that the condition number is smaller than a given threshold.
| Parameters: | X array of shape(nrows,ncols) : cmax=1.e-15, float tolerance for condition number : |
|---|---|
| Returns: | X array of shape(nrows,ncols) after regularization : cmax=1.e-15, float tolerance for condition number : |
Read a (.csv) paradigm file consisting of values yielding (occurence time, (duration), event ID, modulation) and returns a paradigm instance or a dictionary of paradigm instances
| Parameters: | path: string, :
session: int, optional :
|
|---|---|
| Returns: | paradigm, paradigm instance (if session is provided), or :
|
Create the drift formula
| Parameters: | DriftModel: string, :
frametimes: array of shape(ntimes), :
order: int, optional, :
hfcut: float, optional, :
|
|---|---|
| Returns: | df, the resulting drift formula : |