[FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics
"Jörn M. Horschig"
jm.horschig at donders.ru.nl
Mon Sep 19 17:13:53 CEST 2011
Hey Stephen,
please check your FT path. You are definitely not using a recent FT
version, because the line you quoted on statistics_wrapper does not
exist anymore. You can verify your path by typing in Matlab 'which
ft_defaults' or 'which ft_timelockstatistics' (without the quotes).
Due to recent changes, it might additionally help to read these two FAQs:
http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors
http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work
Anyway, the tutorial wiki page is indeed out of date, as the
neighbourselection is not included correctly anymore. I'm gonna fix this
:) The only thing which you need to add is
cfg.neighbours=ft_neighbourselection(cfg, [...]) before calling
ft_timelockstatistics. That's all that changed.
Best regards,
Jörn
On 9/19/2011 4:43 PM, Stephen Politzer-Ahles wrote:
> Jörn,
>
> Thanks lot for this information. I tried specifying cfg.layout and got
> a new error message:
>
> ??? Error using ==> ft_neighbourselection at 130
> Sensor distance is measured in an unknown unit type
>
> Error in ==> statistics_wrapper at 241
> cfg.neighbours = ft_neighbourselection(cfg,varargin{1});
>
> Error in ==> ft_timelockstatistics at 123
> [stat, cfg] = statistics_wrapper(cfg, varargin{:});
>
>
> (I get the same message when trying to run
> neighbours=ft_neighbourselection(cfg,data) with that layout file
> specified.) The layout file I was using is based directly on
> EEG1010.lay which is included in fieldtrip, and it works fine when I
> use it for topoplotting and multiplotting, so I'm not sure why it's
> causing errors when fed to ft_neighbourselection.
>
> As for the version, I actually am using the most recent version (which
> I downloaded yesterday before trying to run cluster statistics, and
> updated my path accordingly), but still getting these errors. The code
> I've been trying to run, though, is based on the sample code on the
> wiki page
> http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock,
> which may be out of date.
>
> Is there perhaps anyone on the list who has run cluster statistics on
> EEG data and would be willing to share a sample of their code?
>
> Best,
> Steve
>
> Message: 1
> Date: Mon, 19 Sep 2011 09:12:32 +0200
> From: "J?rn M. Horschig" <jm.horschig at donders.ru.nl
> <mailto:jm.horschig at donders.ru.nl>>
> To: Email discussion list for the FieldTrip project
> <fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>>
> Subject: Re: [FieldTrip] Problem with EEG channels in
> ft_neighborselection when running cluster statistics
> Message-ID: <4E76EB60.9080801 at donders.ru.nl
> <mailto:4E76EB60.9080801 at donders.ru.nl>>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Hey Stephen,
>
> You need to specify the position of your electrodes, which are mostly
> stored in an 'elec' structure. If you do not have that available, you
> can circumvent the problem by defining a cfg.layout. In that case,
> neighbouring sensors will be selected according to how they are placed
> in that layout-file you specify. That's not 100% correct of
> course, but
> at least an estimate how the sensors are positioned (note that a
> layout
> has only 2D coordinates). For example, you could use cfg.layout =
> 'EEG1010.lay' as a start.
>
> Anyway, could you try using a more recent version of FieldTrip? A few
> months ago, we changed the way the neighbourselection works (actually,
> you have to call cfg.neighbours = ft_neighbourselection manually,
> now).
> You can then also check with cfg.feedback = 'yes' whether the
> neighbourselection looks alright to you (that's the same as calling
> ft_neighbourplot)
>
> Hope it helps! Best regards,
> J?rn
>
>
>
> On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote:
> > When attempting to run cluster statistics on my EEG data (originally
> > from Neuroscan .CNT, then processed in EEGLAB and finally
> imported to
> > fieldtrip) using ft_timelockstatistics(), I receive the following
> > error message:
> >
> > ??? Error using ==> ft_neighbourselection at 114
> > Did not find gradiometer or electrode information.
> >
> > Error in ==> statistics_wrapper at 241
> > cfg.neighbours = ft_neighbourselection(cfg,varargin{1});
> >
> > Error in ==> ft_timelockstatistics at 123
> > [stat, cfg] = statistics_wrapper(cfg, varargin{:});
> >
> > This seems to be because when I use cfg.channel = {'EEG'}; with my
> > data, the channel information (the variable "sens" used in
> > ft_neighbourselection) consists only of the list of channel labels:
> >
> > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........}
> >
> > On the other hand, when I run timelockstatistics on the sample data
> > from the wiki, "sens" includes much more information:
> >
> > sens =
> >
> > pnt: [151x3 double]
> > ori: [356x3 double]
> > tra: [184x356 double]
> > label: {151x1 cell}
> > unit: 'cm'
> >
> > I think most of that extra information is planar gradient data
> (i.e.,
> > it comes from GA_FIC.grad). Since my data are EEG data, I assume it
> > wouldn't make sense to use ft_megplanar on them. So, assuming that I
> > need to get the extra channel location information into my EEG data,
> > does anyone have any ideas on how to do that?
> >
> > Best,
> > Steve Politzer-Ahles
> >
> > --
> > Stephen Politzer-Ahles
> > University of Kansas
> > Linguistics Department
> > http://www.linguistics.ku.edu/
> >
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
> --
> J?rn M. Horschig
> PhD Student
> Donders Institute for Brain, Cognition and Behaviour
> Centre for Cognitive Neuroimaging
> Radboud University Nijmegen
> Neuronal Oscillations Group
>
> P.O. Box 9101
> NL-6500 HB Nijmegen
> The Netherlands
>
> Contact:
> E-Mail: jm.horschig at donders.ru.nl <mailto:jm.horschig at donders.ru.nl>
> Tel: +31-(0)24-36-68493 <tel:%2B31-%280%2924-36-68493>
> Web: http://www.ru.nl/donders
>
> Visiting address:
> Trigon, room 2.30
> Kapittelweg 29
> NL-6525 EN Nijmegen
> The Netherlands
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110919/3fdfbedd/attachment-0001.html>
>
> ------------------------------
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> End of fieldtrip Digest, Vol 10, Issue 25
> *****************************************
>
>
>
>
> --
> Stephen Politzer-Ahles
> University of Kansas
> Linguistics Department
> http://www.linguistics.ku.edu/
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel: +31-(0)24-36-68493
Web: http://www.ru.nl/donders
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110919/3212c654/attachment-0002.html>
More information about the fieldtrip
mailing list