pyavs.align_et_to_meg

pyavs.align_et_to_meg(meg_raw: mne.io.Raw, et_raw: mne.io.RawArray, meg_event_times: ndarray, et_event_times: ndarray, verbose: bool = True) mne.io.RawArray[source]

Align ET RawArray to MEG Raw using shared scene onset events.

Uses mne.preprocessing.realign_raw to correct for clock offset and drift between the two recording systems. ET raw is modified in-place.

Parameters:
  • meg_raw (mne.io.Raw) – MEG data (reference, untouched).

  • et_raw (mne.io.RawArray) – ET data (aligned in-place to MEG timeline).

  • meg_event_times (np.ndarray) – Scene onset times in MEG reference frame [s].

  • et_event_times (np.ndarray) – Corresponding scene onset times in ET reference frame [s].

  • verbose (bool, optional) – Whether to log progress.

Returns:

Aligned ET raw, cropped and resampled to match MEG.

Return type:

mne.io.RawArray