Skip to content

QS tab: Carlos' suggestions (#59) — stacked signals, fit-channel excludes, custom signals#82

Open
logan-nc wants to merge 3 commits into
developfrom
feature/qs-tab-carlos-suggestions
Open

QS tab: Carlos' suggestions (#59) — stacked signals, fit-channel excludes, custom signals#82
logan-nc wants to merge 3 commits into
developfrom
feature/qs-tab-carlos-suggestions

Conversation

@logan-nc

@logan-nc logan-nc commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Implements the three quasi-stationary tab items from #59.

Features

  1. Break sensor signals into stacked plots. The raw+prepared "sensor signals" plot is promoted into its own section with an overlay ⇄ stack per sensor toggle — one tightly-packed axes per sensor, only the bottom axes labels the time axis. A single style legend (── prepared · ···· raw) covers the whole section.
  2. Deselect sensors from the fit. A new fit_exclude query param threads through _prep_qs_ds → _qs_run (cache key) → run_steps(fit_kwargs) → fit.fit(), anchored + re.escape-d for literal matches. It only affects the fit, so excluded channels stay in prepared and render greyed on the φ-θ map.
  3. Custom user signals (Ip, betan, …). raw_pointnames on fetch_shot pulls arbitrary PTDATA pointnames verbatim and merges them into the shot HDF5 (plumbed through the --pointnames CLI + run_remote); a signals field on /api/fetch and a new extra_signals node serve them, plotted one axes each. Input is validated (PTDATA pointname pattern) with a tooltip/help text and rejects malformed entries. Fetch is guarded on missing credentials (clear error + stall watchdog instead of an eternal 0%).

Layout & polish

  • Combined section: fit-channel checkboxes (grid, left) + the φ-θ sensor map (right) merged into one collapsed-by-default section placed above the main plots; the R-Z cross-section was dropped (it duplicates the Sensors tab).
  • Shared credentials: backend/username/Duo lifted into a fetchCreds store slice so PullControl and the custom-signal panel share one entry.
  • Naming: removed the internal tool name "SLCONTOUR" from all user-facing GUI text (kept internal docstrings).

Verification

  • Backend: 299 passed, 5 skipped; ruff format/ty green. New tests cover fit_exclude (drops one fit channel, stays finite) and extra_signals (found/missing), at the build_node and HTTP-route layers.
  • Frontend: tsc/eslint clean, 27 vitest, vite build OK.
  • Playwright end-to-end against a live backend on synthetic data: stack toggle (5→14 plots), exclude→greyed+re-fit, custom-signal input validation, combined-section placement/R-Z removal, style legend, and the credentials guard — all green, zero console errors.

🤖 Generated with Claude Code

logan-nc and others added 2 commits July 1, 2026 18:03
Thread a `fit_exclude` query param through _prep_qs_ds → _qs_run (cache key)
→ run_steps(fit_kwargs) → fit.fit(), anchored+escaped for literal channel
matches. It only affects the fit, so excluded channels stay in `prepared`
(the GUI greys them on the sensor maps rather than dropping them).

Add a custom-signal path: `raw_pointnames` on fetch_shot pulls arbitrary
PTDATA pointnames verbatim and merges them into an existing shot HDF5
(plumbed through the --pointnames CLI and run_remote for the cluster path);
a `signals` field on FetchRequest wires it to /api/fetch; a new
`extra_signals` node serves the merged signals as one series each, with
found/missing reported in meta.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Promote the raw+prepared sensor-signals plot into its own section with an
overlay⇄stack toggle (one tightly-packed axes per sensor; only the bottom
axes labels the time axis). Add a collapsed "fit channels" checkbox panel
whose deselections ride the deferred Plot commit as `fit_exclude` and grey
the excluded sensors on the R-Z and phi-theta maps. Add a collapsed
custom-signal panel above the sensor signals: fetch a list of pointnames
(streamed progress) into the shot's HDF5, then plot each via the
`extra_signals` node in its own axes. Lift backend/credentials into a shared
`fetchCreds` store slice so PullControl and the panel share one entry.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@logan-nc

logan-nc commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

Nice sensor selection with visual aid:
image

@logan-nc

logan-nc commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

Default sensor data overlay:
image

Stacked sensor data:
image

Custom-signal names were all fetched via ptdata2, but EFIT scalars like betan /
li / q95 aren't PTDATA — they live in an MDSplus tree (\top.results.aeqdsk:<name>,
same place kappa comes from), so ptdata2 returned nothing and they read back
"missing". Add a `derived signals` catalog to the device file and split custom
names into PTDATA pointnames vs tree signals (split_custom_signals), routing the
listed EFIT scalars through the existing openTree→get fetch. Broaden the GUI help
text to "signal names — PTDATA pointnames or EFIT scalars".

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@logan-nc logan-nc self-assigned this Jul 6, 2026
@logan-nc logan-nc added the enhancement New feature or request label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant