[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>dispersion_models — 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="DivComponent" href="DivComponent.html" /> |
---|
| 28 | <link rel="prev" title="DisperseModel" href="DisperseModel.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="DivComponent.html" title="DivComponent" |
---|
| 42 | accesskey="N">next</a> |</li> |
---|
| 43 | <li class="right" > |
---|
| 44 | <a href="DisperseModel.html" title="DisperseModel" |
---|
| 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="dispersion-models"> |
---|
| 57 | <h1>dispersion_models<a class="headerlink" href="#dispersion-models" title="Permalink to this headline">¶</a></h1> |
---|
| 58 | <div class="section" id="module-sans.models.dispersion_models"> |
---|
| 59 | <span id="sans-models-dispersion-models"></span><h2><a class="reference internal" href="#module-sans.models.dispersion_models" title="sans.models.dispersion_models"><tt class="xref py py-mod docutils literal"><span class="pre">sans.models.dispersion_models</span></tt></a><a class="headerlink" href="#module-sans.models.dispersion_models" title="Permalink to this headline">¶</a></h2> |
---|
| 60 | <p>Class definitions for python dispersion model for |
---|
| 61 | model parameters. These classes are bridges to the C++ |
---|
| 62 | dispersion object.</p> |
---|
| 63 | <p>The ArrayDispersion class takes in numpy arrays only.</p> |
---|
| 64 | <p>Usage: |
---|
| 65 | These classes can be used to set the dispersion model of a SANS model |
---|
| 66 | parameter:</p> |
---|
| 67 | <blockquote> |
---|
| 68 | <div>cyl = CylinderModel() |
---|
| 69 | cyl.set_dispersion(‘radius’, GaussianDispersion())</div></blockquote> |
---|
| 70 | <p>After the dispersion model is set, you can access it’s |
---|
| 71 | parameter through the dispersion dictionary:</p> |
---|
| 72 | <blockquote> |
---|
| 73 | <div>cyl.dispersion[‘radius’][‘width’] = 5.0</div></blockquote> |
---|
| 74 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 75 | <col class="field-name" /> |
---|
| 76 | <col class="field-body" /> |
---|
| 77 | <tbody valign="top"> |
---|
| 78 | <tr class="field"><th class="field-name">TODO:</th><td class="field-body">For backward compatibility, the model parameters are still kept in |
---|
| 79 | a dictionary. The next iteration of refactoring work should involve moving |
---|
| 80 | away from value-based parameters to object-based parameter. We want to |
---|
| 81 | store parameters as objects so that we can unify the ‘params’ and ‘dispersion’ |
---|
| 82 | dictionaries into a single dictionary of parameter objects that hold the |
---|
| 83 | complete information about the parameter (units, limits, dispersion model, etc...).</td> |
---|
| 84 | </tr> |
---|
| 85 | </tbody> |
---|
| 86 | </table> |
---|
| 87 | <dl class="class"> |
---|
| 88 | <dt id="sans.models.dispersion_models.ArrayDispersion"> |
---|
| 89 | <em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">ArrayDispersion</tt><a class="headerlink" href="#sans.models.dispersion_models.ArrayDispersion" title="Permalink to this definition">¶</a></dt> |
---|
| 90 | <dd><p>Bases: <a class="reference internal" href="#sans.models.dispersion_models.DispersionModel" title="sans.models.dispersion_models.DispersionModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.dispersion_models.DispersionModel</span></tt></a></p> |
---|
| 91 | <p>Python bridge class for a dispersion model based on arrays. |
---|
| 92 | The user has to set a weight distribution that |
---|
| 93 | will be used in the averaging the model parameter |
---|
| 94 | it is applied to.</p> |
---|
| 95 | <dl class="method"> |
---|
| 96 | <dt id="sans.models.dispersion_models.ArrayDispersion.set_weights"> |
---|
| 97 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.ArrayDispersion.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
| 98 | <dd><p>Set the weights of an array dispersion |
---|
| 99 | Only accept numpy arrays.</p> |
---|
| 100 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 101 | <col class="field-name" /> |
---|
| 102 | <col class="field-body" /> |
---|
| 103 | <tbody valign="top"> |
---|
| 104 | <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
| 105 | <li><strong>values</strong> – numpy array of values</li> |
---|
| 106 | <li><strong>weights</strong> – numpy array of weights for each value entry</li> |
---|
| 107 | </ul> |
---|
| 108 | </td> |
---|
| 109 | </tr> |
---|
| 110 | </tbody> |
---|
| 111 | </table> |
---|
| 112 | </dd></dl> |
---|
| 113 | |
---|
| 114 | </dd></dl> |
---|
| 115 | |
---|
| 116 | <dl class="class"> |
---|
| 117 | <dt id="sans.models.dispersion_models.DispersionModel"> |
---|
| 118 | <em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">DispersionModel</tt><a class="headerlink" href="#sans.models.dispersion_models.DispersionModel" title="Permalink to this definition">¶</a></dt> |
---|
| 119 | <dd><p>Python bridge class for a basic dispersion model |
---|
| 120 | class with a constant parameter value distribution</p> |
---|
| 121 | <dl class="method"> |
---|
| 122 | <dt id="sans.models.dispersion_models.DispersionModel.set_weights"> |
---|
| 123 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.DispersionModel.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
| 124 | <dd><p>Set the weights of an array dispersion</p> |
---|
| 125 | </dd></dl> |
---|
| 126 | |
---|
| 127 | </dd></dl> |
---|
| 128 | |
---|
| 129 | <dl class="class"> |
---|
| 130 | <dt id="sans.models.dispersion_models.GaussianDispersion"> |
---|
| 131 | <em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">GaussianDispersion</tt><a class="headerlink" href="#sans.models.dispersion_models.GaussianDispersion" title="Permalink to this definition">¶</a></dt> |
---|
| 132 | <dd><p>Bases: <a class="reference internal" href="#sans.models.dispersion_models.DispersionModel" title="sans.models.dispersion_models.DispersionModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.dispersion_models.DispersionModel</span></tt></a></p> |
---|
| 133 | <p>Python bridge class for a dispersion model based |
---|
| 134 | on a Gaussian distribution.</p> |
---|
| 135 | <dl class="method"> |
---|
| 136 | <dt id="sans.models.dispersion_models.GaussianDispersion.set_weights"> |
---|
| 137 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.GaussianDispersion.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
| 138 | <dd><p>Set the weights of an array dispersion</p> |
---|
| 139 | </dd></dl> |
---|
| 140 | |
---|
| 141 | </dd></dl> |
---|
| 142 | |
---|
| 143 | <dl class="class"> |
---|
| 144 | <dt id="sans.models.dispersion_models.LogNormalDispersion"> |
---|
| 145 | <em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">LogNormalDispersion</tt><a class="headerlink" href="#sans.models.dispersion_models.LogNormalDispersion" title="Permalink to this definition">¶</a></dt> |
---|
| 146 | <dd><p>Bases: <a class="reference internal" href="#sans.models.dispersion_models.DispersionModel" title="sans.models.dispersion_models.DispersionModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.dispersion_models.DispersionModel</span></tt></a></p> |
---|
| 147 | <p>Python bridge class for a dispersion model based |
---|
| 148 | on a Log Normal distribution.</p> |
---|
| 149 | <dl class="method"> |
---|
| 150 | <dt id="sans.models.dispersion_models.LogNormalDispersion.set_weights"> |
---|
| 151 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.LogNormalDispersion.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
| 152 | <dd><p>Set the weights of an array dispersion</p> |
---|
| 153 | </dd></dl> |
---|
| 154 | |
---|
| 155 | </dd></dl> |
---|
| 156 | |
---|
| 157 | <dl class="class"> |
---|
| 158 | <dt id="sans.models.dispersion_models.RectangleDispersion"> |
---|
| 159 | <em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">RectangleDispersion</tt><a class="headerlink" href="#sans.models.dispersion_models.RectangleDispersion" title="Permalink to this definition">¶</a></dt> |
---|
| 160 | <dd><p>Bases: <a class="reference internal" href="#sans.models.dispersion_models.DispersionModel" title="sans.models.dispersion_models.DispersionModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.dispersion_models.DispersionModel</span></tt></a></p> |
---|
| 161 | <p>Python bridge class for a dispersion model based |
---|
| 162 | on a Gaussian distribution.</p> |
---|
| 163 | <dl class="method"> |
---|
| 164 | <dt id="sans.models.dispersion_models.RectangleDispersion.set_weights"> |
---|
| 165 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.RectangleDispersion.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
| 166 | <dd><p>Set the weights of an array dispersion</p> |
---|
| 167 | </dd></dl> |
---|
| 168 | |
---|
| 169 | </dd></dl> |
---|
| 170 | |
---|
| 171 | <dl class="class"> |
---|
| 172 | <dt id="sans.models.dispersion_models.SchulzDispersion"> |
---|
| 173 | <em class="property">class </em><tt class="descclassname">sans.models.dispersion_models.</tt><tt class="descname">SchulzDispersion</tt><a class="headerlink" href="#sans.models.dispersion_models.SchulzDispersion" title="Permalink to this definition">¶</a></dt> |
---|
| 174 | <dd><p>Bases: <a class="reference internal" href="#sans.models.dispersion_models.DispersionModel" title="sans.models.dispersion_models.DispersionModel"><tt class="xref py py-class docutils literal"><span class="pre">sans.models.dispersion_models.DispersionModel</span></tt></a></p> |
---|
| 175 | <p>Python bridge class for a dispersion model based |
---|
| 176 | on a Schulz distribution.</p> |
---|
| 177 | <dl class="method"> |
---|
| 178 | <dt id="sans.models.dispersion_models.SchulzDispersion.set_weights"> |
---|
| 179 | <tt class="descname">set_weights</tt><big>(</big><em>values</em>, <em>weights</em><big>)</big><a class="headerlink" href="#sans.models.dispersion_models.SchulzDispersion.set_weights" title="Permalink to this definition">¶</a></dt> |
---|
| 180 | <dd><p>Set the weights of an array dispersion</p> |
---|
| 181 | </dd></dl> |
---|
| 182 | |
---|
| 183 | </dd></dl> |
---|
| 184 | |
---|
| 185 | </div> |
---|
| 186 | </div> |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | </div> |
---|
| 190 | </div> |
---|
| 191 | </div> |
---|
| 192 | <div class="sphinxsidebar"> |
---|
| 193 | <div class="sphinxsidebarwrapper"> |
---|
| 194 | <h3><a href="../index.html">Table Of Contents</a></h3> |
---|
| 195 | <ul> |
---|
| 196 | <li><a class="reference internal" href="#">dispersion_models</a><ul> |
---|
| 197 | <li><a class="reference internal" href="#module-sans.models.dispersion_models"><tt class="docutils literal"><span class="pre">sans.models.dispersion_models</span></tt></a></li> |
---|
| 198 | </ul> |
---|
| 199 | </li> |
---|
| 200 | </ul> |
---|
| 201 | |
---|
| 202 | <h4>Previous topic</h4> |
---|
| 203 | <p class="topless"><a href="DisperseModel.html" |
---|
| 204 | title="previous chapter">DisperseModel</a></p> |
---|
| 205 | <h4>Next topic</h4> |
---|
| 206 | <p class="topless"><a href="DivComponent.html" |
---|
| 207 | title="next chapter">DivComponent</a></p> |
---|
| 208 | <h3>This Page</h3> |
---|
| 209 | <ul class="this-page-menu"> |
---|
| 210 | <li><a href="../_sources/api/dispersion_models.txt" |
---|
| 211 | rel="nofollow">Show Source</a></li> |
---|
| 212 | </ul> |
---|
| 213 | <div id="searchbox" style="display: none"> |
---|
| 214 | <h3>Quick search</h3> |
---|
| 215 | <form class="search" action="../search.html" method="get"> |
---|
| 216 | <input type="text" name="q" size="18" /> |
---|
| 217 | <input type="submit" value="Go" /> |
---|
| 218 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
| 219 | <input type="hidden" name="area" value="default" /> |
---|
| 220 | </form> |
---|
| 221 | <p class="searchtip" style="font-size: 90%"> |
---|
| 222 | Enter search terms or a module, class or function name. |
---|
| 223 | </p> |
---|
| 224 | </div> |
---|
| 225 | <script type="text/javascript">$('#searchbox').show(0);</script> |
---|
| 226 | </div> |
---|
| 227 | </div> |
---|
| 228 | <div class="clearer"></div> |
---|
| 229 | </div> |
---|
| 230 | <div class="related"> |
---|
| 231 | <h3>Navigation</h3> |
---|
| 232 | <ul> |
---|
| 233 | <li class="right" style="margin-right: 10px"> |
---|
| 234 | <a href="../genindex.html" title="General Index" |
---|
| 235 | >index</a></li> |
---|
| 236 | <li class="right" > |
---|
| 237 | <a href="../py-modindex.html" title="Python Module Index" |
---|
| 238 | >modules</a> |</li> |
---|
| 239 | <li class="right" > |
---|
| 240 | <a href="DivComponent.html" title="DivComponent" |
---|
| 241 | >next</a> |</li> |
---|
| 242 | <li class="right" > |
---|
| 243 | <a href="DisperseModel.html" title="DisperseModel" |
---|
| 244 | >previous</a> |</li> |
---|
| 245 | <li><a href="../index.html">sansmodels v0.1.0 documentation</a> »</li> |
---|
| 246 | <li><a href="index.html" >Reference</a> »</li> |
---|
| 247 | </ul> |
---|
| 248 | </div> |
---|
| 249 | <div class="footer"> |
---|
| 250 | © Copyright 2010, sans group. |
---|
| 251 | Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. |
---|
| 252 | </div> |
---|
| 253 | </body> |
---|
| 254 | </html> |
---|