source: sasview/sansmodels/docs/sphinx/html/api/GaussLorentzGelModel.html @ 8d70c0a

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

edit docs for models

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