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