plv analysis

Bernhard Spitzer bernhard.spitzer at BCCN-BERLIN.DE
Mon Jul 5 17:38:14 CEST 2010


Dear Jan-Mathijs,

thank you - in fact my pathdef was outdated and pointed to an older
fieldtrip version.
With the current version now the plv works indeed without problems.
Thanks again!

Bernhard

Am 7/5/2010 3:54 PM, schrieb jan-mathijs schoffelen:
> Hi Bernhard,
>
> Could you check whether you are using a very recent version of
> fieldtrip? If not, please update and check whether the bug persists.
> It sounds rather like a known bug which has been recently fixed.
>
> Best,
>
> Jan-Mathijs
>
>
> On Jul 5, 2010, at 3:02 PM, Bernhard Spitzer wrote:
>
>> Dear ft_list,
>>
>> I am trying to perform plv analysis using Fieldtrip, on EEG data
>> converted from SPM to Fieldtrip using ftraw.
>> Frequanalysis on the imported data works fine, I obtain the powspctrm
>> and crsspctrm, and I can succeed
>> with connectivityanalyis to compute e.g., coherence without problems.
>> However, when I set cfg.method to 'plv', connectivityanalysis throws
>> the following error:
>>
>> ??? Conversion to cell from double is not possible.
>>
>> Error in ==> avgoverdim at 17
>> reduceddim(avgdimnum) = 1;
>>
>> Error in ==> selectdata at 445
>>    if avgoverrpt,  tmpdata = avgoverdim(tmpdata, 'rpt');   end
>>
>> Error in ==> ft_connectivityanalysis at 256
>>    data   = selectdata(data, 'avgoverrpt', 'yes');
>>
>> any suggestions?
>> best & many thanks
>> Bernhard
>>
>>
>>
>> %Here the settings I use for  frequanalysis (which seems to work fine)
>> cfg = [];
>> cfg.output ='powandcsd';
>> cfg.taper = 'dpss';
>> cfg.channel = unique(S.chancomb(:));
>> cfg.channelcmb = S.chancomb;
>> cfg.method          = 'mtmconvol';
>> cfg.keeptrials = 'yes';
>> cfg.keeptapers = 'no';
>> cfg.foi             = (1/timewin):(1/timewin):S.freqwin(2); %
>> Frequency axis
>> cfg.foi             = cfg.foi(cfg.foi>=S.freqwin(1));
>> numfoi              = length(cfg.foi);
>> cfg.t_ftimwin       = zeros(1,numfoi);
>> cfg.t_ftimwin(:)    = timewin; % Time resolution
>> cfg.tapsmofrq       = zeros(1,numfoi); % Initialize to zero
>> cfg.tapsmofrq(:)    = 1/timewin; % Set initial resolution to
>> 1/timewin (i.e. 2.5 Hz) for all frequencis
>> cfg.tapsmofrq(cfg.foi>10*(1/timewin))    =
>> 0.1*cfg.foi(cfg.foi>10*(1/timewin));
>> cfg.tapsmofrq(cfg.foi>50)                = 5;
>> cfg.toi=(prestim+(timewin/2)):step:(poststim-(timewin/2)-1/data.fsample);
>> % Time axis
>> freq = ft_freqanalysis(cfg, data);
>>
>> %And the part for connectivityanalysis (which works for coherence,
>> but not for plv)
>> cfg=[];
>> cfg.method  = 'plv';
>> [stat] = ft_connectivityanalysis(cfg,  freqs)
>>
>> ----------------------------------
>> 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-3668063
>
> ----------------------------------
> 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. Bernhard Spitzer
Bernstein Center for Computational Neuroscience
Charité Universitätsmedizin Berlin
Philippstr. 13 House 6
10115 Berlin
Germany

Phone: +49 (0)30 2093-6789
Fax: +49 (0)30 2093-6771

----------------------------------
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