source: sasview/sansmodels/docs/sphinx/html/api/dispersion_models.html @ 01de557

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 01de557 was c0d873f, checked in by Gervaise Alina <gervyh@…>, 13 years ago

edit docs for models

  • Property mode set to 100644
File size: 16.8 KB
Line 
1
2
3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6
7<html xmlns="http://www.w3.org/1999/xhtml">
8  <head>
9    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10   
11    <title>dispersion_models &mdash; sansmodels 0.1.0 documentation</title>
12   
13    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
14    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
15   
16    <script type="text/javascript">
17      var DOCUMENTATION_OPTIONS = {
18        URL_ROOT:    '../',
19        VERSION:     '0.1.0',
20        COLLAPSE_INDEX: false,
21        FILE_SUFFIX: '.html',
22        HAS_SOURCE:  true
23      };
24    </script>
25    <script type="text/javascript" src="../_static/jquery.js"></script>
26    <script type="text/javascript" src="../_static/underscore.js"></script>
27    <script type="text/javascript" src="../_static/doctools.js"></script>
28    <link rel="top" title="sansmodels 0.1.0 documentation" href="../index.html" />
29    <link rel="up" title="Reference" href="index.html" />
30    <link rel="next" title="DivComponent" href="DivComponent.html" />
31    <link rel="prev" title="DisperseModel" href="DisperseModel.html" /> 
32  </head>
33  <body>
34    <div class="related">
35      <h3>Navigation</h3>
36      <ul>
37        <li class="right" style="margin-right: 10px">
38          <a href="../genindex.html" title="General Index"
39             accesskey="I">index</a></li>
40        <li class="right" >
41          <a href="../py-modindex.html" title="Python Module Index"
42             >modules</a> |</li>
43        <li class="right" >
44          <a href="DivComponent.html" title="DivComponent"
45             accesskey="N">next</a> |</li>
46        <li class="right" >
47          <a href="DisperseModel.html" title="DisperseModel"
48             accesskey="P">previous</a> |</li>
49        <li><a href="../index.html">sansmodels 0.1.0 documentation</a> &raquo;</li>
50          <li><a href="index.html" accesskey="U">Reference</a> &raquo;</li> 
51      </ul>
52    </div> 
53
54    <div class="document">
55      <div class="documentwrapper">
56        <div class="bodywrapper">
57          <div class="body">
58           
59  <div class="section" id="dispersion-models">
60<h1>dispersion_models<a class="headerlink" href="#dispersion-models" title="Permalink to this headline">¶</a></h1>
61<div class="section" id="sans-models-dispersion-models">
62<h2><a class="reference internal" href="#module-sans.models.dispersion_models" title="sans.models.dispersion_models"><tt class="xref py py-mod docutils literal"><span class="pre">sans.models.dispersion_models</span></tt></a><a class="headerlink" href="#sans-models-dispersion-models" title="Permalink to this headline">¶</a></h2>
63<span class="target" id="module-sans.models.dispersion_models"></span><p>Class definitions for python dispersion model for
64model parameters. These classes are bridges to the C++
65dispersion object.</p>
66<p>The ArrayDispersion class takes in numpy arrays only.</p>
67<p>Usage:
68These classes can be used to set the dispersion model of a SANS model
69parameter:</p>
70<blockquote>
71<div>cyl = CylinderModel()
72cyl.set_dispersion(&#8216;radius&#8217;, GaussianDispersion())</div></blockquote>
73<p>After the dispersion model is set, you can access it&#8217;s
74parameter through the dispersion dictionary:</p>
75<blockquote>
76<div>cyl.dispersion[&#8216;radius&#8217;][&#8216;width&#8217;] = 5.0</div></blockquote>
77<table class="docutils field-list" frame="void" rules="none">
78<col class="field-name" />
79<col class="field-body" />
80<tbody valign="top">
81<tr class="field-odd field"><th class="field-name">TODO:</th><td class="field-body">For backward compatibility, the model parameters are still kept in
82a dictionary. The next iteration of refactoring work should involve moving
83away from value-based parameters to object-based parameter. We want to
84store parameters as objects so that we can unify the &#8216;params&#8217; and &#8216;dispersion&#8217;
85dictionaries into a single dictionary of parameter objects that hold the
86complete information about the parameter (units, limits, dispersion model, etc...).</td>
87</tr>
88</tbody>
89</table>
90<dl class="class">
91<dt id="sans.models.dispersion_models.ArrayDispersion">
92<em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">ArrayDispersion</tt><a class="headerlink" href="#sans.models.dispersion_models.ArrayDispersion" title="Permalink to this definition">¶</a></dt>
93<dd><p>Bases: <a class="reference internal" href="#sans.models.dispersion_models.DispersionModel" title="sans.models.dispersion_models.DispersionModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.dispersion_models.DispersionModel</span></tt></a></p>
94<p>Python bridge class for a dispersion model based on arrays.
95The user has to set a weight distribution that
96will be used in the averaging the model parameter
97it is applied to.</p>
98<dl class="method">
99<dt id="sans.models.dispersion_models.ArrayDispersion.__init__">
100<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.ArrayDispersion.__init__" title="Permalink to this definition">¶</a></dt>
101<dd></dd></dl>
102
103<dl class="attribute">
104<dt id="sans.models.dispersion_models.ArrayDispersion.__module__">
105<tt class="descname">__module__</tt><em class="property"> = 'sans.models.dispersion_models'</em><a class="headerlink" href="#sans.models.dispersion_models.ArrayDispersion.__module__" title="Permalink to this definition">¶</a></dt>
106<dd></dd></dl>
107
108<dl class="method">
109<dt id="sans.models.dispersion_models.ArrayDispersion.set_weights">
110<tt class="descname">set_weights</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.ArrayDispersion.set_weights" title="Permalink to this definition">¶</a></dt>
111<dd><p>Set the weights of an array dispersion
112Only accept numpy arrays.</p>
113<table class="docutils field-list" frame="void" rules="none">
114<col class="field-name" />
115<col class="field-body" />
116<tbody valign="top">
117<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
118<li><strong>values</strong> &#8211; numpy array of values</li>
119<li><strong>weights</strong> &#8211; numpy array of weights for each value entry</li>
120</ul>
121</td>
122</tr>
123</tbody>
124</table>
125</dd></dl>
126
127</dd></dl>
128
129<dl class="class">
130<dt id="sans.models.dispersion_models.DispersionModel">
131<em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">DispersionModel</tt><a class="headerlink" href="#sans.models.dispersion_models.DispersionModel" title="Permalink to this definition">¶</a></dt>
132<dd><p>Python bridge class for a basic dispersion model
133class with a constant parameter value distribution</p>
134<dl class="method">
135<dt id="sans.models.dispersion_models.DispersionModel.__init__">
136<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.DispersionModel.__init__" title="Permalink to this definition">¶</a></dt>
137<dd></dd></dl>
138
139<dl class="attribute">
140<dt id="sans.models.dispersion_models.DispersionModel.__module__">
141<tt class="descname">__module__</tt><em class="property"> = 'sans.models.dispersion_models'</em><a class="headerlink" href="#sans.models.dispersion_models.DispersionModel.__module__" title="Permalink to this definition">¶</a></dt>
142<dd></dd></dl>
143
144<dl class="method">
145<dt id="sans.models.dispersion_models.DispersionModel.set_weights">
146<tt class="descname">set_weights</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.DispersionModel.set_weights" title="Permalink to this definition">¶</a></dt>
147<dd><p>Set the weights of an array dispersion</p>
148</dd></dl>
149
150</dd></dl>
151
152<dl class="class">
153<dt id="sans.models.dispersion_models.GaussianDispersion">
154<em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">GaussianDispersion</tt><a class="headerlink" href="#sans.models.dispersion_models.GaussianDispersion" title="Permalink to this definition">¶</a></dt>
155<dd><p>Bases: <a class="reference internal" href="#sans.models.dispersion_models.DispersionModel" title="sans.models.dispersion_models.DispersionModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.dispersion_models.DispersionModel</span></tt></a></p>
156<p>Python bridge class for a dispersion model based
157on a Gaussian distribution.</p>
158<dl class="method">
159<dt id="sans.models.dispersion_models.GaussianDispersion.__init__">
160<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.GaussianDispersion.__init__" title="Permalink to this definition">¶</a></dt>
161<dd></dd></dl>
162
163<dl class="attribute">
164<dt id="sans.models.dispersion_models.GaussianDispersion.__module__">
165<tt class="descname">__module__</tt><em class="property"> = 'sans.models.dispersion_models'</em><a class="headerlink" href="#sans.models.dispersion_models.GaussianDispersion.__module__" title="Permalink to this definition">¶</a></dt>
166<dd></dd></dl>
167
168<dl class="method">
169<dt id="sans.models.dispersion_models.GaussianDispersion.set_weights">
170<tt class="descname">set_weights</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.GaussianDispersion.set_weights" title="Permalink to this definition">¶</a></dt>
171<dd><p>Set the weights of an array dispersion</p>
172</dd></dl>
173
174</dd></dl>
175
176<dl class="class">
177<dt id="sans.models.dispersion_models.LogNormalDispersion">
178<em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">LogNormalDispersion</tt><a class="headerlink" href="#sans.models.dispersion_models.LogNormalDispersion" title="Permalink to this definition">¶</a></dt>
179<dd><p>Bases: <a class="reference internal" href="#sans.models.dispersion_models.DispersionModel" title="sans.models.dispersion_models.DispersionModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.dispersion_models.DispersionModel</span></tt></a></p>
180<p>Python bridge class for a dispersion model based
181on a Log Normal distribution.</p>
182<dl class="method">
183<dt id="sans.models.dispersion_models.LogNormalDispersion.__init__">
184<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.LogNormalDispersion.__init__" title="Permalink to this definition">¶</a></dt>
185<dd></dd></dl>
186
187<dl class="attribute">
188<dt id="sans.models.dispersion_models.LogNormalDispersion.__module__">
189<tt class="descname">__module__</tt><em class="property"> = 'sans.models.dispersion_models'</em><a class="headerlink" href="#sans.models.dispersion_models.LogNormalDispersion.__module__" title="Permalink to this definition">¶</a></dt>
190<dd></dd></dl>
191
192<dl class="method">
193<dt id="sans.models.dispersion_models.LogNormalDispersion.set_weights">
194<tt class="descname">set_weights</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.LogNormalDispersion.set_weights" title="Permalink to this definition">¶</a></dt>
195<dd><p>Set the weights of an array dispersion</p>
196</dd></dl>
197
198</dd></dl>
199
200<dl class="class">
201<dt id="sans.models.dispersion_models.RectangleDispersion">
202<em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">RectangleDispersion</tt><a class="headerlink" href="#sans.models.dispersion_models.RectangleDispersion" title="Permalink to this definition">¶</a></dt>
203<dd><p>Bases: <a class="reference internal" href="#sans.models.dispersion_models.DispersionModel" title="sans.models.dispersion_models.DispersionModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.dispersion_models.DispersionModel</span></tt></a></p>
204<p>Python bridge class for a dispersion model based
205on a Gaussian distribution.</p>
206<dl class="method">
207<dt id="sans.models.dispersion_models.RectangleDispersion.__init__">
208<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.RectangleDispersion.__init__" title="Permalink to this definition">¶</a></dt>
209<dd></dd></dl>
210
211<dl class="attribute">
212<dt id="sans.models.dispersion_models.RectangleDispersion.__module__">
213<tt class="descname">__module__</tt><em class="property"> = 'sans.models.dispersion_models'</em><a class="headerlink" href="#sans.models.dispersion_models.RectangleDispersion.__module__" title="Permalink to this definition">¶</a></dt>
214<dd></dd></dl>
215
216<dl class="method">
217<dt id="sans.models.dispersion_models.RectangleDispersion.set_weights">
218<tt class="descname">set_weights</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.RectangleDispersion.set_weights" title="Permalink to this definition">¶</a></dt>
219<dd><p>Set the weights of an array dispersion</p>
220</dd></dl>
221
222</dd></dl>
223
224<dl class="class">
225<dt id="sans.models.dispersion_models.SchulzDispersion">
226<em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">SchulzDispersion</tt><a class="headerlink" href="#sans.models.dispersion_models.SchulzDispersion" title="Permalink to this definition">¶</a></dt>
227<dd><p>Bases: <a class="reference internal" href="#sans.models.dispersion_models.DispersionModel" title="sans.models.dispersion_models.DispersionModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.dispersion_models.DispersionModel</span></tt></a></p>
228<p>Python bridge class for a dispersion model based
229on a Schulz distribution.</p>
230<dl class="method">
231<dt id="sans.models.dispersion_models.SchulzDispersion.__init__">
232<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.SchulzDispersion.__init__" title="Permalink to this definition">¶</a></dt>
233<dd></dd></dl>
234
235<dl class="attribute">
236<dt id="sans.models.dispersion_models.SchulzDispersion.__module__">
237<tt class="descname">__module__</tt><em class="property"> = 'sans.models.dispersion_models'</em><a class="headerlink" href="#sans.models.dispersion_models.SchulzDispersion.__module__" title="Permalink to this definition">¶</a></dt>
238<dd></dd></dl>
239
240<dl class="method">
241<dt id="sans.models.dispersion_models.SchulzDispersion.set_weights">
242<tt class="descname">set_weights</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.SchulzDispersion.set_weights" title="Permalink to this definition">¶</a></dt>
243<dd><p>Set the weights of an array dispersion</p>
244</dd></dl>
245
246</dd></dl>
247
248</div>
249</div>
250
251
252          </div>
253        </div>
254      </div>
255      <div class="sphinxsidebar">
256        <div class="sphinxsidebarwrapper">
257  <h3><a href="../index.html">Table Of Contents</a></h3>
258  <ul>
259<li><a class="reference internal" href="#">dispersion_models</a><ul>
260<li><a class="reference internal" href="#sans-models-dispersion-models"><tt class="docutils literal"><span class="pre">sans.models.dispersion_models</span></tt></a></li>
261</ul>
262</li>
263</ul>
264
265  <h4>Previous topic</h4>
266  <p class="topless"><a href="DisperseModel.html"
267                        title="previous chapter">DisperseModel</a></p>
268  <h4>Next topic</h4>
269  <p class="topless"><a href="DivComponent.html"
270                        title="next chapter">DivComponent</a></p>
271  <h3>This Page</h3>
272  <ul class="this-page-menu">
273    <li><a href="../_sources/api/dispersion_models.txt"
274           rel="nofollow">Show Source</a></li>
275  </ul>
276<div id="searchbox" style="display: none">
277  <h3>Quick search</h3>
278    <form class="search" action="../search.html" method="get">
279      <input type="text" name="q" />
280      <input type="submit" value="Go" />
281      <input type="hidden" name="check_keywords" value="yes" />
282      <input type="hidden" name="area" value="default" />
283    </form>
284    <p class="searchtip" style="font-size: 90%">
285    Enter search terms or a module, class or function name.
286    </p>
287</div>
288<script type="text/javascript">$('#searchbox').show(0);</script>
289        </div>
290      </div>
291      <div class="clearer"></div>
292    </div>
293    <div class="related">
294      <h3>Navigation</h3>
295      <ul>
296        <li class="right" style="margin-right: 10px">
297          <a href="../genindex.html" title="General Index"
298             >index</a></li>
299        <li class="right" >
300          <a href="../py-modindex.html" title="Python Module Index"
301             >modules</a> |</li>
302        <li class="right" >
303          <a href="DivComponent.html" title="DivComponent"
304             >next</a> |</li>
305        <li class="right" >
306          <a href="DisperseModel.html" title="DisperseModel"
307             >previous</a> |</li>
308        <li><a href="../index.html">sansmodels 0.1.0 documentation</a> &raquo;</li>
309          <li><a href="index.html" >Reference</a> &raquo;</li> 
310      </ul>
311    </div>
312    <div class="footer">
313        &copy; Copyright 2010, sans group.
314      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.
315    </div>
316  </body>
317</html>
Note: See TracBrowser for help on using the repository browser.