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