source: sasview/park_integration/docs/sphinx/html/api/ParkFitting.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: 68.1 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>ParkFitting &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" />
30    <link rel="next" title="ScipyFitting" href="ScipyFitting.html" />
[f696e2a]31    <link rel="prev" title="Loader" href="Loader.html" /> 
[6b1588b]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="ScipyFitting.html" title="ScipyFitting"
45             accesskey="N">next</a> |</li>
46        <li class="right" >
[f696e2a]47          <a href="Loader.html" title="Loader"
[6b1588b]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="parkfitting">
60<h1>ParkFitting<a class="headerlink" href="#parkfitting" title="Permalink to this headline">¶</a></h1>
61<div class="section" id="mod-sans-fit-parkfitting">
62<h2>:mod:` sans.fit.ParkFitting`<a class="headerlink" href="#mod-sans-fit-parkfitting" title="Permalink to this headline">¶</a></h2>
[f696e2a]63<span class="target" id="module-sans.fit.ParkFitting"></span><p>ParkFitting module contains SansParameter,Model,Data
64FitArrange, ParkFit,Parameter classes.All listed classes work together
65to perform a simple fit with park optimizer.</p>
66<dl class="class">
67<dt id="sans.fit.ParkFitting.MyAssembly">
68<em class="property">class </em><tt class="descclassname">sans.fit.ParkFitting.</tt><tt class="descname">MyAssembly</tt><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly" title="Permalink to this definition">¶</a></dt>
69<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">park.assembly.Assembly</span></tt></p>
70<dl class="method">
71<dt id="sans.fit.ParkFitting.MyAssembly.__call__">
72<tt class="descname">__call__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__call__" title="Permalink to this definition">¶</a></dt>
73<dd><p>Cost function.</p>
74<p>Evaluate the system for the parameter vector pvec, returning chisq
75as the cost function to be minimized.</p>
76<p>Raises a runtime error if the number of fit parameters is
77different than the length of the vector.</p>
78</dd></dl>
79
80<dl class="attribute">
81<dt id="sans.fit.ParkFitting.MyAssembly.__class__">
82<tt class="descname">__class__</tt><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__class__" title="Permalink to this definition">¶</a></dt>
83<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p>
84</dd></dl>
85
86<dl class="attribute">
87<dt id="sans.fit.ParkFitting.MyAssembly.__delattr__">
88<tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__delattr__" title="Permalink to this definition">¶</a></dt>
89<dd><p>x.__delattr__(&#8216;name&#8217;) &lt;==&gt; del x.name</p>
90</dd></dl>
91
92<dl class="method">
93<dt id="sans.fit.ParkFitting.MyAssembly.__delitem__">
94<tt class="descname">__delitem__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__delitem__" title="Permalink to this definition">¶</a></dt>
95<dd><p>Delete the nth model</p>
96</dd></dl>
97
98<dl class="attribute">
99<dt id="sans.fit.ParkFitting.MyAssembly.__dict__">
100<tt class="descname">__dict__</tt><em class="property"> = &lt;dictproxy object at 0x01E46BB0&gt;</em><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__dict__" title="Permalink to this definition">¶</a></dt>
101<dd></dd></dl>
102
103<dl class="attribute">
104<dt id="sans.fit.ParkFitting.MyAssembly.__getattribute__">
105<tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__getattribute__" title="Permalink to this definition">¶</a></dt>
106<dd><p>x.__getattribute__(&#8216;name&#8217;) &lt;==&gt; x.name</p>
107</dd></dl>
108
109<dl class="method">
110<dt id="sans.fit.ParkFitting.MyAssembly.__getitem__">
111<tt class="descname">__getitem__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__getitem__" title="Permalink to this definition">¶</a></dt>
112<dd><p>Return the nth model</p>
113</dd></dl>
114
115<dl class="attribute">
116<dt id="sans.fit.ParkFitting.MyAssembly.__hash__">
117<tt class="descname">__hash__</tt><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__hash__" title="Permalink to this definition">¶</a></dt>
118<dd><p>x.__hash__() &lt;==&gt; hash(x)</p>
119</dd></dl>
120
121<dl class="method">
122<dt id="sans.fit.ParkFitting.MyAssembly.__init__">
123<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__init__" title="Permalink to this definition">¶</a></dt>
124<dd><p>Build an assembly from a list of models.</p>
125</dd></dl>
126
127<dl class="method">
128<dt id="sans.fit.ParkFitting.MyAssembly.__iter__">
129<tt class="descname">__iter__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__iter__" title="Permalink to this definition">¶</a></dt>
130<dd><p>Iterate through the models in order</p>
131</dd></dl>
132
133<dl class="attribute">
134<dt id="sans.fit.ParkFitting.MyAssembly.__module__">
135<tt class="descname">__module__</tt><em class="property"> = 'sans.fit.ParkFitting'</em><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__module__" title="Permalink to this definition">¶</a></dt>
136<dd></dd></dl>
137
138<dl class="staticmethod">
139<dt id="sans.fit.ParkFitting.MyAssembly.__new__">
140<em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> &rarr; a new object with type S, a subtype of T<a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__new__" title="Permalink to this definition">¶</a></dt>
141<dd></dd></dl>
142
143<dl class="method">
144<dt id="sans.fit.ParkFitting.MyAssembly.__reduce__">
145<tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__reduce__" title="Permalink to this definition">¶</a></dt>
146<dd><p>helper for pickle</p>
147</dd></dl>
148
149<dl class="method">
150<dt id="sans.fit.ParkFitting.MyAssembly.__reduce_ex__">
151<tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__reduce_ex__" title="Permalink to this definition">¶</a></dt>
152<dd><p>helper for pickle</p>
153</dd></dl>
154
155<dl class="attribute">
156<dt id="sans.fit.ParkFitting.MyAssembly.__repr__">
157<tt class="descname">__repr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__repr__" title="Permalink to this definition">¶</a></dt>
158<dd><p>x.__repr__() &lt;==&gt; repr(x)</p>
159</dd></dl>
160
161<dl class="attribute">
162<dt id="sans.fit.ParkFitting.MyAssembly.__setattr__">
163<tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__setattr__" title="Permalink to this definition">¶</a></dt>
164<dd><p>x.__setattr__(&#8216;name&#8217;, value) &lt;==&gt; x.name = value</p>
165</dd></dl>
166
167<dl class="method">
168<dt id="sans.fit.ParkFitting.MyAssembly.__setitem__">
169<tt class="descname">__setitem__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__setitem__" title="Permalink to this definition">¶</a></dt>
170<dd><p>Replace the nth model</p>
171</dd></dl>
172
173<dl class="attribute">
174<dt id="sans.fit.ParkFitting.MyAssembly.__str__">
175<tt class="descname">__str__</tt><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__str__" title="Permalink to this definition">¶</a></dt>
176<dd><p>x.__str__() &lt;==&gt; str(x)</p>
177</dd></dl>
178
179<dl class="attribute">
180<dt id="sans.fit.ParkFitting.MyAssembly.__weakref__">
181<tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.__weakref__" title="Permalink to this definition">¶</a></dt>
182<dd><p>list of weak references to the object (if defined)</p>
183</dd></dl>
184
185<dl class="method">
186<dt id="sans.fit.ParkFitting.MyAssembly._reset">
187<tt class="descname">_reset</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly._reset" title="Permalink to this definition">¶</a></dt>
188<dd><p>Adjust the parameter set after the addition of a new model.</p>
189</dd></dl>
190
191<dl class="method">
192<dt id="sans.fit.ParkFitting.MyAssembly.abort">
193<tt class="descname">abort</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.abort" title="Permalink to this definition">¶</a></dt>
194<dd><p>Interrupt the current function evaluation.</p>
195<p>Forward this to the currently executing model if possible.</p>
196</dd></dl>
197
198<dl class="method">
199<dt id="sans.fit.ParkFitting.MyAssembly.all_results">
200<tt class="descname">all_results</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.all_results" title="Permalink to this definition">¶</a></dt>
201<dd><p>Extend result from the fit with the calculated parameters.</p>
202</dd></dl>
203
204<dl class="method">
205<dt id="sans.fit.ParkFitting.MyAssembly.append">
206<tt class="descname">append</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.append" title="Permalink to this definition">¶</a></dt>
207<dd><p>Add a model to the end of set.</p>
208<table class="docutils field-list" frame="void" rules="none">
209<col class="field-name" />
210<col class="field-body" />
211<tbody valign="top">
212<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fitness</strong> &#8211; the fitting model</td>
213</tr>
214</tbody>
215</table>
216<p>The fitting model can be an instance of <cite>park.assembly.Fitness</cite>,
217or a tuple of (<cite>park.model.Model</cite>,`park.data.Data1D`)
218:param weight: model weighting (usually 1.0)
219:param isfitted: whether model should be fit (equivalent to weight 0.)</p>
220</dd></dl>
221
222<dl class="method">
223<dt id="sans.fit.ParkFitting.MyAssembly.cov">
224<tt class="descname">cov</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.cov" title="Permalink to this definition">¶</a></dt>
225<dd><p>Return the covariance matrix inv(J&#8217;J) at point p.</p>
226</dd></dl>
227
228<dl class="method">
229<dt id="sans.fit.ParkFitting.MyAssembly.eval">
230<tt class="descname">eval</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.eval" title="Permalink to this definition">¶</a></dt>
231<dd><p>Recalculate the theory functions, and from them, the
232residuals and chisq.</p>
233<table class="docutils field-list" frame="void" rules="none">
234<col class="field-name" />
235<col class="field-body" />
236<tbody valign="top">
237<tr class="field-odd field"><th class="field-name">Note :</th><td class="field-body">Call this after the parameters have been updated.</td>
238</tr>
239</tbody>
240</table>
241</dd></dl>
242
243<dl class="method">
244<dt id="sans.fit.ParkFitting.MyAssembly.fit_parameters">
245<tt class="descname">fit_parameters</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.fit_parameters" title="Permalink to this definition">¶</a></dt>
246<dd><p>Return an alphabetical list of the fitting parameters.</p>
247<p>This function is called once at the beginning of a fit,
248and serves as a convenient place to precalculate what
249can be precalculated such as the set of fitting parameters
250and the parameter expressions evaluator.</p>
251</dd></dl>
252
253<dl class="method">
254<dt id="sans.fit.ParkFitting.MyAssembly.fresiduals">
255<tt class="descname">fresiduals</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.fresiduals" title="Permalink to this definition">¶</a></dt>
256<dd></dd></dl>
257
258<dl class="method">
259<dt id="sans.fit.ParkFitting.MyAssembly.insert">
260<tt class="descname">insert</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.insert" title="Permalink to this definition">¶</a></dt>
261<dd><p>Add a model to a particular position in the set.</p>
262</dd></dl>
263
264<dl class="method">
265<dt id="sans.fit.ParkFitting.MyAssembly.isfeasible">
266<tt class="descname">isfeasible</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.isfeasible" title="Permalink to this definition">¶</a></dt>
267<dd><p>Returns true if the parameter set is in a feasible region of the
268modeling space.</p>
269</dd></dl>
270
271<dl class="method">
272<dt id="sans.fit.ParkFitting.MyAssembly.isfitted">
273<tt class="descname">isfitted</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.isfitted" title="Permalink to this definition">¶</a></dt>
274<dd><p>Query if a particular model is fitted.</p>
275<p>Set isfitted to value if value is supplied.</p>
276<table class="docutils field-list" frame="void" rules="none">
277<col class="field-name" />
278<col class="field-body" />
279<tbody valign="top">
280<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
281<li><strong>idx</strong> (<em>integer</em>) &#8211; model number</li>
282<li><strong>value</strong> &#8211; </li>
283</ul>
284</td>
285</tr>
286</tbody>
287</table>
288</dd></dl>
289
290<dl class="method">
291<dt id="sans.fit.ParkFitting.MyAssembly.jacobian">
292<tt class="descname">jacobian</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.jacobian" title="Permalink to this definition">¶</a></dt>
293<dd><p>Returns the derivative wrt the fit parameters at point p.</p>
294<p>Numeric derivatives are calculated based on step, where step is
295the portion of the total range for parameter j, or the portion of
296point value p_j if the range on parameter j is infinite.</p>
297</dd></dl>
298
299<dl class="method">
300<dt id="sans.fit.ParkFitting.MyAssembly.result">
301<tt class="descname">result</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.result" title="Permalink to this definition">¶</a></dt>
302<dd><p>Details to send back to the fitting client on an improved fit.</p>
303<p>status is &#8216;start&#8217;, &#8216;step&#8217; or &#8216;end&#8217; depending if this is the
304first result to return, an improved result, or the final result.</p>
305<p>[Not implemented]</p>
306</dd></dl>
307
308<dl class="method">
309<dt id="sans.fit.ParkFitting.MyAssembly.set_result">
310<tt class="descname">set_result</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.set_result" title="Permalink to this definition">¶</a></dt>
311<dd><p>Set the parameters resulting from the fit into the parameter set,
312and update the calculated expression.</p>
313<p>The parameter values may be retrieved by walking the assembly.parameterset
314tree, checking each parameter for isfitted, iscomputed, or isfixed.
315For example:</p>
316<div class="highlight-python"><div class="highlight"><pre><span class="n">assembly</span><span class="o">.</span><span class="n">set_result</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
317<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">assembly</span><span class="o">.</span><span class="n">parameterset</span><span class="o">.</span><span class="n">flatten</span><span class="p">():</span>
318    <span class="k">if</span> <span class="n">p</span><span class="o">.</span><span class="n">isfitted</span><span class="p">():</span>
319        <span class="k">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s"> </span><span class="si">%g</span><span class="s"> in [</span><span class="si">%g</span><span class="s">,</span><span class="si">%g</span><span class="s">]&quot;</span><span class="o">%</span><span class="p">(</span><span class="n">p</span><span class="o">.</span><span class="n">path</span><span class="p">,</span><span class="n">p</span><span class="o">.</span><span class="n">value</span><span class="p">,</span><span class="n">p</span><span class="o">.</span><span class="n">range</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span><span class="n">p</span><span class="o">.</span><span class="n">range</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
320    <span class="k">elif</span> <span class="n">p</span><span class="o">.</span><span class="n">iscomputed</span><span class="p">():</span>
321        <span class="k">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s"> computed as </span><span class="si">%g</span><span class="s">&quot;</span><span class="o">%</span><span class="p">(</span><span class="n">p</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">p</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
322</pre></div>
323</div>
324<p>This does not calculate the function or the residuals for these parameters.
325You can call assembly.eval() to do this.  The residuals will be set in
326assembly[i].residuals.  The theory and data are model specific, and can
327be found in assembly[i].fitness.data.</p>
328</dd></dl>
329
330<dl class="method">
331<dt id="sans.fit.ParkFitting.MyAssembly.stderr">
332<tt class="descname">stderr</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.stderr" title="Permalink to this definition">¶</a></dt>
333<dd><p>Return parameter uncertainty.</p>
334<p>This is just the sqrt diagonal of covariance matrix inv(J&#8217;J) at point p.</p>
335</dd></dl>
336
337<dl class="method">
338<dt id="sans.fit.ParkFitting.MyAssembly.weight">
339<tt class="descname">weight</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.MyAssembly.weight" title="Permalink to this definition">¶</a></dt>
340<dd><p>Query the weight on a particular model.</p>
341<p>Set weight to value if value is supplied.</p>
342<table class="docutils field-list" frame="void" rules="none">
343<col class="field-name" />
344<col class="field-body" />
345<tbody valign="top">
346<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><dl class="first docutils">
347<dt>idx <span class="classifier-delimiter">:</span> <span class="classifier">integer</span></dt>
348<dd><p class="first last">model number</p>
349</dd>
350<dt>value <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
351<dd><p class="first last">model weight</p>
352</dd>
353</dl>
354</td>
355</tr>
356<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">model weight</p>
357</td>
358</tr>
359</tbody>
360</table>
361</dd></dl>
362
363</dd></dl>
364
365<dl class="class">
366<dt id="sans.fit.ParkFitting.ParkFit">
367<em class="property">class </em><tt class="descclassname">sans.fit.ParkFitting.</tt><tt class="descname">ParkFit</tt><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit" title="Permalink to this definition">¶</a></dt>
368<dd><p>Bases: <a class="reference internal" href="AbstractFitEngine.html#sans.fit.AbstractFitEngine.FitEngine" title="sans.fit.AbstractFitEngine.FitEngine"><tt class="xref py py-class docutils literal"><span class="pre">sans.fit.AbstractFitEngine.FitEngine</span></tt></a></p>
369<p>ParkFit performs the Fit.This class can be used as follow:
370#Do the fit Park
371create an engine: engine = ParkFit()
372Use data must be of type plottable
373Use a sans model</p>
374<p>Add data with a dictionnary of FitArrangeList where Uid is a key and data
375is saved in FitArrange object.
376engine.set_data(data,Uid)</p>
377<p>Set model parameter &#8220;M1&#8221;= model.name add {model.parameter.name:value}.</p>
378<table class="docutils field-list" frame="void" rules="none">
379<col class="field-name" />
380<col class="field-body" />
381<tbody valign="top">
382<tr class="field-odd field"><th class="field-name">Note :</th><td class="field-body">Set_param() if used must always preceded set_model()
383for the fit to be performed.</td>
384</tr>
385</tbody>
386</table>
387<p>engine.set_param( model,&#8221;M1&#8221;, {&#8216;A&#8217;:2,&#8217;B&#8217;:4})</p>
388<p>Add model with a dictionnary of FitArrangeList{} where Uid is a key
389and model
390is save in FitArrange object.
391engine.set_model(model,Uid)</p>
392<p>engine.fit return chisqr,[model.parameter 1,2,..],[[err1....][..err2...]]
393chisqr1, out1, cov1=engine.fit({model.parameter.name:value},qmin,qmax)</p>
394<table class="docutils field-list" frame="void" rules="none">
395<col class="field-name" />
396<col class="field-body" />
397<tbody valign="top">
398<tr class="field-odd field"><th class="field-name">Note :</th><td class="field-body">{model.parameter.name:value} is ignored in fit function since
399the user should make sure to call set_param himself.</td>
400</tr>
401</tbody>
402</table>
403<dl class="method">
404<dt id="sans.fit.ParkFitting.ParkFit.__init__">
405<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit.__init__" title="Permalink to this definition">¶</a></dt>
406<dd><p>Creates a dictionary (self.fitArrangeList={})of FitArrange elements
407with Uid as keys</p>
408</dd></dl>
409
410<dl class="attribute">
411<dt id="sans.fit.ParkFitting.ParkFit.__module__">
412<tt class="descname">__module__</tt><em class="property"> = 'sans.fit.ParkFitting'</em><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit.__module__" title="Permalink to this definition">¶</a></dt>
413<dd></dd></dl>
414
415<dl class="method">
416<dt id="sans.fit.ParkFitting.ParkFit.create_assembly">
417<tt class="descname">create_assembly</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit.create_assembly" title="Permalink to this definition">¶</a></dt>
418<dd><p>Extract sansmodel and sansdata from
419self.FitArrangelist ={Uid:FitArrange}
420Create parkmodel and park data ,form a list couple of parkmodel
421and parkdata
422create an assembly self.problem=  park.Assembly([(parkmodel,parkdata)])</p>
423</dd></dl>
424
425<dl class="method">
426<dt id="sans.fit.ParkFitting.ParkFit.fit">
427<tt class="descname">fit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit.fit" title="Permalink to this definition">¶</a></dt>
428<dd><p>Performs fit with park.fit module.It can  perform fit with one model
429and a set of data, more than two fit of  one model and sets of data or
430fit with more than two model associated with their set of data and
431constraints</p>
432<table class="docutils field-list" frame="void" rules="none">
433<col class="field-name" />
434<col class="field-body" />
435<tbody valign="top">
436<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
437<li><strong>pars</strong> &#8211; Dictionary of parameter names for the model and their
438values.</li>
439<li><strong>qmin</strong> &#8211; The minimum value of data&#8217;s range to be fit</li>
440<li><strong>qmax</strong> &#8211; The maximum value of data&#8217;s range to be fit</li>
441</ul>
442</td>
443</tr>
444<tr class="field-even field"><th class="field-name">Note :</th><td class="field-body"><p class="first">all parameter are ignored most of the time.Are just there
445to keep ScipyFit and ParkFit interface the same.</p>
446</td>
447</tr>
448<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">result.fitness Value of the goodness of fit metric</p>
449</td>
450</tr>
451<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">result.pvec list of parameter with the best value
452found during fitting</p>
453</td>
454</tr>
455<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">result.cov Covariance matrix</p>
456</td>
457</tr>
458</tbody>
459</table>
460</dd></dl>
461
462<dl class="method">
463<dt id="sans.fit.ParkFitting.ParkFit.get_model">
464<tt class="descname">get_model</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit.get_model" title="Permalink to this definition">¶</a></dt>
465<dd><table class="docutils field-list" frame="void" rules="none">
466<col class="field-name" />
467<col class="field-body" />
468<tbody valign="top">
469<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>id</strong> &#8211; id is key in the dictionary containing the model to return</td>
470</tr>
471<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a model at this id or None if no FitArrange element was
472created with this id</td>
473</tr>
474</tbody>
475</table>
476</dd></dl>
477
478<dl class="method">
479<dt id="sans.fit.ParkFitting.ParkFit.get_problem_to_fit">
480<tt class="descname">get_problem_to_fit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit.get_problem_to_fit" title="Permalink to this definition">¶</a></dt>
481<dd><p>return the self.selected value of the fit problem of id</p>
482<table class="docutils field-list" frame="void" rules="none">
483<col class="field-name" />
484<col class="field-body" />
485<tbody valign="top">
486<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>
487</tr>
488</tbody>
489</table>
490</dd></dl>
491
492<dl class="method">
493<dt id="sans.fit.ParkFitting.ParkFit.remove_fit_problem">
494<tt class="descname">remove_fit_problem</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit.remove_fit_problem" title="Permalink to this definition">¶</a></dt>
495<dd><p>remove   fitarrange in id</p>
496</dd></dl>
497
498<dl class="method">
499<dt id="sans.fit.ParkFitting.ParkFit.select_problem_for_fit">
500<tt class="descname">select_problem_for_fit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit.select_problem_for_fit" title="Permalink to this definition">¶</a></dt>
501<dd><p>select a couple of model and data at the id position in dictionary
502and set in self.selected value to value</p>
503<table class="docutils field-list" frame="void" rules="none">
504<col class="field-name" />
505<col class="field-body" />
506<tbody valign="top">
507<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> &#8211; the value to allow fitting.
508can only have the value one or zero</td>
509</tr>
510</tbody>
511</table>
512</dd></dl>
513
514<dl class="method">
515<dt id="sans.fit.ParkFitting.ParkFit.set_data">
516<tt class="descname">set_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit.set_data" title="Permalink to this definition">¶</a></dt>
517<dd><p>Receives plottable, creates a list of data to fit,set data
518in a FitArrange object and adds that object in a dictionary
519with key id.</p>
520<table class="docutils field-list" frame="void" rules="none">
521<col class="field-name" />
522<col class="field-body" />
523<tbody valign="top">
524<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
525<li><strong>data</strong> &#8211; data added</li>
526<li><strong>id</strong> &#8211; unique key corresponding to a fitArrange object with data</li>
527</ul>
528</td>
529</tr>
530</tbody>
531</table>
532</dd></dl>
533
534<dl class="method">
535<dt id="sans.fit.ParkFitting.ParkFit.set_model">
536<tt class="descname">set_model</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.ParkFit.set_model" title="Permalink to this definition">¶</a></dt>
537<dd><p>set a model on a given  in the fit engine.</p>
538<table class="docutils field-list" frame="void" rules="none">
539<col class="field-name" />
540<col class="field-body" />
541<tbody valign="top">
542<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>model</strong> &#8211; sans.models type</td>
543</tr>
544</tbody>
545</table>
546<dl class="docutils">
547<dt>:param <span class="classifier-delimiter">:</span> <span class="classifier">is the key of the fitArrange dictionary where model is </span></dt>
548<dd>saved as a value</dd>
549</dl>
550<table class="docutils field-list" frame="void" rules="none">
551<col class="field-name" />
552<col class="field-body" />
553<tbody valign="top">
554<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
555<li><strong>pars</strong> &#8211; the list of parameters to fit</li>
556<li><strong>constraints</strong> &#8211; <p>list of
557tuple (name of parameter, value of parameters)
558the value of parameter must be a string to constraint 2 different
559parameters.
560Example: 
561we want to fit 2 model M1 and M2 both have parameters A and B.
562constraints can be:</p>
563<blockquote>
564<div>constraints = [(M1.A, M2.B+2), (M1.B= M2.A <a href="#id1"><span class="problematic" id="id2">*</span></a>5),...,]</div></blockquote>
565</li>
566</ul>
567</td>
568</tr>
569<tr class="field-even field"><th class="field-name">Note :</th><td class="field-body"><p class="first last">pars must contains only name of existing model&#8217;s parameters</p>
570</td>
571</tr>
572</tbody>
573</table>
574</dd></dl>
575
576</dd></dl>
577
578<dl class="class">
579<dt id="sans.fit.ParkFitting.SansFitMC">
580<em class="property">class </em><tt class="descclassname">sans.fit.ParkFitting.</tt><tt class="descname">SansFitMC</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC" title="Permalink to this definition">¶</a></dt>
581<dd><p>Bases: <a class="reference internal" href="#sans.fit.ParkFitting.SansFitter" title="sans.fit.ParkFitting.SansFitter"><tt class="xref py py-class docutils literal"><span class="pre">sans.fit.ParkFitting.SansFitter</span></tt></a></p>
582<p>Monte Carlo optimizer.</p>
583<p>This implements <cite>park.fit.Fitter</cite>.</p>
584<dl class="attribute">
585<dt id="sans.fit.ParkFitting.SansFitMC.__class__">
586<tt class="descname">__class__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__class__" title="Permalink to this definition">¶</a></dt>
587<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p>
588</dd></dl>
589
590<dl class="attribute">
591<dt id="sans.fit.ParkFitting.SansFitMC.__delattr__">
592<tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__delattr__" title="Permalink to this definition">¶</a></dt>
593<dd><p>x.__delattr__(&#8216;name&#8217;) &lt;==&gt; del x.name</p>
594</dd></dl>
595
596<dl class="attribute">
597<dt id="sans.fit.ParkFitting.SansFitMC.__dict__">
598<tt class="descname">__dict__</tt><em class="property"> = &lt;dictproxy object at 0x01D351B0&gt;</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__dict__" title="Permalink to this definition">¶</a></dt>
599<dd></dd></dl>
600
601<dl class="attribute">
602<dt id="sans.fit.ParkFitting.SansFitMC.__getattribute__">
603<tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__getattribute__" title="Permalink to this definition">¶</a></dt>
604<dd><p>x.__getattribute__(&#8216;name&#8217;) &lt;==&gt; x.name</p>
605</dd></dl>
606
607<dl class="attribute">
608<dt id="sans.fit.ParkFitting.SansFitMC.__hash__">
609<tt class="descname">__hash__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__hash__" title="Permalink to this definition">¶</a></dt>
610<dd><p>x.__hash__() &lt;==&gt; hash(x)</p>
611</dd></dl>
612
613<dl class="method">
614<dt id="sans.fit.ParkFitting.SansFitMC.__init__">
615<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__init__" title="Permalink to this definition">¶</a></dt>
616<dd></dd></dl>
617
618<dl class="attribute">
619<dt id="sans.fit.ParkFitting.SansFitMC.__module__">
620<tt class="descname">__module__</tt><em class="property"> = 'sans.fit.ParkFitting'</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__module__" title="Permalink to this definition">¶</a></dt>
621<dd></dd></dl>
622
623<dl class="staticmethod">
624<dt id="sans.fit.ParkFitting.SansFitMC.__new__">
625<em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> &rarr; a new object with type S, a subtype of T<a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__new__" title="Permalink to this definition">¶</a></dt>
626<dd></dd></dl>
627
628<dl class="method">
629<dt id="sans.fit.ParkFitting.SansFitMC.__reduce__">
630<tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__reduce__" title="Permalink to this definition">¶</a></dt>
631<dd><p>helper for pickle</p>
632</dd></dl>
633
634<dl class="method">
635<dt id="sans.fit.ParkFitting.SansFitMC.__reduce_ex__">
636<tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__reduce_ex__" title="Permalink to this definition">¶</a></dt>
637<dd><p>helper for pickle</p>
638</dd></dl>
639
640<dl class="attribute">
641<dt id="sans.fit.ParkFitting.SansFitMC.__repr__">
642<tt class="descname">__repr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__repr__" title="Permalink to this definition">¶</a></dt>
643<dd><p>x.__repr__() &lt;==&gt; repr(x)</p>
644</dd></dl>
645
646<dl class="attribute">
647<dt id="sans.fit.ParkFitting.SansFitMC.__setattr__">
648<tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__setattr__" title="Permalink to this definition">¶</a></dt>
649<dd><p>x.__setattr__(&#8216;name&#8217;, value) &lt;==&gt; x.name = value</p>
650</dd></dl>
651
652<dl class="attribute">
653<dt id="sans.fit.ParkFitting.SansFitMC.__str__">
654<tt class="descname">__str__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__str__" title="Permalink to this definition">¶</a></dt>
655<dd><p>x.__str__() &lt;==&gt; str(x)</p>
656</dd></dl>
657
658<dl class="attribute">
659<dt id="sans.fit.ParkFitting.SansFitMC.__weakref__">
660<tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.__weakref__" title="Permalink to this definition">¶</a></dt>
661<dd><p>list of weak references to the object (if defined)</p>
662</dd></dl>
663
664<dl class="method">
665<dt id="sans.fit.ParkFitting.SansFitMC._fit">
666<tt class="descname">_fit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC._fit" title="Permalink to this definition">¶</a></dt>
667<dd><p>Run a monte carlo fit.</p>
668<p>This procedure maps a local optimizer across a set of initial points.</p>
669</dd></dl>
670
671<dl class="method">
672<dt id="sans.fit.ParkFitting.SansFitMC._threaded">
673<tt class="descname">_threaded</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC._threaded" title="Permalink to this definition">¶</a></dt>
674<dd></dd></dl>
675
676<dl class="method">
677<dt id="sans.fit.ParkFitting.SansFitMC.fit">
678<tt class="descname">fit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.fit" title="Permalink to this definition">¶</a></dt>
679<dd><p>Global optimizer.</p>
680<p>This function should return immediately</p>
681</dd></dl>
682
683<dl class="attribute">
684<dt id="sans.fit.ParkFitting.SansFitMC.localfit">
685<tt class="descname">localfit</tt><em class="property"> = &lt;sans.fit.ParkFitting.SansFitSimplex object at 0x01D084F0&gt;</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.localfit" title="Permalink to this definition">¶</a></dt>
686<dd></dd></dl>
687
688<dl class="attribute">
689<dt id="sans.fit.ParkFitting.SansFitMC.start_points">
690<tt class="descname">start_points</tt><em class="property"> = 10</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitMC.start_points" title="Permalink to this definition">¶</a></dt>
691<dd></dd></dl>
692
693</dd></dl>
694
695<dl class="class">
696<dt id="sans.fit.ParkFitting.SansFitParameter">
697<em class="property">class </em><tt class="descclassname">sans.fit.ParkFitting.</tt><tt class="descname">SansFitParameter</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter" title="Permalink to this definition">¶</a></dt>
698<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">park.fitresult.FitParameter</span></tt></p>
699<p>Fit result for an individual parameter.</p>
700<dl class="attribute">
701<dt id="sans.fit.ParkFitting.SansFitParameter.__class__">
702<tt class="descname">__class__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__class__" title="Permalink to this definition">¶</a></dt>
703<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p>
704</dd></dl>
705
706<dl class="attribute">
707<dt id="sans.fit.ParkFitting.SansFitParameter.__delattr__">
708<tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__delattr__" title="Permalink to this definition">¶</a></dt>
709<dd><p>x.__delattr__(&#8216;name&#8217;) &lt;==&gt; del x.name</p>
710</dd></dl>
711
712<dl class="attribute">
713<dt id="sans.fit.ParkFitting.SansFitParameter.__dict__">
714<tt class="descname">__dict__</tt><em class="property"> = &lt;dictproxy object at 0x01D352D0&gt;</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__dict__" title="Permalink to this definition">¶</a></dt>
715<dd></dd></dl>
716
717<dl class="attribute">
718<dt id="sans.fit.ParkFitting.SansFitParameter.__getattribute__">
719<tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__getattribute__" title="Permalink to this definition">¶</a></dt>
720<dd><p>x.__getattribute__(&#8216;name&#8217;) &lt;==&gt; x.name</p>
721</dd></dl>
722
723<dl class="attribute">
724<dt id="sans.fit.ParkFitting.SansFitParameter.__hash__">
725<tt class="descname">__hash__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__hash__" title="Permalink to this definition">¶</a></dt>
726<dd><p>x.__hash__() &lt;==&gt; hash(x)</p>
727</dd></dl>
728
729<dl class="method">
730<dt id="sans.fit.ParkFitting.SansFitParameter.__init__">
731<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__init__" title="Permalink to this definition">¶</a></dt>
732<dd></dd></dl>
733
734<dl class="attribute">
735<dt id="sans.fit.ParkFitting.SansFitParameter.__module__">
736<tt class="descname">__module__</tt><em class="property"> = 'sans.fit.ParkFitting'</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__module__" title="Permalink to this definition">¶</a></dt>
737<dd></dd></dl>
738
739<dl class="staticmethod">
740<dt id="sans.fit.ParkFitting.SansFitParameter.__new__">
741<em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> &rarr; a new object with type S, a subtype of T<a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__new__" title="Permalink to this definition">¶</a></dt>
742<dd></dd></dl>
743
744<dl class="method">
745<dt id="sans.fit.ParkFitting.SansFitParameter.__reduce__">
746<tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__reduce__" title="Permalink to this definition">¶</a></dt>
747<dd><p>helper for pickle</p>
748</dd></dl>
749
750<dl class="method">
751<dt id="sans.fit.ParkFitting.SansFitParameter.__reduce_ex__">
752<tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__reduce_ex__" title="Permalink to this definition">¶</a></dt>
753<dd><p>helper for pickle</p>
754</dd></dl>
755
756<dl class="method">
757<dt id="sans.fit.ParkFitting.SansFitParameter.__repr__">
758<tt class="descname">__repr__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__repr__" title="Permalink to this definition">¶</a></dt>
759<dd></dd></dl>
760
761<dl class="attribute">
762<dt id="sans.fit.ParkFitting.SansFitParameter.__setattr__">
763<tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__setattr__" title="Permalink to this definition">¶</a></dt>
764<dd><p>x.__setattr__(&#8216;name&#8217;, value) &lt;==&gt; x.name = value</p>
765</dd></dl>
766
767<dl class="attribute">
768<dt id="sans.fit.ParkFitting.SansFitParameter.__str__">
769<tt class="descname">__str__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__str__" title="Permalink to this definition">¶</a></dt>
770<dd><p>x.__str__() &lt;==&gt; str(x)</p>
771</dd></dl>
772
773<dl class="attribute">
774<dt id="sans.fit.ParkFitting.SansFitParameter.__weakref__">
775<tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.__weakref__" title="Permalink to this definition">¶</a></dt>
776<dd><p>list of weak references to the object (if defined)</p>
777</dd></dl>
778
779<dl class="method">
780<dt id="sans.fit.ParkFitting.SansFitParameter.summarize">
781<tt class="descname">summarize</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitParameter.summarize" title="Permalink to this definition">¶</a></dt>
782<dd><p>Return parameter range string.</p>
783<p>E.g.,  &#8221;       Gold .....|.... 5.2043 in [2,7]&#8221;</p>
784</dd></dl>
785
786</dd></dl>
787
788<dl class="class">
789<dt id="sans.fit.ParkFitting.SansFitResult">
790<em class="property">class </em><tt class="descclassname">sans.fit.ParkFitting.</tt><tt class="descname">SansFitResult</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult" title="Permalink to this definition">¶</a></dt>
791<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">park.fitresult.FitResult</span></tt></p>
792<dl class="attribute">
793<dt id="sans.fit.ParkFitting.SansFitResult.__class__">
794<tt class="descname">__class__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__class__" title="Permalink to this definition">¶</a></dt>
795<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p>
796</dd></dl>
797
798<dl class="attribute">
799<dt id="sans.fit.ParkFitting.SansFitResult.__delattr__">
800<tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__delattr__" title="Permalink to this definition">¶</a></dt>
801<dd><p>x.__delattr__(&#8216;name&#8217;) &lt;==&gt; del x.name</p>
802</dd></dl>
803
804<dl class="attribute">
805<dt id="sans.fit.ParkFitting.SansFitResult.__dict__">
806<tt class="descname">__dict__</tt><em class="property"> = &lt;dictproxy object at 0x01D358D0&gt;</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__dict__" title="Permalink to this definition">¶</a></dt>
807<dd></dd></dl>
808
809<dl class="attribute">
810<dt id="sans.fit.ParkFitting.SansFitResult.__getattribute__">
811<tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__getattribute__" title="Permalink to this definition">¶</a></dt>
812<dd><p>x.__getattribute__(&#8216;name&#8217;) &lt;==&gt; x.name</p>
813</dd></dl>
814
815<dl class="attribute">
816<dt id="sans.fit.ParkFitting.SansFitResult.__hash__">
817<tt class="descname">__hash__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__hash__" title="Permalink to this definition">¶</a></dt>
818<dd><p>x.__hash__() &lt;==&gt; hash(x)</p>
819</dd></dl>
820
821<dl class="method">
822<dt id="sans.fit.ParkFitting.SansFitResult.__init__">
823<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__init__" title="Permalink to this definition">¶</a></dt>
824<dd></dd></dl>
825
826<dl class="attribute">
827<dt id="sans.fit.ParkFitting.SansFitResult.__module__">
828<tt class="descname">__module__</tt><em class="property"> = 'sans.fit.ParkFitting'</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__module__" title="Permalink to this definition">¶</a></dt>
829<dd></dd></dl>
830
831<dl class="staticmethod">
832<dt id="sans.fit.ParkFitting.SansFitResult.__new__">
833<em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> &rarr; a new object with type S, a subtype of T<a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__new__" title="Permalink to this definition">¶</a></dt>
834<dd></dd></dl>
835
836<dl class="method">
837<dt id="sans.fit.ParkFitting.SansFitResult.__reduce__">
838<tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__reduce__" title="Permalink to this definition">¶</a></dt>
839<dd><p>helper for pickle</p>
840</dd></dl>
841
842<dl class="method">
843<dt id="sans.fit.ParkFitting.SansFitResult.__reduce_ex__">
844<tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__reduce_ex__" title="Permalink to this definition">¶</a></dt>
845<dd><p>helper for pickle</p>
846</dd></dl>
847
848<dl class="attribute">
849<dt id="sans.fit.ParkFitting.SansFitResult.__repr__">
850<tt class="descname">__repr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__repr__" title="Permalink to this definition">¶</a></dt>
851<dd><p>x.__repr__() &lt;==&gt; repr(x)</p>
852</dd></dl>
853
854<dl class="attribute">
855<dt id="sans.fit.ParkFitting.SansFitResult.__setattr__">
856<tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__setattr__" title="Permalink to this definition">¶</a></dt>
857<dd><p>x.__setattr__(&#8216;name&#8217;, value) &lt;==&gt; x.name = value</p>
858</dd></dl>
859
860<dl class="method">
861<dt id="sans.fit.ParkFitting.SansFitResult.__str__">
862<tt class="descname">__str__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__str__" title="Permalink to this definition">¶</a></dt>
863<dd></dd></dl>
864
865<dl class="attribute">
866<dt id="sans.fit.ParkFitting.SansFitResult.__weakref__">
867<tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.__weakref__" title="Permalink to this definition">¶</a></dt>
868<dd><p>list of weak references to the object (if defined)</p>
869</dd></dl>
870
871<dl class="method">
872<dt id="sans.fit.ParkFitting.SansFitResult.calc_cov">
873<tt class="descname">calc_cov</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.calc_cov" title="Permalink to this definition">¶</a></dt>
874<dd><p>Return the covariance matrix inv(J&#8217;J) at point p.</p>
875</dd></dl>
876
877<dl class="method">
878<dt id="sans.fit.ParkFitting.SansFitResult.print_summary">
879<tt class="descname">print_summary</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.print_summary" title="Permalink to this definition">¶</a></dt>
880<dd></dd></dl>
881
882<dl class="method">
883<dt id="sans.fit.ParkFitting.SansFitResult.set_cov">
884<tt class="descname">set_cov</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.set_cov" title="Permalink to this definition">¶</a></dt>
885<dd><p>Return the covariance matrix inv(J&#8217;J) at point p.</p>
886</dd></dl>
887
888<dl class="method">
889<dt id="sans.fit.ParkFitting.SansFitResult.update">
890<tt class="descname">update</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitResult.update" title="Permalink to this definition">¶</a></dt>
891<dd></dd></dl>
892
893</dd></dl>
894
895<dl class="class">
896<dt id="sans.fit.ParkFitting.SansFitSimplex">
897<em class="property">class </em><tt class="descclassname">sans.fit.ParkFitting.</tt><tt class="descname">SansFitSimplex</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex" title="Permalink to this definition">¶</a></dt>
898<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">park.fitmc.FitSimplex</span></tt></p>
899<p>Local minimizer using Nelder-Mead simplex algorithm.</p>
900<p>Simplex is robust and derivative free, though not very efficient.</p>
901<p>This class wraps the bounds contrained Nelder-Mead simplex
902implementation for <cite>park.simplex.simplex</cite>.</p>
903<dl class="attribute">
904<dt id="sans.fit.ParkFitting.SansFitSimplex.__class__">
905<tt class="descname">__class__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__class__" title="Permalink to this definition">¶</a></dt>
906<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p>
907</dd></dl>
908
909<dl class="attribute">
910<dt id="sans.fit.ParkFitting.SansFitSimplex.__delattr__">
911<tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__delattr__" title="Permalink to this definition">¶</a></dt>
912<dd><p>x.__delattr__(&#8216;name&#8217;) &lt;==&gt; del x.name</p>
913</dd></dl>
914
915<dl class="attribute">
916<dt id="sans.fit.ParkFitting.SansFitSimplex.__dict__">
917<tt class="descname">__dict__</tt><em class="property"> = &lt;dictproxy object at 0x01D35CB0&gt;</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__dict__" title="Permalink to this definition">¶</a></dt>
918<dd></dd></dl>
919
920<dl class="attribute">
921<dt id="sans.fit.ParkFitting.SansFitSimplex.__getattribute__">
922<tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__getattribute__" title="Permalink to this definition">¶</a></dt>
923<dd><p>x.__getattribute__(&#8216;name&#8217;) &lt;==&gt; x.name</p>
924</dd></dl>
925
926<dl class="attribute">
927<dt id="sans.fit.ParkFitting.SansFitSimplex.__hash__">
928<tt class="descname">__hash__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__hash__" title="Permalink to this definition">¶</a></dt>
929<dd><p>x.__hash__() &lt;==&gt; hash(x)</p>
930</dd></dl>
931
932<dl class="method">
933<dt id="sans.fit.ParkFitting.SansFitSimplex.__init__">
934<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__init__" title="Permalink to this definition">¶</a></dt>
935<dd></dd></dl>
936
937<dl class="attribute">
938<dt id="sans.fit.ParkFitting.SansFitSimplex.__module__">
939<tt class="descname">__module__</tt><em class="property"> = 'sans.fit.ParkFitting'</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__module__" title="Permalink to this definition">¶</a></dt>
940<dd></dd></dl>
941
942<dl class="staticmethod">
943<dt id="sans.fit.ParkFitting.SansFitSimplex.__new__">
944<em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> &rarr; a new object with type S, a subtype of T<a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__new__" title="Permalink to this definition">¶</a></dt>
945<dd></dd></dl>
946
947<dl class="method">
948<dt id="sans.fit.ParkFitting.SansFitSimplex.__reduce__">
949<tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__reduce__" title="Permalink to this definition">¶</a></dt>
950<dd><p>helper for pickle</p>
951</dd></dl>
952
953<dl class="method">
954<dt id="sans.fit.ParkFitting.SansFitSimplex.__reduce_ex__">
955<tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__reduce_ex__" title="Permalink to this definition">¶</a></dt>
956<dd><p>helper for pickle</p>
957</dd></dl>
958
959<dl class="attribute">
960<dt id="sans.fit.ParkFitting.SansFitSimplex.__repr__">
961<tt class="descname">__repr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__repr__" title="Permalink to this definition">¶</a></dt>
962<dd><p>x.__repr__() &lt;==&gt; repr(x)</p>
963</dd></dl>
964
965<dl class="attribute">
966<dt id="sans.fit.ParkFitting.SansFitSimplex.__setattr__">
967<tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__setattr__" title="Permalink to this definition">¶</a></dt>
968<dd><p>x.__setattr__(&#8216;name&#8217;, value) &lt;==&gt; x.name = value</p>
969</dd></dl>
970
971<dl class="attribute">
972<dt id="sans.fit.ParkFitting.SansFitSimplex.__str__">
973<tt class="descname">__str__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__str__" title="Permalink to this definition">¶</a></dt>
974<dd><p>x.__str__() &lt;==&gt; str(x)</p>
975</dd></dl>
976
977<dl class="attribute">
978<dt id="sans.fit.ParkFitting.SansFitSimplex.__weakref__">
979<tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.__weakref__" title="Permalink to this definition">¶</a></dt>
980<dd><p>list of weak references to the object (if defined)</p>
981</dd></dl>
982
983<dl class="method">
984<dt id="sans.fit.ParkFitting.SansFitSimplex._iscancelled">
985<tt class="descname">_iscancelled</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex._iscancelled" title="Permalink to this definition">¶</a></dt>
986<dd></dd></dl>
987
988<dl class="method">
989<dt id="sans.fit.ParkFitting.SansFitSimplex.abort">
990<tt class="descname">abort</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.abort" title="Permalink to this definition">¶</a></dt>
991<dd><p>Cancel the fit in progress from another thread of execution</p>
992</dd></dl>
993
994<dl class="method">
995<dt id="sans.fit.ParkFitting.SansFitSimplex.fit">
996<tt class="descname">fit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.fit" title="Permalink to this definition">¶</a></dt>
997<dd><p>Run the fit</p>
998</dd></dl>
999
1000<dl class="attribute">
1001<dt id="sans.fit.ParkFitting.SansFitSimplex.ftol">
1002<tt class="descname">ftol</tt><em class="property"> = 5.0000000000000002e-005</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.ftol" title="Permalink to this definition">¶</a></dt>
1003<dd><p>Stop when vertex values are within ftol of each other</p>
1004</dd></dl>
1005
1006<dl class="attribute">
1007<dt id="sans.fit.ParkFitting.SansFitSimplex.maxiter">
1008<tt class="descname">maxiter</tt><em class="property"> = None</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.maxiter" title="Permalink to this definition">¶</a></dt>
1009<dd><p>Maximum number of iterations before fit terminates</p>
1010</dd></dl>
1011
1012<dl class="attribute">
1013<dt id="sans.fit.ParkFitting.SansFitSimplex.radius">
1014<tt class="descname">radius</tt><em class="property"> = 0.050000000000000003</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.radius" title="Permalink to this definition">¶</a></dt>
1015<dd><p>Size of the initial simplex; this is a portion between 0 and 1</p>
1016</dd></dl>
1017
1018<dl class="attribute">
1019<dt id="sans.fit.ParkFitting.SansFitSimplex.xtol">
1020<tt class="descname">xtol</tt><em class="property"> = 1</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitSimplex.xtol" title="Permalink to this definition">¶</a></dt>
1021<dd><p>Stop when simplex vertices are within xtol of each other</p>
1022</dd></dl>
1023
1024</dd></dl>
1025
1026<dl class="class">
1027<dt id="sans.fit.ParkFitting.SansFitter">
1028<em class="property">class </em><tt class="descclassname">sans.fit.ParkFitting.</tt><tt class="descname">SansFitter</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter" title="Permalink to this definition">¶</a></dt>
1029<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">park.fit.Fitter</span></tt></p>
1030<dl class="attribute">
1031<dt id="sans.fit.ParkFitting.SansFitter.__class__">
1032<tt class="descname">__class__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__class__" title="Permalink to this definition">¶</a></dt>
1033<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p>
1034</dd></dl>
1035
1036<dl class="attribute">
1037<dt id="sans.fit.ParkFitting.SansFitter.__delattr__">
1038<tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__delattr__" title="Permalink to this definition">¶</a></dt>
1039<dd><p>x.__delattr__(&#8216;name&#8217;) &lt;==&gt; del x.name</p>
1040</dd></dl>
1041
1042<dl class="attribute">
1043<dt id="sans.fit.ParkFitting.SansFitter.__dict__">
1044<tt class="descname">__dict__</tt><em class="property"> = &lt;dictproxy object at 0x01D35B10&gt;</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__dict__" title="Permalink to this definition">¶</a></dt>
1045<dd></dd></dl>
1046
1047<dl class="attribute">
1048<dt id="sans.fit.ParkFitting.SansFitter.__getattribute__">
1049<tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__getattribute__" title="Permalink to this definition">¶</a></dt>
1050<dd><p>x.__getattribute__(&#8216;name&#8217;) &lt;==&gt; x.name</p>
1051</dd></dl>
1052
1053<dl class="attribute">
1054<dt id="sans.fit.ParkFitting.SansFitter.__hash__">
1055<tt class="descname">__hash__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__hash__" title="Permalink to this definition">¶</a></dt>
1056<dd><p>x.__hash__() &lt;==&gt; hash(x)</p>
1057</dd></dl>
1058
1059<dl class="method">
1060<dt id="sans.fit.ParkFitting.SansFitter.__init__">
1061<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__init__" title="Permalink to this definition">¶</a></dt>
1062<dd></dd></dl>
1063
1064<dl class="attribute">
1065<dt id="sans.fit.ParkFitting.SansFitter.__module__">
1066<tt class="descname">__module__</tt><em class="property"> = 'sans.fit.ParkFitting'</em><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__module__" title="Permalink to this definition">¶</a></dt>
1067<dd></dd></dl>
1068
1069<dl class="staticmethod">
1070<dt id="sans.fit.ParkFitting.SansFitter.__new__">
1071<em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> &rarr; a new object with type S, a subtype of T<a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__new__" title="Permalink to this definition">¶</a></dt>
1072<dd></dd></dl>
1073
1074<dl class="method">
1075<dt id="sans.fit.ParkFitting.SansFitter.__reduce__">
1076<tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__reduce__" title="Permalink to this definition">¶</a></dt>
1077<dd><p>helper for pickle</p>
1078</dd></dl>
1079
1080<dl class="method">
1081<dt id="sans.fit.ParkFitting.SansFitter.__reduce_ex__">
1082<tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__reduce_ex__" title="Permalink to this definition">¶</a></dt>
1083<dd><p>helper for pickle</p>
1084</dd></dl>
1085
1086<dl class="attribute">
1087<dt id="sans.fit.ParkFitting.SansFitter.__repr__">
1088<tt class="descname">__repr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__repr__" title="Permalink to this definition">¶</a></dt>
1089<dd><p>x.__repr__() &lt;==&gt; repr(x)</p>
1090</dd></dl>
1091
1092<dl class="attribute">
1093<dt id="sans.fit.ParkFitting.SansFitter.__setattr__">
1094<tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__setattr__" title="Permalink to this definition">¶</a></dt>
1095<dd><p>x.__setattr__(&#8216;name&#8217;, value) &lt;==&gt; x.name = value</p>
1096</dd></dl>
1097
1098<dl class="attribute">
1099<dt id="sans.fit.ParkFitting.SansFitter.__str__">
1100<tt class="descname">__str__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__str__" title="Permalink to this definition">¶</a></dt>
1101<dd><p>x.__str__() &lt;==&gt; str(x)</p>
1102</dd></dl>
1103
1104<dl class="attribute">
1105<dt id="sans.fit.ParkFitting.SansFitter.__weakref__">
1106<tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.__weakref__" title="Permalink to this definition">¶</a></dt>
1107<dd><p>list of weak references to the object (if defined)</p>
1108</dd></dl>
1109
1110<dl class="method">
1111<dt id="sans.fit.ParkFitting.SansFitter._fit">
1112<tt class="descname">_fit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter._fit" title="Permalink to this definition">¶</a></dt>
1113<dd><p>Run the actual fit in a separate thread</p>
1114<dl class="docutils">
1115<dt>Each cycle k of n:</dt>
1116<dd>self.handler.progress(k,n)</dd>
1117<dt>Each improvement:</dt>
1118<dd>self.handler.result.update(x,fx,ncalls)
1119self.handler.improvement()</dd>
1120<dt>On completion (if not already performed):</dt>
1121<dd>self.hander.result.update(x,fx,ncalls)
1122self.handler.done
1123self.handler.finalize()</dd>
1124</dl>
1125</dd></dl>
1126
1127<dl class="method">
1128<dt id="sans.fit.ParkFitting.SansFitter._threaded">
1129<tt class="descname">_threaded</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter._threaded" title="Permalink to this definition">¶</a></dt>
1130<dd></dd></dl>
1131
1132<dl class="method">
1133<dt id="sans.fit.ParkFitting.SansFitter.fit">
1134<tt class="descname">fit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansFitter.fit" title="Permalink to this definition">¶</a></dt>
1135<dd><p>Global optimizer.</p>
1136<p>This function should return immediately</p>
1137</dd></dl>
1138
1139</dd></dl>
1140
1141<dl class="class">
1142<dt id="sans.fit.ParkFitting.SansPart">
1143<em class="property">class </em><tt class="descclassname">sans.fit.ParkFitting.</tt><tt class="descname">SansPart</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansPart" title="Permalink to this definition">¶</a></dt>
1144<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">park.assembly.Part</span></tt></p>
1145<p>Part of a fitting assembly.  Part holds the model itself and
1146associated data.  The part can be initialized with a fitness
1147object or with a pair (model,data) for the default fitness function.</p>
1148<dl class="docutils">
1149<dt>fitness (Fitness)</dt>
1150<dd>object implementing the <cite>park.assembly.Fitness</cite> interface.  In
1151particular, fitness should provide a parameterset attribute
1152containing a ParameterSet and a residuals method returning a vector
1153of residuals.</dd>
1154<dt>weight (dimensionless)</dt>
1155<dd>weight for the model.  See comments in assembly.py for details.</dd>
1156<dt>isfitted (boolean)</dt>
1157<dd>True if the model residuals should be included in the fit.
1158The model parameters may still be used in parameter
1159expressions, but there will be no comparison to the data.</dd>
1160<dt>residuals (vector)</dt>
1161<dd>Residuals for the model if they have been calculated, or None</dd>
1162<dt>degrees_of_freedom</dt>
1163<dd>Number of residuals minus number of fitted parameters.
1164Degrees of freedom for individual models does not make
1165sense in the presence of expressions combining models,
1166particularly in the case where a model has many parameters
1167but no data or many computed parameters.  The degrees of
1168freedom for the model is set to be at least one.</dd>
1169<dt>chisq</dt>
1170<dd><p class="first">sum(residuals**2); use chisq/degrees_of_freedom to
1171get the reduced chisq value.</p>
1172<p>Get/set the weight on the given model.</p>
1173<p class="last">assembly.weight(3) returns the weight on model 3 (0-origin)
1174assembly.weight(3,0.5) sets the weight on model 3 (0-origin)</p>
1175</dd>
1176</dl>
1177<dl class="attribute">
1178<dt id="sans.fit.ParkFitting.SansPart.__class__">
1179<tt class="descname">__class__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__class__" title="Permalink to this definition">¶</a></dt>
1180<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p>
1181</dd></dl>
1182
1183<dl class="attribute">
1184<dt id="sans.fit.ParkFitting.SansPart.__delattr__">
1185<tt class="descname">__delattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__delattr__" title="Permalink to this definition">¶</a></dt>
1186<dd><p>x.__delattr__(&#8216;name&#8217;) &lt;==&gt; del x.name</p>
1187</dd></dl>
1188
1189<dl class="attribute">
1190<dt id="sans.fit.ParkFitting.SansPart.__dict__">
1191<tt class="descname">__dict__</tt><em class="property"> = &lt;dictproxy object at 0x01D29050&gt;</em><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__dict__" title="Permalink to this definition">¶</a></dt>
1192<dd></dd></dl>
1193
1194<dl class="attribute">
1195<dt id="sans.fit.ParkFitting.SansPart.__getattribute__">
1196<tt class="descname">__getattribute__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__getattribute__" title="Permalink to this definition">¶</a></dt>
1197<dd><p>x.__getattribute__(&#8216;name&#8217;) &lt;==&gt; x.name</p>
1198</dd></dl>
1199
1200<dl class="attribute">
1201<dt id="sans.fit.ParkFitting.SansPart.__hash__">
1202<tt class="descname">__hash__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__hash__" title="Permalink to this definition">¶</a></dt>
1203<dd><p>x.__hash__() &lt;==&gt; hash(x)</p>
1204</dd></dl>
1205
1206<dl class="method">
1207<dt id="sans.fit.ParkFitting.SansPart.__init__">
1208<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__init__" title="Permalink to this definition">¶</a></dt>
1209<dd></dd></dl>
1210
1211<dl class="attribute">
1212<dt id="sans.fit.ParkFitting.SansPart.__module__">
1213<tt class="descname">__module__</tt><em class="property"> = 'sans.fit.ParkFitting'</em><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__module__" title="Permalink to this definition">¶</a></dt>
1214<dd></dd></dl>
1215
1216<dl class="staticmethod">
1217<dt id="sans.fit.ParkFitting.SansPart.__new__">
1218<em class="property">static </em><tt class="descname">__new__</tt><big>(</big><em>S</em>, <em>...</em><big>)</big> &rarr; a new object with type S, a subtype of T<a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__new__" title="Permalink to this definition">¶</a></dt>
1219<dd></dd></dl>
1220
1221<dl class="method">
1222<dt id="sans.fit.ParkFitting.SansPart.__reduce__">
1223<tt class="descname">__reduce__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__reduce__" title="Permalink to this definition">¶</a></dt>
1224<dd><p>helper for pickle</p>
1225</dd></dl>
1226
1227<dl class="method">
1228<dt id="sans.fit.ParkFitting.SansPart.__reduce_ex__">
1229<tt class="descname">__reduce_ex__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__reduce_ex__" title="Permalink to this definition">¶</a></dt>
1230<dd><p>helper for pickle</p>
1231</dd></dl>
1232
1233<dl class="attribute">
1234<dt id="sans.fit.ParkFitting.SansPart.__repr__">
1235<tt class="descname">__repr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__repr__" title="Permalink to this definition">¶</a></dt>
1236<dd><p>x.__repr__() &lt;==&gt; repr(x)</p>
1237</dd></dl>
1238
1239<dl class="attribute">
1240<dt id="sans.fit.ParkFitting.SansPart.__setattr__">
1241<tt class="descname">__setattr__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__setattr__" title="Permalink to this definition">¶</a></dt>
1242<dd><p>x.__setattr__(&#8216;name&#8217;, value) &lt;==&gt; x.name = value</p>
1243</dd></dl>
1244
1245<dl class="attribute">
1246<dt id="sans.fit.ParkFitting.SansPart.__str__">
1247<tt class="descname">__str__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__str__" title="Permalink to this definition">¶</a></dt>
1248<dd><p>x.__str__() &lt;==&gt; str(x)</p>
1249</dd></dl>
1250
1251<dl class="attribute">
1252<dt id="sans.fit.ParkFitting.SansPart.__weakref__">
1253<tt class="descname">__weakref__</tt><a class="headerlink" href="#sans.fit.ParkFitting.SansPart.__weakref__" title="Permalink to this definition">¶</a></dt>
1254<dd><p>list of weak references to the object (if defined)</p>
1255</dd></dl>
1256
1257</dd></dl>
1258
[6b1588b]1259</div>
1260</div>
1261
1262
1263          </div>
1264        </div>
1265      </div>
1266      <div class="sphinxsidebar">
1267        <div class="sphinxsidebarwrapper">
1268  <h3><a href="../index.html">Table Of Contents</a></h3>
1269  <ul>
1270<li><a class="reference internal" href="#">ParkFitting</a><ul>
1271<li><a class="reference internal" href="#mod-sans-fit-parkfitting">:mod:` sans.fit.ParkFitting`</a></li>
1272</ul>
1273</li>
1274</ul>
1275
1276  <h4>Previous topic</h4>
[f696e2a]1277  <p class="topless"><a href="Loader.html"
1278                        title="previous chapter">Loader</a></p>
[6b1588b]1279  <h4>Next topic</h4>
1280  <p class="topless"><a href="ScipyFitting.html"
1281                        title="next chapter">ScipyFitting</a></p>
1282  <h3>This Page</h3>
1283  <ul class="this-page-menu">
1284    <li><a href="../_sources/api/ParkFitting.txt"
1285           rel="nofollow">Show Source</a></li>
1286  </ul>
1287<div id="searchbox" style="display: none">
1288  <h3>Quick search</h3>
1289    <form class="search" action="../search.html" method="get">
[f696e2a]1290      <input type="text" name="q" />
[6b1588b]1291      <input type="submit" value="Go" />
1292      <input type="hidden" name="check_keywords" value="yes" />
1293      <input type="hidden" name="area" value="default" />
1294    </form>
1295    <p class="searchtip" style="font-size: 90%">
1296    Enter search terms or a module, class or function name.
1297    </p>
1298</div>
1299<script type="text/javascript">$('#searchbox').show(0);</script>
1300        </div>
1301      </div>
1302      <div class="clearer"></div>
1303    </div>
1304    <div class="related">
1305      <h3>Navigation</h3>
1306      <ul>
1307        <li class="right" style="margin-right: 10px">
1308          <a href="../genindex.html" title="General Index"
1309             >index</a></li>
1310        <li class="right" >
1311          <a href="../py-modindex.html" title="Python Module Index"
1312             >modules</a> |</li>
1313        <li class="right" >
1314          <a href="ScipyFitting.html" title="ScipyFitting"
1315             >next</a> |</li>
1316        <li class="right" >
[f696e2a]1317          <a href="Loader.html" title="Loader"
[6b1588b]1318             >previous</a> |</li>
[f696e2a]1319        <li><a href="../index.html">park_integration 0.1.0 documentation</a> &raquo;</li>
[6b1588b]1320          <li><a href="index.html" >Reference</a> &raquo;</li> 
1321      </ul>
1322    </div>
1323    <div class="footer">
1324        &copy; Copyright 2010, sans group.
[f696e2a]1325      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.
[6b1588b]1326    </div>
1327  </body>
1328</html>
Note: See TracBrowser for help on using the repository browser.