Class definitions for python dispersion model for model parameters. These classes are bridges to the C++ dispersion object.
The ArrayDispersion class takes in numpy arrays only.
Usage: These classes can be used to set the dispersion model of a SANS model parameter:
cyl = CylinderModel() cyl.set_dispersion(‘radius’, GaussianDispersion())
After the dispersion model is set, you can access it’s parameter through the dispersion dictionary:
cyl.dispersion[‘radius’][‘width’] = 5.0
TODO: | For backward compatibility, the model parameters are still kept in a dictionary. The next iteration of refactoring work should involve moving away from value-based parameters to object-based parameter. We want to store parameters as objects so that we can unify the ‘params’ and ‘dispersion’ dictionaries into a single dictionary of parameter objects that hold the complete information about the parameter (units, limits, dispersion model, etc...). |
---|
Bases: sans.models.dispersion_models.DispersionModel
Python bridge class for a dispersion model based on arrays. The user has to set a weight distribution that will be used in the averaging the model parameter it is applied to.
Set the weights of an array dispersion Only accept numpy arrays.
Parameters: |
|
---|
Python bridge class for a basic dispersion model class with a constant parameter value distribution
Bases: sans.models.dispersion_models.DispersionModel
Python bridge class for a dispersion model based on a Gaussian distribution.
Bases: sans.models.dispersion_models.DispersionModel
Python bridge class for a dispersion model based on a Log Normal distribution.
Bases: sans.models.dispersion_models.DispersionModel
Python bridge class for a dispersion model based on a Schulz distribution.