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:
petco2hrfnp.ndarray

Regressor of interest

optshiftint

The index shift computed by the Xcorr/bulk shift

lag_maxint or float, optional

Limits (both positive and negative) of the temporal area to explore, expressed in seconds.

freqstr, int, or float

Sample frequency of petco2hrf

func_sizeint

Total timepoints of functional timeseries

func_upsamp_sizeint

Total timepoints of functional timeseries, resampled at freq frequency

outprefixlist or path

Path to output directory for regressors.

extstr, optional

Extension to be used for the exported regressors.

legacybool, 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)

Returns:
petco2hrf_laggednp.ndarray

The shifted versions of the regresosr of interest.