source: sasview/dev/api/sas.invariant.html @ a462c6a

gh-pages
Last change on this file since a462c6a was a462c6a, checked in by ajj, 9 years ago

Rebuild to fix index and modules docs

  • Property mode set to 100644
File size: 36.3 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4
5<html xmlns="http://www.w3.org/1999/xhtml">
6  <head>
7    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8   
9    <title>sas.invariant package &mdash; SasView 3.0.0 documentation</title>
10   
11    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
12    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
13   
14    <script type="text/javascript">
15      var DOCUMENTATION_OPTIONS = {
16        URL_ROOT:    '../../',
17        VERSION:     '3.0.0',
18        COLLAPSE_INDEX: false,
19        FILE_SUFFIX: '.html',
20        HAS_SOURCE:  true
21      };
22    </script>
23    <script type="text/javascript" src="../../_static/jquery.js"></script>
24    <script type="text/javascript" src="../../_static/underscore.js"></script>
25    <script type="text/javascript" src="../../_static/doctools.js"></script>
26    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
27    <link rel="top" title="SasView 3.0.0 documentation" href="../../index.html" />
28    <link rel="up" title="sas package" href="sas.html" />
29    <link rel="next" title="sas.models package" href="sas.models.html" />
30    <link rel="prev" title="sas.guiframe.local_perspectives.plotting package" href="sas.guiframe.local_perspectives.plotting.html" /> 
31  </head>
32  <body>
33    <div class="related">
34      <h3>Navigation</h3>
35      <ul>
36        <li class="right" style="margin-right: 10px">
37          <a href="../../genindex.html" title="General Index"
38             accesskey="I">index</a></li>
39        <li class="right" >
40          <a href="../../py-modindex.html" title="Python Module Index"
41             >modules</a> |</li>
42        <li class="right" >
43          <a href="sas.models.html" title="sas.models package"
44             accesskey="N">next</a> |</li>
45        <li class="right" >
46          <a href="sas.guiframe.local_perspectives.plotting.html" title="sas.guiframe.local_perspectives.plotting package"
47             accesskey="P">previous</a> |</li>
48        <li><a href="../../index.html">SasView 3.0.0 documentation</a> &raquo;</li>
49          <li><a href="../dev.html" >Developer Documentation</a> &raquo;</li>
50          <li><a href="modules.html" >lib.macosx-10.5-x86_64-2.7</a> &raquo;</li>
51          <li><a href="sas.html" accesskey="U">sas package</a> &raquo;</li> 
52      </ul>
53    </div> 
54
55    <div class="document">
56      <div class="documentwrapper">
57        <div class="bodywrapper">
58          <div class="body">
59           
60  <div class="section" id="sas-invariant-package">
61<h1>sas.invariant package</h1>
62<div class="section" id="submodules">
63<h2>Submodules</h2>
64</div>
65<div class="section" id="module-sas.invariant.invariant">
66<span id="sas-invariant-invariant-module"></span><h2>sas.invariant.invariant module</h2>
67<p>This module implements invariant and its related computations.</p>
68<table class="docutils field-list" frame="void" rules="none">
69<col class="field-name" />
70<col class="field-body" />
71<tbody valign="top">
72<tr class="field-odd field"><th class="field-name">author:</th><td class="field-body">Gervaise B. Alina/UTK</td>
73</tr>
74<tr class="field-even field"><th class="field-name">author:</th><td class="field-body">Mathieu Doucet/UTK</td>
75</tr>
76<tr class="field-odd field"><th class="field-name">author:</th><td class="field-body">Jae Cho/UTK</td>
77</tr>
78</tbody>
79</table>
80<dl class="class">
81<dt id="sas.invariant.invariant.Extrapolator">
82<em class="property">class </em><tt class="descclassname">sas.invariant.invariant.</tt><tt class="descname">Extrapolator</tt><big>(</big><em>data</em>, <em>model=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Extrapolator"><span class="viewcode-link">[source]</span></a></dt>
83<dd><p>Extrapolate I(q) distribution using a given model</p>
84<dl class="method">
85<dt id="sas.invariant.invariant.Extrapolator.fit">
86<tt class="descname">fit</tt><big>(</big><em>power=None</em>, <em>qmin=None</em>, <em>qmax=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Extrapolator.fit"><span class="viewcode-link">[source]</span></a></dt>
87<dd><p>Fit data for y = ax + b  return a and b</p>
88<table class="docutils field-list" frame="void" rules="none">
89<col class="field-name" />
90<col class="field-body" />
91<tbody valign="top">
92<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
93<li><strong>power</strong> &#8211; a fixed, otherwise None</li>
94<li><strong>qmin</strong> &#8211; Minimum Q-value</li>
95<li><strong>qmax</strong> &#8211; Maximum Q-value</li>
96</ul>
97</td>
98</tr>
99</tbody>
100</table>
101</dd></dl>
102
103</dd></dl>
104
105<dl class="class">
106<dt id="sas.invariant.invariant.Guinier">
107<em class="property">class </em><tt class="descclassname">sas.invariant.invariant.</tt><tt class="descname">Guinier</tt><big>(</big><em>scale=1</em>, <em>radius=60</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Guinier"><span class="viewcode-link">[source]</span></a></dt>
108<dd><p>Bases: <a class="reference internal" href="#sas.invariant.invariant.Transform" title="sas.invariant.invariant.Transform"><tt class="xref py py-class docutils literal"><span class="pre">sas.invariant.invariant.Transform</span></tt></a></p>
109<p>class of type Transform that performs operations related to guinier
110function</p>
111<dl class="method">
112<dt id="sas.invariant.invariant.Guinier.evaluate_model">
113<tt class="descname">evaluate_model</tt><big>(</big><em>x</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Guinier.evaluate_model"><span class="viewcode-link">[source]</span></a></dt>
114<dd><p>return F(x)= scale* e-((radius*x)**2/3)</p>
115</dd></dl>
116
117<dl class="method">
118<dt id="sas.invariant.invariant.Guinier.evaluate_model_errors">
119<tt class="descname">evaluate_model_errors</tt><big>(</big><em>x</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Guinier.evaluate_model_errors"><span class="viewcode-link">[source]</span></a></dt>
120<dd><p>Returns the error on I(q) for the given array of q-values</p>
121<table class="docutils field-list" frame="void" rules="none">
122<col class="field-name" />
123<col class="field-body" />
124<tbody valign="top">
125<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> &#8211; array of q-values</td>
126</tr>
127</tbody>
128</table>
129</dd></dl>
130
131<dl class="method">
132<dt id="sas.invariant.invariant.Guinier.extract_model_parameters">
133<tt class="descname">extract_model_parameters</tt><big>(</big><em>constant</em>, <em>slope</em>, <em>dconstant=0</em>, <em>dslope=0</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Guinier.extract_model_parameters"><span class="viewcode-link">[source]</span></a></dt>
134<dd><p>assign new value to the scale and the radius</p>
135</dd></dl>
136
137<dl class="method">
138<dt id="sas.invariant.invariant.Guinier.linearize_q_value">
139<tt class="descname">linearize_q_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Guinier.linearize_q_value"><span class="viewcode-link">[source]</span></a></dt>
140<dd><p>Transform the input q-value for linearization</p>
141<table class="docutils field-list" frame="void" rules="none">
142<col class="field-name" />
143<col class="field-body" />
144<tbody valign="top">
145<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> &#8211; q-value</td>
146</tr>
147<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">q*q</td>
148</tr>
149</tbody>
150</table>
151</dd></dl>
152
153</dd></dl>
154
155<dl class="class">
156<dt id="sas.invariant.invariant.InvariantCalculator">
157<em class="property">class </em><tt class="descclassname">sas.invariant.invariant.</tt><tt class="descname">InvariantCalculator</tt><big>(</big><em>data</em>, <em>background=0</em>, <em>scale=1</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator"><span class="viewcode-link">[source]</span></a></dt>
158<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
159<p>Compute invariant if data is given.
160Can provide volume fraction and surface area if the user provides
161Porod constant  and contrast values.</p>
162<table class="docutils field-list" frame="void" rules="none">
163<col class="field-name" />
164<col class="field-body" />
165<tbody valign="top">
166<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
167the user provide background and scale values.</td>
168</tr>
169<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">Some computations depends on each others.</td>
170</tr>
171</tbody>
172</table>
173<dl class="method">
174<dt id="sas.invariant.invariant.InvariantCalculator.get_data">
175<tt class="descname">get_data</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_data"><span class="viewcode-link">[source]</span></a></dt>
176<dd><table class="docutils field-list" frame="void" rules="none">
177<col class="field-name" />
178<col class="field-body" />
179<tbody valign="top">
180<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">self._data</td>
181</tr>
182</tbody>
183</table>
184</dd></dl>
185
186<dl class="method">
187<dt id="sas.invariant.invariant.InvariantCalculator.get_extra_data_high">
188<tt class="descname">get_extra_data_high</tt><big>(</big><em>npts_in=None</em>, <em>q_end=10</em>, <em>npts=20</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_extra_data_high"><span class="viewcode-link">[source]</span></a></dt>
189<dd><p>Returns the extrapolated data used for the high-Q invariant calculation.
190By default, the distribution will cover the data points used for the
191extrapolation. The number of overlap points is a parameter (npts_in).
192By default, the maximum q-value of the distribution will be Q_MAXIMUM,
193the maximum q-value used when extrapolating for the purpose of the
194invariant calculation.</p>
195<table class="docutils field-list" frame="void" rules="none">
196<col class="field-name" />
197<col class="field-body" />
198<tbody valign="top">
199<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
200<li><strong>npts_in</strong> &#8211; number of data points for which the
201extrapolated data overlap</li>
202<li><strong>q_end</strong> &#8211; is the maximum value to uses for extrapolated data</li>
203<li><strong>npts</strong> &#8211; the number of points in the extrapolated distribution</li>
204</ul>
205</td>
206</tr>
207</tbody>
208</table>
209</dd></dl>
210
211<dl class="method">
212<dt id="sas.invariant.invariant.InvariantCalculator.get_extra_data_low">
213<tt class="descname">get_extra_data_low</tt><big>(</big><em>npts_in=None</em>, <em>q_start=None</em>, <em>npts=20</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_extra_data_low"><span class="viewcode-link">[source]</span></a></dt>
214<dd><p>Returns the extrapolated data used for the loew-Q invariant calculation.
215By default, the distribution will cover the data points used for the
216extrapolation. The number of overlap points is a parameter (npts_in).
217By default, the maximum q-value of the distribution will be 
218the minimum q-value used when extrapolating for the purpose of the
219invariant calculation.</p>
220<table class="docutils field-list" frame="void" rules="none">
221<col class="field-name" />
222<col class="field-body" />
223<tbody valign="top">
224<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
225<li><strong>npts_in</strong> &#8211; number of data points for which
226the extrapolated data overlap</li>
227<li><strong>q_start</strong> &#8211; is the minimum value to uses for extrapolated data</li>
228<li><strong>npts</strong> &#8211; the number of points in the extrapolated distribution</li>
229</ul>
230</td>
231</tr>
232</tbody>
233</table>
234</dd></dl>
235
236<dl class="method">
237<dt id="sas.invariant.invariant.InvariantCalculator.get_extrapolation_power">
238<tt class="descname">get_extrapolation_power</tt><big>(</big><em>range='high'</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_extrapolation_power"><span class="viewcode-link">[source]</span></a></dt>
239<dd><table class="docutils field-list" frame="void" rules="none">
240<col class="field-name" />
241<col class="field-body" />
242<tbody valign="top">
243<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
244extrapolation range</td>
245</tr>
246</tbody>
247</table>
248</dd></dl>
249
250<dl class="method">
251<dt id="sas.invariant.invariant.InvariantCalculator.get_qstar">
252<tt class="descname">get_qstar</tt><big>(</big><em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_qstar"><span class="viewcode-link">[source]</span></a></dt>
253<dd><p>Compute the invariant of the local copy of data.</p>
254<table class="docutils field-list" frame="void" rules="none">
255<col class="field-name" />
256<col class="field-body" />
257<tbody valign="top">
258<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>extrapolation</strong> &#8211; string to apply optional extrapolation</td>
259</tr>
260<tr class="field-even field"><th class="field-name">Return q_star:</th><td class="field-body">invariant of the data within data&#8217;s q range</td>
261</tr>
262<tr class="field-odd field"><th class="field-name">Warning:</th><td class="field-body">When using setting data to Data1D ,
263the user is responsible of
264checking that the scale and the background are
265properly apply to the data</td>
266</tr>
267</tbody>
268</table>
269</dd></dl>
270
271<dl class="method">
272<dt id="sas.invariant.invariant.InvariantCalculator.get_qstar_high">
273<tt class="descname">get_qstar_high</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_qstar_high"><span class="viewcode-link">[source]</span></a></dt>
274<dd><p>Compute the invariant for extrapolated data at high q range.</p>
275<dl class="docutils">
276<dt>Implementation:</dt>
277<dd>data = self._get_extra_data_high()
278return self._get_qstar()</dd>
279</dl>
280<table class="docutils field-list" frame="void" rules="none">
281<col class="field-name" />
282<col class="field-body" />
283<tbody valign="top">
284<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>
285</tr>
286</tbody>
287</table>
288</dd></dl>
289
290<dl class="method">
291<dt id="sas.invariant.invariant.InvariantCalculator.get_qstar_low">
292<tt class="descname">get_qstar_low</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_qstar_low"><span class="viewcode-link">[source]</span></a></dt>
293<dd><p>Compute the invariant for extrapolated data at low q range.</p>
294<dl class="docutils">
295<dt>Implementation:</dt>
296<dd>data = self._get_extra_data_low()
297return self._get_qstar()</dd>
298</dl>
299<table class="docutils field-list" frame="void" rules="none">
300<col class="field-name" />
301<col class="field-body" />
302<tbody valign="top">
303<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>
304</tr>
305</tbody>
306</table>
307</dd></dl>
308
309<dl class="method">
310<dt id="sas.invariant.invariant.InvariantCalculator.get_qstar_with_error">
311<tt class="descname">get_qstar_with_error</tt><big>(</big><em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_qstar_with_error"><span class="viewcode-link">[source]</span></a></dt>
312<dd><p>Compute the invariant uncertainty.
313This uncertainty computation depends on whether or not the data is
314smeared.</p>
315<table class="docutils field-list" frame="void" rules="none">
316<col class="field-name" />
317<col class="field-body" />
318<tbody valign="top">
319<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>extrapolation</strong> &#8211; string to apply optional extrapolation</td>
320</tr>
321<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">invariant, the invariant uncertainty</td>
322</tr>
323</tbody>
324</table>
325</dd></dl>
326
327<dl class="method">
328<dt id="sas.invariant.invariant.InvariantCalculator.get_surface">
329<tt class="descname">get_surface</tt><big>(</big><em>contrast</em>, <em>porod_const</em>, <em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_surface"><span class="viewcode-link">[source]</span></a></dt>
330<dd><p>Compute the specific surface from the data.</p>
331<p>Implementation:</p>
332<div class="highlight-python"><div class="highlight"><pre>V =  self.get_volume_fraction(contrast, extrapolation)
333
334Compute the surface given by:
335  surface = (2*pi *V(1- V)*porod_const)/ q_star
336</pre></div>
337</div>
338<table class="docutils field-list" frame="void" rules="none">
339<col class="field-name" />
340<col class="field-body" />
341<tbody valign="top">
342<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
343<li><strong>contrast</strong> &#8211; contrast value to compute the volume</li>
344<li><strong>porod_const</strong> &#8211; Porod constant to compute the surface</li>
345<li><strong>extrapolation</strong> &#8211; string to apply optional extrapolation</li>
346</ul>
347</td>
348</tr>
349<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">specific surface</p>
350</td>
351</tr>
352</tbody>
353</table>
354</dd></dl>
355
356<dl class="method">
357<dt id="sas.invariant.invariant.InvariantCalculator.get_surface_with_error">
358<tt class="descname">get_surface_with_error</tt><big>(</big><em>contrast</em>, <em>porod_const</em>, <em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_surface_with_error"><span class="viewcode-link">[source]</span></a></dt>
359<dd><p>Compute uncertainty of the surface value as well as the surface value.
360The uncertainty is given as follow:</p>
361<div class="highlight-python"><div class="highlight"><pre>dS = porod_const *2*pi[( dV -2*V*dV)/q_star
362     + dq_star(v-v**2)
363     
364q_star: the invariant value
365dq_star: the invariant uncertainty
366V: the volume fraction value
367dV: the volume uncertainty
368</pre></div>
369</div>
370<table class="docutils field-list" frame="void" rules="none">
371<col class="field-name" />
372<col class="field-body" />
373<tbody valign="top">
374<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
375<li><strong>contrast</strong> &#8211; contrast value</li>
376<li><strong>porod_const</strong> &#8211; porod constant value</li>
377<li><strong>extrapolation</strong> &#8211; string to apply optional extrapolation</li>
378</ul>
379</td>
380</tr>
381<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>
382</td>
383</tr>
384</tbody>
385</table>
386</dd></dl>
387
388<dl class="method">
389<dt id="sas.invariant.invariant.InvariantCalculator.get_volume_fraction">
390<tt class="descname">get_volume_fraction</tt><big>(</big><em>contrast</em>, <em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_volume_fraction"><span class="viewcode-link">[source]</span></a></dt>
391<dd><p>Compute volume fraction is deduced as follow:</p>
392<div class="highlight-python"><div class="highlight"><pre>q_star = 2*(pi*contrast)**2* volume( 1- volume)
393for k = 10^(-8)*q_star/(2*(pi*|contrast|)**2)
394we get 2 values of volume:
395     with   1 - 4 * k &gt;= 0
396     volume1 = (1- sqrt(1- 4*k))/2
397     volume2 = (1+ sqrt(1- 4*k))/2
398
399q_star: the invariant value included extrapolation is applied
400             unit  1/A^(3)*1/cm
401        q_star = self.get_qstar()
402       
403the result returned will be 0 &lt;= volume &lt;= 1
404</pre></div>
405</div>
406<table class="docutils field-list" frame="void" rules="none">
407<col class="field-name" />
408<col class="field-body" />
409<tbody valign="top">
410<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
411<li><strong>contrast</strong> &#8211; contrast value provides by the user of type float.
412contrast unit is 1/A^(2)= 10^(16)cm^(2)</li>
413<li><strong>extrapolation</strong> &#8211; string to apply optional extrapolation</li>
414</ul>
415</td>
416</tr>
417<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">volume fraction</p>
418</td>
419</tr>
420<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>
421</td>
422</tr>
423</tbody>
424</table>
425</dd></dl>
426
427<dl class="method">
428<dt id="sas.invariant.invariant.InvariantCalculator.get_volume_fraction_with_error">
429<tt class="descname">get_volume_fraction_with_error</tt><big>(</big><em>contrast</em>, <em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.get_volume_fraction_with_error"><span class="viewcode-link">[source]</span></a></dt>
430<dd><p>Compute uncertainty on volume value as well as the volume fraction
431This uncertainty is given by the following equation:</p>
432<div class="highlight-python"><div class="highlight"><pre>dV = 0.5 * (4*k* dq_star) /(2* math.sqrt(1-k* q_star))
433                     
434for k = 10^(-8)*q_star/(2*(pi*|contrast|)**2)
435
436q_star: the invariant value including extrapolated value if existing
437dq_star: the invariant uncertainty
438dV: the volume uncertainty
439</pre></div>
440</div>
441<p>The uncertainty will be set to -1 if it can&#8217;t be computed.</p>
442<table class="docutils field-list" frame="void" rules="none">
443<col class="field-name" />
444<col class="field-body" />
445<tbody valign="top">
446<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
447<li><strong>contrast</strong> &#8211; contrast value</li>
448<li><strong>extrapolation</strong> &#8211; string to apply optional extrapolation</li>
449</ul>
450</td>
451</tr>
452<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>
453</td>
454</tr>
455</tbody>
456</table>
457</dd></dl>
458
459<dl class="method">
460<dt id="sas.invariant.invariant.InvariantCalculator.set_extrapolation">
461<tt class="descname">set_extrapolation</tt><big>(</big><em>range</em>, <em>npts=4</em>, <em>function=None</em>, <em>power=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#InvariantCalculator.set_extrapolation"><span class="viewcode-link">[source]</span></a></dt>
462<dd><p>Set the extrapolation parameters for the high or low Q-range.
463Note that this does not turn extrapolation on or off.</p>
464<table class="docutils field-list" frame="void" rules="none">
465<col class="field-name" />
466<col class="field-body" />
467<tbody valign="top">
468<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
469<li><strong>range</strong> &#8211; a keyword set the type of extrapolation . type string</li>
470<li><strong>npts</strong> &#8211; the numbers of q points of data to consider
471for extrapolation</li>
472<li><strong>function</strong> &#8211; a keyword to select the function to use
473for extrapolation.
474of type string.</li>
475<li><strong>power</strong> &#8211; an power to apply power_low function</li>
476</ul>
477</td>
478</tr>
479</tbody>
480</table>
481</dd></dl>
482
483</dd></dl>
484
485<dl class="class">
486<dt id="sas.invariant.invariant.PowerLaw">
487<em class="property">class </em><tt class="descclassname">sas.invariant.invariant.</tt><tt class="descname">PowerLaw</tt><big>(</big><em>scale=1</em>, <em>power=4</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#PowerLaw"><span class="viewcode-link">[source]</span></a></dt>
488<dd><p>Bases: <a class="reference internal" href="#sas.invariant.invariant.Transform" title="sas.invariant.invariant.Transform"><tt class="xref py py-class docutils literal"><span class="pre">sas.invariant.invariant.Transform</span></tt></a></p>
489<p>class of type transform that perform operation related to power_law
490function</p>
491<dl class="method">
492<dt id="sas.invariant.invariant.PowerLaw.evaluate_model">
493<tt class="descname">evaluate_model</tt><big>(</big><em>x</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#PowerLaw.evaluate_model"><span class="viewcode-link">[source]</span></a></dt>
494<dd><p>given a scale and a radius transform x, y using a power_law
495function</p>
496</dd></dl>
497
498<dl class="method">
499<dt id="sas.invariant.invariant.PowerLaw.evaluate_model_errors">
500<tt class="descname">evaluate_model_errors</tt><big>(</big><em>x</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#PowerLaw.evaluate_model_errors"><span class="viewcode-link">[source]</span></a></dt>
501<dd><p>Returns the error on I(q) for the given array of q-values
502:param x: array of q-values</p>
503</dd></dl>
504
505<dl class="method">
506<dt id="sas.invariant.invariant.PowerLaw.extract_model_parameters">
507<tt class="descname">extract_model_parameters</tt><big>(</big><em>constant</em>, <em>slope</em>, <em>dconstant=0</em>, <em>dslope=0</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#PowerLaw.extract_model_parameters"><span class="viewcode-link">[source]</span></a></dt>
508<dd><p>Assign new value to the scale and the power</p>
509</dd></dl>
510
511<dl class="method">
512<dt id="sas.invariant.invariant.PowerLaw.linearize_q_value">
513<tt class="descname">linearize_q_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#PowerLaw.linearize_q_value"><span class="viewcode-link">[source]</span></a></dt>
514<dd><p>Transform the input q-value for linearization</p>
515<table class="docutils field-list" frame="void" rules="none">
516<col class="field-name" />
517<col class="field-body" />
518<tbody valign="top">
519<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> &#8211; q-value</td>
520</tr>
521<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">log(q)</td>
522</tr>
523</tbody>
524</table>
525</dd></dl>
526
527</dd></dl>
528
529<dl class="class">
530<dt id="sas.invariant.invariant.Transform">
531<em class="property">class </em><tt class="descclassname">sas.invariant.invariant.</tt><tt class="descname">Transform</tt><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Transform"><span class="viewcode-link">[source]</span></a></dt>
532<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
533<p>Define interface that need to compute a function or an inverse
534function given some x, y</p>
535<dl class="method">
536<dt id="sas.invariant.invariant.Transform.evaluate_model">
537<tt class="descname">evaluate_model</tt><big>(</big><em>x</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Transform.evaluate_model"><span class="viewcode-link">[source]</span></a></dt>
538<dd><p>Returns an array f(x) values where f is the Transform function.</p>
539</dd></dl>
540
541<dl class="method">
542<dt id="sas.invariant.invariant.Transform.evaluate_model_errors">
543<tt class="descname">evaluate_model_errors</tt><big>(</big><em>x</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Transform.evaluate_model_errors"><span class="viewcode-link">[source]</span></a></dt>
544<dd><p>Returns an array of I(q) errors</p>
545</dd></dl>
546
547<dl class="method">
548<dt id="sas.invariant.invariant.Transform.extract_model_parameters">
549<tt class="descname">extract_model_parameters</tt><big>(</big><em>constant</em>, <em>slope</em>, <em>dconstant=0</em>, <em>dslope=0</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Transform.extract_model_parameters"><span class="viewcode-link">[source]</span></a></dt>
550<dd><p>set private member</p>
551</dd></dl>
552
553<dl class="method">
554<dt id="sas.invariant.invariant.Transform.get_allowed_bins">
555<tt class="descname">get_allowed_bins</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Transform.get_allowed_bins"><span class="viewcode-link">[source]</span></a></dt>
556<dd><p>Goes through the data points and returns a list of boolean values
557to indicate whether each points is allowed by the model or not.</p>
558<table class="docutils field-list" frame="void" rules="none">
559<col class="field-name" />
560<col class="field-body" />
561<tbody valign="top">
562<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> &#8211; Data1D object</td>
563</tr>
564</tbody>
565</table>
566</dd></dl>
567
568<dl class="method">
569<dt id="sas.invariant.invariant.Transform.linearize_data">
570<tt class="descname">linearize_data</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Transform.linearize_data"><span class="viewcode-link">[source]</span></a></dt>
571<dd><p>Linearize data so that a linear fit can be performed.
572Filter out the data that can&#8217;t be transformed.</p>
573<table class="docutils field-list" frame="void" rules="none">
574<col class="field-name" />
575<col class="field-body" />
576<tbody valign="top">
577<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> &#8211; LoadData1D instance</td>
578</tr>
579</tbody>
580</table>
581</dd></dl>
582
583<dl class="method">
584<dt id="sas.invariant.invariant.Transform.linearize_q_value">
585<tt class="descname">linearize_q_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant.html#Transform.linearize_q_value"><span class="viewcode-link">[source]</span></a></dt>
586<dd><p>Transform the input q-value for linearization</p>
587</dd></dl>
588
589</dd></dl>
590
591</div>
592<div class="section" id="module-sas.invariant.invariant_mapper">
593<span id="sas-invariant-invariant-mapper-module"></span><h2>sas.invariant.invariant_mapper module</h2>
594<p>This module is a wrapper to a map function. It allows to loop through
595different invariant objects to call the same function</p>
596<dl class="function">
597<dt id="sas.invariant.invariant_mapper.get_qstar">
598<tt class="descclassname">sas.invariant.invariant_mapper.</tt><tt class="descname">get_qstar</tt><big>(</big><em>inv</em>, <em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant_mapper.html#get_qstar"><span class="viewcode-link">[source]</span></a></dt>
599<dd><p>Get invariant value (Q*)</p>
600</dd></dl>
601
602<dl class="function">
603<dt id="sas.invariant.invariant_mapper.get_qstar_with_error">
604<tt class="descclassname">sas.invariant.invariant_mapper.</tt><tt class="descname">get_qstar_with_error</tt><big>(</big><em>inv</em>, <em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant_mapper.html#get_qstar_with_error"><span class="viewcode-link">[source]</span></a></dt>
605<dd><p>Get invariant value with uncertainty</p>
606</dd></dl>
607
608<dl class="function">
609<dt id="sas.invariant.invariant_mapper.get_surface">
610<tt class="descclassname">sas.invariant.invariant_mapper.</tt><tt class="descname">get_surface</tt><big>(</big><em>inv</em>, <em>contrast</em>, <em>porod_const</em>, <em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant_mapper.html#get_surface"><span class="viewcode-link">[source]</span></a></dt>
611<dd><p>Get surface with uncertainty</p>
612</dd></dl>
613
614<dl class="function">
615<dt id="sas.invariant.invariant_mapper.get_surface_with_error">
616<tt class="descclassname">sas.invariant.invariant_mapper.</tt><tt class="descname">get_surface_with_error</tt><big>(</big><em>inv</em>, <em>contrast</em>, <em>porod_const</em>, <em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant_mapper.html#get_surface_with_error"><span class="viewcode-link">[source]</span></a></dt>
617<dd><p>Get surface with uncertainty</p>
618</dd></dl>
619
620<dl class="function">
621<dt id="sas.invariant.invariant_mapper.get_volume_fraction">
622<tt class="descclassname">sas.invariant.invariant_mapper.</tt><tt class="descname">get_volume_fraction</tt><big>(</big><em>inv</em>, <em>contrast</em>, <em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant_mapper.html#get_volume_fraction"><span class="viewcode-link">[source]</span></a></dt>
623<dd><p>Get volume fraction</p>
624</dd></dl>
625
626<dl class="function">
627<dt id="sas.invariant.invariant_mapper.get_volume_fraction_with_error">
628<tt class="descclassname">sas.invariant.invariant_mapper.</tt><tt class="descname">get_volume_fraction_with_error</tt><big>(</big><em>inv</em>, <em>contrast</em>, <em>extrapolation=None</em><big>)</big><a class="reference internal" href="../../_modules/sas/invariant/invariant_mapper.html#get_volume_fraction_with_error"><span class="viewcode-link">[source]</span></a></dt>
629<dd><p>Get volume fraction with uncertainty</p>
630</dd></dl>
631
632</div>
633<div class="section" id="module-sas.invariant">
634<span id="module-contents"></span><h2>Module contents</h2>
635</div>
636</div>
637
638
639          </div>
640        </div>
641      </div>
642      <div class="sphinxsidebar">
643        <div class="sphinxsidebarwrapper">
644  <h3><a href="../../index.html">Table Of Contents</a></h3>
645  <ul>
646<li><a class="reference internal" href="#">sas.invariant package</a><ul>
647<li><a class="reference internal" href="#submodules">Submodules</a></li>
648<li><a class="reference internal" href="#module-sas.invariant.invariant">sas.invariant.invariant module</a></li>
649<li><a class="reference internal" href="#module-sas.invariant.invariant_mapper">sas.invariant.invariant_mapper module</a></li>
650<li><a class="reference internal" href="#module-sas.invariant">Module contents</a></li>
651</ul>
652</li>
653</ul>
654
655  <h4>Previous topic</h4>
656  <p class="topless"><a href="sas.guiframe.local_perspectives.plotting.html"
657                        title="previous chapter">sas.guiframe.local_perspectives.plotting package</a></p>
658  <h4>Next topic</h4>
659  <p class="topless"><a href="sas.models.html"
660                        title="next chapter">sas.models package</a></p>
661  <h3>This Page</h3>
662  <ul class="this-page-menu">
663    <li><a href="../../_sources/dev/api/sas.invariant.txt"
664           rel="nofollow">Show Source</a></li>
665  </ul>
666<div id="searchbox" style="display: none">
667  <h3>Quick search</h3>
668    <form class="search" action="../../search.html" method="get">
669      <input type="text" name="q" />
670      <input type="submit" value="Go" />
671      <input type="hidden" name="check_keywords" value="yes" />
672      <input type="hidden" name="area" value="default" />
673    </form>
674    <p class="searchtip" style="font-size: 90%">
675    Enter search terms or a module, class or function name.
676    </p>
677</div>
678<script type="text/javascript">$('#searchbox').show(0);</script>
679        </div>
680      </div>
681      <div class="clearer"></div>
682    </div>
683    <div class="related">
684      <h3>Navigation</h3>
685      <ul>
686        <li class="right" style="margin-right: 10px">
687          <a href="../../genindex.html" title="General Index"
688             >index</a></li>
689        <li class="right" >
690          <a href="../../py-modindex.html" title="Python Module Index"
691             >modules</a> |</li>
692        <li class="right" >
693          <a href="sas.models.html" title="sas.models package"
694             >next</a> |</li>
695        <li class="right" >
696          <a href="sas.guiframe.local_perspectives.plotting.html" title="sas.guiframe.local_perspectives.plotting package"
697             >previous</a> |</li>
698        <li><a href="../../index.html">SasView 3.0.0 documentation</a> &raquo;</li>
699          <li><a href="../dev.html" >Developer Documentation</a> &raquo;</li>
700          <li><a href="modules.html" >lib.macosx-10.5-x86_64-2.7</a> &raquo;</li>
701          <li><a href="sas.html" >sas package</a> &raquo;</li> 
702      </ul>
703    </div>
704    <div class="footer">
705        &copy; Copyright 2013, The SasView Project.
706      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
707    </div>
708  </body>
709</html>
Note: See TracBrowser for help on using the repository browser.