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

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 d0d7704 was 79ac6f8, checked in by Gervaise Alina <gervyh@…>, 14 years ago

working on documentation

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