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