# how to use mne to compute non-phase lock power for time frequency analysis

**URL:** <https://mne.discourse.group/t/how-to-use-mne-to-compute-non-phase-lock-power-for-time-frequency-analysis/3648>\
**Category:** Support & Discussions\
**Tags:** time-frequency, eeg\
**Created:** [September 4, 2021, 7:49am UTC](https://mne.discourse.group/t/how-to-use-mne-to-compute-non-phase-lock-power-for-time-frequency-analysis/3648 "2021-09-04T07:49:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hillhillll](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/hillhillll/32/803_2.png) [@hillhillll](https://mne.discourse.group/u/hillhillll)\
**Post date:** [September 4, 2021, 7:49am UTC](https://mne.discourse.group/t/how-to-use-mne-to-compute-non-phase-lock-power-for-time-frequency-analysis/3648/1 "2021-09-04T07:49:37Z")

</div>

Hi, I’m new to MNE. I’m using ‘tfr\_array\_morlet’ to compute time frequency power. I am wondering how to compute the non-phase lock power, should I remove ERP as input data before use ‘tfr\_array\_morlet’ ? And what is the mean of the ‘zero\_mean’ parameter, how should I define its value ? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [September 8, 2021, 8:32pm UTC](https://mne.discourse.group/t/how-to-use-mne-to-compute-non-phase-lock-power-for-time-frequency-analysis/3648/2 "2021-09-08T20:32:01Z")

</div>

Hello @hillhillll and welcome to the forum!

I’m tagging @cbrnr, who might be able to give you some advice here!

Good luck,  
Richard

---

<div class="post-metadata">

**Author:** ![cbrnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/cbrnr/32/1409_2.png) [@cbrnr](https://mne.discourse.group/u/cbrnr)\
**Post date:** [September 15, 2021, 10:44am UTC](https://mne.discourse.group/t/how-to-use-mne-to-compute-non-phase-lock-power-for-time-frequency-analysis/3648/3 "2021-09-15T10:44:30Z")

</div>

I usually do not remove phase-locked activity when computing time-frequency power. I recommend using `mne.time_frequency.tfr_morlet()`, which operates on an `Epochs` objects instead of an array. In particular, this function will return the inter-trial coherence `itc` in addition, which contains information on phase-locked activity.

Regarding the `zero_mean` parameter, I am not entirely sure what it means, but I’d go with the default value of `True` (interestingly, the default is `False` for `mne.time_frequency.tfr_array_morlet()`, but I don’t recommend using that anyway).
