eelbrain.load.mne.mne_epochs

eelbrain.load.mne.mne_epochs(data, tmin=-0.1, tmax=None, baseline=None, i_start='i_start', raw=None, drop_bad_chs=True, picks=None, reject=None, tstop=None, decim=1, trigger='trigger', event_id=None, **kwargs)[source]

Load epochs as mne.Epochs.

Parameters:
  • data (Dataset) – Dataset containing a variable which defines epoch cues (i_start).

  • tmin (float) – First sample to include in the epochs in seconds (Default is -0.1).

  • tmax (float) – Last sample to include in the epochs in seconds (Default 0.6; use tstop instead to specify index exclusive of last sample).

  • baseline (tuple[float, float]) – Time interval for baseline correction. (tmin, tmax) tuple in seconds, or None to use all the data (e.g., (None, 0) uses all the data from the beginning of the epoch up to t = 0). Set to None for no baseline correction (default).

  • i_start (str) – Name of the variable containing the sample index of each event.

  • raw (BaseRaw) – If None, ds.info[‘raw’] is used.

  • drop_bad_chs (bool) – Drop all channels in raw.info[‘bads’] form the Epochs. This argument is ignored if the picks argument is specified.

  • picks (Sequence[str]) – mne.Epochs parameters.

  • reject (float) – mne.Epochs parameters.

  • decim (int) – mne.Epochs parameters.

  • tstop (float) – Alternative to tmax. While tmax specifies the last samples to include, tstop specifies the sample before which to stop (standard Python indexing convention). For example, at 100 Hz the epoch with tmin=-0.1, tmax=0.4 will have 51 samples, while the epoch specified with tmin=-0.1, tstop=0.4 will have 50 samples.

  • trigger (str) – Name of the variable containing the integer event ID (trigger code). If this variable is a Factor (e.g. from a pipeline’s label_events), it is converted to a stable numeric code automatically (see event_id).

  • event_id (dict[str, int]) – Mapping from condition label to trigger code, stored on the resulting mne.Epochs as its event_id (passed through to mne.Epochs). If None and trigger resolves to a Factor, this is derived automatically from the Factor’s own labels; otherwise MNE derives its own from the trigger codes. With trigger=None (every event gets the code 1), event_id entries declaring any other code are ignored (with a warning), since they could never match an event.

  • ... – mne.Epochs parameters.