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