source: sasview/sansmodels/docs/sphinx/html/api/TwoPowerLawModel.html @ 5f696f8

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 5f696f8 was 512573a, checked in by Jessica Tumarkin <jtumarki@…>, 13 years ago

HTML folder generated by Sphinx

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