Skip to content

Adds a trust bar for size distribution result plots#4009

Open
jellybean2004 wants to merge 1 commit into
mainfrom
SD_trust_bar
Open

Adds a trust bar for size distribution result plots#4009
jellybean2004 wants to merge 1 commit into
mainfrom
SD_trust_bar

Conversation

@jellybean2004

@jellybean2004 jellybean2004 commented Jun 25, 2026

Copy link
Copy Markdown
Member

Description

Fixes #3271

This PR adds a Trust Bar to the Size Distribution perspective, inspired by IRENA-style plots. The bar visually indicates which diameter region is reliable based on the fitted Q-range, using a smooth red/yellow/green gradient.

Key changes

  • Adds a horizontal trust bar above the size distribution plot.

  • Uses two physical trust boundaries derived from the fit range as defined in SizeDistributionLogic:

    • D_low = 1.8 * pi / Qmax
    • D_high = 0.95 * pi / Qmin
  • Displays:

    • red for out-of-range / unreliable diameters
    • yellow for transition regions
    • green for the trusted region
  • A small helper class (TrustBar) handles:

    • drawing the gradient bar
    • clearing it
    • updating it when the x-axis limits change
  • The bar stays aligned when the plot is zoomed or rescaled.

How Has This Been Tested?

Manually tested functionality.

Review Checklist:

Documentation

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)
    • Wheels installer (GH artifact) has been tested (installed and worked)

Licensing

  • The introduced changes comply with SasView license (BSD 3-Clause)

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.

Add an IRENA style trust level bar to the Size Distribution results plot

1 participant