SasView / sasmodels

Package for calculation of small angle scattering models using OpenCL.
BSD 3-Clause "New" or "Revised" License
16 stars 28 forks source link

Doc Update: Polydispersity in Sasmodels #484

Closed smk78 closed 3 years ago

smk78 commented 3 years ago

This PR attempts to address some of the documentation deficiencies in SasView raised in https://github.com/SasView/sasview/issues/1839. It is complemented by PR https://github.com/SasView/sasview/pull/1938.

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

smk78 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

@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 commented 3 years ago

@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 commented 3 years ago

Maier-Saupe & Cyclic Gaussian now added to Marketplace.

wpotrzebowski commented 3 years ago

ready for testing on OSX

wpotrzebowski commented 3 years ago

sasmodels ready for testing on OSX

wpotrzebowski commented 3 years ago

sasmodels ready for testing on OSX