Importing event markers into Brainstorm

Hi @AnishSingh27,

AFAIK, in FieldTrip the data and events are two separated structures.
So, reading this custom merged structure is not supported.

Yes, that will be the straight forward way to do it.

Brainstorm support multiple formats for events. See here.
Given that you have simple events (only label and time of occurrence), .csv is a good option:

fid = fopen('events.csv','w');
num_events = length(combined_idx_sorted);
for i = 1:num_events
  fprintf(fid, '%s, %g, 0\n', combined_names_sorted{i}, ft_data.time{1}(combined_idx_sorted(i)));     
end
fclose(fid);

Then you can import events from that file.

  • In the GUI:
    Record tab > (Event section) File > Add events from file

  • Or with a process:
    Events > Import from file

2 Likes