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