 # Frequency bands for the Coherence NxN

We can calculate the value of different frequency bands separately when calculating PLV or PTE. When calculating the coherence, is there a similar frequency division calculation option? How to compute the coherence in different frequency bands.

Easy: once the NxN Coherence is done, drag the file to the process tab, press Run --> Frecuency --> Group in time or frequency bands

1 Like

Thank you for your reply. I think that grouping in frequency bands should be done first and then Coherence. Whether grouping in frequency bands after Coherence is the same as Coherence after grouping?

PLV and PTE are methods that start by filtering the broadband signals in a subset of frequency bands, and then it computes a connectivity measures for these filtered signals.

Coherence is based on Matlab's the FFT function, you obtain your results for the full spectrum of your signal, between 0 and Fs/2.

Methods are documented here:
https://neuroimage.usc.edu/brainstorm/Tutorials/Connectivity

I think that grouping in frequency bands should be done first and then Coherence.

This does not make much sense. What you should have in input of the coherence computation is a broadband signal.

Thank you for your reply. Another question is that there are zero-values in the matrix. How to get a matrix without filtering p value?

There is not much to expect from the values that are filtered out from the p-value. It means mostly that you don't have enough data to estimate the coherence properly.

If you want to change this, you would need to edit the files `process_cohere1n.m` or `process_cohere2.m` and change the option `OPTIONS.pThresh = 0.05;` to `0`.

Hi Francois,
I edited the files process_cohere1n.m and process_cohere2.m and changed the option OPTIONS.pThresh = 0.05; to OPTIONS.pThresh = 0; Then, the matrix of results became the 1-0 matrix. Why?

Then, the matrix of results became the 1-0 matrix

What does this mean?

The effect of `pThresh` on the connectivity matrix is visible in bst_connectivity: the connectivity value for all `pValues` below `pThresh` is set to `0`.

Compared with the condition of OPTIONS.pThresh = 0.05, the matrix of results (OPTIONS.pThresh = 0) became a dual-value matrix (0/1). According to R(pValues > OPTIONS.pThresh) = 0; ,maybe I should change the option `OPTIONS.pThresh = 0.05;` to `1` ?

maybe I should change the option `OPTIONS.pThresh = 0.05;` to `1` ?

Yes, you are absolutely right, sorry I sent you on the wrong tracks.

It's ok, thank you.