Skip to content

Add a Measurements reference tab to the in-app help#43

Merged
jacobson30-bot merged 3 commits into
mainfrom
docs/measurements-reference
Jun 15, 2026
Merged

Add a Measurements reference tab to the in-app help#43
jacobson30-bot merged 3 commits into
mainfrom
docs/measurements-reference

Conversation

@jacobson30-bot

Copy link
Copy Markdown
Contributor

What

The Definitions dialog covered Processing, ROI Actions, and How-to but had nothing on the measurements. Adds a student-friendly Measurements tab covering the image measurements, in the same format as the rest (plain-English summary → "In practice" lead → exact formula → cautions).

Ten entries: Distance, Angle, Line profile (and Δ), Line periodicity, ROI statistics, Step height, Feature maxima, Point mask/FFT, Pair correlation, Feature → lattice.

Each formula was read from its source module so the maths matches the code:

  • Distance/Angle — analysis/simple_measurements.py
  • ROI statistics (rms_roughness = sqrt(mean((z−mean)²))) and Step height (height_difference = mean_b − mean_a) — measurements/image.py
  • Pair correlation g(r) with edge correction — analysis/pair_correlation.py
  • Feature → lattice RMS displacement — analysis/feature_lattice.py
  • Point mask FFT — measurements/fft_points.py; Feature maxima — analysis/feature_finder.py; Line periodicity — analysis/line_periodicity.py

Wiring

  • New Measurements tab between Processing and ROI Actions (_TAB_INDEX + set_reference_tab updated).
  • Reachable via Help menu + command finder: help.measurements command, Help-menu action, and _show_viewer_measurements opening the tab. (Scope per request: image measurements only — no Spectrum Δ.)

Tests

test_measurements_reference_has_entries_and_formulas (10 equation blocks + 10 "In practice" leads + pinned formulas); tab-focus and command-finder tests extended. 74 tests green across the affected suites; ruff clean.

🤖 Generated with Claude Code

jacobson30-bot and others added 3 commits June 15, 2026 21:27
The backend align_rows supports median, mean, and linear (linear also removes a
straight slope within each row), and the Definitions help documents all three —
but the GUI's "Align rows" dropdown only offered None/Median/Mean, so the
documented 'linear' option was unreachable.

Add "Linear" to the Align rows control (probeflow/gui/processing.py: combo items,
state align_map, set_state reverse map, tooltip) and to the menu-bar mirror
(probeflow/gui/dialogs/image_viewer_chrome_mixin.py). The state→op pipeline
already passes the method through generically, so linear works end to end.

Test: test_align_rows_exposes_linear_option.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Definitions dialog explained processing, ROIs, and how-tos but said nothing
about the measurements a user can take. Add a student-friendly Measurements
reference covering the image measurements, in the same format as the rest
(plain-language summary, an "In practice" lead, the exact formula, cautions).

- New _MEASUREMENT_ENTRIES + render_measurements_html + _MeasurementsPanel in
  probeflow/gui/dialogs/definitions.py: ten entries — Distance, Angle, Line
  profile (and Δ), Line periodicity, ROI statistics, Step height, Feature maxima,
  Point mask / FFT, Pair correlation, Feature → lattice. Each formula was read
  from its source module so the maths matches the code (e.g. step height =
  mean_b − mean_a; RMS roughness = sqrt(mean((z−mean)²)); g(r) with edge
  correction; lattice RMS displacement).
- New "Measurements" tab between Processing and ROI Actions; _TAB_INDEX and
  set_reference_tab updated.
- Reachable from Help menu + command finder: new help.measurements ViewerCommand
  (shortcuts.py), Help-menu action (image_viewer_chrome_mixin.py), and
  _show_viewer_measurements opening the tab (image_viewer_toolbar_mixin.py).

Scope: image measurements only (excludes spectroscopy Spectrum Δ).

Tests: test_measurements_reference_has_entries_and_formulas; tab-focus and
command-finder tests extended for measurements.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Follow-up to the Measurements reference, addressing two review notes:

- Advanced Edge Detection was undocumented. Add a Processing-reference entry
  "Advanced edge detection (Canny / Sobel–Scharr)" describing the Process-tab
  tool: Canny (Gaussian smoothing, non-maximum suppression, hysteresis with
  percentile/absolute low/high thresholds) and Sobel/Scharr gradient
  (magnitude / x / y / orientation, optional threshold-to-mask), plus the
  overlay / new-image / mask / ROI outputs and presets. Equations read from
  probeflow/processing/edge_detection.py.
- The line tool is both a measurement and an ROI. Cross-reference it both ways:
  the Measurements "Line profile (and Δ)" entry points to "Line ROI actions"
  (ROI Actions tab) for drawing/editing/width and notes Distance/Angle also use
  line ROIs; "Line ROI actions" points to the Measurements tab for the readouts.

Tests extended: assert the Advanced edge detection entry (hysteresis,
Sobel/Scharr) and the line-tool cross-reference render.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jacobson30-bot jacobson30-bot merged commit 90ddd1e into main Jun 15, 2026
3 checks passed
@jacobson30-bot jacobson30-bot deleted the docs/measurements-reference branch June 15, 2026 12:32
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