Repository navigation
ADR 0137: quality views drawn in the browser - #2342
neuromechanist merged 8 commits into
Conversation
Views are declared data the browser draws; no figure image is stored. Folds in the decisions on activations, electrode positions inferred from names, the public derivative, spectrum parameters, metric names and the plan hash. Indexed in both README lists. Tested: bun test test/adr-index.unit.test.ts.
Adds the pointer under ADR 0134's header and a note on its index line; the rest of 0134 is unchanged. Tested: bun test test/adr-index.unit.test.ts.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2342Version: 🤖 Updated on each push. |
Activations reproduce the Zarr decomposition input exactly (store-content rounding, unit, average reference) with the 1 Hz high-pass as a display filter; positions from names are nemar.sensor-labels.v1 with stated defaults and refusal reasons; a store content_sha256 is null only for profile archive. Tested: adr-index and docs-links tests.
Spectrum bound, archive-only null digest, homes rows named, supersession scope aligned across headers and index, file sizes and caps, first product-file route, anonymity gate, layout-role frame fields, converter follow-up #2343, README status date. Tested: adr-index and docs-links tests.
|
Review: r1 comments lens (docs-only, one reviewer): 4 Important, 8 Low, 4 nits, all wording, all fixed in 3335c59. No second round (wording-only fixes). Held until neuroschema 0.6.0 (nemarOrg/neuroschema#21) is released, then re-check the citation and merge into the epic branch. |
The decomposition always reads preprocessed data (high-pass, line-noise removal, ASR cutoff 30, bad channels removed) on Zarr and BIDS inputs; activations are one browser multiply by the folded unmixing, sphere and average-reference matrices and approximate the decomposition input by design. Adds the raw-input alternative with the fixture numbers and the sccn/eegprep#668 limitation. Tested: adr-index and docs-links tests.
Line noise is a conditional 50/60 Hz band-stop until ZapLine-plus parity is measured; ASR repairs bursts only and reports asrBurstFraction (sccn/eegprep#684); channel types kept per row and keyed (sccn/eegprep#669, #2344); a view refuses rather than mislead; neuroschema 0.6.0 marked in preparation (nemarOrg/neuroschema#21), montage licensing stays a release precondition. Tested: adr-index test.
…-progress' into feature/issue-2324-adr-0137
Decision 1 and the README load-bearing line: an activation or signal-window view that has no bad-segment table says so on the page. Tested: adr-index and docs-links tests.
|
Review: r1 comments lens (docs-only): 4 Important, 8 Low, 4 nits, all fixed (3335c59); later refreshes for the owner's revised decomposition (ae7bbc6) and the decisions made since (16e3517, a0ec441: band-stop until ZapLine-plus, ASR repairs and reports asrBurstFraction, per-row channel types keyed into the derivative, refuse-rather-than-mislead rule, 0.6.0 in preparation). Verified: adr-index and docs-links tests pass. Merging into the epic branch at the owner's request, ahead of the neuroschema 0.6.0 release. |
b05416a
into
feature/issue-2324-epic-pipeline-progress
Summary
Docs only: Architecture Decision Record (ADR) 0137, status
proposed, for the live quality views of epic #2324.NEMAR stores no figure image; a quality view is declared data that the browser draws.
.context/decisions/0137-quality-views-are-declared-data-drawn-in-the-browser-and-no-figure-image-is-stored.md.dev,main, the epic branch, every remote branch and every open PR.The ADR includes these decisions, made with the plan:
nemar.ic-activity.v1applies no preprocessing.It is one multiply of the serving copy's kept channels by the unmixing, sphere and average-reference matrices folded together, in store row order with the unit folded in.
So activations approximate what was decomposed, by design, and the caption says so.
The 1 Hz high-pass is a declared display filter.
Nothing is drawn on a channel-set mismatch or a published-digest mismatch.
When no digest is published, activations draw with a "not checked" caption; an archive decomposition keeps its own caption.
a high-pass filter, a conditional 50 or 60 Hz band-stop (ZapLine-plus later), artifact subspace reconstruction with a cutoff of 30 that repairs bursts and cuts nothing, and bad-channel removal.
The record states
decomposition_input.A store input's
content_sha256may be null only for profilearchive.Without measured positions in a known frame, positions are inferred by
nemar.sensor-labels.v1, which neuroschema owns.It uses normalized labels, aliases such as T3/T7, and MNE-Python's standard montages at a pinned version, with provenance recorded.
The defaults are at least 8 channels matched and a share of at least 0.8.
Its refusal reasons are
duplicate_label,montage_ambiguous,too_few_matched,too_few_channels,bipolar_labels,labels_unrecognizedandshare_too_low.On a refusal no map is drawn and the view says why.
This applies to the viewer's live map and to sensor-field views with no layout role.
catalogorpublishedone bystored_at.<plugin>:<name>; recipe metrics are bare names declared by the recipe.A
qualityMetricnames one producer, and the plugin that would re-report floor values is dropped.tree_sha256) and its outcome.Merge order: this merges now, ahead of the release. The ADR names neuroschema 0.6.0 as in preparation (nemarOrg/neuroschema#21), and confirming the montage licenses remains a precondition of that release.
Part of #2324
Update (lead amendments)
Commit 7847639 folds in the Zarr decomposition (PZ),
nemar.sensor-labels.v1, and the null-only-for-archive rule for the store digest.Update (review round 1)
Commit 3335c59 fixes every Important, Low and Nit item from the round-1 docs review (no Critical findings).
content_sha256may be null only when the view's derivative has profilearchive.Metric naming moves to the plugin manifest, and the no-samples rule stays in signalJourney's
nemarnamespace (now its own row).Both README index entries list the same items, including the rejected alternative of array outputs.
decomposition_inputfields are listed.A recipe's layout role records
coordinate_system(possiblyn/a) andposition_source.Update (design revision)
Commit ae7bbc6 applies the revised decomposition and activation design.
The "reproduces exactly" claim is removed, and the refusals are unchanged.
"Redo the preprocessing in the browser" is also rejected.
Update (owner decisions before merge)
Commit 16e3517 aligns the ADR with the owner's later decisions. Merge commit 9cfb8f8 brings in the epic branch (#2350).
ZapLine-plus follows as a GPL-3.0 eegprep extension (
eegprep-ext-zapline-plus) and becomes the default once its parity with MATLAB is measured.The share of samples it changes is recorded as
asrBurstFraction, and the missing repaired-sample mask is tracked in clean_asr: return the mask of samples it repaired sccn/eegprep#684.Channel types are now part of the derivative key (Derivative key must change when channel types change #2344); the header now lists this as a refinement of ADR 0123.
Details are in neuroschema's view specifications.
Montage licensing stays a precondition of the 0.6.0 release.
ADR 0134 and its index line needed no change.
Test plan
bun test test/adr-index.unit.test.ts: 11 passNEMAR_DOCS_CHECKOUT=<docs checkout> bun test test/docs-links.unit.test.ts: 18 passbun run lintand the pre-commit typecheck: clean (no code changed)typoson the two ADR files: clean