Skip to content

Conversation

@DrPaulSharp
Copy link
Contributor

Description

The use of the value Rg in the Guinier extrapolation for the Invariant perspective causes problems when Rg is negative (i.e., the square root is imaginary). However, we do not require or report the value of Rg itself, so using Rg^2 instead allows us to construct a Guinier extrapolation regardless of the sign of Rg^2.

Fixes #3836

How Has This Been Tested?

Passes unit tests, with the tests modified for Rg^2 where necessary. I have also looked at the data file "10000A_sphere_dsm.xml" in the invariant perspective. I am now able to extrapolate with few low-Q data points and not get the error described in #3836.

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)

@DrPaulSharp DrPaulSharp requested a review from yunliu01 January 14, 2026 11:22
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.

Misleading error message in Invariant low Q extrapolation

2 participants