eelbrain.load.mne.epochs
- eelbrain.load.mne.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
.- Parameters:
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 (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 | None, float | None] | None) – Time interval for baseline correction.
(tmin, tmax)
tuple in seconds, orNone
to use all the data (e.g.,(None, 0)
uses all the data from the beginning of the epoch up tot = 0
). Set toNone
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 (Literal['eeg', 'mag', 'grad']) – Which data channels data to include (default based on channels in data).
reject (float) – Threshold for rejecting epochs (peak to peak). Requires a for of mne-python which implements the Epochs.model[‘index’] variable.
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.info (dict) – Entries for the ndvar’s info dict.
name (str) – name for the new NDVar.
raw (BaseRaw) – Raw file providing the data; if
None
,ds.info['raw']
is used.sensors (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 (float) – Alternative to
tmax
. Whiletmax
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 withtmin=-0.1, tmax=0.4
will have 51 samples, while the epoch specified withtmin=-0.1, tstop=0.4
will have 50 samples.sysname (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 (str | Sequence[Tuple[str, str]] | ndarray) –
Connectivity between elements. Can be specified as:
"none"
for no connectionslist 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:
The data epochs as (case, sensor, time) data.
- Return type:
epochs