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

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 f696e2a was f696e2a, checked in by Gervaise Alina <gervyh@…>, 13 years ago

edit doc

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