# [FieldTrip] instantaneous phase and phase locking value

Shen-Mou Hsu explena at gmail.com
Thu Jun 21 06:19:06 CEST 2012

```Hi,

Although this might be a late reply, I would like to contribute my two
cents and also would be glad to hear any comment.

To calculate PLV
1.  get and real and imaginary part of of Fourier coefficents for each
trial for each sensor

cfg.method                  = 'wavelet'; % 'mtmfft' works as well although
I do not really look into the differences between the two
cfg.keeptrials              = 'yes';
cfg.output                  = 'fourier';
fourier_coefficent = ft_freqanalysis(cfg, data);

2. calculate the phase

phase = arctangent of the imaginary Fourier coefficient divided by the real
one.

3. calculate the phase difference between two sensors, i and j (Melloni et
al. Journal of neuroscience 2007, 27:2858)

phaseij = the phase of the sensor i multiplied by the complex conjugate of
the second sensor j

4. calculate the PLV

PLVij = the absolute value of the mean of the phaseij across all the trials

On Thu, Jun 14, 2012 at 11:16 PM, Simon-Shlomo Poil <
poil.simonshlomo at gmail.com> wrote:

> Hi Qi,
>
> I also don't know how to calculate the phase locking value in
> Fieldtrip. But you can do it in the Neurophysiological Biomarker
> Toolbox  http://www.nbtwiki.net/doku.php?id=tutorial:phase_locking_value
>
> It's a toolbox for EEGLAB, but it should be possible to either use the
> functions directly on you fieldtrip signal, or simply convert the
> signal to eeglab format..
>
> Good luck! :)
> Simon-Shlomo Poil
>
> 2012/6/13 qi li <lihqih at gmail.com>:
> > Hi there,
> >
> > I am wondering whether fieldtrip has a function to compute the
> > instantaneous phase and phase locking value. Thanks!
> >
> > Qi
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
>
>
>
> --
> --
> Simon-Shlomo Poil
>
> Center of MR-Research
> University Childrenâ€™s Hospital Zurich
>
> Mobile number: +41 (0)76 399 5809
> Office number: +41 (0)44 266 3129
> Skype: poil.simonshlomo
> Webpage: http://www.poil.dk/s/ and http://www.nbtwiki.net and
> http://www.kispi.uzh.ch/Kinderspital/Medizin/mrzentrum_en.html
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120621/2ae5983f/attachment-0002.html>
```