This module is for canonical hrf specification. Here we provide for SPM, Glover hrfs and FIR models. This module closely follows SPM implementation
Author: Bertrand Thirion, 2011
This is the main function to convolve regressors with hrf model
Parameters : | exp_condition: descriptor of an experimental condition : hrf_model: string, the hrf model to be used. Can be chosen among: :
frametimes: array of shape (n):the sought : con_id: string, optional identifier of the condition : oversampling: int, optional, oversampling factor to perform the convolution : fir_delays: array-like of int, onsets corresponding to the fir basis : |
---|---|
Returns : | creg: array of shape(n_scans, n_reg): computed regressors sampled :
reg_names: list of strings, corresponding regressor names : |
Compute an hrf as the difference of two gamma functions
Parameters : | tr: float, scan repeat time, in seconds : oversampling: int, temporal oversampling factor, optional : time_length: float, hrf kernel length, in seconds : onset: float, onset of the hrf : |
---|---|
Returns : | hrf: array of shape(length / tr * oversampling, float), :
|
Implementation of the Glover hrf model
Parameters : | tr: float, scan repeat time, in seconds : oversampling: int, temporal oversampling factor, optional : time_length: float, hrf kernel length, in seconds : onset: float, onset of the response : |
---|---|
Returns : | hrf: array of shape(length / tr * oversampling, float), :
|
Implementation of the flover time derivative hrf (dhrf) model
Parameters : | tr: float, scan repeat time, in seconds : oversampling: int, temporal oversampling factor, optional : time_length: float, hrf kernel length, in seconds : onset: float, onset of the response : |
---|---|
Returns : | dhrf: array of shape(length / tr, float), :
|
this function samples the regressors at frametimes
Parameters : | hr_regressor: array of shape(n), :
hr_frametimes: array of shape(n), :
frametimes: array of shape(p), :
kind: string, optional, the kind of desired interpolation : |
---|---|
Returns : | regressor: array of shape(p), the resampled regressor : |
this function samples the experimental condition at frametimes
Parameters : | exp_condition: a tuple of 3 arrays of shape n, corresponding :
frametimes: array of shape(n) : over_sampling: int, over_sampling factor : |
---|---|
Returns : | regressor: array of shape(n) : |
Implementation of the SPM dispersion derivative hrf model
Parameters : | tr: float, scan repeat time, in seconds : oversampling: int, temporal oversampling factor, optional : time_length: float, hrf kernel length, in seconds : onset: float, onset of the response : |
---|---|
Returns : | dhrf: array of shape(length / tr * oversampling, float), :
|
Implementation of the SPM hrf model
Parameters : | tr: float, scan repeat time, in seconds : oversampling: int, temporal oversampling factor, optional : time_length: float, hrf kernel length, in seconds : onset: float, onset of the response : |
---|---|
Returns : | hrf: array of shape(length / tr * oversampling, float), :
|
Implementation of the SPM time derivative hrf (dhrf) model
Parameters : | tr: float, scan repeat time, in seconds : oversampling: int, temporal oversampling factor, optional : time_length: float, hrf kernel length, in seconds : onset: float, onset of the response : |
---|---|
Returns : | dhrf: array of shape(length / tr, float), :
|