source: sasview/sansmodels/docs/sphinx/html/api/GuinierModel.html @ dcbd084f

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

edit docs for models

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