eelbrain.load.mne.variable_length_mne_epochs
- eelbrain.load.mne.variable_length_mne_epochs(events, tmin, tmax=None, baseline=None, allow_truncation=False, tstop=None, picks=None, decim=1, i_start='i_start', trigger='trigger', event_id=None, **kwargs)[source]
Load mne 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] | str) – First sample to include in each epoch in seconds, relative to event time. Can be
strreferencing a variable inevents.tmax (float | Sequence[float] | str) – 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).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.picks (Any) – Channels to include (
mne.Epochsparameter). By default, all channels are included; ifrawhas bad channels, MEG, EEG and EOG channels are picked without excluding the bad ones.decim (int) – Decimate the data by this factor (i.e., only keep every
decim’th sample;mne.Epochsparameter).i_start (str) – Name of the variable containing the sample index of each event.
trigger (str) – Name of the variable containing the integer event ID (trigger code). If this variable is a
Factor(e.g. from a pipeline’slabel_events), it is converted to a stable numeric code automatically (seeevent_id).event_id (dict[str, int]) – Mapping from condition label to trigger code, stored on each resulting
mne.Epochsas itsevent_id(each epoch only keeps the one entry matching its own trigger code, sincemne.Epochsrequires everyevent_idvalue to have a matching event). IfNoneandtriggerresolves to aFactor, this is derived automatically from the Factor’s own labels. Withtrigger=None(every event gets the code 1),event_identries declaring any other code are ignored (with a warning), since they could never match an event.... –
mne.Epochsparameters.
- Returns:
List with one
mne.Epochsobject for each row inevents.- Return type: