source: sasview/sansmodels/docs/sphinx/html/api/TeubnerStreyModel.html @ c0d873f

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

edit docs for models

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