plotting plv

jan-mathijs schoffelen jan.schoffelen at DONDERS.RU.NL
Mon Oct 11 09:17:29 CEST 2010


Dear Akiko,

A small comment first: there's a type in the naming of your zparam
'cohsprctm' should probably read 'cohspctrm', but I don't think that
this is the show stopper. Next, I guess that given your configuration
for ft_freqanalysis, the eventual output of ft_connectivityanalysis is
a 3x3xNfreqxNtime - matrix containing plv-values. Is that correct?
I do not understand why the visualization fails, but it seems that the
correct part of the code is not reached.
Could you save the variable 'stat' to a file and upload it to our ftp-
server, so that we can reproduce your bug. Recently we spent quite
some time in streamlining the visualisation for this type of data and
I am pretty sure that in your case it just should work. Please have a
look at http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers
  to upload your data.

Best,

Jan-Mathijs

On Oct 11, 2010, at 12:54 AM, Akiko Ikkai wrote:

> Hi,
>
> I'm trying to plot plv between channel pairs that I get from
> ft_connectivityanalysis.
>
> when I run
> cfg                  = [];
> cfg.xparam           = 'time';
> cfg.yparam           = 'freq';
> cfg.zparam           = 'cohsprctm';  % need to run stat.cohsprctm =
> stat.plvspctrm;
>                                                  % fixed in the
> latest version?
> cfg.cohrefchannel    = '1';
> cfg.layout = 'ordered';
> cfg.showlabels       = 'yes';
> cfg.colorbar         = 'yes';
> figure; ft_multiplotTFR(cfg, stat)
>
> I get this error:
> ft_multiplotTFR(cfg, stat)
> ??? Index exceeds matrix dimensions.
>
> Error in ==> ft_multiplotTFR at 242
> datavector = data.(cfg.zparam)(seldat,yidc,xidc);
>
>
> ... I'm guessing the error is something like wrong channel
> combination or refchannel selection, but not able to locate where
> the error is coming from (have tried different channel combination).
> stat.dimord is "chan_chan_freq_time", which might not be formatted
> appropriately for ft_multiplotTFR...?  Below, I'm attaching the code
> used to get "stat" (plv).
>
> Any suggestions? Thanks in advance! Akiko
>
>
> %%%%% code for connectivityanalysis %%%%%%
> cfg = [];
> cfg.output ='fourier'; % instead of 'powandcsd'... fixed in the
> latest version?
> cfg.method          = 'mtmconvol';
> cfg.channel = {'1', '7', '120'}; % contra & unrelated channels to test
> cfg.channelcmb = {'1' '7'; '1' '120'; '7', '120'};
> cfg.keeptrials = 'yes';
> cfg.keeptapers = 'no';
> cfg.toi             = [-.8:.1:2]
> cfg.foi             = [1:0.5:30];
> cfg.taper           = 'hanning';
> cfg.t_ftimwin       = zeros(1,length(cfg.foi));
> cfg.t_ftimwin(:)    = 5./cfg.foi;
> TFR = ft_freqanalysis(cfg, ft_data);
>
> cfg=[];
> cfg.method  = 'plv';
> [stat] = ft_connectivityanalysis(cfg,  TFR);
>
> ---------------------------------------------------------------------------
> You are receiving this message because you are subscribed to
> the  FieldTrip 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/neuroimaging/fieldtrip.
> ---------------------------------------------------------------------------
>

Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3614793

---------------------------------------------------------------------------
You are receiving this message because you are subscribed to
the  FieldTrip 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/neuroimaging/fieldtrip.
---------------------------------------------------------------------------



More information about the fieldtrip mailing list