freqanalysis & cfg.channel

Roemer van der Meij r.vandermeij at DONDERS.RU.NL
Mon Jan 4 09:43:50 CET 2010


Hi Akiko,

I've had a quick look through the code and currently rejection of
channels by channel-numbers (e.g. '-1') instead of channels names (e.g.
'-P3') is not supported. No channels are actually being rejected if you
use '-1' (which is why your first channel is still noisy). The rejection
should work if you use the channel name itself.
On the topic of when to reject channels, personally I do this before
re-preprocessing my data (e.g. preprocess the data, do artifact
rejection, and remove channels for subsequent re-preprocessing) using
cfg.channel. You could however also do this in e.g. freqanalysis, or in
the plotting phase as you did. Personally I like to be absolutely sure I
don't accidentally include (really) bad channels in over-channel
comparisons/averages/etc., which is why I remove them in the earliest
phase possible.

Hope this is still of some use after the holidays.

Best,
Roemer



Akiko Ikkai wrote:
> Hi,
>
> I'm trying to run TFR on MEG data and plot the results, and getting puzzling figures.
>
> Both freqanalysis and multiplotTFR run fine, and figures are produced, but the first channel (first channel in ft_data.label) is always extremely noisy (barely changing from the baseline, but showing random patches of activations across time and freq). When I take out that channel with
>
> cfg.channel = {'all','-1'}; % when the first channel is noisy
>
> the second channel (now the first in label) shows the same trend, if I take out the second, the third one is bad, etc... Other channels don't seem to be affected.
>
> I'm pasting my code during this process below. Can anyone tell me what might be going wrong, and when the best point to delete bad channels?
>
> Thanks in advance, Akiko
>
> %%% to run freq analysis %%%
> cfg.output       = 'pow';
>
> cfg.method       = 'mtmconvol';
> cfg.taper        = 'hanning';
> cfg.foi          = 4:2:50;
> cfg.t_ftimwin    = ones(length(cfg.foi),1).*0.5;
> cfg.toi          = -.5:0.05:2;
> cfg.channel = {'all','-1'}; % when the first channel is noisy
>
> TFRhann_Rvalid = freqanalysis(cfg, Rvalid);
>
> cfg = [];
> cfg.baseline     = [-.1 0];
> cfg.baselinetype = 'relative'; 	
> cfg.xlim = [-0.1 1.2];
> cfg.showlabels   = 'yes';	
> cfg.colorbar = 'yes';
>
> figure(1);clf
> cfg.ylim = [5 50];
> cfg.zlim = [0 2];
> multiplotTFR(cfg, TFRhann_Rvalid); % after importing channel layout
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>

--
Roemer van der Meij MSc
Scientific Programmer & Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.



More information about the fieldtrip mailing list