Changes radius in Invariant Guinier extrapolation to radius squared #3841
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)
Installers
Licensing (untick if necessary)