Creating events with varying durations manually

External Email - Use Caution

Hello,

Is it possible to manually create events in mne by just giving their onset
times and duration?

We are working with EEG recordings of interictal epilepsy data, so the
event times are not predefined and vary in duration.

Thank you.

External Email - Use Caution

Hi!

It depends on what you want to achieve. MNE doesn't support variable-length epochs, and events don't have a duration, so if you want to use the event structure (a NumPy array) you can only use onsets. However, MNE also supports annotations, which consist of onsets, durations, and descriptions. Annotations can be variable-length, but not many functions accept annotations for further processing so far, so you might need to convert your annotations to (fixed-length) events at some point. Maybe this description could be helpful as well: https://martinos.org/mne/stable/auto_tutorials/intro/plot_object_annotations.html

Clemens

External Email - Use Caution

Hai,

Thanks for response.

Our data is pertaining to epileptic seizures. We just have the onset and
offset of inter-ictal events. Each of the inter-ictal events have
different duration. We are trying to create the epoch for inter-ictal
events.
How to create the event file in that case? (In our data there is no STIM
channels). Is that we have to create the numpy array manually?

Thank you