eelbrain.load.fiff.epochs(ds, tmin=-0.1, tmax=None, baseline=None, decim=1, mult=1, proj=False, data=None, reject=None, exclude='bads', info=None, name=None, raw=None, sensors=None, i_start='i_start', tstop=None, sysname=None, connectivity=None)

Load epochs as NDVar.

  • ds (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 (Optional[float]) – Last sample to include in the epochs in seconds (Default 0.6; use tstop instead to specify index exclusive of last sample).

  • baseline (Optional[Tuple[Optional[float], Optional[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).

  • decim (int) – Downsample the data by this factor when importing. 1 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 (see Wikipedia).

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

  • proj (bool) – mne.Epochs kwarg (subtract projections when loading data)

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

  • reject (Optional[float]) – Threshold for rejecting epochs (peak to peak). Requires a for of mne-python which implements the Epochs.model[‘index’] variable.

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

  • info (Optional[dict]) – Entries for the ndvar’s info dict.

  • name (Optional[str]) – name for the new NDVar.

  • raw (Optional[BaseRaw]) – Raw file providing the data; if None,['raw'] is used.

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

  • i_start (str) – name of the variable containing the index of the events.

  • tstop (Optional[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.

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

  • connectivity (Union[str, Sequence, None]) –

    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.


The data epochs as (case, sensor, time) data.

Return type