Repository navigation
Quality views: sensor positions from names (W2b) - #603
Merged
neuromechanist merged 14 commits intoNov 26, 2026
Merged
neuromechanist merged 14 commits into
neuromechanist merged 14 commits into
Conversation
Deploying nemar-website with
|
| Latest commit: |
3cd2c9a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cfb6cbf3.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-issue-588-w2b-sensor.nemar-website.pages.dev |
This was referenced Nov 26, 2026
neuromechanist
merged commit Nov 26, 2026
fdf5bfc
into
feature/issue-586-epic-pipeline-progress
3 of 4 checks passed
This was referenced Nov 26, 2026
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.
Part of #588 (epic nemarOrg/nemar-cli#2324)
Summary
Adds
nemar.sensor-labels.v1(neuroschema 0.6.0) assrc/lib/quality-views/sensor-labels.ts, a pure, worker-safe port ofneuroschema.views.sensor_labels, and puts both scalp-map paths on it.The quality views' model (
model.ts) now places sensor-field maps without a layout role by name, replacing the site'slabels_pendingword; the module and the fourteen montages it matches are loaded by dynamic import only when a map is placed by name.The signal viewer's scalp map (
eeg-viewer/scalp-map.ts) uses the same algorithm;name-placement.tsand its test are deleted, and with it the interim EGI-by-names rule (namedCap) the owner accepted until W2b.Precedence is unchanged: measured positions in a known frame are used as they are;
frame_unknown,positions_flatandpositions_partialfall back to names with the reason kept in the caption; intracranial frames are never placed by name.The refusal sentences live once, in
src/lib/quality-views/sensor-labels-copy.ts;render/words.tsshows them as they are and the viewer shows them after "No scalp map:".No
standard-montage.tsornet-montages.tsremained on the base branch.Maps lost, and why
too_few_channels,too_few_matched) instead of a map; before, 3 matched labels drew one.share_too_low), name pairs of electrodes (bipolar_labels), or fit two montages that disagree (montage_ambiguous, such as A1, A2 and C1 to C6) now shows its sentence.cap_model_unknown: the recording store carries noCapManufacturersModelName, and names alone never decide an EGI net. Before,namedCapput numbered E labels on a HydroCel net by the highest number. Follow-up: the converter would need to embedCapManufacturersModelNameandEEGReferencein the store attrs;ScalpInputalready takescapModelandreference.biosemi32), or is refused withnet_coverage_low; before it went tobiosemi128orbiosemi256by the highest bank.viewer-scalp-map.spec.ts(on004504, 10-20 names) still draws on standard_1005, so no e2e changed. Unit tests that pinned the old rule were changed:scalp-map.test.ts"places an EGI net's numbered channels on that net" now assertscap_model_unknownwithout a cap model andGSN-HydroCel-129withHydroCel GSN 128 1.0; "too_few_matched ... E1, E2, E300" became 7 of 8 names; "refuses labels no montage names" uses 8 names; a new case asserts three 10-20 names show thetoo_few_channelssentence; theMontageCenterUnavailablecase is gone because the placed montage's own center is passed, so it cannot happen; the measured fixtures drop T3 to T6, which the 10-05 file lists beside T7, T8, P7 and P8 and which areduplicate_labelby name.Test plan
bun run typecheck: 0 errors, 0 warnings.bun run lint: clean.test/quality-views-*.test.ts,src/lib/eeg-viewer,src/lib/quality-views): 42 files passed, 1 skipped; 2314 tests passed, 9 skipped.test/quality-views-sensor-labels.test.ts: all 86 vector cases replayed exactly (every refusal reason covered), placed positions equal the montage files, the montage files' SHA-256 equal the vectors' and PROVENANCE.json's digests.test/quality-views-models.test.ts: the 21 kinds-models cases placed by name are now compared whole (werelabels_pending);quality-views-presets.test.tsspectrum_maps_nameslikewise.bunx astro build && bun scripts/check-quality-views-size.mjs --require-build), all gated rows ok. First screen Spectrum 28.8 KB (base 27.8), Components 28.4 (27.4), Spectrum no preload 29.1 (29.2), Components no preload 29.2 (29.2), Activations 26.4 (25.2), Activations no preload 26.8 (26.6), budget 30 KB; worker with lazy chunks 15.6 KB (15.6), budget 16 KB.sensor-labelsis a lazy chunk of its own (2.7 KB gzipped), and each montage a lazy chunk; neither loads with a first screen.bun run test:quality-views-perf), 7 passed. Medians of 5: montage_128 cold 2.4 / 17.3 ms, eager 11.0 / 26.1 ms; montage_256 cold 3.7 / 63.5 ms, eager 18.8 / 81.3 ms (first maps / view); budgets unchanged.E2E_PORT=4417 PUBLIC_DATA_BASE_URL=https://data.nemar.org): viewer-scalp-map, quality-panel, quality-views-perf and the embed route specs (ieeg-spatial-panel, ieeg-subject-anatomy, ieeg-spatial-validation): 96 passed, 3 failed. The 3 failures are in ieeg-spatial-validation (on005415 and on004473data-template-state) and fail the same way on the base branch (4 failed there), so they are not this change's.Mutations (each applied alone, then restored; targeted tests: sensor-labels, models, presets, scalp-map)
vref_outside_egi_netsand a rules caseMIN_MATCHED7too_few_matched, two rules casesMIN_MATCHED9eight_matchedand 6 moremontage_ambiguousdropped)egi_e1_to_e28,egi_e33_ambiguous_with_biosemi_e_bankand 4 morereference_namesAgentic AI tools were used in preparing this PR.