[FieldTrip] problem getting frequency bands
Wong-Barnum, Mona
mona at sdsc.edu
Sat Feb 11 04:08:17 CET 2017
Hi:
I am having trouble getting the frequency bands for my EEG data. All my different EEG frequency plots (for channel 1) come out the same as the original unfiltered EEG :
[cid:E9FC888B-B6C1-4CA4-9966-5F9DB37D24E7]
I’d appreciate all tips on what I am doing wrong. Here is my partial script for the first 3 plots:
addpath /path/to/fieldtrip
ft_defaults
% 1. EEG
disp ( 'EEG...' )
cfg = [];
cfg.dataset = '1.fif';
data = ft_preprocessing ( cfg );
disp ( 'Getting eeg channels...' )
eeg_channels = ft_channelselection ( 'EEG*', data.label );
cfg = [];
cfg.channel = eeg_channels;
eeg = ft_selectdata ( cfg, data );
disp ( 'Saving eeg...' )
save eeg.mat eeg -v7.3;
clearvars cfg eeg;
% 2. Low delta EEG
disp ( 'Low delta EEG...' )
cfg = [];
cfg.bgfilter = 'yes';
cfg.bpfreq = [0.1 2];
cfg.dataset = '1.fif';
data = ft_preprocessing ( cfg );
cfg = [];
cfg.channel = eeg_channels;
cfg.frequency = [0.1 2];
eeg = ft_selectdata ( cfg, data );
disp ( 'Saving low delta eeg...' )
save low_delta_eeg.mat eeg -v7.3;
clearvars cfg eeg;
% 3. Delta EEG
disp ( 'Delta EEG...' )
cfg = [];
cfg.bgfilter = 'yes';
cfg.bpfreq = [2 4];
cfg.dataset = '1.fif';
data = ft_preprocessing ( cfg );
cfg = [];
cfg.channel = eeg_channels;
cfg.frequency = [2 4];
eeg = ft_selectdata ( cfg, data );
disp ( 'Saving delta eeg...' )
save delta_eeg.mat eeg -v7.3;
clearvars cfg eeg;
Thanks!
Mona
*********************************************
Mona Wong
Web & Mobile Application Developer
San Diego Supercomputer Center
"I've learned that people will forget
what you said, people will forget
what you did, but people will never
forget how you made them feel."
--- Maya Angelou
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170211/f7bd74b4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EEG_fbands.png
Type: image/png
Size: 65435 bytes
Desc: EEG_fbands.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170211/f7bd74b4/attachment.png>
More information about the fieldtrip
mailing list