Skip to content

Commit

Permalink
Update connectivity.py
Browse files Browse the repository at this point in the history
Fix typo in coherence_magnitude() in connectivity.py. Originally, the file said that the modulus squared of coherency was not the magnitude squared coherence. However, I believe that's the definition (i.e., drop the complex component and normalize the real component to be bounded by 0 and 1).
  • Loading branch information
bloniaszp committed May 7, 2023
1 parent 548a1b9 commit 5a5e8e3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spectral_connectivity/connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,15 @@ def coherence_phase(self):

@_asnumpy
def coherence_magnitude(self):
"""The magnitude of the complex coherency.
Note that this is not the magnitude squared coherence.
"""The magnitude squared of the complex coherency. Note that the
squared modulus of coherency (originally a complex quantity) is the
magnitude-squared coherence (i.e., the normalized, real component of coherency).
This value should bounded by 0 and 1.
Hansson-Sandsten M (2011) Cross-spectrum and coherence function
estimation using time-delayed Thomson multitapers. In: 2011 IEEE
International Conference on Acoustics, Speech and Signal
Processing (ICASSP), pp 4240–4243.
Returns
-------
Expand Down

0 comments on commit 5a5e8e3

Please sign in to comment.