Skip to content

P1D.4: unified COMTRADE cursors, realtime scrub and SIGRA-style harmonics - #300

Draft
masarray wants to merge 52 commits into
feat/p1d2d-phasor-workstation-parityfrom
feat/p1d3-harmonics-performance
Draft

P1D.4: unified COMTRADE cursors, realtime scrub and SIGRA-style harmonics#300
masarray wants to merge 52 commits into
feat/p1d2d-phasor-workstation-parityfrom
feat/p1d3-harmonics-performance

Conversation

@masarray

@masarray masarray commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Field-driven P1D.4 continuation of the COMTRADE investigation workstation. Keep this PR unmerged until the same field COMTRADE record used for the SIGRA comparison is re-tested.

P1D.4 fixes now in the branch:

  • one snap authority for the upper investigation ruler and Time Signals waveform cursors;
  • waveform-to-ruler drag mirrored at pointer cadence so both surfaces read as one cursor identity;
  • Phasor uses one dedicated P cursor; Harmonics uses one dedicated H cursor;
  • P/H live analysis is coalesced at WPF composition cadence with stale-result rejection after mouse-up;
  • accented CFG digital labels are recovered using strict UTF-8 with deterministic Latin-1 fallback;
  • trigger-origin correction, digital-event timing, cached waveform geometry and bounded full-record rendering remain intact;
  • Harmonics workstation redesigned for SIGRA-style engineering comparison: all checked analog channels are shown together as stacked strips, H0…H10 share aligned order columns, H1 is the 100% reference, each order exposes % fundamental plus RMS engineering value, and one selected harmonic order applies across all channels;
  • H0/DC uses the native ArdIrec spectrum DC component; no managed DSP/DFT is introduced;
  • multi-channel harmonic scrub is calculated in one native-gate batch and reuses the existing per-channel/frame cache to preserve realtime responsiveness.

Exact-head qualification:

Field-test focus against SIGRA / ligne_1:

  1. C1/C2 upper marker and waveform line remain aligned while dragging fast.
  2. Snap is identical from either drag surface.
  3. Phasor has only P and follows scrub without stale-frame flicker.
  4. Harmonics has only H and updates all checked analog channels together.
  5. Harmonic strips show aligned H0…H10, H1=100%, and readable % + RMS labels comparable to SIGRA.
  6. Compare numeric harmonic values at the same reference time (for the supplied SIGRA screenshot, H = -9.9 ms).
  7. Digital labels such as Déclenchement preserve accents.
  8. TRG remains exactly at the corrected 0 reference.

Do not merge until field comparison is accepted.

Copy link
Copy Markdown
Owner Author

Exact-head validation — P1D.3 first slice

Validated head: 99d5c33255232131f9dcad84961968643ded8712

All qualification gates are green on this exact head:

Field-retention policy: keep this PR draft / unmerged until the same protection COMTRADE record is re-tested for cursor drag, left/right pan, dense digital-event readability, and the new Harmonics view.

Expected field differences vs P1D.2D:

  • C1/C2 no longer rebuild all waveform geometry while dragging;
  • visible digital-edge snap lookup uses a prebuilt sorted index + binary search;
  • pan is a translated preview during drag and commits once on release;
  • digital transition glyphs and lane metadata are density-suppressed;
  • Harmonics starts its P1D.3 workstation treatment while keeping ArdIrec native DFT as the sole calculation authority.

Copy link
Copy Markdown
Owner Author

Exact-head qualification is complete for 99d5c33255232131f9dcad84961968643ded8712.

Green gates:

Field-test package from installer run #808:

  • artifact ARSAS-1.6.35-win-x64-installer
  • artifact id 10136722555
  • artifact digest sha256:f67f978e6db37cc18fa582cefc33cd5fac707797c9b0e849347e91911739b781
  • setup EXE SHA-256 d0ffe7fed1b734b9669eb068ced2da4ae6e49bf06d135968a003f500bd666d80

PR remains draft intentionally until this exact build is exercised against the real protection COMTRADE field record. Focus the field check on C1/C2 drag smoothness, pan responsiveness, digital transition readability/snap, Phasor display, and Harmonics display.

@masarray masarray changed the title P1D.3: optimize Time Signals interaction and start Harmonics workstation parity P1D.3: responsive COMTRADE investigation shell, trigger alignment and harmonics cursor Sep 10, 2026
@masarray
masarray marked this pull request as ready for review September 10, 2026 06:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e8870d2773

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ComtradeWorkspaceWindow.Analysis.cs Outdated
Comment on lines +176 to +180
else
{
cursorReference = TryResolveAnalysisCursorFrame(preferredCursor, out var cursorFrame);
referenceFrame = cursorReference ? cursorFrame : ResolveAnalysisReferenceFrame(preferredCursor);
referenceName = cursorReference ? CursorName(preferredCursor) : "visible center";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Defer harmonics until the H cursor can be resolved

If Harmonics is selected while the initial disturbance load is still running, _harmonicCursorMilliseconds is initialized but the reference timestamp arrays are not yet available, so this fallback silently analyzes C1 or the record center instead of H. The load completion only raises a navigation event, whose shell handler synchronizes the ruler without refreshing harmonics, leaving a result that can remain associated with the wrong frame while the UI presents H as its reference. Avoid calculating until H resolves, or refresh harmonics when the disturbance reference arrays become available.

Useful? React with 👍 / 👎.

@masarray
masarray marked this pull request as draft September 10, 2026 07:50
@masarray masarray changed the title P1D.3: responsive COMTRADE investigation shell, trigger alignment and harmonics cursor P1D.4: unified COMTRADE cursors, realtime scrub and text decoding Sep 10, 2026
@masarray masarray changed the title P1D.4: unified COMTRADE cursors, realtime scrub and text decoding P1D.4: unified COMTRADE cursors, realtime scrub and SIGRA-style harmonics Sep 10, 2026
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