Changeset ff7119b in sasmodels for sasmodels/weights.py


Ignore:
Timestamp:
Aug 26, 2014 10:27:06 PM (10 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
5d4777d
Parents:
a7684e5
Message:

docu update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/weights.py

    r1780d59 rff7119b  
     1""" 
     2SAS distributions for polydispersity. 
     3""" 
    14# TODO: include dispersion docs with the disperser models 
    25from math import sqrt 
     
    116119 
    117120 
     121# dispersion name -> disperser lookup table. 
    118122models = dict((d.type,d) for d in ( 
    119123    GaussianDispersion, RectangleDispersion, 
     
    123127 
    124128def get_weights(disperser, n, width, nsigmas, value, limits, relative): 
     129    """ 
     130    Return the set of values and weights for a polydisperse parameter. 
     131 
     132    *disperser* is the name of the disperser. 
     133 
     134    *n* is the number of points in the weight vector. 
     135 
     136    *width* is the width of the disperser distribution. 
     137 
     138    *nsigmas* is the number of sigmas to span for the dispersion convolution. 
     139 
     140    *value* is the value of the parameter in the model. 
     141 
     142    *limits* is [lb, ub], the lower and upper bound of the weight value. 
     143 
     144    *relative* is true if *width* is defined in proportion to the value 
     145    of the parameter, and false if it is an absolute width. 
     146 
     147    Returns *(value,weight)*, where *value* and *weight* are vectors. 
     148    """ 
    125149    cls = models[disperser] 
    126150    obj = cls(n, width, nsigmas) 
Note: See TracChangeset for help on using the changeset viewer.