Skip to content

NEMAR: a clearer notebook welcome and a curated first plot - #577

Merged
neuromechanist merged 3 commits into
developfrom
feature/nemar-playground-welcome-and-plot-guidance
Oct 1, 2026
Merged

neuromechanist merged 3 commits into
developfrom
feature/nemar-playground-welcome-and-plot-guidance

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Two changes to what a first-time NEMAR reader sees.

  • Notebook welcome (starter.ipynb): retitled "Python playground for {dataset}" with a short welcome. It says data streams in while code, edits and results stay on the reader's machine, that eegprep-lean reads recordings and plots signals, that spectra and event-related potential (ERP) images are SciPy, NumPy and matplotlib recipes, that EEGPrep preprocessing and ICLabel are not in the browser yet, that the latest MNE does not install here yet, and that the Zarr copy is lossy.
  • Curated first plot (config.yaml system prompt, "Spectra, events and ERP images"): the first figure should be the one an expert expects. The PSD y-limits and the ERP image color range are set before drawing. ERP image rows are ordered (reader's choice, else response time, else each epoch's amplitude in a window), then smoothed. The assistant says how rows are ordered, offers one other ordering, and describes what the plot shows rather than calling the recording noise.

Checked facts

Review

Three Sonnet reviews (code, text accuracy, tests) and an earlier Opus consult on placement. Addressed in the last commit: the MNE claim scoped to the latest release, the PSD limit rule (log y-axis, top limit keeps named peaks), the response-time wording (read response_time from columns_summary, in seconds, paired copy under a length assert), the amplitude-ordering caveat versus the tone rule, "order" instead of "sort" next to the pinned events rule, abbreviations defined once, and the CHANGELOG wording.

Left as written, on purpose: "Your code, edits and results never leave your machine" and "streams NEMAR's Zarr data to run your code locally" are the maintainer's wording; the first was verified for code, edits and results (the notebook site makes no call to the OSA API).

Testing

  • uv run pytest tests/test_assistants tests/test_core/test_config tests/test_scripts/test_build_notebook_site.py: 943 passed, 11 skipped.
  • bun notebook/test-open.js (52) and bun frontend/test-data-lane.js (106) pass.
  • The prompt's plot-range constants (a factor of 3 around the median spectrum, the 95th percentile for the color range) are starting values, not checked against a live recording. Test on the staging fixture xx099905 on the dev deployment after merge: the develop chat reads NEMAR's staging server, which has the xx0999NN fixtures, not production datasets such as nm000132.

Retitle the starter as a Python playground, state that code, edits and results stay
on the reader's machine while data streams in, name what eegprep-lean does and does
not do yet, and note that MNE does not install in this Pyodide 0.29.5 runtime.
Tested: starter, notebook-lock and notebook-site tests pass.
Set the PSD y-limits and the ERP image color range before drawing, sort ERP image
rows (by response time, or by response amplitude) and then smooth them, say how rows
are ordered and offer one other sort, and describe the structure a plot shows rather
than calling the recording noise. The first figure is the one an expert would expect.
Tested: NEMAR prompt, config and runtime tests pass; the plots themselves are not yet
checked against a live recording.
Notebook: say the latest MNE does not install (an older release does), use the
package's own name for eegprep-lean, define ERP and ICLabel where first used and
once only, and restore the setup cell's Ready instruction.
Prompt: log y-axis and a top limit that keeps named peaks, response_time read from
columns_summary in seconds with paired-copy length assert, the first response within
the epoch, 'order' instead of 'sort' to avoid the pinned events rule, an amplitude
ordering described as imposed structure, and no blanket ban on the word noise.
Tested: 943 Python tests, notebook/test-open.js and frontend/test-data-lane.js pass.
@neuromechanist neuromechanist changed the title NEMAR: shorter notebook welcome and a curated first plot NEMAR: a clearer notebook welcome and a curated first plot Oct 1, 2026
@neuromechanist
neuromechanist merged commit 4c5543d into develop Oct 1, 2026
10 checks passed
@neuromechanist
neuromechanist deleted the feature/nemar-playground-welcome-and-plot-guidance branch October 1, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant