examples: two demos for the 2.4.0 multi-panel viewer features - #20
Merged
Conversation
channel_grid_demo.py already covers one viewer picking channels out of a multi-grid stream. These cover the arrangements 2.4.0 made possible: multi_panel_grids.py — a panel per electrode grid. Five 64-channel arrays of one 320-channel stream, each its own SignalViewer in a Grid(2, 3) cell, showing why both parameters are needed: widget_id keeps the five states apart (without it they resolve to one and render identically), and channel_scope is the hard restriction, so All/Invert, the N/total count, [Edit…] and shift-click all stay inside that panel's array. It passes initial_channels alongside the scope, since scope alone would open each panel on its array's first 16 channels. electrode_overview.py — the same five arrays as live spatial RMS maps plus a detail viewer, built on Heatmap's new vrange. All five share ONE colour range recomputed across all 320 channels, which is what makes them comparable; with per-map autoscaling a silent array renders exactly like a busy one. The source runs each array at a different amplitude and kills one contact on IN3, so the maps have something to reveal. Both use the wall-clock-paced synthetic source pattern from channel_grid_demo, so the acquire thread doesn't busy-loop generating data faster than fs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
channel_grid_demo.pyalready covers one viewer picking channels out of a multi-grid stream.These cover the two arrangements 2.4.0 made possible, and each is built around the parameter that
makes it work.
examples/synthetic/multi_panel_grids.py— a panel per electrode grid. Five 64-channel arraysof one 320-channel stream, each its own
SignalViewerin aGrid(2, 3)cell.widget_idkeeps the five states apart — without it everySignalViewer("emg")resolves to onestate and the tiles render identically.
channel_scopeis the hard restriction: All selects 64, not 320; the count reads64/64;[Edit…]lists only that array; shift-click and rubber-band drags stay inside it.initial_channelsalongside the scope, because scope alone would open each panel onits array's first 16 channels (the >32 default policy, applied within the scope).
comparable across them by eye.
examples/synthetic/electrode_overview.py— the same five arrays as live spatial RMS mapsplus a detail viewer, built on
Heatmap.ui(vrange=…).the load-bearing detail: with per-map autoscaling a silent array renders exactly like a busy one.
have something to reveal (verified: per-array mean RMS 0.99 → 0.15, dead contact 0.0).
not signal; a map answers "which electrode is dead?" at a glance.
Both reuse the wall-clock-paced synthetic-source pattern from
channel_grid_demo.py, so thefree-spinning acquire thread doesn't busy-loop generating data faster than
fs.Examples only — no library changes, no test changes.