[67cd7c0] | 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 | |
---|
| 7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
| 8 | <head> |
---|
| 9 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
| 10 | |
---|
| 11 | <title>invariant — invariant 0.1.0 documentation</title> |
---|
| 12 | |
---|
| 13 | <link rel="stylesheet" href="../_static/default.css" type="text/css" /> |
---|
| 14 | <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> |
---|
| 15 | |
---|
| 16 | <script type="text/javascript"> |
---|
| 17 | var DOCUMENTATION_OPTIONS = { |
---|
| 18 | URL_ROOT: '../', |
---|
| 19 | VERSION: '0.1.0', |
---|
| 20 | COLLAPSE_INDEX: false, |
---|
| 21 | FILE_SUFFIX: '.html', |
---|
| 22 | HAS_SOURCE: true |
---|
| 23 | }; |
---|
| 24 | </script> |
---|
| 25 | <script type="text/javascript" src="../_static/jquery.js"></script> |
---|
| 26 | <script type="text/javascript" src="../_static/underscore.js"></script> |
---|
| 27 | <script type="text/javascript" src="../_static/doctools.js"></script> |
---|
| 28 | <link rel="top" title="invariant 0.1.0 documentation" href="../index.html" /> |
---|
| 29 | <link rel="up" title="Reference" href="index.html" /> |
---|
| 30 | <link rel="next" title="invariant_mapper" href="invariant_mapper.html" /> |
---|
| 31 | <link rel="prev" title="Reference" href="index.html" /> |
---|
| 32 | </head> |
---|
| 33 | <body> |
---|
| 34 | <div class="related"> |
---|
| 35 | <h3>Navigation</h3> |
---|
| 36 | <ul> |
---|
| 37 | <li class="right" style="margin-right: 10px"> |
---|
| 38 | <a href="../genindex.html" title="General Index" |
---|
| 39 | accesskey="I">index</a></li> |
---|
| 40 | <li class="right" > |
---|
| 41 | <a href="../py-modindex.html" title="Python Module Index" |
---|
| 42 | >modules</a> |</li> |
---|
| 43 | <li class="right" > |
---|
| 44 | <a href="invariant_mapper.html" title="invariant_mapper" |
---|
| 45 | accesskey="N">next</a> |</li> |
---|
| 46 | <li class="right" > |
---|
| 47 | <a href="index.html" title="Reference" |
---|
| 48 | accesskey="P">previous</a> |</li> |
---|
| 49 | <li><a href="../index.html">invariant 0.1.0 documentation</a> »</li> |
---|
| 50 | <li><a href="index.html" accesskey="U">Reference</a> »</li> |
---|
| 51 | </ul> |
---|
| 52 | </div> |
---|
| 53 | |
---|
| 54 | <div class="document"> |
---|
| 55 | <div class="documentwrapper"> |
---|
| 56 | <div class="bodywrapper"> |
---|
| 57 | <div class="body"> |
---|
| 58 | |
---|
| 59 | <div class="section" id="invariant"> |
---|
| 60 | <h1>invariant<a class="headerlink" href="#invariant" title="Permalink to this headline">¶</a></h1> |
---|
| 61 | <div class="section" id="sans-invariant-invariant"> |
---|
| 62 | <h2><a class="reference internal" href="#module-sans.invariant.invariant" title="sans.invariant.invariant"><tt class="xref py py-mod docutils literal"><span class="pre">sans.invariant.invariant</span></tt></a><a class="headerlink" href="#sans-invariant-invariant" title="Permalink to this headline">¶</a></h2> |
---|
| 63 | <span class="target" id="module-sans.invariant.invariant"></span><p>This module implements invariant and its related computations.</p> |
---|
| 64 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 65 | <col class="field-name" /> |
---|
| 66 | <col class="field-body" /> |
---|
| 67 | <tbody valign="top"> |
---|
| 68 | <tr class="field-odd field"><th class="field-name">author:</th><td class="field-body">Gervaise B. Alina/UTK</td> |
---|
| 69 | </tr> |
---|
| 70 | <tr class="field-even field"><th class="field-name">author:</th><td class="field-body">Mathieu Doucet/UTK</td> |
---|
| 71 | </tr> |
---|
| 72 | <tr class="field-odd field"><th class="field-name">author:</th><td class="field-body">Jae Cho/UTK</td> |
---|
| 73 | </tr> |
---|
| 74 | </tbody> |
---|
| 75 | </table> |
---|
| 76 | <dl class="class"> |
---|
| 77 | <dt id="sans.invariant.invariant.Extrapolator"> |
---|
| 78 | <em class="property">class </em><tt class="descclassname">sans.invariant.invariant.</tt><tt class="descname">Extrapolator</tt><a class="headerlink" href="#sans.invariant.invariant.Extrapolator" title="Permalink to this definition">¶</a></dt> |
---|
| 79 | <dd><p>Extrapolate I(q) distribution using a given model</p> |
---|
| 80 | <dl class="method"> |
---|
| 81 | <dt id="sans.invariant.invariant.Extrapolator.__init__"> |
---|
| 82 | <tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Extrapolator.__init__" title="Permalink to this definition">¶</a></dt> |
---|
| 83 | <dd><p>Determine a and b given a linear equation y = ax + b</p> |
---|
| 84 | <p>If a model is given, it will be used to linearize the data before |
---|
| 85 | the extrapolation is performed. If None, |
---|
| 86 | a simple linear fit will be done.</p> |
---|
| 87 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 88 | <col class="field-name" /> |
---|
| 89 | <col class="field-body" /> |
---|
| 90 | <tbody valign="top"> |
---|
| 91 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
| 92 | <li><strong>data</strong> – data containing x and y such as y = ax + b</li> |
---|
| 93 | <li><strong>model</strong> – optional Transform object</li> |
---|
| 94 | </ul> |
---|
| 95 | </td> |
---|
| 96 | </tr> |
---|
| 97 | </tbody> |
---|
| 98 | </table> |
---|
| 99 | </dd></dl> |
---|
| 100 | |
---|
| 101 | <dl class="attribute"> |
---|
| 102 | <dt id="sans.invariant.invariant.Extrapolator.__module__"> |
---|
| 103 | <tt class="descname">__module__</tt><em class="property"> = 'sans.invariant.invariant'</em><a class="headerlink" href="#sans.invariant.invariant.Extrapolator.__module__" title="Permalink to this definition">¶</a></dt> |
---|
| 104 | <dd></dd></dl> |
---|
| 105 | |
---|
| 106 | <dl class="method"> |
---|
| 107 | <dt id="sans.invariant.invariant.Extrapolator.fit"> |
---|
| 108 | <tt class="descname">fit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Extrapolator.fit" title="Permalink to this definition">¶</a></dt> |
---|
| 109 | <dd><p>Fit data for y = ax + b return a and b</p> |
---|
| 110 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 111 | <col class="field-name" /> |
---|
| 112 | <col class="field-body" /> |
---|
| 113 | <tbody valign="top"> |
---|
| 114 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
| 115 | <li><strong>power</strong> – a fixed, otherwise None</li> |
---|
| 116 | <li><strong>qmin</strong> – Minimum Q-value</li> |
---|
| 117 | <li><strong>qmax</strong> – Maximum Q-value</li> |
---|
| 118 | </ul> |
---|
| 119 | </td> |
---|
| 120 | </tr> |
---|
| 121 | </tbody> |
---|
| 122 | </table> |
---|
| 123 | </dd></dl> |
---|
| 124 | |
---|
| 125 | </dd></dl> |
---|
| 126 | |
---|
| 127 | <dl class="class"> |
---|
| 128 | <dt id="sans.invariant.invariant.Guinier"> |
---|
| 129 | <em class="property">class </em><tt class="descclassname">sans.invariant.invariant.</tt><tt class="descname">Guinier</tt><a class="headerlink" href="#sans.invariant.invariant.Guinier" title="Permalink to this definition">¶</a></dt> |
---|
| 130 | <dd><p>Bases: <a class="reference internal" href="#sans.invariant.invariant.Transform" title="sans.invariant.invariant.Transform"><tt class="xref py py-class docutils literal"><span class="pre">sans.invariant.invariant.Transform</span></tt></a></p> |
---|
| 131 | <p>class of type Transform that performs operations related to guinier |
---|
| 132 | function</p> |
---|
| 133 | <dl class="attribute"> |
---|
| 134 | <dt id="sans.invariant.invariant.Guinier.__class__"> |
---|
| 135 | <tt class="descname">__class__</tt><a class="headerlink" href="#sans.invariant.invariant.Guinier.__class__" title="Permalink to this definition">¶</a></dt> |
---|
| 136 | <dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p> |
---|
| 137 | </dd></dl> |
---|
| 138 | |
---|
| 139 | <dl class="attribute"> |
---|
| 140 | <dt id="sans.invariant.invariant.Guinier.__delattr__"> |
---|
| 141 | <tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.invariant.invariant.Guinier.__delattr__" title="Permalink to this definition">¶</a></dt> |
---|
| 142 | <dd><p>x.__delattr__(‘name’) <==> del x.name</p> |
---|
| 143 | </dd></dl> |
---|
| 144 | |
---|
| 145 | <dl class="attribute"> |
---|
| 146 | <dt id="sans.invariant.invariant.Guinier.__dict__"> |
---|
| 147 | <tt class="descname">__dict__</tt><em class="property"> = <dictproxy object at 0x0202B090></em><a class="headerlink" href="#sans.invariant.invariant.Guinier.__dict__" title="Permalink to this definition">¶</a></dt> |
---|
| 148 | <dd></dd></dl> |
---|
| 149 | |
---|
| 150 | <dl class="attribute"> |
---|
| 151 | <dt id="sans.invariant.invariant.Guinier.__getattribute__"> |
---|
| 152 | <tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.invariant.invariant.Guinier.__getattribute__" title="Permalink to this definition">¶</a></dt> |
---|
| 153 | <dd><p>x.__getattribute__(‘name’) <==> x.name</p> |
---|
| 154 | </dd></dl> |
---|
| 155 | |
---|
| 156 | <dl class="attribute"> |
---|
| 157 | <dt id="sans.invariant.invariant.Guinier.__hash__"> |
---|
| 158 | <tt class="descname">__hash__</tt><a class="headerlink" href="#sans.invariant.invariant.Guinier.__hash__" title="Permalink to this definition">¶</a></dt> |
---|
| 159 | <dd><p>x.__hash__() <==> hash(x)</p> |
---|
| 160 | </dd></dl> |
---|
| 161 | |
---|
| 162 | <dl class="method"> |
---|
| 163 | <dt id="sans.invariant.invariant.Guinier.__init__"> |
---|
| 164 | <tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Guinier.__init__" title="Permalink to this definition">¶</a></dt> |
---|
| 165 | <dd></dd></dl> |
---|
| 166 | |
---|
| 167 | <dl class="attribute"> |
---|
| 168 | <dt id="sans.invariant.invariant.Guinier.__module__"> |
---|
| 169 | <tt class="descname">__module__</tt><em class="property"> = 'sans.invariant.invariant'</em><a class="headerlink" href="#sans.invariant.invariant.Guinier.__module__" title="Permalink to this definition">¶</a></dt> |
---|
| 170 | <dd></dd></dl> |
---|
| 171 | |
---|
| 172 | <dl class="staticmethod"> |
---|
| 173 | <dt id="sans.invariant.invariant.Guinier.__new__"> |
---|
| 174 | <em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> → a new object with type S, a subtype of T<a class="headerlink" href="#sans.invariant.invariant.Guinier.__new__" title="Permalink to this definition">¶</a></dt> |
---|
| 175 | <dd></dd></dl> |
---|
| 176 | |
---|
| 177 | <dl class="method"> |
---|
| 178 | <dt id="sans.invariant.invariant.Guinier.__reduce__"> |
---|
| 179 | <tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Guinier.__reduce__" title="Permalink to this definition">¶</a></dt> |
---|
| 180 | <dd><p>helper for pickle</p> |
---|
| 181 | </dd></dl> |
---|
| 182 | |
---|
| 183 | <dl class="method"> |
---|
| 184 | <dt id="sans.invariant.invariant.Guinier.__reduce_ex__"> |
---|
| 185 | <tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Guinier.__reduce_ex__" title="Permalink to this definition">¶</a></dt> |
---|
| 186 | <dd><p>helper for pickle</p> |
---|
| 187 | </dd></dl> |
---|
| 188 | |
---|
| 189 | <dl class="attribute"> |
---|
| 190 | <dt id="sans.invariant.invariant.Guinier.__repr__"> |
---|
| 191 | <tt class="descname">__repr__</tt><a class="headerlink" href="#sans.invariant.invariant.Guinier.__repr__" title="Permalink to this definition">¶</a></dt> |
---|
| 192 | <dd><p>x.__repr__() <==> repr(x)</p> |
---|
| 193 | </dd></dl> |
---|
| 194 | |
---|
| 195 | <dl class="attribute"> |
---|
| 196 | <dt id="sans.invariant.invariant.Guinier.__setattr__"> |
---|
| 197 | <tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.invariant.invariant.Guinier.__setattr__" title="Permalink to this definition">¶</a></dt> |
---|
| 198 | <dd><p>x.__setattr__(‘name’, value) <==> x.name = value</p> |
---|
| 199 | </dd></dl> |
---|
| 200 | |
---|
| 201 | <dl class="attribute"> |
---|
| 202 | <dt id="sans.invariant.invariant.Guinier.__str__"> |
---|
| 203 | <tt class="descname">__str__</tt><a class="headerlink" href="#sans.invariant.invariant.Guinier.__str__" title="Permalink to this definition">¶</a></dt> |
---|
| 204 | <dd><p>x.__str__() <==> str(x)</p> |
---|
| 205 | </dd></dl> |
---|
| 206 | |
---|
| 207 | <dl class="attribute"> |
---|
| 208 | <dt id="sans.invariant.invariant.Guinier.__weakref__"> |
---|
| 209 | <tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.invariant.invariant.Guinier.__weakref__" title="Permalink to this definition">¶</a></dt> |
---|
| 210 | <dd><p>list of weak references to the object (if defined)</p> |
---|
| 211 | </dd></dl> |
---|
| 212 | |
---|
| 213 | <dl class="method"> |
---|
| 214 | <dt id="sans.invariant.invariant.Guinier._guinier"> |
---|
| 215 | <tt class="descname">_guinier</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Guinier._guinier" title="Permalink to this definition">¶</a></dt> |
---|
| 216 | <dd><p>Retrive the guinier function after apply an inverse guinier function |
---|
| 217 | to x |
---|
| 218 | Compute a F(x) = scale* e-((radius*x)**2/3).</p> |
---|
| 219 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 220 | <col class="field-name" /> |
---|
| 221 | <col class="field-body" /> |
---|
| 222 | <tbody valign="top"> |
---|
| 223 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
| 224 | <li><strong>x</strong> – a vector of q values</li> |
---|
| 225 | <li><strong>scale</strong> – the scale value</li> |
---|
| 226 | <li><strong>radius</strong> – the guinier radius value</li> |
---|
| 227 | </ul> |
---|
| 228 | </td> |
---|
| 229 | </tr> |
---|
| 230 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">F(x)</p> |
---|
| 231 | </td> |
---|
| 232 | </tr> |
---|
| 233 | </tbody> |
---|
| 234 | </table> |
---|
| 235 | </dd></dl> |
---|
| 236 | |
---|
| 237 | <dl class="method"> |
---|
| 238 | <dt id="sans.invariant.invariant.Guinier.evaluate_model"> |
---|
| 239 | <tt class="descname">evaluate_model</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Guinier.evaluate_model" title="Permalink to this definition">¶</a></dt> |
---|
| 240 | <dd><p>return F(x)= scale* e-((radius*x)**2/3)</p> |
---|
| 241 | </dd></dl> |
---|
| 242 | |
---|
| 243 | <dl class="method"> |
---|
| 244 | <dt id="sans.invariant.invariant.Guinier.evaluate_model_errors"> |
---|
| 245 | <tt class="descname">evaluate_model_errors</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Guinier.evaluate_model_errors" title="Permalink to this definition">¶</a></dt> |
---|
| 246 | <dd><p>Returns the error on I(q) for the given array of q-values</p> |
---|
| 247 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 248 | <col class="field-name" /> |
---|
| 249 | <col class="field-body" /> |
---|
| 250 | <tbody valign="top"> |
---|
| 251 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> – array of q-values</td> |
---|
| 252 | </tr> |
---|
| 253 | </tbody> |
---|
| 254 | </table> |
---|
| 255 | </dd></dl> |
---|
| 256 | |
---|
| 257 | <dl class="method"> |
---|
| 258 | <dt id="sans.invariant.invariant.Guinier.extract_model_parameters"> |
---|
| 259 | <tt class="descname">extract_model_parameters</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Guinier.extract_model_parameters" title="Permalink to this definition">¶</a></dt> |
---|
| 260 | <dd><p>assign new value to the scale and the radius</p> |
---|
| 261 | </dd></dl> |
---|
| 262 | |
---|
| 263 | <dl class="method"> |
---|
| 264 | <dt id="sans.invariant.invariant.Guinier.get_allowed_bins"> |
---|
| 265 | <tt class="descname">get_allowed_bins</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Guinier.get_allowed_bins" title="Permalink to this definition">¶</a></dt> |
---|
| 266 | <dd><p>Goes through the data points and returns a list of boolean values |
---|
| 267 | to indicate whether each points is allowed by the model or not.</p> |
---|
| 268 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 269 | <col class="field-name" /> |
---|
| 270 | <col class="field-body" /> |
---|
| 271 | <tbody valign="top"> |
---|
| 272 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – Data1D object</td> |
---|
| 273 | </tr> |
---|
| 274 | </tbody> |
---|
| 275 | </table> |
---|
| 276 | </dd></dl> |
---|
| 277 | |
---|
| 278 | <dl class="method"> |
---|
| 279 | <dt id="sans.invariant.invariant.Guinier.linearize_data"> |
---|
| 280 | <tt class="descname">linearize_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Guinier.linearize_data" title="Permalink to this definition">¶</a></dt> |
---|
| 281 | <dd><p>Linearize data so that a linear fit can be performed. |
---|
| 282 | Filter out the data that can’t be transformed.</p> |
---|
| 283 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 284 | <col class="field-name" /> |
---|
| 285 | <col class="field-body" /> |
---|
| 286 | <tbody valign="top"> |
---|
| 287 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – LoadData1D instance</td> |
---|
| 288 | </tr> |
---|
| 289 | </tbody> |
---|
| 290 | </table> |
---|
| 291 | </dd></dl> |
---|
| 292 | |
---|
| 293 | <dl class="method"> |
---|
| 294 | <dt id="sans.invariant.invariant.Guinier.linearize_q_value"> |
---|
| 295 | <tt class="descname">linearize_q_value</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Guinier.linearize_q_value" title="Permalink to this definition">¶</a></dt> |
---|
| 296 | <dd><p>Transform the input q-value for linearization</p> |
---|
| 297 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 298 | <col class="field-name" /> |
---|
| 299 | <col class="field-body" /> |
---|
| 300 | <tbody valign="top"> |
---|
| 301 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> – q-value</td> |
---|
| 302 | </tr> |
---|
| 303 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">q*q</td> |
---|
| 304 | </tr> |
---|
| 305 | </tbody> |
---|
| 306 | </table> |
---|
| 307 | </dd></dl> |
---|
| 308 | |
---|
| 309 | </dd></dl> |
---|
| 310 | |
---|
| 311 | <dl class="class"> |
---|
| 312 | <dt id="sans.invariant.invariant.InvariantCalculator"> |
---|
| 313 | <em class="property">class </em><tt class="descclassname">sans.invariant.invariant.</tt><tt class="descname">InvariantCalculator</tt><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator" title="Permalink to this definition">¶</a></dt> |
---|
| 314 | <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p> |
---|
| 315 | <p>Compute invariant if data is given. |
---|
| 316 | Can provide volume fraction and surface area if the user provides |
---|
| 317 | Porod constant and contrast values.</p> |
---|
| 318 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 319 | <col class="field-name" /> |
---|
| 320 | <col class="field-body" /> |
---|
| 321 | <tbody valign="top"> |
---|
| 322 | <tr class="field-odd field"><th class="field-name">Precondition :</th><td class="field-body">the user must send a data of type DataLoader.Data1D |
---|
| 323 | the user provide background and scale values.</td> |
---|
| 324 | </tr> |
---|
| 325 | <tr class="field-even field"><th class="field-name">Note :</th><td class="field-body">Some computations depends on each others.</td> |
---|
| 326 | </tr> |
---|
| 327 | </tbody> |
---|
| 328 | </table> |
---|
| 329 | <dl class="attribute"> |
---|
| 330 | <dt id="sans.invariant.invariant.InvariantCalculator.__class__"> |
---|
| 331 | <tt class="descname">__class__</tt><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__class__" title="Permalink to this definition">¶</a></dt> |
---|
| 332 | <dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p> |
---|
| 333 | </dd></dl> |
---|
| 334 | |
---|
| 335 | <dl class="attribute"> |
---|
| 336 | <dt id="sans.invariant.invariant.InvariantCalculator.__delattr__"> |
---|
| 337 | <tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__delattr__" title="Permalink to this definition">¶</a></dt> |
---|
| 338 | <dd><p>x.__delattr__(‘name’) <==> del x.name</p> |
---|
| 339 | </dd></dl> |
---|
| 340 | |
---|
| 341 | <dl class="attribute"> |
---|
| 342 | <dt id="sans.invariant.invariant.InvariantCalculator.__dict__"> |
---|
| 343 | <tt class="descname">__dict__</tt><em class="property"> = <dictproxy object at 0x0202B2F0></em><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__dict__" title="Permalink to this definition">¶</a></dt> |
---|
| 344 | <dd></dd></dl> |
---|
| 345 | |
---|
| 346 | <dl class="attribute"> |
---|
| 347 | <dt id="sans.invariant.invariant.InvariantCalculator.__getattribute__"> |
---|
| 348 | <tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__getattribute__" title="Permalink to this definition">¶</a></dt> |
---|
| 349 | <dd><p>x.__getattribute__(‘name’) <==> x.name</p> |
---|
| 350 | </dd></dl> |
---|
| 351 | |
---|
| 352 | <dl class="attribute"> |
---|
| 353 | <dt id="sans.invariant.invariant.InvariantCalculator.__hash__"> |
---|
| 354 | <tt class="descname">__hash__</tt><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__hash__" title="Permalink to this definition">¶</a></dt> |
---|
| 355 | <dd><p>x.__hash__() <==> hash(x)</p> |
---|
| 356 | </dd></dl> |
---|
| 357 | |
---|
| 358 | <dl class="method"> |
---|
| 359 | <dt id="sans.invariant.invariant.InvariantCalculator.__init__"> |
---|
| 360 | <tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__init__" title="Permalink to this definition">¶</a></dt> |
---|
| 361 | <dd><p>Initialize variables.</p> |
---|
| 362 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 363 | <col class="field-name" /> |
---|
| 364 | <col class="field-body" /> |
---|
| 365 | <tbody valign="top"> |
---|
| 366 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
| 367 | <li><strong>data</strong> – data must be of type DataLoader.Data1D</li> |
---|
| 368 | <li><strong>background</strong> – Background value. The data will be corrected |
---|
| 369 | before processing</li> |
---|
| 370 | <li><strong>scale</strong> – Scaling factor for I(q). The data will be corrected |
---|
| 371 | before processing</li> |
---|
| 372 | </ul> |
---|
| 373 | </td> |
---|
| 374 | </tr> |
---|
| 375 | </tbody> |
---|
| 376 | </table> |
---|
| 377 | </dd></dl> |
---|
| 378 | |
---|
| 379 | <dl class="attribute"> |
---|
| 380 | <dt id="sans.invariant.invariant.InvariantCalculator.__module__"> |
---|
| 381 | <tt class="descname">__module__</tt><em class="property"> = 'sans.invariant.invariant'</em><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__module__" title="Permalink to this definition">¶</a></dt> |
---|
| 382 | <dd></dd></dl> |
---|
| 383 | |
---|
| 384 | <dl class="staticmethod"> |
---|
| 385 | <dt id="sans.invariant.invariant.InvariantCalculator.__new__"> |
---|
| 386 | <em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> → a new object with type S, a subtype of T<a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__new__" title="Permalink to this definition">¶</a></dt> |
---|
| 387 | <dd></dd></dl> |
---|
| 388 | |
---|
| 389 | <dl class="method"> |
---|
| 390 | <dt id="sans.invariant.invariant.InvariantCalculator.__reduce__"> |
---|
| 391 | <tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__reduce__" title="Permalink to this definition">¶</a></dt> |
---|
| 392 | <dd><p>helper for pickle</p> |
---|
| 393 | </dd></dl> |
---|
| 394 | |
---|
| 395 | <dl class="method"> |
---|
| 396 | <dt id="sans.invariant.invariant.InvariantCalculator.__reduce_ex__"> |
---|
| 397 | <tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__reduce_ex__" title="Permalink to this definition">¶</a></dt> |
---|
| 398 | <dd><p>helper for pickle</p> |
---|
| 399 | </dd></dl> |
---|
| 400 | |
---|
| 401 | <dl class="attribute"> |
---|
| 402 | <dt id="sans.invariant.invariant.InvariantCalculator.__repr__"> |
---|
| 403 | <tt class="descname">__repr__</tt><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__repr__" title="Permalink to this definition">¶</a></dt> |
---|
| 404 | <dd><p>x.__repr__() <==> repr(x)</p> |
---|
| 405 | </dd></dl> |
---|
| 406 | |
---|
| 407 | <dl class="attribute"> |
---|
| 408 | <dt id="sans.invariant.invariant.InvariantCalculator.__setattr__"> |
---|
| 409 | <tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__setattr__" title="Permalink to this definition">¶</a></dt> |
---|
| 410 | <dd><p>x.__setattr__(‘name’, value) <==> x.name = value</p> |
---|
| 411 | </dd></dl> |
---|
| 412 | |
---|
| 413 | <dl class="attribute"> |
---|
| 414 | <dt id="sans.invariant.invariant.InvariantCalculator.__str__"> |
---|
| 415 | <tt class="descname">__str__</tt><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__str__" title="Permalink to this definition">¶</a></dt> |
---|
| 416 | <dd><p>x.__str__() <==> str(x)</p> |
---|
| 417 | </dd></dl> |
---|
| 418 | |
---|
| 419 | <dl class="attribute"> |
---|
| 420 | <dt id="sans.invariant.invariant.InvariantCalculator.__weakref__"> |
---|
| 421 | <tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.__weakref__" title="Permalink to this definition">¶</a></dt> |
---|
| 422 | <dd><p>list of weak references to the object (if defined)</p> |
---|
| 423 | </dd></dl> |
---|
| 424 | |
---|
| 425 | <dl class="method"> |
---|
| 426 | <dt id="sans.invariant.invariant.InvariantCalculator._fit"> |
---|
| 427 | <tt class="descname">_fit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator._fit" title="Permalink to this definition">¶</a></dt> |
---|
| 428 | <dd><p>fit data with function using |
---|
| 429 | data = self._get_data() |
---|
| 430 | fx = Functor(data , function) |
---|
| 431 | y = data.y |
---|
| 432 | slope, constant = linalg.lstsq(y,fx)</p> |
---|
| 433 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 434 | <col class="field-name" /> |
---|
| 435 | <col class="field-body" /> |
---|
| 436 | <tbody valign="top"> |
---|
| 437 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
| 438 | <li><strong>qmin</strong> – data first q value to consider during the fit</li> |
---|
| 439 | <li><strong>qmax</strong> – data last q value to consider during the fit</li> |
---|
| 440 | </ul> |
---|
| 441 | </td> |
---|
| 442 | </tr> |
---|
| 443 | </tbody> |
---|
| 444 | </table> |
---|
| 445 | <p>:param power : power value to consider for power-law |
---|
| 446 | :param function: the function to use during the fit</p> |
---|
| 447 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 448 | <col class="field-name" /> |
---|
| 449 | <col class="field-body" /> |
---|
| 450 | <tbody valign="top"> |
---|
| 451 | <tr class="field-odd field"><th class="field-name">Return a:</th><td class="field-body">the scale of the function</td> |
---|
| 452 | </tr> |
---|
| 453 | <tr class="field-even field"><th class="field-name">Return b:</th><td class="field-body">the other parameter of the function for guinier will be radius |
---|
| 454 | for power_law will be the power value</td> |
---|
| 455 | </tr> |
---|
| 456 | </tbody> |
---|
| 457 | </table> |
---|
| 458 | </dd></dl> |
---|
| 459 | |
---|
| 460 | <dl class="method"> |
---|
| 461 | <dt id="sans.invariant.invariant.InvariantCalculator._get_data"> |
---|
| 462 | <tt class="descname">_get_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator._get_data" title="Permalink to this definition">¶</a></dt> |
---|
| 463 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
| 464 | <col class="field-name" /> |
---|
| 465 | <col class="field-body" /> |
---|
| 466 | <tbody valign="top"> |
---|
| 467 | <tr class="field-odd field"><th class="field-name">Note :</th><td class="field-body">this function must be call before computing any type |
---|
| 468 | of invariant</td> |
---|
| 469 | </tr> |
---|
| 470 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">new data = self._scale <a href="#id1"><span class="problematic" id="id2">*</span></a>data - self._background</td> |
---|
| 471 | </tr> |
---|
| 472 | </tbody> |
---|
| 473 | </table> |
---|
| 474 | </dd></dl> |
---|
| 475 | |
---|
| 476 | <dl class="method"> |
---|
| 477 | <dt id="sans.invariant.invariant.InvariantCalculator._get_extrapolated_data"> |
---|
| 478 | <tt class="descname">_get_extrapolated_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator._get_extrapolated_data" title="Permalink to this definition">¶</a></dt> |
---|
| 479 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
| 480 | <col class="field-name" /> |
---|
| 481 | <col class="field-body" /> |
---|
| 482 | <tbody valign="top"> |
---|
| 483 | <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">extrapolate data create from data</td> |
---|
| 484 | </tr> |
---|
| 485 | </tbody> |
---|
| 486 | </table> |
---|
| 487 | </dd></dl> |
---|
| 488 | |
---|
| 489 | <dl class="method"> |
---|
| 490 | <dt id="sans.invariant.invariant.InvariantCalculator._get_qstar"> |
---|
| 491 | <tt class="descname">_get_qstar</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator._get_qstar" title="Permalink to this definition">¶</a></dt> |
---|
| 492 | <dd><p>Compute invariant for pinhole data. |
---|
| 493 | This invariant is given by:</p> |
---|
| 494 | <div class="highlight-python"><pre>q_star = x0**2 *y0 *dx0 +x1**2 *y1 *dx1 |
---|
| 495 | + ..+ xn**2 *yn *dxn for non smeared data |
---|
| 496 | |
---|
| 497 | q_star = dxl0 *x0 *y0 *dx0 +dxl1 *x1 *y1 *dx1 |
---|
| 498 | + ..+ dlxn *xn *yn *dxn for smeared data |
---|
| 499 | |
---|
| 500 | where n >= len(data.x)-1 |
---|
| 501 | dxl = slit height dQl |
---|
| 502 | dxi = 1/2*(xi+1 - xi) + (xi - xi-1) |
---|
| 503 | dx0 = (x1 - x0)/2 |
---|
| 504 | dxn = (xn - xn-1)/2</pre> |
---|
| 505 | </div> |
---|
| 506 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 507 | <col class="field-name" /> |
---|
| 508 | <col class="field-body" /> |
---|
| 509 | <tbody valign="top"> |
---|
| 510 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – the data to use to compute invariant.</td> |
---|
| 511 | </tr> |
---|
| 512 | <tr class="field-even field"><th class="field-name">Return q_star:</th><td class="field-body">invariant value for pinhole data. q_star > 0</td> |
---|
| 513 | </tr> |
---|
| 514 | </tbody> |
---|
| 515 | </table> |
---|
| 516 | </dd></dl> |
---|
| 517 | |
---|
| 518 | <dl class="method"> |
---|
| 519 | <dt id="sans.invariant.invariant.InvariantCalculator._get_qstar_uncertainty"> |
---|
| 520 | <tt class="descname">_get_qstar_uncertainty</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator._get_qstar_uncertainty" title="Permalink to this definition">¶</a></dt> |
---|
| 521 | <dd><p>Compute invariant uncertainty with with pinhole data. |
---|
| 522 | This uncertainty is given as follow:</p> |
---|
| 523 | <div class="highlight-python"><pre>dq_star = math.sqrt[(x0**2*(dy0)*dx0)**2 + |
---|
| 524 | (x1**2 *(dy1)*dx1)**2 + ..+ (xn**2 *(dyn)*dxn)**2 ]</pre> |
---|
| 525 | </div> |
---|
| 526 | <p>where n >= len(data.x)-1 |
---|
| 527 | dxi = 1/2*(xi+1 - xi) + (xi - xi-1) |
---|
| 528 | dx0 = (x1 - x0)/2 |
---|
| 529 | dxn = (xn - xn-1)/2 |
---|
| 530 | dyn: error on dy</p> |
---|
| 531 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 532 | <col class="field-name" /> |
---|
| 533 | <col class="field-body" /> |
---|
| 534 | <tbody valign="top"> |
---|
| 535 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – </td> |
---|
| 536 | </tr> |
---|
| 537 | <tr class="field-even field"><th class="field-name">Note :</th><td class="field-body">if data doesn’t contain dy assume dy= math.sqrt(data.y)</td> |
---|
| 538 | </tr> |
---|
| 539 | </tbody> |
---|
| 540 | </table> |
---|
| 541 | </dd></dl> |
---|
| 542 | |
---|
| 543 | <dl class="method"> |
---|
| 544 | <dt id="sans.invariant.invariant.InvariantCalculator.get_data"> |
---|
| 545 | <tt class="descname">get_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_data" title="Permalink to this definition">¶</a></dt> |
---|
| 546 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
| 547 | <col class="field-name" /> |
---|
| 548 | <col class="field-body" /> |
---|
| 549 | <tbody valign="top"> |
---|
| 550 | <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">self._data</td> |
---|
| 551 | </tr> |
---|
| 552 | </tbody> |
---|
| 553 | </table> |
---|
| 554 | </dd></dl> |
---|
| 555 | |
---|
| 556 | <dl class="method"> |
---|
| 557 | <dt id="sans.invariant.invariant.InvariantCalculator.get_extra_data_high"> |
---|
| 558 | <tt class="descname">get_extra_data_high</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_extra_data_high" title="Permalink to this definition">¶</a></dt> |
---|
| 559 | <dd><p>Returns the extrapolated data used for the high-Q invariant calculation. |
---|
| 560 | By default, the distribution will cover the data points used for the |
---|
| 561 | extrapolation. The number of overlap points is a parameter (npts_in). |
---|
| 562 | By default, the maximum q-value of the distribution will be Q_MAXIMUM, |
---|
| 563 | the maximum q-value used when extrapolating for the purpose of the |
---|
| 564 | invariant calculation.</p> |
---|
| 565 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 566 | <col class="field-name" /> |
---|
| 567 | <col class="field-body" /> |
---|
| 568 | <tbody valign="top"> |
---|
| 569 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
| 570 | <li><strong>npts_in</strong> – number of data points for which the |
---|
| 571 | extrapolated data overlap</li> |
---|
| 572 | <li><strong>q_end</strong> – is the maximum value to uses for extrapolated data</li> |
---|
| 573 | <li><strong>npts</strong> – the number of points in the extrapolated distribution</li> |
---|
| 574 | </ul> |
---|
| 575 | </td> |
---|
| 576 | </tr> |
---|
| 577 | </tbody> |
---|
| 578 | </table> |
---|
| 579 | </dd></dl> |
---|
| 580 | |
---|
| 581 | <dl class="method"> |
---|
| 582 | <dt id="sans.invariant.invariant.InvariantCalculator.get_extra_data_low"> |
---|
| 583 | <tt class="descname">get_extra_data_low</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_extra_data_low" title="Permalink to this definition">¶</a></dt> |
---|
| 584 | <dd><p>Returns the extrapolated data used for the loew-Q invariant calculation. |
---|
| 585 | By default, the distribution will cover the data points used for the |
---|
| 586 | extrapolation. The number of overlap points is a parameter (npts_in). |
---|
| 587 | By default, the maximum q-value of the distribution will be |
---|
| 588 | the minimum q-value used when extrapolating for the purpose of the |
---|
| 589 | invariant calculation.</p> |
---|
| 590 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 591 | <col class="field-name" /> |
---|
| 592 | <col class="field-body" /> |
---|
| 593 | <tbody valign="top"> |
---|
| 594 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
| 595 | <li><strong>npts_in</strong> – number of data points for which |
---|
| 596 | the extrapolated data overlap</li> |
---|
| 597 | <li><strong>q_start</strong> – is the minimum value to uses for extrapolated data</li> |
---|
| 598 | <li><strong>npts</strong> – the number of points in the extrapolated distribution</li> |
---|
| 599 | </ul> |
---|
| 600 | </td> |
---|
| 601 | </tr> |
---|
| 602 | </tbody> |
---|
| 603 | </table> |
---|
| 604 | </dd></dl> |
---|
| 605 | |
---|
| 606 | <dl class="method"> |
---|
| 607 | <dt id="sans.invariant.invariant.InvariantCalculator.get_extrapolation_power"> |
---|
| 608 | <tt class="descname">get_extrapolation_power</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_extrapolation_power" title="Permalink to this definition">¶</a></dt> |
---|
| 609 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
| 610 | <col class="field-name" /> |
---|
| 611 | <col class="field-body" /> |
---|
| 612 | <tbody valign="top"> |
---|
| 613 | <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the fitted power for power law function for a given</td> |
---|
| 614 | </tr> |
---|
| 615 | </tbody> |
---|
| 616 | </table> |
---|
| 617 | <p>extrapolation range</p> |
---|
| 618 | </dd></dl> |
---|
| 619 | |
---|
| 620 | <dl class="method"> |
---|
| 621 | <dt id="sans.invariant.invariant.InvariantCalculator.get_qstar"> |
---|
| 622 | <tt class="descname">get_qstar</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_qstar" title="Permalink to this definition">¶</a></dt> |
---|
| 623 | <dd><p>Compute the invariant of the local copy of data.</p> |
---|
| 624 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 625 | <col class="field-name" /> |
---|
| 626 | <col class="field-body" /> |
---|
| 627 | <tbody valign="top"> |
---|
| 628 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>extrapolation</strong> – string to apply optional extrapolation</td> |
---|
| 629 | </tr> |
---|
| 630 | <tr class="field-even field"><th class="field-name">Return q_star:</th><td class="field-body">invariant of the data within data’s q range</td> |
---|
| 631 | </tr> |
---|
| 632 | <tr class="field-odd field"><th class="field-name">Warning :</th><td class="field-body">When using setting data to Data1D , |
---|
| 633 | the user is responsible of |
---|
| 634 | checking that the scale and the background are |
---|
| 635 | properly apply to the data</td> |
---|
| 636 | </tr> |
---|
| 637 | </tbody> |
---|
| 638 | </table> |
---|
| 639 | </dd></dl> |
---|
| 640 | |
---|
| 641 | <dl class="method"> |
---|
| 642 | <dt id="sans.invariant.invariant.InvariantCalculator.get_qstar_high"> |
---|
| 643 | <tt class="descname">get_qstar_high</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_qstar_high" title="Permalink to this definition">¶</a></dt> |
---|
| 644 | <dd><p>Compute the invariant for extrapolated data at high q range.</p> |
---|
| 645 | <dl class="docutils"> |
---|
| 646 | <dt>Implementation:</dt> |
---|
| 647 | <dd>data = self._get_extra_data_high() |
---|
| 648 | return self._get_qstar()</dd> |
---|
| 649 | </dl> |
---|
| 650 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 651 | <col class="field-name" /> |
---|
| 652 | <col class="field-body" /> |
---|
| 653 | <tbody valign="top"> |
---|
| 654 | <tr class="field-odd field"><th class="field-name">Return q_star:</th><td class="field-body">the invariant for data extrapolated at high q.</td> |
---|
| 655 | </tr> |
---|
| 656 | </tbody> |
---|
| 657 | </table> |
---|
| 658 | </dd></dl> |
---|
| 659 | |
---|
| 660 | <dl class="method"> |
---|
| 661 | <dt id="sans.invariant.invariant.InvariantCalculator.get_qstar_low"> |
---|
| 662 | <tt class="descname">get_qstar_low</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_qstar_low" title="Permalink to this definition">¶</a></dt> |
---|
| 663 | <dd><p>Compute the invariant for extrapolated data at low q range.</p> |
---|
| 664 | <dl class="docutils"> |
---|
| 665 | <dt>Implementation:</dt> |
---|
| 666 | <dd>data = self._get_extra_data_low() |
---|
| 667 | return self._get_qstar()</dd> |
---|
| 668 | </dl> |
---|
| 669 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 670 | <col class="field-name" /> |
---|
| 671 | <col class="field-body" /> |
---|
| 672 | <tbody valign="top"> |
---|
| 673 | <tr class="field-odd field"><th class="field-name">Return q_star:</th><td class="field-body">the invariant for data extrapolated at low q.</td> |
---|
| 674 | </tr> |
---|
| 675 | </tbody> |
---|
| 676 | </table> |
---|
| 677 | </dd></dl> |
---|
| 678 | |
---|
| 679 | <dl class="method"> |
---|
| 680 | <dt id="sans.invariant.invariant.InvariantCalculator.get_qstar_with_error"> |
---|
| 681 | <tt class="descname">get_qstar_with_error</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_qstar_with_error" title="Permalink to this definition">¶</a></dt> |
---|
| 682 | <dd><p>Compute the invariant uncertainty. |
---|
| 683 | This uncertainty computation depends on whether or not the data is |
---|
| 684 | smeared.</p> |
---|
| 685 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 686 | <col class="field-name" /> |
---|
| 687 | <col class="field-body" /> |
---|
| 688 | <tbody valign="top"> |
---|
| 689 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>extrapolation</strong> – string to apply optional extrapolation</td> |
---|
| 690 | </tr> |
---|
| 691 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">invariant, the invariant uncertainty</td> |
---|
| 692 | </tr> |
---|
| 693 | </tbody> |
---|
| 694 | </table> |
---|
| 695 | </dd></dl> |
---|
| 696 | |
---|
| 697 | <dl class="method"> |
---|
| 698 | <dt id="sans.invariant.invariant.InvariantCalculator.get_surface"> |
---|
| 699 | <tt class="descname">get_surface</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_surface" title="Permalink to this definition">¶</a></dt> |
---|
| 700 | <dd><p>Compute the specific surface from the data.</p> |
---|
| 701 | <p>Implementation:</p> |
---|
| 702 | <div class="highlight-python"><pre>V = self.get_volume_fraction(contrast, extrapolation) |
---|
| 703 | |
---|
| 704 | Compute the surface given by: |
---|
| 705 | surface = (2*pi *V(1- V)*porod_const)/ q_star</pre> |
---|
| 706 | </div> |
---|
| 707 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 708 | <col class="field-name" /> |
---|
| 709 | <col class="field-body" /> |
---|
| 710 | <tbody valign="top"> |
---|
| 711 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
| 712 | <li><strong>contrast</strong> – contrast value to compute the volume</li> |
---|
| 713 | <li><strong>porod_const</strong> – Porod constant to compute the surface</li> |
---|
| 714 | <li><strong>extrapolation</strong> – string to apply optional extrapolation</li> |
---|
| 715 | </ul> |
---|
| 716 | </td> |
---|
| 717 | </tr> |
---|
| 718 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">specific surface</p> |
---|
| 719 | </td> |
---|
| 720 | </tr> |
---|
| 721 | </tbody> |
---|
| 722 | </table> |
---|
| 723 | </dd></dl> |
---|
| 724 | |
---|
| 725 | <dl class="method"> |
---|
| 726 | <dt id="sans.invariant.invariant.InvariantCalculator.get_surface_with_error"> |
---|
| 727 | <tt class="descname">get_surface_with_error</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_surface_with_error" title="Permalink to this definition">¶</a></dt> |
---|
| 728 | <dd><p>Compute uncertainty of the surface value as well as the surface value. |
---|
| 729 | The uncertainty is given as follow:</p> |
---|
| 730 | <div class="highlight-python"><pre>dS = porod_const *2*pi[( dV -2*V*dV)/q_star |
---|
| 731 | + dq_star(v-v**2) |
---|
| 732 | |
---|
| 733 | q_star: the invariant value |
---|
| 734 | dq_star: the invariant uncertainty |
---|
| 735 | V: the volume fraction value |
---|
| 736 | dV: the volume uncertainty</pre> |
---|
| 737 | </div> |
---|
| 738 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 739 | <col class="field-name" /> |
---|
| 740 | <col class="field-body" /> |
---|
| 741 | <tbody valign="top"> |
---|
| 742 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
| 743 | <li><strong>contrast</strong> – contrast value</li> |
---|
| 744 | <li><strong>porod_const</strong> – porod constant value</li> |
---|
| 745 | <li><strong>extrapolation</strong> – string to apply optional extrapolation</li> |
---|
| 746 | </ul> |
---|
| 747 | </td> |
---|
| 748 | </tr> |
---|
| 749 | <tr class="field-even field"><th class="field-name">Return S, dS:</th><td class="field-body"><p class="first last">the surface, with its uncertainty</p> |
---|
| 750 | </td> |
---|
| 751 | </tr> |
---|
| 752 | </tbody> |
---|
| 753 | </table> |
---|
| 754 | </dd></dl> |
---|
| 755 | |
---|
| 756 | <dl class="method"> |
---|
| 757 | <dt id="sans.invariant.invariant.InvariantCalculator.get_volume_fraction"> |
---|
| 758 | <tt class="descname">get_volume_fraction</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_volume_fraction" title="Permalink to this definition">¶</a></dt> |
---|
| 759 | <dd><p>Compute volume fraction is deduced as follow:</p> |
---|
| 760 | <div class="highlight-python"><pre>q_star = 2*(pi*contrast)**2* volume( 1- volume) |
---|
| 761 | for k = 10^(-8)*q_star/(2*(pi*|contrast|)**2) |
---|
| 762 | we get 2 values of volume: |
---|
| 763 | with 1 - 4 * k >= 0 |
---|
| 764 | volume1 = (1- sqrt(1- 4*k))/2 |
---|
| 765 | volume2 = (1+ sqrt(1- 4*k))/2 |
---|
| 766 | |
---|
| 767 | q_star: the invariant value included extrapolation is applied |
---|
| 768 | unit 1/A^(3)*1/cm |
---|
| 769 | q_star = self.get_qstar() |
---|
| 770 | |
---|
| 771 | the result returned will be 0 <= volume <= 1</pre> |
---|
| 772 | </div> |
---|
| 773 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 774 | <col class="field-name" /> |
---|
| 775 | <col class="field-body" /> |
---|
| 776 | <tbody valign="top"> |
---|
| 777 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
| 778 | <li><strong>contrast</strong> – contrast value provides by the user of type float. |
---|
| 779 | contrast unit is 1/A^(2)= 10^(16)cm^(2)</li> |
---|
| 780 | <li><strong>extrapolation</strong> – string to apply optional extrapolation</li> |
---|
| 781 | </ul> |
---|
| 782 | </td> |
---|
| 783 | </tr> |
---|
| 784 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">volume fraction</p> |
---|
| 785 | </td> |
---|
| 786 | </tr> |
---|
| 787 | <tr class="field-odd field"><th class="field-name">Note :</th><td class="field-body"><p class="first last">volume fraction must have no unit</p> |
---|
| 788 | </td> |
---|
| 789 | </tr> |
---|
| 790 | </tbody> |
---|
| 791 | </table> |
---|
| 792 | </dd></dl> |
---|
| 793 | |
---|
| 794 | <dl class="method"> |
---|
| 795 | <dt id="sans.invariant.invariant.InvariantCalculator.get_volume_fraction_with_error"> |
---|
| 796 | <tt class="descname">get_volume_fraction_with_error</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.get_volume_fraction_with_error" title="Permalink to this definition">¶</a></dt> |
---|
| 797 | <dd><p>Compute uncertainty on volume value as well as the volume fraction |
---|
| 798 | This uncertainty is given by the following equation:</p> |
---|
| 799 | <div class="highlight-python"><pre>dV = 0.5 * (4*k* dq_star) /(2* math.sqrt(1-k* q_star)) |
---|
| 800 | |
---|
| 801 | for k = 10^(-8)*q_star/(2*(pi*|contrast|)**2) |
---|
| 802 | |
---|
| 803 | q_star: the invariant value including extrapolated value if existing |
---|
| 804 | dq_star: the invariant uncertainty |
---|
| 805 | dV: the volume uncertainty</pre> |
---|
| 806 | </div> |
---|
| 807 | <p>The uncertainty will be set to -1 if it can’t be computed.</p> |
---|
| 808 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 809 | <col class="field-name" /> |
---|
| 810 | <col class="field-body" /> |
---|
| 811 | <tbody valign="top"> |
---|
| 812 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
| 813 | <li><strong>contrast</strong> – contrast value</li> |
---|
| 814 | <li><strong>extrapolation</strong> – string to apply optional extrapolation</li> |
---|
| 815 | </ul> |
---|
| 816 | </td> |
---|
| 817 | </tr> |
---|
| 818 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">V, dV = volume fraction, error on volume fraction</p> |
---|
| 819 | </td> |
---|
| 820 | </tr> |
---|
| 821 | </tbody> |
---|
| 822 | </table> |
---|
| 823 | </dd></dl> |
---|
| 824 | |
---|
| 825 | <dl class="method"> |
---|
| 826 | <dt id="sans.invariant.invariant.InvariantCalculator.set_extrapolation"> |
---|
| 827 | <tt class="descname">set_extrapolation</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.InvariantCalculator.set_extrapolation" title="Permalink to this definition">¶</a></dt> |
---|
| 828 | <dd><p>Set the extrapolation parameters for the high or low Q-range. |
---|
| 829 | Note that this does not turn extrapolation on or off.</p> |
---|
| 830 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 831 | <col class="field-name" /> |
---|
| 832 | <col class="field-body" /> |
---|
| 833 | <tbody valign="top"> |
---|
| 834 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
| 835 | <li><strong>range</strong> – a keyword set the type of extrapolation . type string</li> |
---|
| 836 | <li><strong>npts</strong> – the numbers of q points of data to consider |
---|
| 837 | for extrapolation</li> |
---|
| 838 | <li><strong>function</strong> – a keyword to select the function to use |
---|
| 839 | for extrapolation. |
---|
| 840 | of type string.</li> |
---|
| 841 | <li><strong>power</strong> – an power to apply power_low function</li> |
---|
| 842 | </ul> |
---|
| 843 | </td> |
---|
| 844 | </tr> |
---|
| 845 | </tbody> |
---|
| 846 | </table> |
---|
| 847 | </dd></dl> |
---|
| 848 | |
---|
| 849 | </dd></dl> |
---|
| 850 | |
---|
| 851 | <dl class="class"> |
---|
| 852 | <dt id="sans.invariant.invariant.PowerLaw"> |
---|
| 853 | <em class="property">class </em><tt class="descclassname">sans.invariant.invariant.</tt><tt class="descname">PowerLaw</tt><a class="headerlink" href="#sans.invariant.invariant.PowerLaw" title="Permalink to this definition">¶</a></dt> |
---|
| 854 | <dd><p>Bases: <a class="reference internal" href="#sans.invariant.invariant.Transform" title="sans.invariant.invariant.Transform"><tt class="xref py py-class docutils literal"><span class="pre">sans.invariant.invariant.Transform</span></tt></a></p> |
---|
| 855 | <p>class of type transform that perform operation related to power_law |
---|
| 856 | function</p> |
---|
| 857 | <dl class="attribute"> |
---|
| 858 | <dt id="sans.invariant.invariant.PowerLaw.__class__"> |
---|
| 859 | <tt class="descname">__class__</tt><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__class__" title="Permalink to this definition">¶</a></dt> |
---|
| 860 | <dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p> |
---|
| 861 | </dd></dl> |
---|
| 862 | |
---|
| 863 | <dl class="attribute"> |
---|
| 864 | <dt id="sans.invariant.invariant.PowerLaw.__delattr__"> |
---|
| 865 | <tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__delattr__" title="Permalink to this definition">¶</a></dt> |
---|
| 866 | <dd><p>x.__delattr__(‘name’) <==> del x.name</p> |
---|
| 867 | </dd></dl> |
---|
| 868 | |
---|
| 869 | <dl class="attribute"> |
---|
| 870 | <dt id="sans.invariant.invariant.PowerLaw.__dict__"> |
---|
| 871 | <tt class="descname">__dict__</tt><em class="property"> = <dictproxy object at 0x01FC3EF0></em><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__dict__" title="Permalink to this definition">¶</a></dt> |
---|
| 872 | <dd></dd></dl> |
---|
| 873 | |
---|
| 874 | <dl class="attribute"> |
---|
| 875 | <dt id="sans.invariant.invariant.PowerLaw.__getattribute__"> |
---|
| 876 | <tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__getattribute__" title="Permalink to this definition">¶</a></dt> |
---|
| 877 | <dd><p>x.__getattribute__(‘name’) <==> x.name</p> |
---|
| 878 | </dd></dl> |
---|
| 879 | |
---|
| 880 | <dl class="attribute"> |
---|
| 881 | <dt id="sans.invariant.invariant.PowerLaw.__hash__"> |
---|
| 882 | <tt class="descname">__hash__</tt><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__hash__" title="Permalink to this definition">¶</a></dt> |
---|
| 883 | <dd><p>x.__hash__() <==> hash(x)</p> |
---|
| 884 | </dd></dl> |
---|
| 885 | |
---|
| 886 | <dl class="method"> |
---|
| 887 | <dt id="sans.invariant.invariant.PowerLaw.__init__"> |
---|
| 888 | <tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__init__" title="Permalink to this definition">¶</a></dt> |
---|
| 889 | <dd></dd></dl> |
---|
| 890 | |
---|
| 891 | <dl class="attribute"> |
---|
| 892 | <dt id="sans.invariant.invariant.PowerLaw.__module__"> |
---|
| 893 | <tt class="descname">__module__</tt><em class="property"> = 'sans.invariant.invariant'</em><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__module__" title="Permalink to this definition">¶</a></dt> |
---|
| 894 | <dd></dd></dl> |
---|
| 895 | |
---|
| 896 | <dl class="staticmethod"> |
---|
| 897 | <dt id="sans.invariant.invariant.PowerLaw.__new__"> |
---|
| 898 | <em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> → a new object with type S, a subtype of T<a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__new__" title="Permalink to this definition">¶</a></dt> |
---|
| 899 | <dd></dd></dl> |
---|
| 900 | |
---|
| 901 | <dl class="method"> |
---|
| 902 | <dt id="sans.invariant.invariant.PowerLaw.__reduce__"> |
---|
| 903 | <tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__reduce__" title="Permalink to this definition">¶</a></dt> |
---|
| 904 | <dd><p>helper for pickle</p> |
---|
| 905 | </dd></dl> |
---|
| 906 | |
---|
| 907 | <dl class="method"> |
---|
| 908 | <dt id="sans.invariant.invariant.PowerLaw.__reduce_ex__"> |
---|
| 909 | <tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__reduce_ex__" title="Permalink to this definition">¶</a></dt> |
---|
| 910 | <dd><p>helper for pickle</p> |
---|
| 911 | </dd></dl> |
---|
| 912 | |
---|
| 913 | <dl class="attribute"> |
---|
| 914 | <dt id="sans.invariant.invariant.PowerLaw.__repr__"> |
---|
| 915 | <tt class="descname">__repr__</tt><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__repr__" title="Permalink to this definition">¶</a></dt> |
---|
| 916 | <dd><p>x.__repr__() <==> repr(x)</p> |
---|
| 917 | </dd></dl> |
---|
| 918 | |
---|
| 919 | <dl class="attribute"> |
---|
| 920 | <dt id="sans.invariant.invariant.PowerLaw.__setattr__"> |
---|
| 921 | <tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__setattr__" title="Permalink to this definition">¶</a></dt> |
---|
| 922 | <dd><p>x.__setattr__(‘name’, value) <==> x.name = value</p> |
---|
| 923 | </dd></dl> |
---|
| 924 | |
---|
| 925 | <dl class="attribute"> |
---|
| 926 | <dt id="sans.invariant.invariant.PowerLaw.__str__"> |
---|
| 927 | <tt class="descname">__str__</tt><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__str__" title="Permalink to this definition">¶</a></dt> |
---|
| 928 | <dd><p>x.__str__() <==> str(x)</p> |
---|
| 929 | </dd></dl> |
---|
| 930 | |
---|
| 931 | <dl class="attribute"> |
---|
| 932 | <dt id="sans.invariant.invariant.PowerLaw.__weakref__"> |
---|
| 933 | <tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.__weakref__" title="Permalink to this definition">¶</a></dt> |
---|
| 934 | <dd><p>list of weak references to the object (if defined)</p> |
---|
| 935 | </dd></dl> |
---|
| 936 | |
---|
| 937 | <dl class="method"> |
---|
| 938 | <dt id="sans.invariant.invariant.PowerLaw._power_law"> |
---|
| 939 | <tt class="descname">_power_law</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.PowerLaw._power_law" title="Permalink to this definition">¶</a></dt> |
---|
| 940 | <dd><dl class="docutils"> |
---|
| 941 | <dt>F(x) = scale* (x)^(-power)</dt> |
---|
| 942 | <dd>when power= 4. the model is porod |
---|
| 943 | else power_law</dd> |
---|
| 944 | <dt>The model has three parameters: ::</dt> |
---|
| 945 | <dd><ol class="first last arabic simple"> |
---|
| 946 | <li>x: a vector of q values</li> |
---|
| 947 | <li>power: power of the function</li> |
---|
| 948 | <li>scale : scale factor value</li> |
---|
| 949 | </ol> |
---|
| 950 | </dd> |
---|
| 951 | </dl> |
---|
| 952 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 953 | <col class="field-name" /> |
---|
| 954 | <col class="field-body" /> |
---|
| 955 | <tbody valign="top"> |
---|
| 956 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> – array</td> |
---|
| 957 | </tr> |
---|
| 958 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">F(x)</td> |
---|
| 959 | </tr> |
---|
| 960 | </tbody> |
---|
| 961 | </table> |
---|
| 962 | </dd></dl> |
---|
| 963 | |
---|
| 964 | <dl class="method"> |
---|
| 965 | <dt id="sans.invariant.invariant.PowerLaw.evaluate_model"> |
---|
| 966 | <tt class="descname">evaluate_model</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.evaluate_model" title="Permalink to this definition">¶</a></dt> |
---|
| 967 | <dd><p>given a scale and a radius transform x, y using a power_law |
---|
| 968 | function</p> |
---|
| 969 | </dd></dl> |
---|
| 970 | |
---|
| 971 | <dl class="method"> |
---|
| 972 | <dt id="sans.invariant.invariant.PowerLaw.evaluate_model_errors"> |
---|
| 973 | <tt class="descname">evaluate_model_errors</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.evaluate_model_errors" title="Permalink to this definition">¶</a></dt> |
---|
| 974 | <dd><p>Returns the error on I(q) for the given array of q-values |
---|
| 975 | :param x: array of q-values</p> |
---|
| 976 | </dd></dl> |
---|
| 977 | |
---|
| 978 | <dl class="method"> |
---|
| 979 | <dt id="sans.invariant.invariant.PowerLaw.extract_model_parameters"> |
---|
| 980 | <tt class="descname">extract_model_parameters</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.extract_model_parameters" title="Permalink to this definition">¶</a></dt> |
---|
| 981 | <dd><p>Assign new value to the scale and the power</p> |
---|
| 982 | </dd></dl> |
---|
| 983 | |
---|
| 984 | <dl class="method"> |
---|
| 985 | <dt id="sans.invariant.invariant.PowerLaw.get_allowed_bins"> |
---|
| 986 | <tt class="descname">get_allowed_bins</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.get_allowed_bins" title="Permalink to this definition">¶</a></dt> |
---|
| 987 | <dd><p>Goes through the data points and returns a list of boolean values |
---|
| 988 | to indicate whether each points is allowed by the model or not.</p> |
---|
| 989 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 990 | <col class="field-name" /> |
---|
| 991 | <col class="field-body" /> |
---|
| 992 | <tbody valign="top"> |
---|
| 993 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – Data1D object</td> |
---|
| 994 | </tr> |
---|
| 995 | </tbody> |
---|
| 996 | </table> |
---|
| 997 | </dd></dl> |
---|
| 998 | |
---|
| 999 | <dl class="method"> |
---|
| 1000 | <dt id="sans.invariant.invariant.PowerLaw.linearize_data"> |
---|
| 1001 | <tt class="descname">linearize_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.linearize_data" title="Permalink to this definition">¶</a></dt> |
---|
| 1002 | <dd><p>Linearize data so that a linear fit can be performed. |
---|
| 1003 | Filter out the data that can’t be transformed.</p> |
---|
| 1004 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 1005 | <col class="field-name" /> |
---|
| 1006 | <col class="field-body" /> |
---|
| 1007 | <tbody valign="top"> |
---|
| 1008 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – LoadData1D instance</td> |
---|
| 1009 | </tr> |
---|
| 1010 | </tbody> |
---|
| 1011 | </table> |
---|
| 1012 | </dd></dl> |
---|
| 1013 | |
---|
| 1014 | <dl class="method"> |
---|
| 1015 | <dt id="sans.invariant.invariant.PowerLaw.linearize_q_value"> |
---|
| 1016 | <tt class="descname">linearize_q_value</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.PowerLaw.linearize_q_value" title="Permalink to this definition">¶</a></dt> |
---|
| 1017 | <dd><p>Transform the input q-value for linearization</p> |
---|
| 1018 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 1019 | <col class="field-name" /> |
---|
| 1020 | <col class="field-body" /> |
---|
| 1021 | <tbody valign="top"> |
---|
| 1022 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> – q-value</td> |
---|
| 1023 | </tr> |
---|
| 1024 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">log(q)</td> |
---|
| 1025 | </tr> |
---|
| 1026 | </tbody> |
---|
| 1027 | </table> |
---|
| 1028 | </dd></dl> |
---|
| 1029 | |
---|
| 1030 | </dd></dl> |
---|
| 1031 | |
---|
| 1032 | <dl class="class"> |
---|
| 1033 | <dt id="sans.invariant.invariant.Transform"> |
---|
| 1034 | <em class="property">class </em><tt class="descclassname">sans.invariant.invariant.</tt><tt class="descname">Transform</tt><a class="headerlink" href="#sans.invariant.invariant.Transform" title="Permalink to this definition">¶</a></dt> |
---|
| 1035 | <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p> |
---|
| 1036 | <p>Define interface that need to compute a function or an inverse |
---|
| 1037 | function given some x, y</p> |
---|
| 1038 | <dl class="attribute"> |
---|
| 1039 | <dt id="sans.invariant.invariant.Transform.__class__"> |
---|
| 1040 | <tt class="descname">__class__</tt><a class="headerlink" href="#sans.invariant.invariant.Transform.__class__" title="Permalink to this definition">¶</a></dt> |
---|
| 1041 | <dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p> |
---|
| 1042 | </dd></dl> |
---|
| 1043 | |
---|
| 1044 | <dl class="attribute"> |
---|
| 1045 | <dt id="sans.invariant.invariant.Transform.__delattr__"> |
---|
| 1046 | <tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.invariant.invariant.Transform.__delattr__" title="Permalink to this definition">¶</a></dt> |
---|
| 1047 | <dd><p>x.__delattr__(‘name’) <==> del x.name</p> |
---|
| 1048 | </dd></dl> |
---|
| 1049 | |
---|
| 1050 | <dl class="attribute"> |
---|
| 1051 | <dt id="sans.invariant.invariant.Transform.__dict__"> |
---|
| 1052 | <tt class="descname">__dict__</tt><em class="property"> = <dictproxy object at 0x02041A70></em><a class="headerlink" href="#sans.invariant.invariant.Transform.__dict__" title="Permalink to this definition">¶</a></dt> |
---|
| 1053 | <dd></dd></dl> |
---|
| 1054 | |
---|
| 1055 | <dl class="attribute"> |
---|
| 1056 | <dt id="sans.invariant.invariant.Transform.__getattribute__"> |
---|
| 1057 | <tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.invariant.invariant.Transform.__getattribute__" title="Permalink to this definition">¶</a></dt> |
---|
| 1058 | <dd><p>x.__getattribute__(‘name’) <==> x.name</p> |
---|
| 1059 | </dd></dl> |
---|
| 1060 | |
---|
| 1061 | <dl class="attribute"> |
---|
| 1062 | <dt id="sans.invariant.invariant.Transform.__hash__"> |
---|
| 1063 | <tt class="descname">__hash__</tt><a class="headerlink" href="#sans.invariant.invariant.Transform.__hash__" title="Permalink to this definition">¶</a></dt> |
---|
| 1064 | <dd><p>x.__hash__() <==> hash(x)</p> |
---|
| 1065 | </dd></dl> |
---|
| 1066 | |
---|
| 1067 | <dl class="attribute"> |
---|
| 1068 | <dt id="sans.invariant.invariant.Transform.__init__"> |
---|
| 1069 | <tt class="descname">__init__</tt><a class="headerlink" href="#sans.invariant.invariant.Transform.__init__" title="Permalink to this definition">¶</a></dt> |
---|
| 1070 | <dd><p>x.__init__(...) initializes x; see x.__class__.__doc__ for signature</p> |
---|
| 1071 | </dd></dl> |
---|
| 1072 | |
---|
| 1073 | <dl class="attribute"> |
---|
| 1074 | <dt id="sans.invariant.invariant.Transform.__module__"> |
---|
| 1075 | <tt class="descname">__module__</tt><em class="property"> = 'sans.invariant.invariant'</em><a class="headerlink" href="#sans.invariant.invariant.Transform.__module__" title="Permalink to this definition">¶</a></dt> |
---|
| 1076 | <dd></dd></dl> |
---|
| 1077 | |
---|
| 1078 | <dl class="staticmethod"> |
---|
| 1079 | <dt id="sans.invariant.invariant.Transform.__new__"> |
---|
| 1080 | <em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> → a new object with type S, a subtype of T<a class="headerlink" href="#sans.invariant.invariant.Transform.__new__" title="Permalink to this definition">¶</a></dt> |
---|
| 1081 | <dd></dd></dl> |
---|
| 1082 | |
---|
| 1083 | <dl class="method"> |
---|
| 1084 | <dt id="sans.invariant.invariant.Transform.__reduce__"> |
---|
| 1085 | <tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Transform.__reduce__" title="Permalink to this definition">¶</a></dt> |
---|
| 1086 | <dd><p>helper for pickle</p> |
---|
| 1087 | </dd></dl> |
---|
| 1088 | |
---|
| 1089 | <dl class="method"> |
---|
| 1090 | <dt id="sans.invariant.invariant.Transform.__reduce_ex__"> |
---|
| 1091 | <tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Transform.__reduce_ex__" title="Permalink to this definition">¶</a></dt> |
---|
| 1092 | <dd><p>helper for pickle</p> |
---|
| 1093 | </dd></dl> |
---|
| 1094 | |
---|
| 1095 | <dl class="attribute"> |
---|
| 1096 | <dt id="sans.invariant.invariant.Transform.__repr__"> |
---|
| 1097 | <tt class="descname">__repr__</tt><a class="headerlink" href="#sans.invariant.invariant.Transform.__repr__" title="Permalink to this definition">¶</a></dt> |
---|
| 1098 | <dd><p>x.__repr__() <==> repr(x)</p> |
---|
| 1099 | </dd></dl> |
---|
| 1100 | |
---|
| 1101 | <dl class="attribute"> |
---|
| 1102 | <dt id="sans.invariant.invariant.Transform.__setattr__"> |
---|
| 1103 | <tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.invariant.invariant.Transform.__setattr__" title="Permalink to this definition">¶</a></dt> |
---|
| 1104 | <dd><p>x.__setattr__(‘name’, value) <==> x.name = value</p> |
---|
| 1105 | </dd></dl> |
---|
| 1106 | |
---|
| 1107 | <dl class="attribute"> |
---|
| 1108 | <dt id="sans.invariant.invariant.Transform.__str__"> |
---|
| 1109 | <tt class="descname">__str__</tt><a class="headerlink" href="#sans.invariant.invariant.Transform.__str__" title="Permalink to this definition">¶</a></dt> |
---|
| 1110 | <dd><p>x.__str__() <==> str(x)</p> |
---|
| 1111 | </dd></dl> |
---|
| 1112 | |
---|
| 1113 | <dl class="attribute"> |
---|
| 1114 | <dt id="sans.invariant.invariant.Transform.__weakref__"> |
---|
| 1115 | <tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.invariant.invariant.Transform.__weakref__" title="Permalink to this definition">¶</a></dt> |
---|
| 1116 | <dd><p>list of weak references to the object (if defined)</p> |
---|
| 1117 | </dd></dl> |
---|
| 1118 | |
---|
| 1119 | <dl class="method"> |
---|
| 1120 | <dt id="sans.invariant.invariant.Transform.evaluate_model"> |
---|
| 1121 | <tt class="descname">evaluate_model</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Transform.evaluate_model" title="Permalink to this definition">¶</a></dt> |
---|
| 1122 | <dd><p>Returns an array f(x) values where f is the Transform function.</p> |
---|
| 1123 | </dd></dl> |
---|
| 1124 | |
---|
| 1125 | <dl class="method"> |
---|
| 1126 | <dt id="sans.invariant.invariant.Transform.evaluate_model_errors"> |
---|
| 1127 | <tt class="descname">evaluate_model_errors</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Transform.evaluate_model_errors" title="Permalink to this definition">¶</a></dt> |
---|
| 1128 | <dd><p>Returns an array of I(q) errors</p> |
---|
| 1129 | </dd></dl> |
---|
| 1130 | |
---|
| 1131 | <dl class="method"> |
---|
| 1132 | <dt id="sans.invariant.invariant.Transform.extract_model_parameters"> |
---|
| 1133 | <tt class="descname">extract_model_parameters</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Transform.extract_model_parameters" title="Permalink to this definition">¶</a></dt> |
---|
| 1134 | <dd><p>set private member</p> |
---|
| 1135 | </dd></dl> |
---|
| 1136 | |
---|
| 1137 | <dl class="method"> |
---|
| 1138 | <dt id="sans.invariant.invariant.Transform.get_allowed_bins"> |
---|
| 1139 | <tt class="descname">get_allowed_bins</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Transform.get_allowed_bins" title="Permalink to this definition">¶</a></dt> |
---|
| 1140 | <dd><p>Goes through the data points and returns a list of boolean values |
---|
| 1141 | to indicate whether each points is allowed by the model or not.</p> |
---|
| 1142 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 1143 | <col class="field-name" /> |
---|
| 1144 | <col class="field-body" /> |
---|
| 1145 | <tbody valign="top"> |
---|
| 1146 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – Data1D object</td> |
---|
| 1147 | </tr> |
---|
| 1148 | </tbody> |
---|
| 1149 | </table> |
---|
| 1150 | </dd></dl> |
---|
| 1151 | |
---|
| 1152 | <dl class="method"> |
---|
| 1153 | <dt id="sans.invariant.invariant.Transform.linearize_data"> |
---|
| 1154 | <tt class="descname">linearize_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Transform.linearize_data" title="Permalink to this definition">¶</a></dt> |
---|
| 1155 | <dd><p>Linearize data so that a linear fit can be performed. |
---|
| 1156 | Filter out the data that can’t be transformed.</p> |
---|
| 1157 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 1158 | <col class="field-name" /> |
---|
| 1159 | <col class="field-body" /> |
---|
| 1160 | <tbody valign="top"> |
---|
| 1161 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> – LoadData1D instance</td> |
---|
| 1162 | </tr> |
---|
| 1163 | </tbody> |
---|
| 1164 | </table> |
---|
| 1165 | </dd></dl> |
---|
| 1166 | |
---|
| 1167 | <dl class="method"> |
---|
| 1168 | <dt id="sans.invariant.invariant.Transform.linearize_q_value"> |
---|
| 1169 | <tt class="descname">linearize_q_value</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.invariant.invariant.Transform.linearize_q_value" title="Permalink to this definition">¶</a></dt> |
---|
| 1170 | <dd><p>Transform the input q-value for linearization</p> |
---|
| 1171 | </dd></dl> |
---|
| 1172 | |
---|
| 1173 | </dd></dl> |
---|
| 1174 | |
---|
| 1175 | </div> |
---|
| 1176 | </div> |
---|
| 1177 | |
---|
| 1178 | |
---|
| 1179 | </div> |
---|
| 1180 | </div> |
---|
| 1181 | </div> |
---|
| 1182 | <div class="sphinxsidebar"> |
---|
| 1183 | <div class="sphinxsidebarwrapper"> |
---|
| 1184 | <h3><a href="../index.html">Table Of Contents</a></h3> |
---|
| 1185 | <ul> |
---|
| 1186 | <li><a class="reference internal" href="#">invariant</a><ul> |
---|
| 1187 | <li><a class="reference internal" href="#sans-invariant-invariant"><tt class="docutils literal"><span class="pre">sans.invariant.invariant</span></tt></a></li> |
---|
| 1188 | </ul> |
---|
| 1189 | </li> |
---|
| 1190 | </ul> |
---|
| 1191 | |
---|
| 1192 | <h4>Previous topic</h4> |
---|
| 1193 | <p class="topless"><a href="index.html" |
---|
| 1194 | title="previous chapter">Reference</a></p> |
---|
| 1195 | <h4>Next topic</h4> |
---|
| 1196 | <p class="topless"><a href="invariant_mapper.html" |
---|
| 1197 | title="next chapter">invariant_mapper</a></p> |
---|
| 1198 | <h3>This Page</h3> |
---|
| 1199 | <ul class="this-page-menu"> |
---|
| 1200 | <li><a href="../_sources/api/invariant.txt" |
---|
| 1201 | rel="nofollow">Show Source</a></li> |
---|
| 1202 | </ul> |
---|
| 1203 | <div id="searchbox" style="display: none"> |
---|
| 1204 | <h3>Quick search</h3> |
---|
| 1205 | <form class="search" action="../search.html" method="get"> |
---|
| 1206 | <input type="text" name="q" /> |
---|
| 1207 | <input type="submit" value="Go" /> |
---|
| 1208 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
| 1209 | <input type="hidden" name="area" value="default" /> |
---|
| 1210 | </form> |
---|
| 1211 | <p class="searchtip" style="font-size: 90%"> |
---|
| 1212 | Enter search terms or a module, class or function name. |
---|
| 1213 | </p> |
---|
| 1214 | </div> |
---|
| 1215 | <script type="text/javascript">$('#searchbox').show(0);</script> |
---|
| 1216 | </div> |
---|
| 1217 | </div> |
---|
| 1218 | <div class="clearer"></div> |
---|
| 1219 | </div> |
---|
| 1220 | <div class="related"> |
---|
| 1221 | <h3>Navigation</h3> |
---|
| 1222 | <ul> |
---|
| 1223 | <li class="right" style="margin-right: 10px"> |
---|
| 1224 | <a href="../genindex.html" title="General Index" |
---|
| 1225 | >index</a></li> |
---|
| 1226 | <li class="right" > |
---|
| 1227 | <a href="../py-modindex.html" title="Python Module Index" |
---|
| 1228 | >modules</a> |</li> |
---|
| 1229 | <li class="right" > |
---|
| 1230 | <a href="invariant_mapper.html" title="invariant_mapper" |
---|
| 1231 | >next</a> |</li> |
---|
| 1232 | <li class="right" > |
---|
| 1233 | <a href="index.html" title="Reference" |
---|
| 1234 | >previous</a> |</li> |
---|
| 1235 | <li><a href="../index.html">invariant 0.1.0 documentation</a> »</li> |
---|
| 1236 | <li><a href="index.html" >Reference</a> »</li> |
---|
| 1237 | </ul> |
---|
| 1238 | </div> |
---|
| 1239 | <div class="footer"> |
---|
| 1240 | © Copyright 2010, sans group. |
---|
| 1241 | Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1. |
---|
| 1242 | </div> |
---|
| 1243 | </body> |
---|
| 1244 | </html> |
---|