eelbrain.load.mne.evoked_ndvar

eelbrain.load.mne.evoked_ndvar(evoked, name=None, data=None, exclude='bads', vmax=None, sysname=None, adjacency=None)[source]

Convert one or more mne mne.Evoked objects to an NDVar.

Parameters:
  • evoked (str | Evoked | Sequence[Evoked]) – The Evoked to convert to NDVar. Can be a string designating a file path to a evoked fiff file containing only one evoked.

  • name (str) – Name of the NDVar.

  • data (Literal['eeg', 'mag', 'grad']) – Which data channels data to include (default based on channels in data).

  • exclude (str | Sequence[str]) – Channels to exclude (mne.pick_types() kwarg). If ‘bads’ (default), exclude channels in info[‘bads’]. If empty do not exclude any.

  • vmax (float) – Set a default range for plotting.

  • sysname (str) – Name of the sensor system to load sensor adjacency (e.g. ‘neuromag306’, inferred automatically for KIT data converted with a recent version of MNE-Python).

  • adjacency (str | Sequence[tuple[str, str]] | ndarray | None) –

    adjacency between elements. Can be specified as:

    • "none" for no connections

    • list of connections (e.g., [('OZ', 'O1'), ('OZ', 'O2'), ...])

    • numpy.ndarray of int, shape (n_edges, 2), to specify connections in terms of indices. Each row should specify one connection [i, j] with i < j. If the array’s dtype is uint32, property checks are disabled to improve efficiency.

    • "grid" to use adjacency in the sensor names

    If unspecified, it is inferred from sysname if possible.

Notes

If evoked objects have different channels, the intersection is used (i.e., only the channels present in all objects are retained).