...
Step-by-step guide
Table of Contents |
---|
1. Dealing with events
a. Events in original fif format
If you are reading your events directly from the fif file, you can use the ft_read_event function. This will give you a data structure, with all the triggers found in the data. For each trigger, you will have the following fields: the type (can be the channel where triggers were recorded, or the name of the event), the sample number, the value of the trigger, the offset and the duration. These are the basic triggers you sent during recording.
b. Events in .mrk file
If your events have been read, modified or added with dataHandler or Muse, you have a '_trans_tsss.mrk' file with all the occurrences of the events. The advantage of having such a file is that Muse will automatically read the events and plot them together with your continuous data.
...
View file name my_ft_read_event.m height 150
c. Creating and reading events of interest
You can then rename the events (by writing a meaningful string in the field .type, for example 'StimPresentation'), create new events and add them to this structure or create new structures with subsets of events. For example, you can create new events corresponding to specific combinations of conditions or corresponding to clean data (ex: StimPresentation_noEOG, meaning that there are no EOG events in a time window of interest around the event StimPresentation). Creating specific events, corresponding to clean data, will make your life easier, because you can directly create your final epochs based on those events.
...
Info |
---|
if you downsample your data, make sure the event sample numbers correspond to the new data sampling! |
2. Epoching the data
Now that you have your events, you can epoch, e.g extract the data around the event of interest.
...
Info |
---|
Beware that filtering epoched data may lead to edge effets! |
3. Averaging over trials
Once your data is cut into epochs, you may want to average them. For this, you can use the function ft_timelockanalysis.
Info |
---|
You can't average epochs with different lengths, in that case this function will throw an error. |
4. Averaging over subjects
To average EPRs/ERFs over a group of subjects, use the function ft_timelockgrandaverage.
...
to get only the grand average ERP/ERF over all subjects.
5. Plotting
a. Timecourse of the ERP/ERF
You can use the function ft_singleplotER to plot the timecourse over a single channel or a group of channels (average across selected channels).
b. Topography of the ERP/ERF
You can use the function ft_topoplotER to plot the topography of the ERP over a specified time window (data is averaged over this time window).
c. Multiplot
You can use the function ft_multiplotER to plot the timecourses of all channels, displayed according to their layout.
...
Related articles
Filter by label (Content by label) | ||
---|---|---|
|
...