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

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 2ece81ff was 0c3003d, checked in by Jessica Tumarkin <jtumarki@…>, 13 years ago

Sphinx documentation for park_integration

  • Property mode set to 100644
File size: 11.8 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="nb">id</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="nb">id</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>, <em>ftol=1.49012e-008</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.fit" title="Permalink to this definition">¶</a></dt>
82<dd><p>Perform the fit</p>
83</dd></dl>
84
85<dl class="method">
86<dt id="sans.fit.Fitting.Fit.get_model">
87<tt class="descname">get_model</tt><big>(</big><em>id</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.get_model" title="Permalink to this definition">¶</a></dt>
88<dd><p>return list of data</p>
89</dd></dl>
90
91<dl class="method">
92<dt id="sans.fit.Fitting.Fit.get_problem_to_fit">
93<tt class="descname">get_problem_to_fit</tt><big>(</big><em>id</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.get_problem_to_fit" title="Permalink to this definition">¶</a></dt>
94<dd><p>return the self.selected value of the fit problem of id</p>
95<table class="docutils field-list" frame="void" rules="none">
96<col class="field-name" />
97<col class="field-body" />
98<tbody valign="top">
99<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>id</strong> &#8211; the id of the problem</td>
100</tr>
101</tbody>
102</table>
103</dd></dl>
104
105<dl class="method">
106<dt id="sans.fit.Fitting.Fit.remove_fit_problem">
107<tt class="descname">remove_fit_problem</tt><big>(</big><em>id</em><big>)</big><a class="headerlink" href="#sans.fit.Fitting.Fit.remove_fit_problem" title="Permalink to this definition">¶</a></dt>
108<dd><p>remove fitarrange in id</p>
109</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>id</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 id 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"><strong>value</strong> &#8211; the value to allow fitting.
121can only have the value one or zero</td>
122</tr>
123</tbody>
124</table>
125</dd></dl>
126
127<dl class="method">
128<dt id="sans.fit.Fitting.Fit.set_data">
129<tt class="descname">set_data</tt><big>(</big><em>data</em>, <em>id</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>
130<dd><p>Store data to fit at the psotion id of the fit engine</p>
131<table class="docutils field-list" frame="void" rules="none">
132<col class="field-name" />
133<col class="field-body" />
134<tbody valign="top">
135<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
136<li><strong>data</strong> &#8211; data to fit</li>
137<li><strong>smearer</strong> &#8211; smearerobject to smear data</li>
138<li><strong>qmin</strong> &#8211; the minimum q range to fit</li>
139<li><strong>qmax</strong> &#8211; the minimum q range to fit</li>
140</ul>
141</td>
142</tr>
143</tbody>
144</table>
145</dd></dl>
146
147<dl class="method">
148<dt id="sans.fit.Fitting.Fit.set_engine">
149<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>
150<dd><p>Select the type of Fit</p>
151<table class="docutils field-list" frame="void" rules="none">
152<col class="field-name" />
153<col class="field-body" />
154<tbody valign="top">
155<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>word</strong> &#8211; the keyword to select the fit type</td>
156</tr>
157<tr class="field"><th class="field-name">Raise :</th><td class="field-body">if the user does not enter &#8216;scipy&#8217; or &#8216;park&#8217;,
158a valueError is raised</td>
159</tr>
160</tbody>
161</table>
162</dd></dl>
163
164<dl class="method">
165<dt id="sans.fit.Fitting.Fit.set_model">
166<tt class="descname">set_model</tt><big>(</big><em>model</em>, <em>id</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>
167<dd><p>store a model model to fit at the position id of the fit engine</p>
168</dd></dl>
169
170</dd></dl>
171
172</div>
173</div>
174
175
176          </div>
177        </div>
178      </div>
179      <div class="sphinxsidebar">
180        <div class="sphinxsidebarwrapper">
181  <h3><a href="../index.html">Table Of Contents</a></h3>
182  <ul>
183<li><a class="reference internal" href="#">Fitting</a><ul>
184<li><a class="reference internal" href="#module-sans.fit.Fitting">:mod:` sans.fit.Fitting`</a></li>
185</ul>
186</li>
187</ul>
188
189  <h4>Previous topic</h4>
190  <p class="topless"><a href="AbstractFitEngine.html"
191                        title="previous chapter">AbstractFitEngine</a></p>
192  <h4>Next topic</h4>
193  <p class="topless"><a href="ParkFitting.html"
194                        title="next chapter">ParkFitting</a></p>
195  <h3>This Page</h3>
196  <ul class="this-page-menu">
197    <li><a href="../_sources/api/Fitting.txt"
198           rel="nofollow">Show Source</a></li>
199  </ul>
200<div id="searchbox" style="display: none">
201  <h3>Quick search</h3>
202    <form class="search" action="../search.html" method="get">
203      <input type="text" name="q" size="18" />
204      <input type="submit" value="Go" />
205      <input type="hidden" name="check_keywords" value="yes" />
206      <input type="hidden" name="area" value="default" />
207    </form>
208    <p class="searchtip" style="font-size: 90%">
209    Enter search terms or a module, class or function name.
210    </p>
211</div>
212<script type="text/javascript">$('#searchbox').show(0);</script>
213        </div>
214      </div>
215      <div class="clearer"></div>
216    </div>
217    <div class="related">
218      <h3>Navigation</h3>
219      <ul>
220        <li class="right" style="margin-right: 10px">
221          <a href="../genindex.html" title="General Index"
222             >index</a></li>
223        <li class="right" >
224          <a href="../py-modindex.html" title="Python Module Index"
225             >modules</a> |</li>
226        <li class="right" >
227          <a href="ParkFitting.html" title="ParkFitting"
228             >next</a> |</li>
229        <li class="right" >
230          <a href="AbstractFitEngine.html" title="AbstractFitEngine"
231             >previous</a> |</li>
232        <li><a href="../index.html">park_integration v0.1.0 documentation</a> &raquo;</li>
233          <li><a href="index.html" >Reference</a> &raquo;</li> 
234      </ul>
235    </div>
236    <div class="footer">
237        &copy; Copyright 2010, sans group.
238      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
239    </div>
240  </body>
241</html>
Note: See TracBrowser for help on using the repository browser.