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

Document error characteristics of the log normal distribution #558

Open
pkienzle opened this issue Mar 24, 2023 · 0 comments
Open

Document error characteristics of the log normal distribution #558

pkienzle opened this issue Mar 24, 2023 · 0 comments

Comments

@pkienzle
Copy link
Contributor

The relationship between the model + polydispersity and the number of calculation points + distribution width is complicated. For example, the lognormal distribution is highly skew and requires a large value for nsigma and npts to get an accurate estimate.
Users should try very large values for these at the end of the fit to verify that the answer does not change significantly. This needs to be mentioned in the documentation for the distribution, and more generally in the usage notes for polydispersity.

The following shows a 1% error at low q with 8-σ distribution width compared to 28-σ:

sascomp sphere radius=500,500 radius_pd=0.3 radius_pd_n=3001,3001 radius_pd_nsigma=8,28 radius_pd_type=lognormal -double!

I've experimented with sampling more densely where the probability is highest (i.e., sampling linearly in the cdf rather than the pdf), but it doesn't work very well. That's because $I(Q,R)$ can change by orders of magnitude with $R$. Despite a small probability $P(R)$ the $I(Q,R)$ term may contribute a lot to the integral $\int_0^{\infty} P(R) I(Q, R) dR$ for distributions with long tails. I'm not sure if we can do better than linear sampling.

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

No branches or pull requests

1 participant