source: sasmodels/api/weights.html @ 68532f3

gh-pages
Last change on this file since 68532f3 was 68532f3, checked in by ajj, 8 years ago

Adding docs

  • Property mode set to 100644
File size: 18.6 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4
5<html xmlns="http://www.w3.org/1999/xhtml">
6  <head>
7    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8   
9    <title>3.15. Distribution functions &mdash; Sasmodels</title>
10   
11    <link rel="stylesheet" href="../_static/haiku-site.css" type="text/css" />
12    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13   
14    <script type="text/javascript">
15      var DOCUMENTATION_OPTIONS = {
16        URL_ROOT:    '../',
17        VERSION:     '0.9',
18        COLLAPSE_INDEX: false,
19        FILE_SUFFIX: '.html',
20        HAS_SOURCE:  true
21      };
22    </script>
23    <script type="text/javascript" src="../_static/jquery.js"></script>
24    <script type="text/javascript" src="../_static/underscore.js"></script>
25    <script type="text/javascript" src="../_static/doctools.js"></script>
26    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
27    <link rel="top" title="Sasmodels" href="../index.html" />
28    <link rel="up" title="3. Reference" href="index.html" />
29    <link rel="prev" title="3.14. SESANS model evaluator" href="sesans.html" /> 
30  </head>
31  <body>
32      <div class="header"><h1 class="heading"><a href="../index.html">
33          <span>Home</span></a></h1>
34        <h2 class="heading"><span>3.15. Distribution functions</span></h2>
35      </div>
36      <div class="topnav">
37     
38        <p>
39        «&#160;&#160;<a href="sesans.html">3.14. SESANS model evaluator</a>
40        &#160;&#160;::&#160;&#160;
41        <a class="uplink" href="../index.html">Contents</a>
42        </p>
43
44      </div>
45      <div class="content">
46       
47       
48  <div class="section" id="distribution-functions">
49<h1>3.15. Distribution functions<a class="headerlink" href="#distribution-functions" title="Permalink to this headline">¶</a></h1>
50<div class="section" id="module-sasmodels.weights">
51<span id="sasmodels-weights"></span><h2>3.15.1. <a class="reference internal" href="#module-sasmodels.weights" title="sasmodels.weights"><tt class="xref py py-mod docutils literal"><span class="pre">sasmodels.weights</span></tt></a><a class="headerlink" href="#module-sasmodels.weights" title="Permalink to this headline">¶</a></h2>
52<p>SAS distributions for polydispersity.</p>
53<dl class="class">
54<dt id="sasmodels.weights.ArrayDispersion">
55<em class="property">class </em><tt class="descclassname">sasmodels.weights.</tt><tt class="descname">ArrayDispersion</tt><big>(</big><em>npts=None</em>, <em>width=None</em>, <em>nsigmas=None</em><big>)</big><a class="headerlink" href="#sasmodels.weights.ArrayDispersion" title="Permalink to this definition">¶</a></dt>
56<dd><p>Bases: <a class="reference internal" href="#sasmodels.weights.Dispersion" title="sasmodels.weights.Dispersion"><tt class="xref py py-class docutils literal"><span class="pre">sasmodels.weights.Dispersion</span></tt></a></p>
57<dl class="method">
58<dt id="sasmodels.weights.ArrayDispersion.get_pars">
59<tt class="descname">get_pars</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.weights.ArrayDispersion.get_pars" title="Permalink to this definition">¶</a></dt>
60<dd></dd></dl>
61
62<dl class="method">
63<dt id="sasmodels.weights.ArrayDispersion.get_weights">
64<tt class="descname">get_weights</tt><big>(</big><em>center</em>, <em>lb</em>, <em>ub</em>, <em>relative</em><big>)</big><a class="headerlink" href="#sasmodels.weights.ArrayDispersion.get_weights" title="Permalink to this definition">¶</a></dt>
65<dd><p>Return the weights for the distribution.</p>
66<p><em>center</em> is the center of the distribution</p>
67<p><em>lb</em>,*ub* are the min and max allowed values</p>
68<p><em>relative</em> is True if the distribution width is proportional to the
69center value instead of absolute.  For polydispersity use relative.
70For orientation parameters use absolute.</p>
71</dd></dl>
72
73<dl class="method">
74<dt id="sasmodels.weights.ArrayDispersion.set_weights">
75<tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sasmodels.weights.ArrayDispersion.set_weights" title="Permalink to this definition">¶</a></dt>
76<dd></dd></dl>
77
78<dl class="attribute">
79<dt id="sasmodels.weights.ArrayDispersion.default">
80<tt class="descname">default</tt><em class="property"> = {'width': 0, 'nsigmas': 1, 'npts': 35}</em><a class="headerlink" href="#sasmodels.weights.ArrayDispersion.default" title="Permalink to this definition">¶</a></dt>
81<dd></dd></dl>
82
83<dl class="attribute">
84<dt id="sasmodels.weights.ArrayDispersion.type">
85<tt class="descname">type</tt><em class="property"> = 'array'</em><a class="headerlink" href="#sasmodels.weights.ArrayDispersion.type" title="Permalink to this definition">¶</a></dt>
86<dd></dd></dl>
87
88</dd></dl>
89
90<dl class="class">
91<dt id="sasmodels.weights.Dispersion">
92<em class="property">class </em><tt class="descclassname">sasmodels.weights.</tt><tt class="descname">Dispersion</tt><big>(</big><em>npts=None</em>, <em>width=None</em>, <em>nsigmas=None</em><big>)</big><a class="headerlink" href="#sasmodels.weights.Dispersion" title="Permalink to this definition">¶</a></dt>
93<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
94<p>Base dispersion object.</p>
95<p>Subclasses should define <em>_weights(center, sigma, lb, ub)</em>
96which returns the x points and their corresponding weights.</p>
97<dl class="method">
98<dt id="sasmodels.weights.Dispersion.get_pars">
99<tt class="descname">get_pars</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.weights.Dispersion.get_pars" title="Permalink to this definition">¶</a></dt>
100<dd></dd></dl>
101
102<dl class="method">
103<dt id="sasmodels.weights.Dispersion.get_weights">
104<tt class="descname">get_weights</tt><big>(</big><em>center</em>, <em>lb</em>, <em>ub</em>, <em>relative</em><big>)</big><a class="headerlink" href="#sasmodels.weights.Dispersion.get_weights" title="Permalink to this definition">¶</a></dt>
105<dd><p>Return the weights for the distribution.</p>
106<p><em>center</em> is the center of the distribution</p>
107<p><em>lb</em>,*ub* are the min and max allowed values</p>
108<p><em>relative</em> is True if the distribution width is proportional to the
109center value instead of absolute.  For polydispersity use relative.
110For orientation parameters use absolute.</p>
111</dd></dl>
112
113<dl class="method">
114<dt id="sasmodels.weights.Dispersion.set_weights">
115<tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sasmodels.weights.Dispersion.set_weights" title="Permalink to this definition">¶</a></dt>
116<dd></dd></dl>
117
118<dl class="attribute">
119<dt id="sasmodels.weights.Dispersion.default">
120<tt class="descname">default</tt><em class="property"> = {'width': 0, 'nsigmas': 3, 'npts': 35}</em><a class="headerlink" href="#sasmodels.weights.Dispersion.default" title="Permalink to this definition">¶</a></dt>
121<dd></dd></dl>
122
123<dl class="attribute">
124<dt id="sasmodels.weights.Dispersion.type">
125<tt class="descname">type</tt><em class="property"> = 'base disperser'</em><a class="headerlink" href="#sasmodels.weights.Dispersion.type" title="Permalink to this definition">¶</a></dt>
126<dd></dd></dl>
127
128</dd></dl>
129
130<dl class="class">
131<dt id="sasmodels.weights.GaussianDispersion">
132<em class="property">class </em><tt class="descclassname">sasmodels.weights.</tt><tt class="descname">GaussianDispersion</tt><big>(</big><em>npts=None</em>, <em>width=None</em>, <em>nsigmas=None</em><big>)</big><a class="headerlink" href="#sasmodels.weights.GaussianDispersion" title="Permalink to this definition">¶</a></dt>
133<dd><p>Bases: <a class="reference internal" href="#sasmodels.weights.Dispersion" title="sasmodels.weights.Dispersion"><tt class="xref py py-class docutils literal"><span class="pre">sasmodels.weights.Dispersion</span></tt></a></p>
134<dl class="method">
135<dt id="sasmodels.weights.GaussianDispersion.get_pars">
136<tt class="descname">get_pars</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.weights.GaussianDispersion.get_pars" title="Permalink to this definition">¶</a></dt>
137<dd></dd></dl>
138
139<dl class="method">
140<dt id="sasmodels.weights.GaussianDispersion.get_weights">
141<tt class="descname">get_weights</tt><big>(</big><em>center</em>, <em>lb</em>, <em>ub</em>, <em>relative</em><big>)</big><a class="headerlink" href="#sasmodels.weights.GaussianDispersion.get_weights" title="Permalink to this definition">¶</a></dt>
142<dd><p>Return the weights for the distribution.</p>
143<p><em>center</em> is the center of the distribution</p>
144<p><em>lb</em>,*ub* are the min and max allowed values</p>
145<p><em>relative</em> is True if the distribution width is proportional to the
146center value instead of absolute.  For polydispersity use relative.
147For orientation parameters use absolute.</p>
148</dd></dl>
149
150<dl class="method">
151<dt id="sasmodels.weights.GaussianDispersion.set_weights">
152<tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sasmodels.weights.GaussianDispersion.set_weights" title="Permalink to this definition">¶</a></dt>
153<dd></dd></dl>
154
155<dl class="attribute">
156<dt id="sasmodels.weights.GaussianDispersion.default">
157<tt class="descname">default</tt><em class="property"> = {'width': 0, 'nsigmas': 3, 'npts': 35}</em><a class="headerlink" href="#sasmodels.weights.GaussianDispersion.default" title="Permalink to this definition">¶</a></dt>
158<dd></dd></dl>
159
160<dl class="attribute">
161<dt id="sasmodels.weights.GaussianDispersion.type">
162<tt class="descname">type</tt><em class="property"> = 'gaussian'</em><a class="headerlink" href="#sasmodels.weights.GaussianDispersion.type" title="Permalink to this definition">¶</a></dt>
163<dd></dd></dl>
164
165</dd></dl>
166
167<dl class="class">
168<dt id="sasmodels.weights.LogNormalDispersion">
169<em class="property">class </em><tt class="descclassname">sasmodels.weights.</tt><tt class="descname">LogNormalDispersion</tt><big>(</big><em>npts=None</em>, <em>width=None</em>, <em>nsigmas=None</em><big>)</big><a class="headerlink" href="#sasmodels.weights.LogNormalDispersion" title="Permalink to this definition">¶</a></dt>
170<dd><p>Bases: <a class="reference internal" href="#sasmodels.weights.Dispersion" title="sasmodels.weights.Dispersion"><tt class="xref py py-class docutils literal"><span class="pre">sasmodels.weights.Dispersion</span></tt></a></p>
171<dl class="method">
172<dt id="sasmodels.weights.LogNormalDispersion.get_pars">
173<tt class="descname">get_pars</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.weights.LogNormalDispersion.get_pars" title="Permalink to this definition">¶</a></dt>
174<dd></dd></dl>
175
176<dl class="method">
177<dt id="sasmodels.weights.LogNormalDispersion.get_weights">
178<tt class="descname">get_weights</tt><big>(</big><em>center</em>, <em>lb</em>, <em>ub</em>, <em>relative</em><big>)</big><a class="headerlink" href="#sasmodels.weights.LogNormalDispersion.get_weights" title="Permalink to this definition">¶</a></dt>
179<dd><p>Return the weights for the distribution.</p>
180<p><em>center</em> is the center of the distribution</p>
181<p><em>lb</em>,*ub* are the min and max allowed values</p>
182<p><em>relative</em> is True if the distribution width is proportional to the
183center value instead of absolute.  For polydispersity use relative.
184For orientation parameters use absolute.</p>
185</dd></dl>
186
187<dl class="method">
188<dt id="sasmodels.weights.LogNormalDispersion.set_weights">
189<tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sasmodels.weights.LogNormalDispersion.set_weights" title="Permalink to this definition">¶</a></dt>
190<dd></dd></dl>
191
192<dl class="attribute">
193<dt id="sasmodels.weights.LogNormalDispersion.default">
194<tt class="descname">default</tt><em class="property"> = {'width': 0, 'nsigmas': 8, 'npts': 80}</em><a class="headerlink" href="#sasmodels.weights.LogNormalDispersion.default" title="Permalink to this definition">¶</a></dt>
195<dd></dd></dl>
196
197<dl class="attribute">
198<dt id="sasmodels.weights.LogNormalDispersion.type">
199<tt class="descname">type</tt><em class="property"> = 'lognormal'</em><a class="headerlink" href="#sasmodels.weights.LogNormalDispersion.type" title="Permalink to this definition">¶</a></dt>
200<dd></dd></dl>
201
202</dd></dl>
203
204<dl class="class">
205<dt id="sasmodels.weights.RectangleDispersion">
206<em class="property">class </em><tt class="descclassname">sasmodels.weights.</tt><tt class="descname">RectangleDispersion</tt><big>(</big><em>npts=None</em>, <em>width=None</em>, <em>nsigmas=None</em><big>)</big><a class="headerlink" href="#sasmodels.weights.RectangleDispersion" title="Permalink to this definition">¶</a></dt>
207<dd><p>Bases: <a class="reference internal" href="#sasmodels.weights.Dispersion" title="sasmodels.weights.Dispersion"><tt class="xref py py-class docutils literal"><span class="pre">sasmodels.weights.Dispersion</span></tt></a></p>
208<dl class="method">
209<dt id="sasmodels.weights.RectangleDispersion.get_pars">
210<tt class="descname">get_pars</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.weights.RectangleDispersion.get_pars" title="Permalink to this definition">¶</a></dt>
211<dd></dd></dl>
212
213<dl class="method">
214<dt id="sasmodels.weights.RectangleDispersion.get_weights">
215<tt class="descname">get_weights</tt><big>(</big><em>center</em>, <em>lb</em>, <em>ub</em>, <em>relative</em><big>)</big><a class="headerlink" href="#sasmodels.weights.RectangleDispersion.get_weights" title="Permalink to this definition">¶</a></dt>
216<dd><p>Return the weights for the distribution.</p>
217<p><em>center</em> is the center of the distribution</p>
218<p><em>lb</em>,*ub* are the min and max allowed values</p>
219<p><em>relative</em> is True if the distribution width is proportional to the
220center value instead of absolute.  For polydispersity use relative.
221For orientation parameters use absolute.</p>
222</dd></dl>
223
224<dl class="method">
225<dt id="sasmodels.weights.RectangleDispersion.set_weights">
226<tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sasmodels.weights.RectangleDispersion.set_weights" title="Permalink to this definition">¶</a></dt>
227<dd></dd></dl>
228
229<dl class="attribute">
230<dt id="sasmodels.weights.RectangleDispersion.default">
231<tt class="descname">default</tt><em class="property"> = {'width': 0, 'nsigmas': 1.70325, 'npts': 35}</em><a class="headerlink" href="#sasmodels.weights.RectangleDispersion.default" title="Permalink to this definition">¶</a></dt>
232<dd></dd></dl>
233
234<dl class="attribute">
235<dt id="sasmodels.weights.RectangleDispersion.type">
236<tt class="descname">type</tt><em class="property"> = 'rectangle'</em><a class="headerlink" href="#sasmodels.weights.RectangleDispersion.type" title="Permalink to this definition">¶</a></dt>
237<dd></dd></dl>
238
239</dd></dl>
240
241<dl class="class">
242<dt id="sasmodels.weights.SchulzDispersion">
243<em class="property">class </em><tt class="descclassname">sasmodels.weights.</tt><tt class="descname">SchulzDispersion</tt><big>(</big><em>npts=None</em>, <em>width=None</em>, <em>nsigmas=None</em><big>)</big><a class="headerlink" href="#sasmodels.weights.SchulzDispersion" title="Permalink to this definition">¶</a></dt>
244<dd><p>Bases: <a class="reference internal" href="#sasmodels.weights.Dispersion" title="sasmodels.weights.Dispersion"><tt class="xref py py-class docutils literal"><span class="pre">sasmodels.weights.Dispersion</span></tt></a></p>
245<dl class="method">
246<dt id="sasmodels.weights.SchulzDispersion.get_pars">
247<tt class="descname">get_pars</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.weights.SchulzDispersion.get_pars" title="Permalink to this definition">¶</a></dt>
248<dd></dd></dl>
249
250<dl class="method">
251<dt id="sasmodels.weights.SchulzDispersion.get_weights">
252<tt class="descname">get_weights</tt><big>(</big><em>center</em>, <em>lb</em>, <em>ub</em>, <em>relative</em><big>)</big><a class="headerlink" href="#sasmodels.weights.SchulzDispersion.get_weights" title="Permalink to this definition">¶</a></dt>
253<dd><p>Return the weights for the distribution.</p>
254<p><em>center</em> is the center of the distribution</p>
255<p><em>lb</em>,*ub* are the min and max allowed values</p>
256<p><em>relative</em> is True if the distribution width is proportional to the
257center value instead of absolute.  For polydispersity use relative.
258For orientation parameters use absolute.</p>
259</dd></dl>
260
261<dl class="method">
262<dt id="sasmodels.weights.SchulzDispersion.set_weights">
263<tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sasmodels.weights.SchulzDispersion.set_weights" title="Permalink to this definition">¶</a></dt>
264<dd></dd></dl>
265
266<dl class="attribute">
267<dt id="sasmodels.weights.SchulzDispersion.default">
268<tt class="descname">default</tt><em class="property"> = {'width': 0, 'nsigmas': 8, 'npts': 80}</em><a class="headerlink" href="#sasmodels.weights.SchulzDispersion.default" title="Permalink to this definition">¶</a></dt>
269<dd></dd></dl>
270
271<dl class="attribute">
272<dt id="sasmodels.weights.SchulzDispersion.type">
273<tt class="descname">type</tt><em class="property"> = 'schulz'</em><a class="headerlink" href="#sasmodels.weights.SchulzDispersion.type" title="Permalink to this definition">¶</a></dt>
274<dd></dd></dl>
275
276</dd></dl>
277
278<dl class="function">
279<dt id="sasmodels.weights.get_weights">
280<tt class="descclassname">sasmodels.weights.</tt><tt class="descname">get_weights</tt><big>(</big><em>disperser</em>, <em>n</em>, <em>width</em>, <em>nsigmas</em>, <em>value</em>, <em>limits</em>, <em>relative</em><big>)</big><a class="headerlink" href="#sasmodels.weights.get_weights" title="Permalink to this definition">¶</a></dt>
281<dd><p>Return the set of values and weights for a polydisperse parameter.</p>
282<p><em>disperser</em> is the name of the disperser.</p>
283<p><em>n</em> is the number of points in the weight vector.</p>
284<p><em>width</em> is the width of the disperser distribution.</p>
285<p><em>nsigmas</em> is the number of sigmas to span for the dispersion convolution.</p>
286<p><em>value</em> is the value of the parameter in the model.</p>
287<p><em>limits</em> is [lb, ub], the lower and upper bound of the weight value.</p>
288<p><em>relative</em> is true if <em>width</em> is defined in proportion to the value
289of the parameter, and false if it is an absolute width.</p>
290<p>Returns <em>(value,weight)</em>, where <em>value</em> and <em>weight</em> are vectors.</p>
291</dd></dl>
292
293</div>
294</div>
295
296
297      </div>
298      <div class="bottomnav">
299     
300        <p>
301        «&#160;&#160;<a href="sesans.html">3.14. SESANS model evaluator</a>
302        &#160;&#160;::&#160;&#160;
303        <a class="uplink" href="../index.html">Contents</a>
304        </p>
305
306      </div>
307
308    <div class="footer">
309        &copy; Copyright 2014, sasview team.
310      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
311    </div>
312  </body>
313</html>
Note: See TracBrowser for help on using the repository browser.