[FieldTrip] problem getting frequency bands

Julian Keil julian.keil at gmail.com
Sat Feb 11 08:10:24 CET 2017


Hi Mona,
You have a typo in you cfg call.
Check thr cfg.bpfilter='yes' setting.

Hope that hepls,

Julian


Wong-Barnum, Mona <mona at sdsc.edu> schrieb am Sa. 11. Feb. 2017 um 04:09:

>
> 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 :
>
>
> 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
> *********************************************
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170211/44eb6901/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EEG_fbands.png
Type: image/png
Size: 65435 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170211/44eb6901/attachment.png>


More information about the fieldtrip mailing list