eelbrain.pipeline.ContinuousEpoch

class eelbrain.pipeline.ContinuousEpoch(session, sel=None, pad_start=0.1, pad_end=1.0, split=10, samplingrate=200, vars=None)

Epoch spanning multiple events for continuous analysis

A ContinuousEpoch will extract a continuous segment of data from the first event to the last event. pad_start and pad_stop determine how much extra time to include before the first event and after the last event (to allow using the data surrounding these events for estimating TRFs with negative and positive lags). split controls whether to break up the data into multuple segments when there are long pauses between successive events.

When using MneExperiment.load_epochs(), each row of the returned Dataset will contain the events in the epoch alongside the data.

Parameters:
  • session (str) – Session (raw file) from which to load data.

  • sel (str) – Expression which evaluates in the events Dataset to the index of the events included in this Epoch specification (default is all events).

  • pad_start (float) – Time to add before the first event (in seconds, default 0.100).

  • pad_end (float) – Time to add after the last event (in seconds, default 1).

  • split (float) – Split into several continuous epochs whenever time between used data (event times ± pad) is larger than split (default 10). For example, in an experiment with many 2 s long trials which are grouped into 2 blocks with a break of 50 s, this would result in two epochs, one for each block.

  • samplingrate (float) – Target samplingrate. Needs to divide data samplingrate evenly (e.g. 200 for data sampled at 1000 Hz; default 200).

  • vars (dict) – Add new variables only for this epoch. Each entry specifies a variable with the following schema: {name: definition}. definition can be either a string that is evaluated in the events-Dataset`, or a (source_name, {value: code})-tuple. source_name can also be an interaction, in which case cells are joined with spaces ("f1_cell f2_cell").