Epochs Within Extended Events

Hello,

I am a new graduate student and have just begun to use Brainstorm and perform SSEP analysis.

My data files consist of continuous EEG data. Within each continuous recording, there are multiple trials. Each trial consists of repetitive stimuli of the same intensity setting.

I would like to break down each continuous EEG data file into the individual trials, and then from there epoch my trials, so that each epoch contains the stimulus and response.

I think the best way to do this will be to create extended events that span the duration of each trial. Once I've done so, is there a way to load just one extended event and then create epochs within that event? I have been trying to select and load an extended event (one of my trials), by selecting Events-File-Import in Database, but receive an error message:
image

Is there a better way to do this? Any suggestions are appreciated!

I would like to break down each continuous EEG data file into the individual trials, and then from there epoch my trials, so that each epoch contains the stimulus and response.

If you want to epoch your data based on a stimulus trigger, why do you want first to split the file in multiple blocks?
If you need to reorganize the events from the continuous file before importing, you have a few processes that can help you do this, like Combine stim/response:
https://neuroimage.usc.edu/brainstorm/Tutorials/EventMarkers#Other_menus

I think the best way to do this will be to create extended events that span the duration of each trial. Once I've done so, is there a way to load just one extended event and then create epochs within that event? I have been trying to select and load an extended event (one of my trials), by selecting Events-File-Import in Database, but receive an error message:

I'm not sure I understand where this error can come from...
How did you create these extended events?

Hi Francois,

Thanks for responding so quickly.

I need to split the file into blocks because each experimental block (each with different stimulus conditions) was recorded as one continuous trial. I.e., Block A has stimulus condition A, Block B has stimulus condition B, etc. I would like to be able to average my responses to Stimuli A, B, etc., and then compare the conditions to one another. If I divide the entire file into epochs, I would be averaging responses from different stimulus types--apples to oranges.

I am creating extended events by creating a new group (events-add group), highlighting the section of the trace that is the trial, and then adding it to the new group with the "E" key shortcut.

I need to split the file into blocks because each experimental block (each with different stimulus conditions) was recorded as one continuous trial.

  1. If the blocks have exactly the same duration, you can simply use the option "Split" in the options window when epoching the data.

  2. Otherwise, if you know their timing: you can unselect the option "use events" and enter the time window of the first block in the import options, then repeat for each block. Depending on the number of blocks you have to import, this could be a bit faster than first creating extended events, and much less prone to manipulation errors (selecting with the mouse is not very precise, use at least the popup menu Time selection > Set selection manually)

  3. In order to obtain something reproducible, you could generate a script for doing this. Select the process Import > Import > Import recordings > Import MEG/EEG: Time, generate the corresponding .m script, write a for loop around the bst_process call to repeat for multiple blocks.
    https://neuroimage.usc.edu/brainstorm/Tutorials/PipelineEditor#Automatic_script_generation
    https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting

  4. When you create manually your extended events: how do you know how where is the separation between blocks? If you have event markers that indicate this, you an use that to first import the blocks.

I'm not sure I understand where this error can come from...
How did you create these extended events?

I am creating extended events by creating a new group (events-add group), highlighting the section of the trace that is the trial, and then adding it to the new group with the "E" key shortcut.

I still don't understand how this error can occur.
If you can still observe this when you right-click on the Link to raw file > Import in database, I would need some additional information and example file in order to reproduce this error on my end.

Hi,

My apologies for the late reply. It turns out that I was having difficulty importing time segments and receiving error messages because my copy of Brainstorm installed incorrectly. I removed it and re-installed it, and have not had issues since.

Thanks again for your help.