brainsets.utils.bids_utils#

Brain Imaging Data Structure (BIDS) utilities.

This module provides utility functions to parse BIDS-compliant filenames, discover BIDS recordings in a dataset, and check for the existence of BIDS-conformant data files.

For more information about BIDS, see the BIDS specification: https://bids-specification.readthedocs.io/en/stable/

fetch_eeg_recordings

Discover all EEG recordings inside a BIDS dataset or list of files.

fetch_ieeg_recordings

Discover all iEEG recordings inside a BIDS dataset or list of files.

group_recordings_by_entity

Group BIDS-compliant recordings by specified fixed entities.

check_eeg_recording_files_exist

Check if EEG data files corresponding to a BIDS recording_id exist in the BIDS root directory.

check_ieeg_recording_files_exist

Check if iEEG data files corresponding to a BIDS recording_id exist in the BIDS root directory.

build_bids_path

Build a mne_bids.BIDSPath for a given recording_id, modality, and BIDS root directory.

load_json_sidecar

Load the JSON sidecar file for a given BIDS file.

load_participants_tsv

Load participants.tsv data from a BIDS root directory.

get_subject_info

Retrieve demographic information (age, sex) for a given subject from a participants DataFrame.