olimex-shielddocs

Reference

Workbench (Python)

apps/web: the workbench server, the readout catalogue that says what this front end can carry, the hookup guide and the montage drawings.

languagepythonpathapps/webmodules4public symbols19

Stories

Real calls, run when this page was built. The code is the story file itself.

Which readouts can it carry at all?

Each readout in the catalogue names the feature that makes it informative. readouts.gate asks the front-end model whether that feature fits in the band, and answers before anything is recorded.

docs-site/stories/front_end.py
import readouts

gates = {r["key"]: readouts.gate(r["key"]) for r in readouts.catalogue()}
readouts
3
reachable
3

Ran 2026-10-02 21:53 at 98158d0 in 0.0 s. Output is computed at build time; plots decimate long traces for display only.

Modules

API reference

Read from the source without importing or running it.

hookup

hookup.py -- the guide that opens BEFORE the port does. Stdlib only.

function

guide

source
guide(readout_key: str='eeg') -> dict

Everything the modal shows. Raises rather than returning a partial guide.

Full documentation

A guide missing its diagram, or showing a site the montage does not contain, is worse than no guide -- someone places an electrode from it.

placement.placement

placement.py — WHERE DO THE ELECTRODES GO? As a picture, not a paragraph.

class

PlacementError

source
class PlacementError(ValueError)
function

get_map

source
get_map(map_id, mirror=False)
function

sites

source
sites(map_id)
function

label_boxes

source
label_boxes(montage, map_id='hand-dorsal-right', mirror=False)

Where each label's text actually lands, in view-box units.

Full documentation

Same estimate _gutters already uses, so the two cannot disagree about how wide a label is.

function

label_collisions

source
label_collisions(montage, map_id='hand-dorsal-right', mirror=False)

Pairs of labels whose text boxes overlap.

Full documentation

A diagram whose captions sit on top of each other is unreadable in exactly the place it matters — beside the electrode. This was found by LOOKING at a rendered head map (two labels printed over one another) rather than by any test, which is why it is a function now.

function

render

source
render(montage, map_id='hand-dorsal-right', mirror=False, title=None, width=560, require_ground=True)

Montage -> a self-contained SVG string.

Full documentation

montage is a list of {role, site, note?} — the shape the scalp montage advisor, ECG lead definitions and peripheral montages already use.

function

checklist

source
checklist(montage, map_id='hand-dorsal-right', mirror=False)

The words that go beside the picture: one line per connection, plus each site's own note.

readouts

readouts.py -- WHAT the electrodes are measuring, and whether this front end can carry it.

class

ReadoutError

source
class ReadoutError(ValueError)
function

get

source
get(key: str) -> dict
function

gate

source
gate(key: str) -> dict

Can this front end carry this readout's informative feature? Answer BEFORE recording.

Full documentation

Returns the per-frequency verdict for the feature and both band edges, so a readout that is fine in the middle and destroyed at one edge cannot read as simply 'reachable'.

function

catalogue

source
catalogue() -> list

serve

serve.py -- the olimex-shield workbench: live view, record, playback, electrode placement.

function

tools_dir

source
tools_dir()

The directory holding the optional companion analysis tools: $OLIMEX_TOOLS, else the nearest parent with a REGISTRY.md. The Atlas tab and the extraction widgets come from there; without it they are switched off.

function

optional_tools

source
optional_tools() -> dict
class

Handler

source
class Handler(SimpleHTTPRequestHandler)
function

bridge_up

source
bridge_up(url: str=BRIDGE) -> bool
function

start_bridge

source
start_bridge(url: str=BRIDGE) -> subprocess.Popen | None
function

main

source
main(argv=None)
Generated from polarizetech/olimex-shield at 98158d0 by automatic-documentation-site 0.2.1, on polarize-ui v0.5.15. Nothing on this page is written by hand; edit the source it names.