eelbrain.load.mne.raw_ndvar

eelbrain.load.mne.raw_ndvar(raw, i_start=None, i_stop=None, decim=1, data=None, exclude='bads', sysname=None, connectivity=None)

Raw data as NDVar

Parameters:
  • raw (BaseRaw | Path | str) – Raw instance, or path of a raw FIFF file..

  • i_start (int | Sequence[int]) – Start sample (see notes; default is the beginning of the raw).

  • i_stop (int | Sequence[int]) – Stop sample (see notes; default is end of the raw).

  • decim (int) – Downsample the data by this factor when importing. 1 (default) means no downsampling. Note that this function does not low-pass filter the data. The data is downsampled by picking out every n-th sample.

  • data (Literal['eeg', 'mag', 'grad']) – The kind of data to include (default based on 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.

  • 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 | Sequence[Tuple[str, str]] | ndarray) –

    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.

Returns:

data – Data (sensor or source space). If i_start and i_stopr are scalar then a single NDVar is returned, if they are lists then a list of NDVars is returned.

Return type:

NDVar | list of NDVar

Notes

i_start and i_stop are interpreted as event indexes (from mne.find_events()), i.e. relative to raw.first_samp.