gastropy.neuro.fmri.align_bold_to_egg#
- gastropy.neuro.fmri.align_bold_to_egg(bold_2d, n_triggers, confounds_df=None)[source]#
Align BOLD volumes to EGG trigger count.
fMRIPrep BOLD may contain more volumes than EGG triggers (e.g., pre- or post-trigger dummy scans). This function truncates BOLD to the first
n_triggersvolumes.- Parameters:
bold_2d (np.ndarray, shape (n_voxels, n_volumes)) – BOLD time series.
n_triggers (int) – Number of EGG scanner triggers (= expected volume count).
confounds_df (pandas.DataFrame, optional) – If provided, also truncates to first
n_triggersrows.
- Returns:
bold_aligned (np.ndarray, shape (n_voxels, n_triggers)) – Truncated BOLD time series.
confounds_aligned (pandas.DataFrame or None) – Truncated confounds (if input was provided).