pybemobil.io.MultimodalRecording#

class pybemobil.io.MultimodalRecording(raw, tier2=<factory>, events=<factory>, session_t0=0.0, eeg_timestamps=None)[source]#

Bases: object

Container returned by XDFLoader.load().

Parameters:
rawmne.io.BaseRaw

Tier-1 physiological streams (EEG, ECG, EMG, eye-tracking, EDA, …) aligned to a common grid at target_sfreq and merged into an MNE Raw object. The time axis starts at 0 and corresponds to LSL timestamp session_t0. The sampling rate is the EEG stream’s nominal rate; EEG dropouts are filled with interpolated samples and marked BAD_eeg_missing, and markers are placed by timestamp on this sample grid.

tier2dict[str, tuple[np.ndarray, np.ndarray]]

Tier-2 streams kept at their native sampling rate, suitable for time-frequency analysis or frame-level processing. {label: (data, timestamps_s)} where data is (n_samples, n_channels) and timestamps_s are LSL seconds relative to session_t0. These equal Raw times only if the EEG has no dropouts and its clock does not drift; use eeg_timestamps to map them exactly (see below).

eventsdict[str, tuple[list[str], np.ndarray]]

Irregular / event-based streams (nominal_srate == 0), e.g. fixation events, saccade events, or custom trigger streams. {label: (descriptions, timestamps_s)} relative to session_t0.

session_t0float

Absolute LSL timestamp of t = 0 in the Raw object (and in all Tier-2 and event timestamp arrays). Use this to cross-reference with external system logs that carry LSL time.

eeg_timestampsnp.ndarray | None

LSL timestamp of every EEG sample at the native rate, after dropout filling (sample i is at Raw time i / native_sfreq). Map an LSL time t to Raw time with np.interp(t, eeg_timestamps, np.arange(len(eeg_timestamps))) / native_sfreq.

Parameters:
__init__(raw, tier2=<factory>, events=<factory>, session_t0=0.0, eeg_timestamps=None)#
Parameters:
Return type:

None

Methods

__init__(raw[, tier2, events, session_t0, ...])

Attributes

eeg_timestamps: ndarray | None = None#
events: dict[str, tuple[list[str], ndarray]]#
raw: BaseRaw#
session_t0: float = 0.0#
tier2: dict[str, tuple[ndarray, ndarray]]#