gastropy.fetch_fmri_bold

gastropy.fetch_fmri_bold#

gastropy.fetch_fmri_bold(session='0001', data_dir=None)[source]#

Download preprocessed fMRI BOLD data for coupling analysis.

Downloads a preprocessed BOLD NIfTI file, brain mask, and fMRIPrep confounds table from a GitHub Release. Files are cached locally after the first download.

Requires the pooch package (included in the neuro optional dependency group).

Parameters:
  • session (str) – Session identifier. Available: "0001", "0008".

  • data_dir (str or Path, optional) – Directory to store downloaded files. Default uses pooch’s OS-appropriate cache directory.

Returns:

Dictionary with keys:

  • bold : Path — path to preprocessed BOLD NIfTI

  • mask : Path — path to brain mask NIfTI

  • confounds : Path — path to confounds TSV

  • session : str — session identifier

  • tr : float — repetition time (1.856 s)

Return type:

dict

Raises:

Notes

The BOLD files are large (~1.2-1.4 GB). The first download may take several minutes depending on your connection speed.

The data comes from the semi_precision study, preprocessed with fMRIPrep v25.1.4 in MNI152NLin2009cAsym space.

Examples

>>> import gastropy as gp
>>> data = gp.fetch_fmri_bold()
>>> data["bold"]
PosixPath('/home/user/.cache/gastropy/sub-01_ses-..._bold.nii.gz')