source: sasview/park_integration/docs/sphinx/_build/html/api/Fitting.html @ aa36f96

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since aa36f96 was aa36f96, checked in by Gervaise Alina <gervyh@…>, 14 years ago

working on documentation

  • Property mode set to 100644
File size: 11.9 KB
Line 
1
2
3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6<html xmlns="http://www.w3.org/1999/xhtml">
7  <head>
8    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9   
10    <title>Fitting &mdash; park_integration v0.1.0 documentation</title>
11    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
12    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13    <script type="text/javascript">
14      var DOCUMENTATION_OPTIONS = {
15        URL_ROOT:    '../',
16        VERSION:     '0.1.0',
17        COLLAPSE_INDEX: false,
18        FILE_SUFFIX: '.html',
19        HAS_SOURCE:  true
20      };
21    </script>
22    <script type="text/javascript" src="../_static/jquery.js"></script>
23    <script type="text/javascript" src="../_static/underscore.js"></script>
24    <script type="text/javascript" src="../_static/doctools.js"></script>
25    <link rel="top" title="park_integration v0.1.0 documentation" href="../index.html" />
26    <link rel="up" title="Reference" href="index.html" />
27    <link rel="next" title="ParkFitting" href="ParkFitting.html" />
28    <link rel="prev" title="AbstractFitEngine" href="AbstractFitEngine.html" /> 
29  </head>
30  <body>
31    <div class="related">
32      <h3>Navigation</h3>
33      <ul>
34        <li class="right" style="margin-right: 10px">
35          <a href="../genindex.html" title="General Index"
36             accesskey="I">index</a></li>
37        <li class="right" >
38          <a href="../py-modindex.html" title="Python Module Index"
39             >modules</a> |</li>
40        <li class="right" >
41          <a href="ParkFitting.html" title="ParkFitting"
42             accesskey="N">next</a> |</li>
43        <li class="right" >
44          <a href="AbstractFitEngine.html" title="AbstractFitEngine"
45             accesskey="P">previous</a> |</li>
46        <li><a href="../index.html">park_integration v0.1.0 documentation</a> &raquo;</li>
47          <li><a href="index.html" accesskey="U">Reference</a> &raquo;</li> 
48      </ul>
49    </div> 
50
51    <div class="document">
52      <div class="documentwrapper">
53        <div class="bodywrapper">
54          <div class="body">
55           
56  <div class="section" id="fitting">
57<h1>Fitting<a class="headerlink" href="#fitting" title="Permalink to this headline">¶</a></h1>
58<div class="section" id="module-sans.fit.Fitting">
59<span id="mod-sans-fit-fitting"></span><h2>:mod:` sans.fit.Fitting`<a class="headerlink" href="#module-sans.fit.Fitting" title="Permalink to this headline">¶</a></h2>
60<p>Class Fit contains ScipyFit and ParkFit methods declaration
61allows to create instance of type ScipyFit or ParkFit to perform either
62a park fit or a scipy fit.</p>
63<dl class="class">
64<dt id="sans.fit.Fitting.Fit">
65<em class="property">class </em><tt class="descclassname">sans.fit.Fitting.</tt><tt class="descname">Fit</tt><big>(</big><em>engine='scipy'</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit" title="Permalink to this definition">¶</a></dt>
66<dd><p>Wrap class that allows to select the fitting type.this class
67can be used as follow :</p>
68<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">sans.fit.Fitting</span> <span class="kn">import</span> <span class="n">Fit</span>
69<span class="n">fitter</span><span class="o">=</span> <span class="n">Fit</span><span class="p">()</span>
70<span class="n">fitter</span><span class="o">.</span><span class="n">fit_engine</span><span class="p">(</span><span class="s">&#39;scipy&#39;</span><span class="p">)</span> <span class="ow">or</span> <span class="n">fitter</span><span class="o">.</span><span class="n">fit_engine</span><span class="p">(</span><span class="s">&#39;park&#39;</span><span class="p">)</span>
71<span class="n">engine</span> <span class="o">=</span> <span class="n">fitter</span><span class="o">.</span><span class="n">returnEngine</span><span class="p">()</span>
72<span class="n">engine</span><span class="o">.</span><span class="n">set_data</span><span class="p">(</span><span class="n">data</span><span class="p">,</span><span class="n">Uid</span><span class="p">)</span>
73<span class="n">engine</span><span class="o">.</span><span class="n">set_param</span><span class="p">(</span> <span class="n">model</span><span class="p">,</span><span class="n">model</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">pars</span><span class="p">)</span>
74<span class="n">engine</span><span class="o">.</span><span class="n">set_model</span><span class="p">(</span><span class="n">model</span><span class="p">,</span><span class="n">Uid</span><span class="p">)</span>
75
76<span class="n">chisqr1</span><span class="p">,</span> <span class="n">out1</span><span class="p">,</span> <span class="n">cov1</span><span class="o">=</span><span class="n">engine</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">pars</span><span class="p">,</span><span class="n">qmin</span><span class="p">,</span><span class="n">qmax</span><span class="p">)</span>
77</pre></div>
78</div>
79<dl class="method">
80<dt id="sans.fit.Fitting.Fit.fit">
81<tt class="descname">fit</tt><big>(</big><em>q=None</em>, <em>handler=None</em>, <em>curr_thread=None</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.fit" title="Permalink to this definition">¶</a></dt>
82<dd>Perform the fit</dd></dl>
83
84<dl class="method">
85<dt id="sans.fit.Fitting.Fit.get_model">
86<tt class="descname">get_model</tt><big>(</big><em>Uid</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.get_model" title="Permalink to this definition">¶</a></dt>
87<dd>return list of data</dd></dl>
88
89<dl class="method">
90<dt id="sans.fit.Fitting.Fit.get_problem_to_fit">
91<tt class="descname">get_problem_to_fit</tt><big>(</big><em>Uid</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.get_problem_to_fit" title="Permalink to this definition">¶</a></dt>
92<dd><p>return the self.selected value of the fit problem of Uid</p>
93<table class="docutils field-list" frame="void" rules="none">
94<col class="field-name" />
95<col class="field-body" />
96<tbody valign="top">
97<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
98<li><strong>Uid</strong> &#8211; the Uid of the problem</li>
99</ul>
100</td>
101</tr>
102</tbody>
103</table>
104</dd></dl>
105
106<dl class="method">
107<dt id="sans.fit.Fitting.Fit.remove_Fit_Problem">
108<tt class="descname">remove_Fit_Problem</tt><big>(</big><em>Uid</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.remove_Fit_Problem" title="Permalink to this definition">¶</a></dt>
109<dd>remove fitarrange in Uid</dd></dl>
110
111<dl class="method">
112<dt id="sans.fit.Fitting.Fit.select_problem_for_fit">
113<tt class="descname">select_problem_for_fit</tt><big>(</big><em>Uid</em>, <em>value</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.select_problem_for_fit" title="Permalink to this definition">¶</a></dt>
114<dd><p>select a couple of model and data at the Uid position in dictionary
115and set in self.selected value to value</p>
116<table class="docutils field-list" frame="void" rules="none">
117<col class="field-name" />
118<col class="field-body" />
119<tbody valign="top">
120<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
121<li><strong>value</strong> &#8211; the value to allow fitting.
122can only have the value one or zero</li>
123</ul>
124</td>
125</tr>
126</tbody>
127</table>
128</dd></dl>
129
130<dl class="method">
131<dt id="sans.fit.Fitting.Fit.set_data">
132<tt class="descname">set_data</tt><big>(</big><em>data</em>, <em>Uid</em>, <em>smearer=None</em>, <em>qmin=None</em>, <em>qmax=None</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.set_data" title="Permalink to this definition">¶</a></dt>
133<dd><p>Store data to fit at the psotion Uid of the fit engine</p>
134<table class="docutils field-list" frame="void" rules="none">
135<col class="field-name" />
136<col class="field-body" />
137<tbody valign="top">
138<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
139<li><strong>data</strong> &#8211; data to fit</li>
140<li><strong>smearer</strong> &#8211; smearerobject to smear data</li>
141<li><strong>qmin</strong> &#8211; the minimum q range to fit</li>
142<li><strong>qmax</strong> &#8211; the minimum q range to fit</li>
143</ul>
144</td>
145</tr>
146</tbody>
147</table>
148</dd></dl>
149
150<dl class="method">
151<dt id="sans.fit.Fitting.Fit.set_engine">
152<tt class="descname">set_engine</tt><big>(</big><em>word</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.set_engine" title="Permalink to this definition">¶</a></dt>
153<dd><p>Select the type of Fit</p>
154<table class="docutils field-list" frame="void" rules="none">
155<col class="field-name" />
156<col class="field-body" />
157<tbody valign="top">
158<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
159<li><strong>word</strong> &#8211; the keyword to select the fit type</li>
160</ul>
161</td>
162</tr>
163<tr class="field"><th class="field-name">Raise :</th><td class="field-body"><p class="first last">if the user does not enter &#8216;scipy&#8217; or &#8216;park&#8217;,
164a valueError is raised</p>
165</td>
166</tr>
167</tbody>
168</table>
169</dd></dl>
170
171<dl class="method">
172<dt id="sans.fit.Fitting.Fit.set_model">
173<tt class="descname">set_model</tt><big>(</big><em>model</em>, <em>Uid</em>, <em>pars=</em><span class="optional">[</span><span class="optional">]</span>, <em>constraints=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.set_model" title="Permalink to this definition">¶</a></dt>
174<dd>store a model model to fit at the position Uid of the fit engine</dd></dl>
175
176</dd></dl>
177
178</div>
179</div>
180
181
182          </div>
183        </div>
184      </div>
185      <div class="sphinxsidebar">
186        <div class="sphinxsidebarwrapper">
187  <h3><a href="../index.html">Table Of Contents</a></h3>
188  <ul>
189<li><a class="reference internal" href="#">Fitting</a><ul>
190<li><a class="reference internal" href="#module-sans.fit.Fitting">:mod:` sans.fit.Fitting`</a></li>
191</ul>
192</li>
193</ul>
194
195  <h4>Previous topic</h4>
196  <p class="topless"><a href="AbstractFitEngine.html"
197                        title="previous chapter">AbstractFitEngine</a></p>
198  <h4>Next topic</h4>
199  <p class="topless"><a href="ParkFitting.html"
200                        title="next chapter">ParkFitting</a></p>
201  <h3>This Page</h3>
202  <ul class="this-page-menu">
203    <li><a href="../_sources/api/Fitting.txt"
204           rel="nofollow">Show Source</a></li>
205  </ul>
206<div id="searchbox" style="display: none">
207  <h3>Quick search</h3>
208    <form class="search" action="../search.html" method="get">
209      <input type="text" name="q" size="18" />
210      <input type="submit" value="Go" />
211      <input type="hidden" name="check_keywords" value="yes" />
212      <input type="hidden" name="area" value="default" />
213    </form>
214    <p class="searchtip" style="font-size: 90%">
215    Enter search terms or a module, class or function name.
216    </p>
217</div>
218<script type="text/javascript">$('#searchbox').show(0);</script>
219        </div>
220      </div>
221      <div class="clearer"></div>
222    </div>
223    <div class="related">
224      <h3>Navigation</h3>
225      <ul>
226        <li class="right" style="margin-right: 10px">
227          <a href="../genindex.html" title="General Index"
228             >index</a></li>
229        <li class="right" >
230          <a href="../py-modindex.html" title="Python Module Index"
231             >modules</a> |</li>
232        <li class="right" >
233          <a href="ParkFitting.html" title="ParkFitting"
234             >next</a> |</li>
235        <li class="right" >
236          <a href="AbstractFitEngine.html" title="AbstractFitEngine"
237             >previous</a> |</li>
238        <li><a href="../index.html">park_integration v0.1.0 documentation</a> &raquo;</li>
239          <li><a href="index.html" >Reference</a> &raquo;</li> 
240      </ul>
241    </div>
242    <div class="footer">
243        &copy; Copyright 2010, sans group.
244      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0b1.
245    </div>
246  </body>
247</html>
Note: See TracBrowser for help on using the repository browser.