lyman.glm.prewhiten_image_data¶
-
lyman.glm.
prewhiten_image_data
(ts_img, mask_img, X, smooth_fwhm=5)[source]¶ Estimate autocorrelation and transform data and design for OLS.
- Parameters
- ts_imgnibabel image
4D image with fMRI data. If using autocorrelation smoothing, the affine must have correct information about voxel size.
- mask_imgnibabel image
3D image with mask defining voxels to include in model. Also used to constrain the autocorrelation estimate smoothing.
- Xn_tp x n_ev array
Design matrix array. Should have zero mean and no constant.
- smooth_fwhmfloat
Size (in mm) of the smoothing kernel for smoothing the autocorrelation estimates. Requires that the time series image affine has correct information about voxel size.
- Returns
- WYn_tp x n_vox array
Prewhitened time series data for voxels in mask.
- WXn_tp x n_ev x n_vox array
Prewhitened design matrix for voxels in mask.