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