Skip to content

Refresh Definitions help for students; fix bad-line + stale-UI text#41

Merged
jacobson30-bot merged 1 commit into
mainfrom
docs/definitions-student-refresh
Jun 15, 2026
Merged

Refresh Definitions help for students; fix bad-line + stale-UI text#41
jacobson30-bot merged 1 commit into
mainfrom
docs/definitions-student-refresh

Conversation

@jacobson30-bot

Copy link
Copy Markdown
Contributor

What

Makes the in-app Definitions / Help reference accurate and easier for students to start from.

Accuracy (the must-fix)

  • Bad-line correction (definition entry + how-to) rewritten for the current MAD method: residual smoothed along the row (matched filter, ~11 px), thresholded directly against MADN of the smoothed residual (no per-row median), with noise-gap bridging, a median significance guard, and no upper length cap. The repair's adjacent-line limit is now column-aware (only vertically overlapping stacks count). Reframed from "short streaks only" → short scars (step) vs long faint lines (mad).
  • Stale UI references: ROI tabROI/Mask tab (tabs merged); FFT how-to Expert tabCorrection tab (Expert removed), plus a reminder to match the target lattice to the Bragg/known-structure spacing.

Student usability

  • New optional _DefinitionEntry.in_practice field renders a beginner "In practice:" lead before the equations (with a .lead style), added to all 17 processing + 7 ROI entries — concrete "when to use / what to set" so newcomers can skip the math.
  • Clarified the Gaussian-smoothing note (σ is the Gaussian width / standard deviation; kernel reaches ~±4σ) to match the viewer's new readout.

Verification

  • physics-check of the bad-line equations vs bad_lines.py — no issues; equations match the implementation line-by-line.
  • test_definitions_dialog.py + test_viewer_window_menu.py green; ruff clean. Test-pinned strings (S = [j0, j1), etc.) preserved.

🤖 Generated with Claude Code

The in-app Definitions/Help reference had drifted from the code and read as a
spec rather than a getting-started guide. This makes it accurate and more
student-friendly.

- Bad-line correction (entry + how-to): rewrite for the current MAD method —
  the residual is smoothed along the row (matched filter, ~11 px), thresholded
  directly against MADN of the smoothed residual (no per-row median), with noise-
  gap bridging, a median significance guard, and no upper length cap; the repair
  adjacent-line limit is now column-aware (only vertically overlapping stacks
  count). Reframed from "short streaks only" to short scars (step) and long faint
  lines (mad). Kept the test-pinned "S = [j0, j1)" notation.
- Stale UI references: "ROI tab" -> "ROI/Mask tab" (tabs merged); FFT how-to
  "Expert tab" -> the Correction tab (Expert tab removed), with a note to match
  the target lattice to the Bragg/known-structure spacing.
- Student-usability pass: add a beginner "In practice:" lead (new optional
  _DefinitionEntry.in_practice field, rendered before the equations with a .lead
  style) to all 17 processing and 7 ROI entries, so a newcomer gets concrete
  "when to use / what to set" guidance and can skip the math. Clarified the
  Gaussian-smoothing note (sigma is the Gaussian width / standard deviation;
  kernel reaches ~±4 sigma) to match the viewer's new readout.

Verified: physics-check of the bad-line equations vs bad_lines.py (no issues),
test_definitions_dialog.py and test_viewer_window_menu.py green, ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jacobson30-bot jacobson30-bot merged commit 7304006 into main Jun 15, 2026
3 checks passed
@jacobson30-bot jacobson30-bot deleted the docs/definitions-student-refresh branch June 15, 2026 07:28
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