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

Raise Down Sampling Threshold from 1000 to 1024 #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion paintwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class DataThread(QThread):
'downSampling': None, 'downSamplingFactor': None, 'downSamplingBuffer': None,
'inlet': None, 'stream_idx': None, 'is_marker': False}

DOWN_SAMPLING_THRESHOLD = 1024

def __init__(self, parent):
super().__init__(parent)
self.chunksPerScreen = 50 # For known sampling rate data, divide the screen into this many segments.
Expand Down Expand Up @@ -55,7 +57,7 @@ def update_streams(self):
if self.sig_strm_idx < 0:
self.sig_strm_idx = k
srate = stream.nominal_srate()
stream_params['downSampling'] = srate > 1000
stream_params['downSampling'] = srate > DOWN_SAMPLING_THRESHOLD
stream_params['chunkSize'] = round(srate / self.chunksPerScreen * self.seconds_per_screen)
if stream_params['downSampling']:
stream_params['downSamplingFactor'] = round(srate / 1000)
Expand Down