[FieldTrip] Phase synchronization and coherence spectrum
Laurent Sheybani
Laurent.Sheybani at unige.ch
Tue Jun 9 17:57:49 CEST 2020
Dear Jan-Mathijs,
Thank you for this very clear answer !
May I ask a further question on the same topic? Why the script gives a result of ‘1’ for each frequency bin if I change the number of repetitions (‘numrpt’) to 1 ? I would expect that, even over 1 single trial, phase synchronization can still be measured across time between two signals, and should thus not be equal to 1 (except if both signals are not identical, which is not the case) ?
- it is true that I did not find this tutorial straight away, but I am trying different methods to calculate phase synchronization between pairs of sensors. If you have another method that I could use without a Fourier transform, I would greatly appreciate it ! (I already tried the inter-trial coherence of the phase differences between the 2 sensors across time).
Thanks again for your help!
Laurent
De : fieldtrip <fieldtrip-bounces at science.ru.nl> De la part de Schoffelen, J.M. (Jan Mathijs)
Envoyé : lundi, 8 juin 2020 18:13
À : FieldTrip discussion list <fieldtrip at science.ru.nl>
Objet : Re: [FieldTrip] Phase synchronization and coherence spectrum
Dear Laurent,
Hmmm, interesting that you managed to find this tutorial, since it does not seem to be linked. This is a very ‘old’ tutorial (i.e. > 15 years), and hasn’t been updated for quite a while. You are indeed correct that the x-axis represents frequency bins, but given the way that the data are plotted, i.e. as plot(<some-vector>) these frequency bins are not reflecting physical units as expressed in Hz. Rather, the number of points in the graph just reflect the number of points of the fft, which is by definition equal to the number of samples in the time domain signal. These frequency bins essentially span an axis that runs from 0 Hz up to (in this case) twice the Nyquist frequency (minus a little bit), where the Nyquist frequency is defined as the sampling frequency divided by 2. In other words, the 100 ‘bins’ on the frequency axis run from 0 to 99 Hz, which nicely correspond to a bin width of 1 Hz per bin. As you see in the graph, the coherence peak is actually at the 11’th bin, coinciding with a frequency of 10 Hz.
Now, if you change the length of your signal to 2.5 seconds (at a sampling frequency of 100 Hz), your signals will be 250 samples long, and by consequence the fft of the signals will also be 250 samples long. Now the total frequency range (i.e. 0 Hz up to 100 Hz minus a bit) will be divided into 250 bins. This indeed causes the bin with the maximum coherence to be the 26th bin, but this still corresponds to a physical frequency of 10 Hz, because the bin width has changed from 1 bins/Hz into 2.5 bins/Hz.
Best wishes,
Jan-Mathijs
On 8 Jun 2020, at 14:27, Laurent Sheybani <Laurent.Sheybani at unige.ch<mailto:Laurent.Sheybani at unige.ch>> wrote:
Dear Fieldtrippers,
I am trying to implement the example provided here (http://www.fieldtriptoolbox.org/tutorial/fourier/) to measure the phase synchronization between two signals. I followed the paragraph starting by “The coherence spectrum”.
From what I understand of the “Coherence spectrum” example script of this web-page, the plot that one should obtain when calling plot(coh) is a 2-D plot with the y-axis corresponding to the coherence index between 0 to 1 and x-axis corresponding to frequencies (right ?).
However, when I changed the length of the signal (argument “len”), I noticed that the frequency (x-) axis increased by the same factor (e.g. if I change len from 1 to 2.5, the x-axis changes from 100 to 250). The coherence is no more on 10 Hz, but on 25 Hz. I must have missed something simple, but I do not understand why the results (& frequency axis) depend on the duration of the signal ? Did I miss a normalization somewhere ?
Any help would be greatly appreciated !
Thanks in advance !
-----------------------------
Dr. Laurent Sheybani, Ph.D
Médecin interne en Neurologie Clinique
Clinique de Neurologie
Hôpitaux Universitaires de Genève
Rue Gabrielle-Perret-Gentil, 4
1205 Genève
Switzerland
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200609/86af1477/attachment.htm>
More information about the fieldtrip
mailing list