Skip to content

Conversation

@jellybean2004
Copy link
Contributor

Description

This refactors the Corfunc slider into a reusable component so it can be shared by Invariant, making the slider generic and reusable for components that need different constraint semantics (e.g., Invariant needs to permit extrapolation beyond the raw data).

  • Takes CorfuncSlider.py out of src/sas/qtgui/Perspectives/Corfunc
  • Renames to ExtrapolationSlider.py and places in src/sas/qtgui/Utilities
  • Moves utility classes from src/sas/sascalc/corfunc/calculation_data.py to src/sas/sascalc/util.py
  • Updates all imports/usages to match the new locations and names

Behavioural change (boundaries)

Introduces two distinct boundary pairs used by different callers:

  • Data range — the actual start/end of data points (existing boundary used by Corfunc).
  • Extrapolation range — a broader fixed range used by Invariant (10e-5 … 10).

Usage differences:

Corfunc: uses Data range only (no functional change except location/imports).
Invariant: uses both:

  • Low-Q end and High-Q start are constrained within the Data range.
  • High-Q end extends into the Extrapolation range.

Fixes #3824

How Has This Been Tested?

Ran the program and tested the slider functionality in both perspectives.

Review Checklist:

[if using the editor, use [x] in place of [ ] to check a box]

Documentation (check at least one)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

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 (untick if necessary)

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

@jellybean2004 jellybean2004 linked an issue Dec 23, 2025 that may be closed by this pull request
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.

Refactor the Corfunc slider to be more general

2 participants