phys2cvr.regressors.create_fine_shift_regressors¶
- phys2cvr.regressors.create_fine_shift_regressors(petco2hrf, optshift, lag_max, freq, func_size, func_upsamp_size, outprefix, ext='.1D', legacy=False)[source]¶
Compute fine shifts to further optimize shifts.
- Parameters:
- petco2hrf
np.ndarray Regressor of interest
- optshift
int The index shift computed by the Xcorr/bulk shift
- lag_max
intorfloat, optional Limits (both positive and negative) of the temporal area to explore, expressed in seconds.
- freq
str,int, orfloat Sample frequency of petco2hrf
- func_size
int Total timepoints of functional timeseries
- func_upsamp_size
int Total timepoints of functional timeseries, resampled at freq frequency
- outprefix
listorpath Path to output directory for regressors.
- ext
str, optional Extension to be used for the exported regressors.
- legacy
bool, optional If True, exclude the upper lag limit from the regression estimation. If True, the maximum number of regressors will be (freq*lag_max*2)
- petco2hrf
- Returns:
- petco2hrf_lagged
np.ndarray The shifted versions of the regresosr of interest.
- petco2hrf_lagged