[79ac6f8] | 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>PowerLawAbsModel — 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="PowerLawModel" href="PowerLawModel.html" /> |
---|
| 28 | <link rel="prev" title="PorodModel" href="PorodModel.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="PowerLawModel.html" title="PowerLawModel" |
---|
| 42 | accesskey="N">next</a> |</li> |
---|
| 43 | <li class="right" > |
---|
| 44 | <a href="PorodModel.html" title="PorodModel" |
---|
| 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="powerlawabsmodel"> |
---|
| 57 | <h1>PowerLawAbsModel<a class="headerlink" href="#powerlawabsmodel" title="Permalink to this headline">¶</a></h1> |
---|
| 58 | <div class="section" id="module-sans.models.PowerLawAbsModel"> |
---|
| 59 | <span id="sans-models-powerlawabsmodel"></span><h2><a class="reference internal" href="#module-sans.models.PowerLawAbsModel"><tt class="xref py py-mod docutils literal"><span class="pre">sans.models.PowerLawAbsModel</span></tt></a><a class="headerlink" href="#module-sans.models.PowerLawAbsModel" title="Permalink to this headline">¶</a></h2> |
---|
| 60 | <p>Provide F(x) = scale* (<a href="#id1"><span class="problematic" id="id2">|x|</span></a>)^(-m) + bkd |
---|
| 61 | Power law function as a BaseComponent model</p> |
---|
| 62 | <dl class="class"> |
---|
| 63 | <dt id="sans.models.PowerLawAbsModel.PowerLawAbsModel"> |
---|
| 64 | <em class="property">class </em><tt class="descclassname">sans.models.PowerLawAbsModel.</tt><tt class="descname">PowerLawAbsModel</tt><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel" title="Permalink to this definition">¶</a></dt> |
---|
| 65 | <dd><p>Bases: <a class="reference internal" href="PowerLawModel.html#sans.models.PowerLawModel.PowerLawModel" title="sans.models.PowerLawModel.PowerLawModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.PowerLawModel.PowerLawModel</span></tt></a></p> |
---|
| 66 | <p>Class that evaluates a absolute Power_Law model.</p> |
---|
| 67 | <p>F(x) = scale* (<a href="#id3"><span class="problematic" id="id4">|x|</span></a>)^(-m) + bkd</p> |
---|
| 68 | <dl class="docutils"> |
---|
| 69 | <dt>The model has three parameters: </dt> |
---|
| 70 | <dd>m = power |
---|
| 71 | scale = scale factor |
---|
| 72 | bkd = incoherent background</dd> |
---|
| 73 | </dl> |
---|
| 74 | <dl class="method"> |
---|
| 75 | <dt id="sans.models.PowerLawAbsModel.PowerLawAbsModel.calculate_ER"> |
---|
| 76 | <tt class="descname">calculate_ER</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.calculate_ER" title="Permalink to this definition">¶</a></dt> |
---|
| 77 | <dd></dd></dl> |
---|
| 78 | |
---|
| 79 | <dl class="method"> |
---|
| 80 | <dt id="sans.models.PowerLawAbsModel.PowerLawAbsModel.clone"> |
---|
| 81 | <tt class="descname">clone</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.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.PowerLawAbsModel.PowerLawAbsModel.evalDistribution"> |
---|
| 86 | <tt class="descname">evalDistribution</tt><big>(</big><em>qdist</em><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.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.PowerLawAbsModel.PowerLawAbsModel.getDispParamList"> |
---|
| 139 | <tt class="descname">getDispParamList</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.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.PowerLawAbsModel.PowerLawAbsModel.getParam"> |
---|
| 144 | <tt class="descname">getParam</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.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.PowerLawAbsModel.PowerLawAbsModel.getParamList"> |
---|
| 161 | <tt class="descname">getParamList</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.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.PowerLawAbsModel.PowerLawAbsModel.getParamListWithToken"> |
---|
| 166 | <tt class="descname">getParamListWithToken</tt><big>(</big><em>token</em>, <em>member</em><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.getParamListWithToken" title="Permalink to this definition">¶</a></dt> |
---|
| 167 | <dd></dd></dl> |
---|
| 168 | |
---|
| 169 | <dl class="method"> |
---|
| 170 | <dt id="sans.models.PowerLawAbsModel.PowerLawAbsModel.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.PowerLawAbsModel.PowerLawAbsModel.getParamWithToken" title="Permalink to this definition">¶</a></dt> |
---|
| 172 | <dd></dd></dl> |
---|
| 173 | |
---|
| 174 | <dl class="method"> |
---|
| 175 | <dt id="sans.models.PowerLawAbsModel.PowerLawAbsModel.is_fittable"> |
---|
| 176 | <tt class="descname">is_fittable</tt><big>(</big><em>par_name</em><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.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.PowerLawAbsModel.PowerLawAbsModel.run"> |
---|
| 193 | <tt class="descname">run</tt><big>(</big><em>x=0.0</em><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.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: (PowerLaw value)</dd></dl> |
---|
| 197 | |
---|
| 198 | <dl class="method"> |
---|
| 199 | <dt id="sans.models.PowerLawAbsModel.PowerLawAbsModel.runXY"> |
---|
| 200 | <tt class="descname">runXY</tt><big>(</big><em>x=0.0</em><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.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: PowerLaw value</dd></dl> |
---|
| 204 | |
---|
| 205 | <dl class="method"> |
---|
| 206 | <dt id="sans.models.PowerLawAbsModel.PowerLawAbsModel.setParam"> |
---|
| 207 | <tt class="descname">setParam</tt><big>(</big><em>name</em>, <em>value</em><big>)</big><a class="headerlink" href="#sans.models.PowerLawAbsModel.PowerLawAbsModel.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.PowerLawAbsModel.PowerLawAbsModel.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.PowerLawAbsModel.PowerLawAbsModel.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="#">PowerLawAbsModel</a><ul> |
---|
| 242 | <li><a class="reference internal" href="#module-sans.models.PowerLawAbsModel"><tt class="docutils literal"><span class="pre">sans.models.PowerLawAbsModel</span></tt></a></li> |
---|
| 243 | </ul> |
---|
| 244 | </li> |
---|
| 245 | </ul> |
---|
| 246 | |
---|
| 247 | <h4>Previous topic</h4> |
---|
| 248 | <p class="topless"><a href="PorodModel.html" |
---|
| 249 | title="previous chapter">PorodModel</a></p> |
---|
| 250 | <h4>Next topic</h4> |
---|
| 251 | <p class="topless"><a href="PowerLawModel.html" |
---|
| 252 | title="next chapter">PowerLawModel</a></p> |
---|
| 253 | <h3>This Page</h3> |
---|
| 254 | <ul class="this-page-menu"> |
---|
| 255 | <li><a href="../_sources/api/PowerLawAbsModel.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="PowerLawModel.html" title="PowerLawModel" |
---|
| 286 | >next</a> |</li> |
---|
| 287 | <li class="right" > |
---|
| 288 | <a href="PorodModel.html" title="PorodModel" |
---|
| 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> |
---|