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 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
7 | <head> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
9 | |
---|
10 | <title>dispersion_models — sansmodels v0.1.0 documentation</title> |
---|
11 | <link rel="stylesheet" href="../_static/default.css" type="text/css" /> |
---|
12 | <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> |
---|
13 | <script type="text/javascript"> |
---|
14 | var DOCUMENTATION_OPTIONS = { |
---|
15 | URL_ROOT: '../', |
---|
16 | VERSION: '0.1.0', |
---|
17 | COLLAPSE_INDEX: false, |
---|
18 | FILE_SUFFIX: '.html', |
---|
19 | HAS_SOURCE: true |
---|
20 | }; |
---|
21 | </script> |
---|
22 | <script type="text/javascript" src="../_static/jquery.js"></script> |
---|
23 | <script type="text/javascript" src="../_static/underscore.js"></script> |
---|
24 | <script type="text/javascript" src="../_static/doctools.js"></script> |
---|
25 | <link rel="top" title="sansmodels v0.1.0 documentation" href="../index.html" /> |
---|
26 | <link rel="up" title="Reference" href="index.html" /> |
---|
27 | <link rel="next" title="DivComponent" href="DivComponent.html" /> |
---|
28 | <link rel="prev" title="DisperseModel" href="DisperseModel.html" /> |
---|
29 | </head> |
---|
30 | <body> |
---|
31 | <div class="related"> |
---|
32 | <h3>Navigation</h3> |
---|
33 | <ul> |
---|
34 | <li class="right" style="margin-right: 10px"> |
---|
35 | <a href="../genindex.html" title="General Index" |
---|
36 | accesskey="I">index</a></li> |
---|
37 | <li class="right" > |
---|
38 | <a href="../py-modindex.html" title="Python Module Index" |
---|
39 | >modules</a> |</li> |
---|
40 | <li class="right" > |
---|
41 | <a href="DivComponent.html" title="DivComponent" |
---|
42 | accesskey="N">next</a> |</li> |
---|
43 | <li class="right" > |
---|
44 | <a href="DisperseModel.html" title="DisperseModel" |
---|
45 | accesskey="P">previous</a> |</li> |
---|
46 | <li><a href="../index.html">sansmodels v0.1.0 documentation</a> »</li> |
---|
47 | <li><a href="index.html" accesskey="U">Reference</a> »</li> |
---|
48 | </ul> |
---|
49 | </div> |
---|
50 | |
---|
51 | <div class="document"> |
---|
52 | <div class="documentwrapper"> |
---|
53 | <div class="bodywrapper"> |
---|
54 | <div class="body"> |
---|
55 | |
---|
56 | <div class="section" id="dispersion-models"> |
---|
57 | <h1>dispersion_models<a class="headerlink" href="#dispersion-models" title="Permalink to this headline">¶</a></h1> |
---|
58 | <div class="section" id="module-sans.models.dispersion_models"> |
---|
59 | <span id="sans-models-dispersion-models"></span><h2><a class="reference internal" href="#module-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="#module-sans.models.dispersion_models" title="Permalink to this headline">¶</a></h2> |
---|
60 | <p>Class definitions for python dispersion model for |
---|
61 | model parameters. These classes are bridges to the C++ |
---|
62 | dispersion object.</p> |
---|
63 | <p>The ArrayDispersion class takes in numpy arrays only.</p> |
---|
64 | <p>Usage: |
---|
65 | These classes can be used to set the dispersion model of a SANS model |
---|
66 | parameter:</p> |
---|
67 | <blockquote> |
---|
68 | cyl = CylinderModel() |
---|
69 | cyl.set_dispersion(‘radius’, GaussianDispersion())</blockquote> |
---|
70 | <p>After the dispersion model is set, you can access it’s |
---|
71 | parameter through the dispersion dictionary:</p> |
---|
72 | <blockquote> |
---|
73 | cyl.dispersion[‘radius’][‘width’] = 5.0</blockquote> |
---|
74 | <table class="docutils field-list" frame="void" rules="none"> |
---|
75 | <col class="field-name" /> |
---|
76 | <col class="field-body" /> |
---|
77 | <tbody valign="top"> |
---|
78 | <tr class="field"><th class="field-name">TODO:</th><td class="field-body">For backward compatibility, the model parameters are still kept in |
---|
79 | a dictionary. The next iteration of refactoring work should involve moving |
---|
80 | away from value-based parameters to object-based parameter. We want to |
---|
81 | store parameters as objects so that we can unify the ‘params’ and ‘dispersion’ |
---|
82 | dictionaries into a single dictionary of parameter objects that hold the |
---|
83 | complete information about the parameter (units, limits, dispersion model, etc...).</td> |
---|
84 | </tr> |
---|
85 | </tbody> |
---|
86 | </table> |
---|
87 | <dl class="class"> |
---|
88 | <dt id="sans.models.dispersion_models.ArrayDispersion"> |
---|
89 | <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> |
---|
90 | <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> |
---|
91 | <p>Python bridge class for a dispersion model based on arrays. |
---|
92 | The user has to set a weight distribution that |
---|
93 | will be used in the averaging the model parameter |
---|
94 | it is applied to.</p> |
---|
95 | <dl class="method"> |
---|
96 | <dt id="sans.models.dispersion_models.ArrayDispersion.set_weights"> |
---|
97 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.ArrayDispersion.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
98 | <dd><p>Set the weights of an array dispersion |
---|
99 | Only accept numpy arrays.</p> |
---|
100 | <table class="docutils field-list" frame="void" rules="none"> |
---|
101 | <col class="field-name" /> |
---|
102 | <col class="field-body" /> |
---|
103 | <tbody valign="top"> |
---|
104 | <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
105 | <li><strong>values</strong> – numpy array of values</li> |
---|
106 | <li><strong>weights</strong> – numpy array of weights for each value entry</li> |
---|
107 | </ul> |
---|
108 | </td> |
---|
109 | </tr> |
---|
110 | </tbody> |
---|
111 | </table> |
---|
112 | </dd></dl> |
---|
113 | |
---|
114 | </dd></dl> |
---|
115 | |
---|
116 | <dl class="class"> |
---|
117 | <dt id="sans.models.dispersion_models.DispersionModel"> |
---|
118 | <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> |
---|
119 | <dd><p>Python bridge class for a basic dispersion model |
---|
120 | class with a constant parameter value distribution</p> |
---|
121 | <dl class="method"> |
---|
122 | <dt id="sans.models.dispersion_models.DispersionModel.set_weights"> |
---|
123 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.DispersionModel.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
124 | <dd>Set the weights of an array dispersion</dd></dl> |
---|
125 | |
---|
126 | </dd></dl> |
---|
127 | |
---|
128 | <dl class="class"> |
---|
129 | <dt id="sans.models.dispersion_models.GaussianDispersion"> |
---|
130 | <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> |
---|
131 | <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> |
---|
132 | <p>Python bridge class for a dispersion model based |
---|
133 | on a Gaussian distribution.</p> |
---|
134 | <dl class="method"> |
---|
135 | <dt id="sans.models.dispersion_models.GaussianDispersion.set_weights"> |
---|
136 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.GaussianDispersion.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
137 | <dd>Set the weights of an array dispersion</dd></dl> |
---|
138 | |
---|
139 | </dd></dl> |
---|
140 | |
---|
141 | <dl class="class"> |
---|
142 | <dt id="sans.models.dispersion_models.LogNormalDispersion"> |
---|
143 | <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> |
---|
144 | <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> |
---|
145 | <p>Python bridge class for a dispersion model based |
---|
146 | on a Log Normal distribution.</p> |
---|
147 | <dl class="method"> |
---|
148 | <dt id="sans.models.dispersion_models.LogNormalDispersion.set_weights"> |
---|
149 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.LogNormalDispersion.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
150 | <dd>Set the weights of an array dispersion</dd></dl> |
---|
151 | |
---|
152 | </dd></dl> |
---|
153 | |
---|
154 | <dl class="class"> |
---|
155 | <dt id="sans.models.dispersion_models.SchulzDispersion"> |
---|
156 | <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> |
---|
157 | <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> |
---|
158 | <p>Python bridge class for a dispersion model based |
---|
159 | on a Schulz distribution.</p> |
---|
160 | <dl class="method"> |
---|
161 | <dt id="sans.models.dispersion_models.SchulzDispersion.set_weights"> |
---|
162 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.SchulzDispersion.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
163 | <dd>Set the weights of an array dispersion</dd></dl> |
---|
164 | |
---|
165 | </dd></dl> |
---|
166 | |
---|
167 | </div> |
---|
168 | </div> |
---|
169 | |
---|
170 | |
---|
171 | </div> |
---|
172 | </div> |
---|
173 | </div> |
---|
174 | <div class="sphinxsidebar"> |
---|
175 | <div class="sphinxsidebarwrapper"> |
---|
176 | <h3><a href="../index.html">Table Of Contents</a></h3> |
---|
177 | <ul> |
---|
178 | <li><a class="reference internal" href="#">dispersion_models</a><ul> |
---|
179 | <li><a class="reference internal" href="#module-sans.models.dispersion_models"><tt class="docutils literal"><span class="pre">sans.models.dispersion_models</span></tt></a></li> |
---|
180 | </ul> |
---|
181 | </li> |
---|
182 | </ul> |
---|
183 | |
---|
184 | <h4>Previous topic</h4> |
---|
185 | <p class="topless"><a href="DisperseModel.html" |
---|
186 | title="previous chapter">DisperseModel</a></p> |
---|
187 | <h4>Next topic</h4> |
---|
188 | <p class="topless"><a href="DivComponent.html" |
---|
189 | title="next chapter">DivComponent</a></p> |
---|
190 | <h3>This Page</h3> |
---|
191 | <ul class="this-page-menu"> |
---|
192 | <li><a href="../_sources/api/dispersion_models.txt" |
---|
193 | rel="nofollow">Show Source</a></li> |
---|
194 | </ul> |
---|
195 | <div id="searchbox" style="display: none"> |
---|
196 | <h3>Quick search</h3> |
---|
197 | <form class="search" action="../search.html" method="get"> |
---|
198 | <input type="text" name="q" size="18" /> |
---|
199 | <input type="submit" value="Go" /> |
---|
200 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
201 | <input type="hidden" name="area" value="default" /> |
---|
202 | </form> |
---|
203 | <p class="searchtip" style="font-size: 90%"> |
---|
204 | Enter search terms or a module, class or function name. |
---|
205 | </p> |
---|
206 | </div> |
---|
207 | <script type="text/javascript">$('#searchbox').show(0);</script> |
---|
208 | </div> |
---|
209 | </div> |
---|
210 | <div class="clearer"></div> |
---|
211 | </div> |
---|
212 | <div class="related"> |
---|
213 | <h3>Navigation</h3> |
---|
214 | <ul> |
---|
215 | <li class="right" style="margin-right: 10px"> |
---|
216 | <a href="../genindex.html" title="General Index" |
---|
217 | >index</a></li> |
---|
218 | <li class="right" > |
---|
219 | <a href="../py-modindex.html" title="Python Module Index" |
---|
220 | >modules</a> |</li> |
---|
221 | <li class="right" > |
---|
222 | <a href="DivComponent.html" title="DivComponent" |
---|
223 | >next</a> |</li> |
---|
224 | <li class="right" > |
---|
225 | <a href="DisperseModel.html" title="DisperseModel" |
---|
226 | >previous</a> |</li> |
---|
227 | <li><a href="../index.html">sansmodels v0.1.0 documentation</a> »</li> |
---|
228 | <li><a href="index.html" >Reference</a> »</li> |
---|
229 | </ul> |
---|
230 | </div> |
---|
231 | <div class="footer"> |
---|
232 | © Copyright 2010, sans group. |
---|
233 | Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0b1. |
---|
234 | </div> |
---|
235 | </body> |
---|
236 | </html> |
---|