source: sasview/sansmodels/docs/sphinx/html/api/UnifiedPowerRgModel.html @ c09ace41

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

edit docs for models

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