EEG lab pop_spectopo()

19 ビュー (過去 30 日間)
Mubeen Janmohamed
Mubeen Janmohamed 2021 年 1 月 10 日
回答済み: Prasanna 2024 年 5 月 25 日
Hi,
I would like to plot the power spectra of my events in EEGlab which were labelled by EDF browser.
The pop_spectopo() does the whole EEG epoch.
I cant seem to be finding the code to slectively do this for certain event types with a specified time from the event annotation.
Could anyone help me with this. I had trimmed the original EDF file to select data by events only.

回答 (1 件)

Prasanna
Prasanna 2024 年 5 月 25 日
Hi Mubeen,
To plot the power spectra of specific events in EEG data, especially when those events are marked with annotations like in your case, You'll need to segment your continuous EEG data around the events of interest and then use spectral analysis functions on these segments.
  • Load the dataset using the ‘pop_loadset’ function of EEGLAB
  • Use ‘pop_epoch’ function to create epochs centred around your events of interest. You’ll need to specify the time window around each event you are interested to plot.
% extract epoch from -1 to 2 seconds around each event of type ‘x’
EEG1 = pop_epoch(EEG, {yourEventType}, [-1,2])
  • After epoching, you can plot the power spectra of these epochs using the ‘pop_spectopo’ function.
% For example, to plot the spectra at 25 points between the EEG frequencies, for channel 1:
pop_spectopo(EEG1, 1, [EEG1.xmin*1000 EEG1.xmax*1000], 'EEG' , 'percent', 25);
For more information on the ‘pop_epoch’ and the ‘pop_spectopo‘ functions, refer to the following documentations:
Hope this helps.

カテゴリ

Help Center および File ExchangeEEG/MEG/ECoG についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by