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

RuntimeWarning: divide by zero encountered in divide #50

Open
wucke13 opened this issue Dec 8, 2022 · 3 comments
Open

RuntimeWarning: divide by zero encountered in divide #50

wucke13 opened this issue Dec 8, 2022 · 3 comments

Comments

@wucke13
Copy link

wucke13 commented Dec 8, 2022

This line yields the error. This was also mentioned in #31. I see the error every time when I launch the script. I'm using a PlutoSDR as source.

self.bit_confidence = 10.0*np.log10(bit1_amps/bit0_amps)

@mhostetter
Copy link
Owner

Are you using real captured signals or synthetically-generated signals? This error occurs if the bit 0 positions have exactly 0.0000 amplitude, which is unlikely in real captured signals. An easy fix is to add a complex noise source (with very very small noise) to your signal.

But I agree, this error should be avoided.

@wucke13
Copy link
Author

wucke13 commented Dec 8, 2022 via email

@thinkski
Copy link

I encountered same and fixed in #52.

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

3 participants