source: sasview/sansmodels/docs/sphinx/html/api/BroadPeakModel.html @ e594bb0

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

edit docs for models

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