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

Consider implementing metalog size distributions #585

Open
smk78 opened this issue Oct 24, 2023 · 2 comments
Open

Consider implementing metalog size distributions #585

smk78 opened this issue Oct 24, 2023 · 2 comments

Comments

@smk78
Copy link
Contributor

smk78 commented Oct 24, 2023

Following discussions at CanSAS-2023, @Kohlbrecher suggests SasView follow the lead of SASfit and implement its size distributions in terms of a Metalog Distribution:

https://en.wikipedia.org/wiki/Metalog_distribution
https://doi.org/10.1107/S1600576722009037, Section 5.1 & Fig 4

This very flexible distribution could overcome the limitations imposed on fit solutions by the shapes of singular (or composites of singular) distributions.

The Metalog Distribution is defined through its Quantile Probability Distribution (the inverse of the Cumulative Distribution Function).

Many 'conventional' distribution functions also have analytic quantile functions, for example:

https://en.wikipedia.org/wiki/Quantile_function#Simple_example
https://en.wikipedia.org/wiki/Log-normal_distribution, under 'Mode, Median, Quantiles'

It is also possible that the QPD approach could be more numerically stable because it is a proper integral (over 0 - 1) unlike the improper integrals (over 0 - inf) of traditional size distributions.

@lucas-wilkins
Copy link
Contributor

I think the quantile approach will be good for 1D polydispersity, but it gets weird, complicated or both when it comes to multiple dimensions.

@Kohlbrecher
Copy link

I am not sure why you think it gets more complicated using multiple parameters with a distribution. The parameter having a distribution is simply replaced by its QDF. If you have multiple independent parameters each will be replaced by a separate QDF and the multiple integral has to be calculated over a hypercube [0,1]^n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants