Report templates (structures that worked in the pilot)¶
Replicate these layouts in the toolbox's reporting component. All figures should
derive from the single metrics.json (principle #7).
A. Per-participant device/condition comparison report¶
One HTML per participant; each section places the two arms side by side (left vs right). Sections, in order: 1. Overview — device/condition, bad channels, n trials. The headline accuracy and ITR are stated with the window they are read at, and the best-of-sweep accuracy is labelled as picked after the fact (see the derivatives index). 2. Decoding — accuracy vs window + ITR vs window (overlaid arms, faceted by condition/band), with the chance line marked. 3. Spectral — SNR spectra (per condition); electrode impedance channel-array maps (sequential colormap); per-channel SNR channel-array maps (diverging). 4. Decoding — confusion matrices. 5. Hardware — impedance-vs-SNR scatter.
B. Group / study report — built as contrasts, not as a report¶
This layout was deliberately not built as specified (#269). A page of group means side by side invites the by-eye comparison it was meant to replace. Group-level results are contrasts instead: declared in the protocol, permutation-tested, one page per (protocol, contrast). See Between-condition contrasts. What the pilot layout got right, and where it lives now: - Never hide the spread. The contrast report plots every participant individually at n ≤ 12, because with that few subjects any summary is worse than showing the data. - Accuracy-vs-window curves with the chance line. Kept, on the contrast report's sweep plot. One pre-declared window carries the test; the sweep's own cluster test is labelled exploratory. - Mean metric by condition × arm (bar charts). Not built. Counterbalancing arm enters the GEE estimate as a covariate, and the order effect is reported on its own. - Conditions inside one run (factorial sweeps). No group view yet: contrasts compare runs, and they refuse multi-condition runs. That is #31.
C. Deliverable metrics (external)¶
metrics.json(source of truth) →metrics.mdtable, a prose "status" paragraph, one-pager stat chips, and slide figures (PNG ≥150 dpi + SVG).- Every accuracy carries chance + window; every mean carries SD + per-participant values; an explicit "not measured / not computed" block.
Figure conventions¶
- Accuracy/ITR vs window: x = window (s), mean line + SD shading, dashed chance line,
title states decoder + n. (
ssvep.classification.viz.plot_window_sweep) - Channel maps: discrete circles at montage 2-D positions, no interpolation; diverging
(signed) vs sequential (non-negative). (
ssvep.classification.viz.plot_channel_array) - Confusion: row-normalised. (
ssvep.classification.viz.plot_confusion)