source: sasview/sansmodels/docs/sphinx/html/api/PeakLorentzModel.html @ 67cd7c0

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

HTML folder generated by Sphinx

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