mne_bids.read_raw_bids

mne_bids.read_raw_bids(bids_path, extra_params=None, verbose=True)[source]

Read BIDS compatible data.

Will attempt to read associated events.tsv and channels.tsv files to populate the returned raw object with raw.annotations and raw.info[‘bads’].

Parameters
bids_pathBIDSPath

The file to read. The mne_bids.BIDSPath instance passed here must have the .root attribute set. The .datatype attribute may be set. If .datatype is not set and only one data type (e.g., only EEG or MEG data) is present in the dataset, it will be selected automatically.

extra_paramsNone | dict

Extra parameters to be passed to MNE read_raw_* functions. If a dict, for example: extra_params=dict(allow_maxshield=True).

verbosebool

The verbosity level.

Returns
rawinstance of Raw

The data as MNE-Python Raw object.

Raises
RuntimeError

If multiple recording data types are present in the dataset, but datatype=None.

RuntimeError

If more than one data files exist for the specified recording.

RuntimeError

If no data file in a supported format can be located.

ValueError

If the specified datatype cannot be found in the dataset.