Epoching around movement interval marked with 2 separate event markers?

Hi,

I have been trying to import EEG data with fixed intervals before and after the movement interval, which is variable in length and defined by 2 separate event markers labelling the movement onset and the movement end.

However, it seems like Brainstorm can only epoch around 1 event marker.

Is it possible to use Brainstorm to import the data with a fixed time interval defined before marker 1 and another fixed time interval after marker 2?

If this is not possible, would it be possible to reference the data of event markers (e.g. time points) in Matlab scripts evaluated with Brainstorm?

Best regards,
Ashira

You can use the processes in the Events menu (also accessible from the Record tab, menu Events):

  1. Combine stim/response: Create an extended event between to consecutive events A and B
  2. Convert to simple/extended events
    https://neuroimage.usc.edu/brainstorm/Tutorials/EventMarkers#Other_menus

Then you can import extended events as epochs.
Note that if they don't have the exact same duration, you won't be able to average them.

Thanks a lot for the solution! Converting between simple/extended events then combining the response to create extended events for importing worked well for me!

Since I am only trying to average the results stored in the first few cells of the data matrix after running a Matlab script in Brainstorm, is it possible to resize the data matrix using the script such that the data matrix for all epochs is the same size (regardless of their original length) and thus allow them to be averaged in Brainstorm?

is it possible to resize the data matrix using the script such that the data matrix for all epochs is the same size

If you want to have the same number of time samples in all the files, starting from the beginning of the file, use the menu "Import MEG/EEG" (or the process "Import recordings > Import MEG/EEG: Time" with all the epochs selected in Process1), to extract save new files into the database with the expected length.

If you want to resample the data, use the process "Standardize > Uniform epoch time"