source: sasview/sansmodels/docs/sphinx/html/api/DivComponent.html @ 7e7e806

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

HTML folder generated by Sphinx

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