problem w/ cfg.highlight using topoplot to show samples in sig clusters

Andrew Smart andrew.smart at NYU.EDU
Fri Sep 7 21:22:06 CEST 2007


i meant to write

j=[0.18:0.02:0.28];
m=[114:4:171];

i had those  switched

----- Original Message -----
From: Ingrid Nieuwenhuis <ingrid.nieuwenhuis at FCDONDERS.RU.NL>
Date: Thursday, August 30, 2007 9:29 am
Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show samples in sig clusters
To: FIELDTRIP at NIC.SURFNET.NL

> Hi Andrew,
>
> - where does this size come from if my sample rate is 600?:
> The size 267x301 means 267 channels x 301 samples. You have 301 samples
> because your latency in timelockanalysis was cfg.latency = [0.0 0.5];
> so
> that's 301 samples with sample rate 600
>
> Plotting the output from the randomization can be quite tricky,
> because you
> have 301 moments in time where you can have a cluster. In the tutorial
> a
> trick was used. There they also had 301 time points, but a sample rate
> of
> 300 -> spanning one second. If you exactly want to know where the clusters
> are you would have to plot all the 301 time points. Because that doesn't
> make sense they average over 50 millisecond time windows. If for instance
> k=10 -> pos_int = mean(pos(:,m(k):m(k+1))')' -> an average is made over
> samples 136-151 time is 0.45-0.5s giving the 10th plot in the figure.
> Only
> those sensors that are part of the cluster for this whole time window
> (all
> 15 time points) give out a mean of 1 or -1 and are plotted. In the tutorial
> data the cluster was present over a long time window in many sensors,
> therefore there were many sensors with 1 or -1.
>
> For your data this doesn't work, but you do have significant clusters.
>
>
> "I can find the elements of pos and neg that = 1 and = -1
> respectively.
> elements =1 are spread out between roughly pos(59:168,149:172) and =-1
>
> between neg(152:240,242:270)"
>
> For instance this means that the positive clusters are in channel
> 59:168 at
> time points 149:172, with a sample rate of 600 this means from 0.248 to
> 0.287 seconds. You should adjust the loop in such a way that you put the
> settings that they fit your data. So for instance make the time resolution
> higher (by adjusting j and m) since you have clusters that are short lived
> in time, and to have not to many plots, plot around the time where you
> know
> your clusters are.
>
> Hope this solves your stuck-ness,
> Good luck again.
> Ingrid
>
>
>
>
>
> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf
> Of Andrew Smart
> Sent: Wednesday, August 29, 2007 8:02 PM
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show
> samples in sig clusters
>
> Hi Ingrid again,
> Inspecting the variables more I find that the output of the
> timelockstatistics on
> my data gives:
> 28 pos clusters and 36 neg clusters (1 significant pos cluster and 1
> sig neg
>
> cluster)
>
> and posclusterslabelmat and negclusterslabelmet as 267x301 (where does
> this
> size come from if my sample rate is 600?)
>
> then using
> pos = stat.posclusterslabelmat==1;
> neg = (stat.negclusterslabelmat==1)*(-1);
>
> pos and neg are obviously 267x301,
> and I can find the elements of pos and neg that = 1 and = -1
> respectively.
> elements =1 are spread out between roughly pos(59:168,149:172) and =-1
>
> between neg(152:240,242:270).
>
> however, using
>
> pos_int = mean(pos(:,m(k):m(k+1))')';
> neg_int = mean(neg(:,m(k):m(k+1))')';
>
> in the for loop, gives pos_int as 267x1 but all the elements are zeros.
>
> and in neg_int some elements are values like -0.1667 for example.
>
> so for the highlight to work do the values in pos_int and neg_int have
> to be
>
> either 1 or -1?
>
> i have tried various parameters in m and but nothing i have tried
> seems to
> work. i am stuck!
>
> thanks!
> andy
>
>
>
>
> ----- Original Message -----
> From: Ingrid Nieuwenhuis <ingrid.nieuwenhuis at FCDONDERS.RU.NL>
> Date: Wednesday, August 29, 2007 5:12 am
> Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to
> show
> samples in sig clusters
> To: FIELDTRIP at NIC.SURFNET.NL
>
> > Hi Andrew,
> >
> > You can find the option cfg.highlight in the function topoplot.m, this
> > function is called by topoplotER (also by topoplotTFR by the way).
> It
> > should
> > contain the channel numbers which you want to highlight.
> >
> > Why your plot doesn't give any highlighted sensors is hard to say without
> > knowing your data (what did you give in to timelockstatistics with which
> > cfg).
> > - It could be that the time you plot (0:0.05:0.5) does not contain the
> > clusters
> > - It could be the specification of m [1:15:301], this is exactly
> > copied from
> > the tutorial, but it is based on the sample frequency of the data used
> > there. In the tutorial a second of data is used, cut up in 21 pieces
> from
> > 0:0.05:1 and that data has a sample frequency of 301 also cut up in
> 21
> > pieces 1:15:301. You should adjust m to you own time settings and sample
> > frequency.
> > - cfg.highlight = find(pos_int==1|neg_int==-1), what is the outcome
> of
> > this?
> > For the highlighting to work it should contain the sensor numbers to
> be
> > highlighted. If your m is not specified correctly I would guess that
> pos_int
> > and neg_int are not specified correctly and cfg.highlight turnes up
> empty
> > and therefore no highlights are plotted.
> >
> > Hope this give you some ideas to find out what's wrong.
> >
> > Good luck,
> > Ingrid
> >
> >
> > -----Original Message-----
> > From: FieldTrip discussion list [
>
> ----------------------------------
> 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/fcdonders/fieldtrip.
>
> ----------------------------------
> 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://www.ru.nl/fcdonders/fieldtrip.

----------------------------------
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/fcdonders/fieldtrip.



More information about the fieldtrip mailing list