-
Notifications
You must be signed in to change notification settings - Fork 123
refactored demo_waterfall to not use depricated libraries, runs much smoother now. #165
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
base: master
Are you sure you want to change the base?
Conversation
demo_waterfall.py
Outdated
import numpy as np | ||
import sys | ||
from rtlsdr import RtlSdr | ||
from scipy.signal import welch | ||
from numba import jit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be optional? I'd rather not add any dependencies than necessary.
Maybe if you move the related log10 function up here and wrap it all in a
try:
from numba import jit
@jit(...)
def log10(...):
...
except ImportError:
log10 = np.log10
|
||
# A simple waterfall, spectrum plotter | ||
# | ||
# Controls: | ||
# | ||
# * Scroll mouse-wheel up or down, or press the left or right arrow keys, to | ||
# change the center frequency (hold shift for finer control). | ||
# change the centre frequency (hold shift for finer control). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these spelling and single/double quote changes seem a bit unnecessary. I don't really mind one way or another, but it just seems like a lot of noise for a functional PR.
Not really a big deal in this case. For other types of pull requests though (especially in other projects) I would imagine maintainers not being incredibly thrilled. (FWIW)
keyboard_buffer = [] | ||
shift_key_down = False | ||
image_buffer = -100*np.ones((NUM_BUFFERED_SWEEPS,\ | ||
NUM_SCANS_PER_SWEEP*NFFT)) | ||
image_buffer = -100 * np.ones((NUM_BUFFERED_SWEEPS, NUM_SCANS_PER_SWEEP * NFFT)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These indentation and line-break changes however are much appreciated! (as well as the ones below)
Thanks for the review. Will remove numba as it doesn't work as a standalone function (I haven't looked into why). Yes sorry about the pedantic quotes etc - I use the formatter, "black" and it's ruthless and unforgiving. |
Pull Request Test Coverage Report for Build 10189619615Details
💛 - Coveralls |
The demo waterfall app used a number of depricated libraries and techniques.
I hope my autoformatter doesn't cause any style issues.