# source of equation

**URL:** <https://mne.discourse.group/t/source-of-equation/10579>\
**Category:** Support & Discussions\
**Tags:** time-frequency\
**Created:** [November 28, 2024, 7:06am UTC](https://mne.discourse.group/t/source-of-equation/10579 "2024-11-28T07:06:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oyamat](https://avatars.discourse-cdn.com/v4/letter/o/c6cbf5/32.png) [@oyamat](https://mne.discourse.group/u/oyamat)\
**Post date:** [November 28, 2024, 7:06am UTC](https://mne.discourse.group/t/source-of-equation/10579/1 "2024-11-28T07:06:56Z")

</div>

mne version 1.8.0  
windows 11  
Hi experts,  
I am a biginner of mne.  
I study time\_frequency.py(mne-python/mne/minimum\_norm/time\_frequency).  
In def \_single\_epoch\_tfr, line432, script is plv\_f /= np.abs(plv\_f).  
Please let me know the meaning, background, source of “plv\_f /= np.abs(plv\_f).”  
The reports I know does not this division.

Thanks for your response in advance.

Best regards,  
Tetsu

---

<div class="post-metadata">

**Author:** ![scott-huberty](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/scott-huberty/32/2715_2.png) [@scott-huberty](https://mne.discourse.group/u/scott-huberty)\
**Post date:** [November 28, 2024, 4:12pm UTC](https://mne.discourse.group/t/source-of-equation/10579/2 "2024-11-28T16:12:24Z")

</div>

> [@oyamat](#):
>
> plv\_f /= np.abs(plv\_f)

@oyamat , that line of code was written 10 years ago, so I don’t think someone on this forum can describe it in great detail for you ☹

Here’s what I can say:

- PLV stands for _Phase Locking Value._

- Practically speaking, `plv_f /= np.abs(plv_f)` just scales `plv_f` by the absolute value of itself. So it will be either -1 or 1.

- I _think_ that this line of code is only reached if you set `return_plv` to True in [`mne.minimum_norm.source_induced_power`](https://mne.tools/stable/generated/mne.minimum_norm.source_induced_power.html)

---

<div class="post-metadata">

**Author:** ![sotpapad](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sotpapad/32/2184_2.png) [@sotpapad](https://mne.discourse.group/u/sotpapad)\
**Post date:** [November 29, 2024, 8:34am UTC](https://mne.discourse.group/t/source-of-equation/10579/3 "2024-11-29T08:34:03Z")

</div>

Maybe it’s as discussed [in this thread](https://mne.discourse.group/t/how-is-plv-calculated-in-mne-connectivity-and-can-someone-point-me-to-an-article-about-it/10479)?

---

<div class="post-metadata">

**Author:** ![oyamat](https://avatars.discourse-cdn.com/v4/letter/o/c6cbf5/32.png) [@oyamat](https://mne.discourse.group/u/oyamat)\
**Post date:** [November 29, 2024, 8:38am UTC](https://mne.discourse.group/t/source-of-equation/10579/4 "2024-11-29T08:38:59Z")

</div>

Dear Scott,

Thank you for your response. I don’t understand the correct definition of Phase Locking Value(PLV), Phase Locking Factor(PLF), the Evoked Power.  
Then,  
(1) If the value is divided by the absolute of coefficients of the complex, the value will become PLF ?  
(2) PLF is applied to a single channel(electrode), PLV is applied to 2 channels, not 1 channel. This is correct ?  
(3) Please let me know how to calculate the evoked power for 1 channel.

Best regards,  
Tetsu

---

<div class="post-metadata">

**Author:** ![sotpapad](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sotpapad/32/2184_2.png) [@sotpapad](https://mne.discourse.group/u/sotpapad)\
**Post date:** [November 29, 2024, 11:04am UTC](https://mne.discourse.group/t/source-of-equation/10579/5 "2024-11-29T11:04:26Z")

</div>

Hi,

1. I think `plf_f` is a complex number and dividing by it’s absolute value only amounts to applying a scaling factor that makes the amplitude span the range [0, 1]. In that respect, PLV is not converted to PLF when applying the normalization.
2. I am no expert, but I would that’s true based on a couple of articles ([A novel approach for assessing neuromodulation using phase-locked information measured with TMS-EEG - PubMed](https://pubmed.ncbi.nlm.nih.gov/30674902/), [Frontiers | Transcranial magnetic stimulation-induced global propagation of transient phase resetting associated with directional information flow](https://www.frontiersin.org/journals/human-neuroscience/articles/10.3389/fnhum.2014.00173/full)).
3. Maybe [this example](https://mne.tools/stable/auto_examples/time_frequency/source_label_time_frequency.html#sphx-glr-auto-examples-time-frequency-source-label-time-frequency-py) will be of help to you.

Cheers,

---

<div class="post-metadata">

**Author:** ![demnads](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/demnads/32/3962_2.png) [@demnads](https://mne.discourse.group/u/demnads)\
**Post date:** [November 29, 2024, 11:53pm UTC](https://mne.discourse.group/t/source-of-equation/10579/6 "2024-11-29T23:53:00Z")

</div>

Assuming plv\_f /= np.abs(plv\_f) is equal to CSDxy/|CSDxy| this is just a method to obtain e^(i theta) where theta is the phase difference between x and y signal. By average CSDxy/|CSDxy| across epochs you get a plv value. I came to this conclusion from reading the following articles.

Ricardo Bruña et al 2018 J. Neural Eng. 15 056011

[arXiv:1702.05254](https://arxiv.org/abs/1702.05254)

Neuroimage. 2013 July 1; 74: 231–244. doi:10.1016/j.neuroimage.2013.02.008.

PLOSONE|DOI:10.1371/journal.pone.0146443 January8, 2016

Hum Brain Mapp. 1999;8(4):194-208. doi: 10.1002/(sici)1097-0193(1999)8:4\<194::aid-hbm4\>[3.0.co](http://3.0.co);2-c.
