Skip to content

Modernize#24

Open
Pandapip1 wants to merge 14 commits into
labstreaminglayer:masterfrom
Pandapip1:modernize
Open

Modernize#24
Pandapip1 wants to merge 14 commits into
labstreaminglayer:masterfrom
Pandapip1:modernize

Conversation

@Pandapip1

@Pandapip1 Pandapip1 commented Jul 7, 2026

Copy link
Copy Markdown

Also fixes #18, #20, closes #21 (see 72af5be)

Updates sigvisualizer to use actual proper python packaging, updates it to support Qt 6, fixes various bugs, and also adds Qt theming because at this point why not.

It seems like this project is unmaintained atm; if you'd like to add me as an external collaborator I'd be happy to keep it up-to-date. I've got some thoughts as to some other changes I'd also like to make to improve usability, but I'm keeping this PR relatively narrowly scoped (ha) for now.

Pandapip1 added 14 commits July 7, 2026 16:37
pull_chunk can return fewer than chunkSize samples, and the averaging
produced a shorter data buffer while leaving the timestamps untouched.
Build a matching downsampled timestamp per averaged sample so the two
stay length-aligned, and drop the aliased pre-allocated downSamplingBuffer
(every row referenced the same list).
The x-position was derived from a per-chunk slot counter, which assumes
every chunk holds the same number of samples. pull_chunk can return
variable counts, so slots drifted and produced disconnected segments.
Position each sample by its own timestamp relative to the sweep origin,
track the actual last-drawn x for the connecting line, and start a new
sweep once a full screen of time has elapsed.
Move t0, chunk_idx, lastX, lastY, mean and scaling out of single widget
attributes into a per-stream dict. Streams at the same nominal rate can
arrive out of phase, so each stream must track its own sweep origin and
position; switching the plotted stream now resumes that stream's own
timeline instead of jumping.
A flat channel (routine with HD-EEG reference/disconnected channels) had
its range padded by a tiny epsilon, yielding a ~1e12 scaling factor that
overflowed drawLine's int32 coordinate as soon as the channel carried a
real value. Scale a zero-range channel to 0 so it draws centered.

Fixes labstreaminglayer#18, labstreaminglayer#20.
Downsampling only decimated streams above 1 kHz to ~1 kHz, a negligible
saving given the canvas is far narrower than even a 1 kHz sweep, while
adding real complexity and (until recently) bugs. Always emit the raw
pull_chunk output and let QPainter draw it.
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

Successfully merging this pull request may close these issues.

OverflwError

1 participant