Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

absolute qudratic values from bic in biocoherence #3

Open
Tru3Dilemm4 opened this issue Dec 14, 2021 · 1 comment
Open

absolute qudratic values from bic in biocoherence #3

Tru3Dilemm4 opened this issue Dec 14, 2021 · 1 comment

Comments

@Tru3Dilemm4
Copy link

Hey there!

At the moment I am rewriting the package for python 3 and have come across a step in the biocoherence.py function that I don't quite understand:

In line 103 in bicoherence.py:
bic = abs(bic)**2 / ((Pyy * np.transpose(Pyy)) * mask)
Why is the absolute value determined from the expected value of the complex bispectrum (bic)? The squaring should surely elemenate the root operation from the denominator of the Haubrich normalization, so that the new bic should actually be squared as well?
Is this already for the visualization step or am I wrong in assuming that the normalized bispectrum is complex?

Best Regards
true

@Tru3Dilemm4
Copy link
Author

I would suggest the following change to line 103:

bic = bic / np.sqrt((Pyy * np.transpose(Pyy)) * mask) # normalizing bic (Haubrich et al.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant