meeg_utils.io.read#

meeg_utils.io.read(path, *, preload=True, **kwargs)[source]#

Read a recording into memory, using BIDS metadata when available.

BIDS recordings are read with mne_bids.read_raw_bids(), so channel types, bad channels (channels.tsv), events, line frequency and head-coordinate information come from the BIDS sidecars. A plain path that lies inside a BIDS dataset is read the same way; any other file is read with mne.io.read_raw().

Parameters:
  • path (str | Path | BIDSPath) – The recording.

  • preload (bool) – Load the data into memory (needed for processing); False reads only the header and annotations.

  • **kwargs – Passed to mne_bids.read_raw_bids() (as extra_params entries when reading BIDS data) or mne.io.read_raw().

Returns:

The recording.

Return type:

Raw

Raises:

FileNotFoundError – If the recording does not exist.