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

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

working on documentation

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