pySPFM._solvers.debiasing.do_debias_spike#
- do_debias_spike(hrf, y, estimates_matrix, group=False, group_dist=3, non_negative=False)[source]#
Perform debiasing with the spike model.
- Parameters:
hrf ((E x T) ndarray) – Matrix containing shifted HRFs in its columns. E stands for the number of volumes times the number of echo-times.
y ((T x 1) ndarray) – Array with fMRI data of a voxel provided to pySPFM.
estimates_matrix ((T x 1) ndarray) – Array containing the non-zero coefficients selected as neuronal-related.
group (bool, optional) – Whether to group the spikes or not, by default False
group_dist (int, optional) – Minimum number of TRs in between of the peaks found, by default 3
non_negative (bool, optional) – Whether to perform non-negative least squares or not, by default False
- Returns:
beta_out (ndarray) – Debiased activity-inducing signal in a voxel.
fitts_out (ndarray) – Debiased activity-inducing signal convolved with the HRF in a voxel.