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

Doc Update: Polydispersity in Sasmodels #484

Merged
merged 7 commits into from
Nov 5, 2021
Merged

Conversation

smk78
Copy link
Contributor

@smk78 smk78 commented Nov 1, 2021

This PR attempts to address some of the documentation deficiencies in SasView raised in SasView/sasview#1839. It is complemented by PR SasView/sasview#1938.

The usage text regarding the array distribution has been tweaked and clarified.

Copy link
Contributor

@pkienzle pkienzle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Text is okay as is.

The Suggested Applications suggestion says to use uniform for orientation, but you can also use gaussian if 3σ is small enough. Better would be to move Maier-Saupe and/or Cyclic gaussian from examples/weights to sasmodels/weights.py, or at least mention that they can be added as user-defined distributions (and add them to the marketplace?)

What we call the Boltzmann distribution in sasmodels/weights.py is in fact a Laplace distribution. Boltzmann is a limiting case with no shift, no negative values, and scale related to temperature. We could mention in the docs that it is the Laplace distribution, but I don't think we want to change the name in the code. The distribution I put in example/weights/laplace.py isn't Laplace since its scale is b rather than 1/b.

@smk78
Copy link
Contributor Author

smk78 commented Nov 2, 2021

@pkienzle commented:

Better would be to move Maier-Saupe and/or Cyclic gaussian from examples/weights to sasmodels/weights.py, or at least mention that they can be added as user-defined distributions (and add them to the marketplace?)

If we put the Maier-Saupe and Cyclic_gaussian distributions on the Marketplace, how would you use them from SasView?

@pkienzle
Copy link
Contributor

pkienzle commented Nov 3, 2021

According to the docs you need to save the file into ~/.sasview/weights.

Note that we probably need to change the way distributions are defined if we implement #486, but I don't expect that to happen any time soon.

@smk78
Copy link
Contributor Author

smk78 commented Nov 3, 2021

@pkienzle commented:

According to the docs you need to save the file into ~/.sasview/weights.

Oops. My bad! I should have read our wonderful docs! Just tested this and it works! Fantastic! The 'plugin' distribution appears in the Function drop-down and can be used like the in-program distributions.

image

I'm just going to push a minor doc edit for the benefit of Windows users though.

@smk78
Copy link
Contributor Author

smk78 commented Nov 3, 2021

@pkienzle commented:

What we call the Boltzmann distribution in sasmodels/weights.py is in fact a Laplace distribution. Boltzmann is a limiting case with no shift, no negative values, and scale related to temperature. We could mention in the docs that it is the Laplace distribution, but I don't think we want to change the name in the code. The distribution I put in example/weights/laplace.py isn't Laplace since its scale is b rather than 1/b.

Have now mentioned this in the docs:

image

Have also created several in-doc links to save scrolling. And for consistency have linked more references (some were, some weren't).

@smk78
Copy link
Contributor Author

smk78 commented Nov 3, 2021

@pkienzle commented:

Better would be to move Maier-Saupe and/or Cyclic gaussian from examples/weights to sasmodels/weights.py, or at least mention that they can be added as user-defined distributions (and add them to the marketplace?)

Have mentioned these distributions in the doc and will also create/populate a Distributions category on the Marketplace.

@smk78
Copy link
Contributor Author

smk78 commented Nov 3, 2021

Maier-Saupe & Cyclic Gaussian now added to Marketplace.

@wpotrzebowski
Copy link

ready for testing on OSX

@wpotrzebowski
Copy link

sasmodels ready for testing on OSX

1 similar comment
@wpotrzebowski
Copy link

sasmodels ready for testing on OSX

@wpotrzebowski wpotrzebowski merged commit 640273f into master Nov 5, 2021
@krzywon krzywon deleted the DocUpdatePD branch August 18, 2022 14:55
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

Successfully merging this pull request may close these issues.

3 participants