Epoching as interval between two events

Hi all,

I have a question about epoching: Is it possible to define an epoch as the
interval between two events? (rather than the interval between tmin and
tmax around an event). I am currently working on analising data from an
experiment where a "trial" includes different (but related) events. Each of
these events within a trial have different predefined codes, including
"Trial start" and "Trial end" codes. In my specific case, the main
inconvenience with the standard tmin-to-tmax approach is that there is a
great deal of variation in the trial duration, so defining a single
standard time-window for epoching risks either including too much unrelated
noise or even data from the next trial if the window is too long, or
cutting off events in some trials if it is too short.

I have been trying to figure out if this is possible from the
documentation, but I could not find anything in the website.
Many thanks in advance for any suggestions
Best,
DP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20171122/b604acae/attachment.html

1 Like

Hi!

You can't define epochs with variable lengths using MNE's Epoch class. If you really need variable length epochs, you'd have to implement it yourself (but note that you should think about how you'll deal with these data in your analysis, e.g. how do you average etc.). I often need to consider only a time average of each variable-length epoch, so in the end each epoch is represented by one value (which means that averaging is straightforward).

Clemens