source: sasview/sansmodels/docs/sphinx/html/api/PorodModel.html @ dbdff5e

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 dbdff5e was c0d873f, checked in by Gervaise Alina <gervyh@…>, 13 years ago

edit docs for models

  • Property mode set to 100644
File size: 15.1 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>PorodModel &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="PowerLawAbsModel" href="PowerLawAbsModel.html" />
31    <link rel="prev" title="Poly_GaussCoil" href="Poly_GaussCoil.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="PowerLawAbsModel.html" title="PowerLawAbsModel"
45             accesskey="N">next</a> |</li>
46        <li class="right" >
47          <a href="Poly_GaussCoil.html" title="Poly_GaussCoil"
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="porodmodel">
60<h1>PorodModel<a class="headerlink" href="#porodmodel" title="Permalink to this headline">¶</a></h1>
61<div class="section" id="sans-models-porodmodel">
62<h2><a class="reference internal" href="#module-sans.models.PorodModel" title="sans.models.PorodModel"><tt class="xref py py-mod docutils literal"><span class="pre">sans.models.PorodModel</span></tt></a><a class="headerlink" href="#sans-models-porodmodel" title="Permalink to this headline">¶</a></h2>
63<span class="target" id="module-sans.models.PorodModel"></span><p>Provide I(q) = C/q^4,
64Porod function as a BaseComponent model</p>
65<dl class="class">
66<dt id="sans.models.PorodModel.PorodModel">
67<em class="property">class </em><tt class="descclassname">sans.models.PorodModel.</tt><tt class="descname">PorodModel</tt><a class="headerlink" href="#sans.models.PorodModel.PorodModel" title="Permalink to this definition">¶</a></dt>
68<dd><p>Bases: <a class="reference internal" href="BaseComponent.html#sans.models.BaseComponent.BaseComponent" title="sans.models.BaseComponent.BaseComponent"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.BaseComponent.BaseComponent</span></tt></a></p>
69<p>Class that evaluates a Porod model.</p>
70<p>I(q) = scale/q^4 +background</p>
71<dl class="method">
72<dt id="sans.models.PorodModel.PorodModel.__add__">
73<tt class="descname">__add__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.__add__" title="Permalink to this definition">¶</a></dt>
74<dd></dd></dl>
75
76<dl class="method">
77<dt id="sans.models.PorodModel.PorodModel.__div__">
78<tt class="descname">__div__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.__div__" title="Permalink to this definition">¶</a></dt>
79<dd></dd></dl>
80
81<dl class="method">
82<dt id="sans.models.PorodModel.PorodModel.__init__">
83<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.__init__" title="Permalink to this definition">¶</a></dt>
84<dd><p>Initialization</p>
85</dd></dl>
86
87<dl class="attribute">
88<dt id="sans.models.PorodModel.PorodModel.__module__">
89<tt class="descname">__module__</tt><em class="property"> = 'sans.models.PorodModel'</em><a class="headerlink" href="#sans.models.PorodModel.PorodModel.__module__" title="Permalink to this definition">¶</a></dt>
90<dd></dd></dl>
91
92<dl class="method">
93<dt id="sans.models.PorodModel.PorodModel.__mul__">
94<tt class="descname">__mul__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.__mul__" title="Permalink to this definition">¶</a></dt>
95<dd></dd></dl>
96
97<dl class="method">
98<dt id="sans.models.PorodModel.PorodModel.__str__">
99<tt class="descname">__str__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.__str__" title="Permalink to this definition">¶</a></dt>
100<dd><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-odd field"><th class="field-name">Returns:</th><td class="field-body">string representatio</td>
105</tr>
106</tbody>
107</table>
108</dd></dl>
109
110<dl class="method">
111<dt id="sans.models.PorodModel.PorodModel.__sub__">
112<tt class="descname">__sub__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.__sub__" title="Permalink to this definition">¶</a></dt>
113<dd></dd></dl>
114
115<dl class="method">
116<dt id="sans.models.PorodModel.PorodModel._clone">
117<tt class="descname">_clone</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel._clone" title="Permalink to this definition">¶</a></dt>
118<dd><p>Internal utility function to copy the internal
119data members to a fresh copy.</p>
120</dd></dl>
121
122<dl class="method">
123<dt id="sans.models.PorodModel.PorodModel._porod">
124<tt class="descname">_porod</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel._porod" title="Permalink to this definition">¶</a></dt>
125<dd></dd></dl>
126
127<dl class="method">
128<dt id="sans.models.PorodModel.PorodModel.calculate_ER">
129<tt class="descname">calculate_ER</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.calculate_ER" title="Permalink to this definition">¶</a></dt>
130<dd></dd></dl>
131
132<dl class="method">
133<dt id="sans.models.PorodModel.PorodModel.clone">
134<tt class="descname">clone</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.clone" title="Permalink to this definition">¶</a></dt>
135<dd><p>Returns a new object identical to the current object</p>
136</dd></dl>
137
138<dl class="method">
139<dt id="sans.models.PorodModel.PorodModel.evalDistribution">
140<tt class="descname">evalDistribution</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.evalDistribution" title="Permalink to this definition">¶</a></dt>
141<dd><p>Evaluate a distribution of q-values.</p>
142<ul>
143<li><p class="first">For 1D, a numpy array is expected as input:</p>
144<blockquote>
145<div><p>evalDistribution(q)</p>
146</div></blockquote>
147</li>
148</ul>
149<p>where q is a numpy array.</p>
150<ul class="simple">
151<li>For 2D, a list of numpy arrays are expected: [qx_prime,qy_prime],
152where 1D arrays,</li>
153</ul>
154<p>qx_prime = [ qx[0], qx[1], qx[2], ....]
155and
156qy_prime = [ qy[0], qy[1], qy[2], ....]</p>
157<p>Then get
158q = numpy.sqrt(qx_prime^2+qy_prime^2)</p>
159<p>that is a qr in 1D array;
160q = [q[0], q[1], q[2], ....]</p>
161<table class="docutils field-list" frame="void" rules="none">
162<col class="field-name" />
163<col class="field-body" />
164<tbody valign="top">
165<tr class="field-odd field"><th class="field-name">Note :</th><td class="field-body"><p class="first">Due to 2D speed issue, no anisotropic scattering
166is supported for python models, thus C-models should have</p>
167<blockquote class="last">
168<div><p>their own evalDistribution methods.</p>
169</div></blockquote>
170</td>
171</tr>
172</tbody>
173</table>
174<p>The method is then called the following way:</p>
175<p>evalDistribution(q)
176where q is a numpy array.</p>
177<table class="docutils field-list" frame="void" rules="none">
178<col class="field-name" />
179<col class="field-body" />
180<tbody valign="top">
181<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>qdist</strong> &#8211; ndarray of scalar q-values or list [qx,qy]
182where qx,qy are 1D ndarrays</td>
183</tr>
184</tbody>
185</table>
186</dd></dl>
187
188<dl class="method">
189<dt id="sans.models.PorodModel.PorodModel.getDispParamList">
190<tt class="descname">getDispParamList</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.getDispParamList" title="Permalink to this definition">¶</a></dt>
191<dd><p>Return a list of all available parameters for the model</p>
192</dd></dl>
193
194<dl class="method">
195<dt id="sans.models.PorodModel.PorodModel.getParam">
196<tt class="descname">getParam</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.getParam" title="Permalink to this definition">¶</a></dt>
197<dd><p>Set the value of a model parameter</p>
198<table class="docutils field-list" frame="void" rules="none">
199<col class="field-name" />
200<col class="field-body" />
201<tbody valign="top">
202<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> &#8211; name of the parameter</td>
203</tr>
204</tbody>
205</table>
206</dd></dl>
207
208<dl class="method">
209<dt id="sans.models.PorodModel.PorodModel.getParamList">
210<tt class="descname">getParamList</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.getParamList" title="Permalink to this definition">¶</a></dt>
211<dd><p>Return a list of all available parameters for the model</p>
212</dd></dl>
213
214<dl class="method">
215<dt id="sans.models.PorodModel.PorodModel.getParamListWithToken">
216<tt class="descname">getParamListWithToken</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.getParamListWithToken" title="Permalink to this definition">¶</a></dt>
217<dd></dd></dl>
218
219<dl class="method">
220<dt id="sans.models.PorodModel.PorodModel.getParamWithToken">
221<tt class="descname">getParamWithToken</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.getParamWithToken" title="Permalink to this definition">¶</a></dt>
222<dd></dd></dl>
223
224<dl class="method">
225<dt id="sans.models.PorodModel.PorodModel.is_fittable">
226<tt class="descname">is_fittable</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.is_fittable" title="Permalink to this definition">¶</a></dt>
227<dd><p>Check if a given parameter is fittable or not</p>
228<table class="docutils field-list" frame="void" rules="none">
229<col class="field-name" />
230<col class="field-body" />
231<tbody valign="top">
232<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>par_name</strong> &#8211; the parameter name to check</td>
233</tr>
234</tbody>
235</table>
236</dd></dl>
237
238<dl class="method">
239<dt id="sans.models.PorodModel.PorodModel.run">
240<tt class="descname">run</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.run" title="Permalink to this definition">¶</a></dt>
241<dd><p>Evaluate the model
242&#64;param x: input q-value (float or [float, float] as [r, theta])
243&#64;return: (porod value)</p>
244</dd></dl>
245
246<dl class="method">
247<dt id="sans.models.PorodModel.PorodModel.runXY">
248<tt class="descname">runXY</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.runXY" title="Permalink to this definition">¶</a></dt>
249<dd><p>Evaluate the model
250&#64;param x: input q-value (float or [float, float] as [qx, qy])
251&#64;return: porod value</p>
252</dd></dl>
253
254<dl class="method">
255<dt id="sans.models.PorodModel.PorodModel.setParam">
256<tt class="descname">setParam</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.setParam" title="Permalink to this definition">¶</a></dt>
257<dd><p>Set the value of a model parameter</p>
258<table class="docutils field-list" frame="void" rules="none">
259<col class="field-name" />
260<col class="field-body" />
261<tbody valign="top">
262<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
263<li><strong>name</strong> &#8211; name of the parameter</li>
264<li><strong>value</strong> &#8211; value of the parameter</li>
265</ul>
266</td>
267</tr>
268</tbody>
269</table>
270</dd></dl>
271
272<dl class="method">
273<dt id="sans.models.PorodModel.PorodModel.setParamWithToken">
274<tt class="descname">setParamWithToken</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PorodModel.PorodModel.setParamWithToken" title="Permalink to this definition">¶</a></dt>
275<dd></dd></dl>
276
277</dd></dl>
278
279</div>
280</div>
281
282
283          </div>
284        </div>
285      </div>
286      <div class="sphinxsidebar">
287        <div class="sphinxsidebarwrapper">
288  <h3><a href="../index.html">Table Of Contents</a></h3>
289  <ul>
290<li><a class="reference internal" href="#">PorodModel</a><ul>
291<li><a class="reference internal" href="#sans-models-porodmodel"><tt class="docutils literal"><span class="pre">sans.models.PorodModel</span></tt></a></li>
292</ul>
293</li>
294</ul>
295
296  <h4>Previous topic</h4>
297  <p class="topless"><a href="Poly_GaussCoil.html"
298                        title="previous chapter">Poly_GaussCoil</a></p>
299  <h4>Next topic</h4>
300  <p class="topless"><a href="PowerLawAbsModel.html"
301                        title="next chapter">PowerLawAbsModel</a></p>
302  <h3>This Page</h3>
303  <ul class="this-page-menu">
304    <li><a href="../_sources/api/PorodModel.txt"
305           rel="nofollow">Show Source</a></li>
306  </ul>
307<div id="searchbox" style="display: none">
308  <h3>Quick search</h3>
309    <form class="search" action="../search.html" method="get">
310      <input type="text" name="q" />
311      <input type="submit" value="Go" />
312      <input type="hidden" name="check_keywords" value="yes" />
313      <input type="hidden" name="area" value="default" />
314    </form>
315    <p class="searchtip" style="font-size: 90%">
316    Enter search terms or a module, class or function name.
317    </p>
318</div>
319<script type="text/javascript">$('#searchbox').show(0);</script>
320        </div>
321      </div>
322      <div class="clearer"></div>
323    </div>
324    <div class="related">
325      <h3>Navigation</h3>
326      <ul>
327        <li class="right" style="margin-right: 10px">
328          <a href="../genindex.html" title="General Index"
329             >index</a></li>
330        <li class="right" >
331          <a href="../py-modindex.html" title="Python Module Index"
332             >modules</a> |</li>
333        <li class="right" >
334          <a href="PowerLawAbsModel.html" title="PowerLawAbsModel"
335             >next</a> |</li>
336        <li class="right" >
337          <a href="Poly_GaussCoil.html" title="Poly_GaussCoil"
338             >previous</a> |</li>
339        <li><a href="../index.html">sansmodels 0.1.0 documentation</a> &raquo;</li>
340          <li><a href="index.html" >Reference</a> &raquo;</li> 
341      </ul>
342    </div>
343    <div class="footer">
344        &copy; Copyright 2010, sans group.
345      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.
346    </div>
347  </body>
348</html>
Note: See TracBrowser for help on using the repository browser.