eelbrain.load.mne.variable_length_epochs
- eelbrain.load.mne.variable_length_epochs(events, tmin, tmax=None, baseline=None, allow_truncation=False, data=None, exclude='bads', sysname=None, adjacency=None, tstop=None, name=None, **kwargs)[source]
Load data epochs where each epoch has a different length
- Parameters:
events (Dataset) – Dataset containing events and an
mne.io.Rawdata object, as returned byeelbrain.load.mne.events().tmin (float | Sequence[float]) – First sample to include in each epoch in seconds, relative to event time. Can be
strreferencing a variable inevents.tmax (float | Sequence[float]) – Last sample to include in each epoch in seconds, relative to event time. Can be
strreferencing a variable inevents.baseline (tuple[float | None, float | None] | None) – Time interval for baseline correction.
(tmin, tmax)tuple in seconds, orNoneto use all the data (e.g.,(None, 0)uses all the data from the beginning of the epoch up tot = 0). Set toNonefor no baseline correction (default).allow_truncation (bool) – If a
tminortmaxvalue falls outside the data available inraw, automatically truncate the epoch (by default this raises aValueError).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.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 connectionslist of connections (e.g.,
[('OZ', 'O1'), ('OZ', 'O2'), ...])numpy.ndarrayof 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
sysnameif possible.tstop (float | Sequence[float] | str) – Alternative to
tmax. Whiletmaxspecifies the last samples to include,tstopspecifies the sample before which to stop (standard Python indexing convention). For example, at 100 Hz the epoch withtmin=-0.1, tmax=0.4will have 51 samples, while the epoch specified withtmin=-0.1, tstop=0.4will have 50 samples. Can bestrreferencing a variable inevents.name (str) – Name for the NDVar.
... –
mne.Epochsparameters.
- Returns:
List of data epochs of shape.
- Return type: