[FieldTrip] About wPLI and connectivity computing

Omar Ortega tourette95 at gmail.com
Fri Sep 6 22:33:20 CEST 2019


Hi everyone!
I'm trying to analyzethe  EEG connecivity in resting state, but I don't
know how to do it, I wan to get the connectivity info for all channel pairs
in the EEG Bands (Delta, Theta, Alpha, Beta). I would like to use wPLI (or
coherence) but I don't know how

First I imported my continuous data from neuroscan,


then I segmented it in 1 seg epochs,
then I tried to compute the fft using mtfft
and then I used the output to compute wPLI and save it as a variable named
'stat', but when I check 'stat' is empty

What is wrong?
What are the correct steps for wPLI computing?

Please help!
I'm so lost!
  Thanks in advance!

here is my code:

Importing:
cfg =[];
>> cfg.dataset='../../KATYNRM.cnt';
>> kat_cnt=ft_preprocessing(cfg)
Warning: adding C:\Users\Omar\Documents\MatLab\Fieldtrip\external\eeglab
toolbox to your MATLAB path
Loading file ../../KATYNRM.cnt ...
Reading data .....
Scaling data .....
Reading Event Table...
Skipping event table (tag != 1,2,3 ; theoritically impossible)
processing channel { 'FP1' 'FP2' 'F3' 'F4' 'C3' 'C4' 'P3' 'P4' 'O1' 'O2'
'F7' 'F8' 'T3' 'T4' 'T5' 'T6' 'FZ' 'CZ' 'PZ' }
reading and preprocessing
Loading file ../../KATYNRM.cnt ...
Reading data .....
Scaling data .....
Reading Event Table...
Skipping event table (tag != 1,2,3 ; theoritically impossible)
reading and preprocessing trial 1 from 1

the call to "ft_preprocessing" took 5 seconds

kat_cnt =

  struct with fields:

           hdr: [1×1 struct]
         label: {19×1 cell}
          time: {[1×63297 double]}
         trial: {[19×63297 double]}
       fsample: 500
    sampleinfo: [1 63297]
           cfg: [1×1 struct]
-------------------------------------------------------------------------
Epoching:

>> cfg=[];
>> cfg = [];
cfg.length  = 1;
cfg.overlap = 0;
katepoched = ft_redefinetrial(cfg, kat_cnt)
the input is raw data with 19 channels and 1 trials
the input is raw data with 19 channels and 1 trials
the call to "ft_redefinetrial" took 0 seconds
the call to "ft_redefinetrial" took 1 seconds

katepoched =

  struct with fields:

           hdr: [1×1 struct]
         trial: {1×126 cell}
          time: {1×126 cell}
       fsample: 500
         label: {19×1 cell}
    sampleinfo: [126×2 double]
           cfg: [1×1 struct]


--------------------------------------------------------------------------------

freqanalysis

>> cfg=[];
>> cfg.hpfilter='yes';
>> cfg.hpfreq=1;
>> cfg = [];
cfg.method     = 'mtmfft'
cfg.taper      = 'hanning'
cfg.foilim     = [1 30];
cfg.keeptrials = 'yes'
powandcsd = ft_freqanalysis(cfg, katepoched)

cfg =

  struct with fields:

    method: 'mtmfft'


cfg =

  struct with fields:

    method: 'mtmfft'
     taper: 'hanning'


cfg =

  struct with fields:

        method: 'mtmfft'
         taper: 'hanning'
        foilim: [1 30]
    keeptrials: 'yes'

the input is raw data with 19 channels and 126 trials
the call to "ft_selectdata" took 0 seconds
Default cfg.pad='maxperlen' can run slowly. Consider using
cfg.pad='nextpow2' for more efficient FFT computation.
processing trials
processing trial 126/126 nfft: 500 samples, datalength: 500 samples, 1 tapers

the call to "ft_freqanalysis" took 2 seconds

powandcsd =

  struct with fields:

        label: {19×1 cell}
       dimord: 'rpt_chan_freq'
         freq: [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
22 23 24 25 26 27 28 29 30]
    powspctrm: [126×19×30 double]
    cumsumcnt: [126×1 double]
    cumtapcnt: [126×1 double]
          cfg: [1×1 struct]



------------------------------------------------------------------


Connectivity:

>> cfg.method='wpli_debiased';
>> stat = ft_connectivityanalysis(cfg, powandcsd)
the call to "ft_selectdata" took 0 seconds
the call to "ft_connectivityanalysis" took 1 seconds

stat =

  struct with fields:

               labelcmb: {0×2 cell}
                 dimord: 'chancmb_freq'
    wpli_debiasedspctrm: [0×30 double]
                   freq: [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27 28 29 30]
                    cfg: [1×1 struct]


--------------------------------


Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190906/daad5dd0/attachment.html>


More information about the fieldtrip mailing list