source: sasview/sansmodels/docs/sphinx/_build/html/api/Sin.html @ b94945d

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 b94945d was 79ac6f8, checked in by Gervaise Alina <gervyh@…>, 15 years ago

working on documentation

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