eelbrain.load.mne.epochs_ndvar(epochs, name=None, data=None, exclude='bads', mult=1, info=None, sensors=None, vmax=None, sysname=None, connectivity=None, proj=True)

Convert an mne.Epochs object to an NDVar.

  • epochs (BaseEpochs | Path | str) – The epochs object or path to an epochs FIFF file.

  • name (str) – Name for 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.

  • mult (float) – multiply all data by a constant.

  • info (None | dict) – Additional contents for the info dictionary of the NDVar.

  • sensors (Sensor) – The default (None) reads the sensor locations from the fiff file. If the fiff file contains incorrect sensor locations, a different Sensor can be supplied through this kwarg.

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

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

  • connectivity (str | list of (str, str) | array of int, (n_edges, 2)) –

    Connectivity 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.

  • proj (bool) – Add projectors (only applies when epochs is a path).