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 : | con_id: array of shape (n_events), type = string, 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, optional :
hfcut: float, optional :
drift_order: int, optional :
fir_delays: array of shape(nb_onsets) or list, optional, :
fir_duration: float, optional :
add_regs: array of shape(nbframes, naddreg), optional :
add_reg_names: list of (naddreg) regressor names, optional :
|
---|
Numerical estimation of self.
and sets self.estimated to True
load self.matrix and self.names from a csv file Parameter ——— path: string,
path of the .csv file that includes the matrix and related information
Vizualization of a design matrix
Parameters : | rescale: bool, optional :
ax: figure handle, optional : |
---|---|
Returns : | ax, figure handle : |
write self.matrix as a csv file witha propriate column names
Parameters : | path: string, path of the resulting csv file : |
---|
Bases: object
Simple class to hanle the experimental paradigm in one session
Parameters : | con_id: array of shape (n_events), type = string, 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: formula.Formula instance, :
frametimes: array of shape (nb_time_samples), :
|
---|---|
Returns : | X: array of shape (nrows,nb_time_samples) :
|
Creation of a formula that represents the convolution of the conditions onset with a certain hrf model
Parameters : | paradigm: paradigm instance : hrf_model: string that can be ‘Canonical’, :
end_time: float, :
fir_delays=[0], optional, array of shape(nb_onsets) or list :
fir_duration=1., float, duration of the FIR block; :
|
---|---|
Returns : | f: formula instance, :
names: list of strings, :
|
return a DesignMatrix instance from a csv file
Parameters : | path: string, :
|
---|---|
Returns : | A DesignMatrix instance : |
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; :
add_regs=None, array of shape (nbframes, naddreg) :
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 : |