Repository navigation
feat: iEEG per-channel activity metrics (IS-M1) - #546
Merged
neuromechanist merged 3 commits intoNov 17, 2026
Merged
Conversation
Deploying nemar-website with
|
| Latest commit: |
b6dd2a7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://15347501.nemar-website.pages.dev |
| Branch Preview URL: | https://feat-is-m1-metrics.nemar-website.pages.dev |
neuromechanist
merged commit Nov 17, 2026
366e4d4
into
feature/issue-537-epic-spatial
11 of 13 checks passed
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.
What changed
Card IS-M1 of the iEEG spatial view plan: a pure module that turns the level-0 samples of the visible window into one value per channel for
rms,line_lengthorband_power(delta, theta, alpha, beta, low gamma, high gamma), with its unit, and maps values to colors on a stated scale.src/lib/ieeg-spatial/activity.ts: Welch band power (Hann, 1 s segment rounded to a power of two, 50 percent overlap, mean removed per segment, radix-2 FFT in the module, no new dependency); refusalsband_above_nyquist(upper edge above 0.45 times the rate, also per channel against its own native rate),window_too_short,not_level0(a view-level window is a min/max envelope, never samples),bad_input(including a display unit of another dimension and a stored unit the store did not convert to SI);analyzedSamplesandanalyzedSsay what band power really describes; one non-finite sample anywhere in the window nulls the channel for every metric;sequential(2nd to 98th percentile of located channels, viridis) andzscore(symmetric limits, diverging map declared once) scales with numeric limits for the colorbar.src/lib/ieeg-spatial/activity.test.ts: 21 tests.test/fixtures/ieeg-activity/: one real level-0 slice (on006136 v1.0.0,sub-P5, 14 channels, 2 s, 1000 Hz, volts asreadLevel0returns it),SOURCES.json,reference.jsoncomputed independently withscipy.signal.welchand NumPy, and the smallreference.pythat produced it.Deviations from the card (accepted)
rmsis mean-removed (the window's population standard deviation), consistent with the viewer's DC removal and the per-segment mean removal in Welch.activityChannelsFromWindow,displayUnitconversion within one dimension, per-channelnativeRateHz,reference.pyinside the fixture directory.Gates
bun run test src/lib/ieeg-spatial: 21 passedbun run test: 176 files passed, 4986 tests passed, 14 skippedbun run lint: no fixes appliedbun run typecheck: 0 errorsNot run
gh pr checks.Card: IS-M1. Part of #537