source: sasview/sansmodels/docs/sphinx/_build/html/api/DebyeModel.html @ 79ac6f8

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

working on documentation

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