Skip to content

feat: add result-bearing 1D NMR integral curves - #1

Merged
nmrtist merged 1 commit into
mainfrom
feat/1d-nmr-integral-curves
Jul 22, 2026
Merged

feat: add result-bearing 1D NMR integral curves#1
nmrtist merged 1 commit into
mainfrom
feat/1d-nmr-integral-curves

Conversation

@nmrtist

@nmrtist nmrtist commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Context

1D NMR integrals were primarily represented by editable rectangular regions.
The normal figure view did not provide cumulative integral curves, and the
result-bearing representation was not shared across screen and export
renderers.

Reference normalization was also fixed to 1.0 for 1D integrals and used a
different state model from 2D integrals.

Changes

  • Add lightweight integral-curve descriptions to the shared Figure model.
  • Derive signed cumulative curves from the source spectrum using
    spacing-aware trapezoidal integration.
  • Share curve geometry and label layout across screen, SVG, PDF, bitmap, EMF,
    and clipboard vector rendering.
  • Use compact vertical labels on the right side of each curve with overlap
    mitigation and viewport clamping.
  • Keep integration rectangles and handles as editing-only UI chrome.
  • Support arbitrary normalization reference values for both 1D and 2D NMR.
  • Remove reference-specific curve colors and plot markers.
  • Synchronize integral curves across apply, undo, redo, live editing,
    cancellation, figure rebuilds, and processing changes.
  • Respect primary-series visibility and prevent cross-plot hover activation.
  • Handle zero, near-cancelling, non-finite, and undersampled integrals without
    producing invalid coordinates.
  • Avoid repeated sorting for monotonic NMR spectra while retaining a fallback
    for non-monotonic series.
  • Add serde defaults for additive integral and figure fields without
    reintroducing the previous dual reference model.
  • Update the English and Simplified Chinese integration documentation.

Testing

  • cargo pr-check — passed all 7 checks
  • npm run build in docs/ — 63 pages built successfully

Render normalized cumulative integral curves consistently across the canvas and export backends. Unify editable reference values for 1D and 2D NMR, synchronize integral results after processing and undo/redo, and document the updated workflows.
@nmrtist
nmrtist merged commit afa7818 into main Jul 22, 2026
11 checks passed
@nmrtist
nmrtist deleted the feat/1d-nmr-integral-curves branch July 22, 2026 01:51
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant