Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redefine rectangular distribution parameters (Trac #764) #879

Closed
pkienzle opened this issue Mar 30, 2019 · 11 comments
Closed

redefine rectangular distribution parameters (Trac #764) #879

pkienzle opened this issue Mar 30, 2019 · 11 comments
Labels
Defect Bug or undesirable behaviour Major Big change in the code or important change in behaviour

Comments

@pkienzle
Copy link
Contributor

pkienzle commented Mar 30, 2019

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.

Migrated from http://trac.sasview.org/ticket/764

{
    "status": "new",
    "changetime": "2018-02-14T10:19:02",
    "_ts": "2018-02-14 10:19:02.656355+00:00",
    "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.\n\nIt 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.",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "",
    "workpackage": "SasView Bug Fixing",
    "time": "2016-10-10T20:37:54",
    "component": "SasView",
    "summary": "redefine rectangular distribution parameters",
    "priority": "major",
    "keywords": "",
    "milestone": "SasView 4.3.0",
    "owner": "",
    "type": "defect"
}
@pkienzle pkienzle added this to the SasView 4.3.0 milestone Mar 30, 2019
@pkienzle pkienzle added Defect Bug or undesirable behaviour Incomplete Migration Major Big change in the code or important change in behaviour and removed Incomplete Migration labels Mar 30, 2019
@pkienzle
Copy link
Contributor Author

Trac update at 2016/10/10 20:39:42: pkienzle commented:

Documentation needs to be updated to match.

@butlerpd
Copy link
Member

Trac update at 2016/10/11 18:02:53:

  • butler commented:

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)

  • butler changed milestone from "SasView 4.1.0" to "SasView 4.2.0"

@butlerpd
Copy link
Member

Trac update at 2017/10/27 14:23:03: butler changed milestone from "SasView 4.2.0" to "SasView 4.3.0"

@RichardHeenan
Copy link
Contributor

Trac update at 2017/10/28 07:53:47:

  • richardh commented:

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.

[ticket:1018 Also http://trac.sasview.org/ticket/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 http://trac.sasview.org/ticket/1018 (within the branch for http://trac.sasview.org/ticket/776) we ought to do something, if only a partial fix, now for v4.2

  • richardh changed milestone from "SasView 4.3.0" to "SasView 4.2.0"

@sasview-bot
Copy link

Trac update at 2017/10/28 13:32:59: dirk commented:

In changeset 75e4319ad561dab526fd24007bccaa56623e0cc1:

#!CommitTicketReference repository="sasmodels" revision="75e4319ad561dab526fd24007bccaa56623e0cc1"
create uniform distribution and docs ticket addresses #879

@sasview-bot
Copy link

sasview-bot commented Mar 30, 2019

  • dirk commented:

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.

@RichardHeenan
Copy link
Contributor

Trac update at 2017/10/29 11:08:47: richardh commented:

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.

@sasview-bot
Copy link

Trac update at 2017/10/29 13:40:10: dirk commented:

Replying to [comment:4 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.

[ticket:1018 Also http://trac.sasview.org/ticket/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 http://trac.sasview.org/ticket/1018 (within the branch for http://trac.sasview.org/ticket/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.

@butlerpd
Copy link
Member

Trac update at 2018/02/13 03:00:28: butler changed milestone from "SasView 4.2.0" to "SasView 4.3.0"

@RichardHeenan
Copy link
Contributor

Trac update at 2018/02/14 10:19:02: richardh commented:

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).

@pkienzle
Copy link
Contributor Author

pkienzle commented Apr 3, 2019

Closing this ticket since rectangular distribution is superseded by uniform distribution. Opened new ticket to remove rectangular distribution.

@pkienzle pkienzle closed this as completed Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Bug or undesirable behaviour Major Big change in the code or important change in behaviour
Projects
None yet
Development

No branches or pull requests

4 participants