Opened 3 years ago
Last modified 19 months ago
#764 new defect
redefine rectangular distribution parameters
Reported by: | pkienzle | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | SasView 4.3.0 |
Component: | SasView | Keywords: | |
Cc: | Work Package: | SasView Bug Fixing |
Description
The current definition of the rectangular distribution uses the 1-sigma equivalent width of the distribution rather than the more natural half-width. That means, for example, that if you want a rectangular distribution covering theta ± 10 degrees uniformly, you instead need to 10/sqrt(3) or 5.77. Furthermore, then number of points in the distribution will be reduced as a function of Nsigs.
It will be far easier to use the distribution if PD is half the width of the desired distribution, Npts is the number of points used and Nsigs is ignored.
Change History (10)
comment:1 Changed 3 years ago by pkienzle
comment:2 Changed 3 years ago by butler
- Milestone changed from SasView 4.1.0 to SasView 4.2.0
Not addressed at code camp at SNS — probably should be part of a polydispersity refactoring in 4.2 (a number of related tickets exist now on this topic)
comment:3 Changed 22 months ago by butler
- Milestone changed from SasView 4.2.0 to SasView 4.3.0
comment:4 follow-up: ↓ 8 Changed 22 months ago by richardh
- Milestone changed from SasView 4.3.0 to SasView 4.2.0
The gui will need to be clever to make it abundantly clear when we are using say standard deviation for a Gaussian or full (half?) width for rectangular distribution.
Also #1018 for the Boltzmann distribution requires a new "dispersity" which is dimensionless and goes from 0 to say ~0.01 for isotropic to ordered.
There is currently a column headed PD[ratio],Sig[deg] can we insert a descriptor column that changes with the function drop down to say PD[ratio], sigma [Ang or deg], Boltzmann L[ratio], full width[Ang or deg] etc. Or perhaps for now a footnote to the table to explain all this?
Should we try to do this now or should we wait until the new gui in v5.0? I think that given the new distribution in #1018 (within the branch for #776) we ought to do something, if only a partial fix, now for v4.2
comment:5 Changed 22 months ago by dirk
comment:6 Changed 22 months ago by dirk
A new Uniform distribution has been added in the Boltzmann branch to the distribution models, here the $\sigma$ is exactly the half-width (https://github.com/SasView/sasmodels/tree/boltzmann). The rectangle distribution is kept for backward compatibility reason.
comment:7 Changed 22 months ago by richardh
The idea is that at some time soon rectangle distribution will be deprecated in favor of the new uniform distribution. Then the loader has to be changed to convert any rectangular input into the equivalent uniform one in order to maintain backwards compatibility.
comment:8 in reply to: ↑ 4 Changed 22 months ago by dirk
Replying to richardh:
The gui will need to be clever to make it abundantly clear when we are using say standard deviation for a Gaussian or full (half?) width for rectangular distribution.
Also #1018 for the Boltzmann distribution requires a new "dispersity" which is dimensionless and goes from 0 to say ~0.01 for isotropic to ordered.
There is currently a column headed PD[ratio],Sig[deg] can we insert a descriptor column that changes with the function drop down to say PD[ratio], sigma [Ang or deg], Boltzmann L[ratio], full width[Ang or deg] etc. Or perhaps for now a footnote to the table to explain all this?
Should we try to do this now or should we wait until the new gui in v5.0? I think that given the new distribution in #1018 (within the branch for #776) we ought to do something, if only a partial fix, now for v4.2
Even for log-normal and Schultz distribution, sigma is not the standard deviation but some "width" of the distribution, the standard deviations are rather sqrt(exp sigma^{2} (exp sigma^{2} - 1)) and 1/sqrt(1+z), respectively, so the width sigma already now is a dimensionless number with varying meaning.
comment:9 Changed 19 months ago by butler
- Milestone changed from SasView 4.2.0 to SasView 4.3.0
comment:10 Changed 19 months ago by richardh
The old rectangle polydispersity distribution could be deprecated in favor of the new uniform distribution which has a more sensible width parameter. To do this the loader has to be changed to convert any rectangular input into the equivalent uniform one in order to maintain backwards compatibility.
Then we need to check that the gui and the docs do not anywhere imply that the "width parameter" is the standard deviation when it is not actually that (this is probably OK now).
Documentation needs to be updated to match.