source: sasview/sansview/docs/sphinx/_build/html/api/perspectives/fitting/model_thread.html @ 5062bbf

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

working on documentation

  • Property mode set to 100644
File size: 15.6 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>model_thread &mdash; sansview 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="sansview v0.1.0 documentation" href="../../../index.html" />
26    <link rel="up" title="Reference" href="index.html" />
27    <link rel="next" title="models" href="models.html" />
28    <link rel="prev" title="hint_fitpage" href="hint_fitpage.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="models.html" title="models"
42             accesskey="N">next</a> |</li>
43        <li class="right" >
44          <a href="hint_fitpage.html" title="hint_fitpage"
45             accesskey="P">previous</a> |</li>
46        <li><a href="../../../index.html">sansview 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="model-thread">
57<h1>model_thread<a class="headerlink" href="#model-thread" title="Permalink to this headline">¶</a></h1>
58<div class="section" id="module-sans.perspectives.fitting.model_thread">
59<span id="sans-perspectives-fitting-model-thread"></span><h2><a class="reference internal" href="#module-sans.perspectives.fitting.model_thread"><tt class="xref py py-mod docutils literal"><span class="pre">sans.perspectives.fitting.model_thread</span></tt></a><a class="headerlink" href="#module-sans.perspectives.fitting.model_thread" title="Permalink to this headline">¶</a></h2>
60<dl class="class">
61<dt id="sans.perspectives.fitting.model_thread.Calc1D">
62<em class="property">class </em><tt class="descclassname">sans.perspectives.fitting.model_thread.</tt><tt class="descname">Calc1D</tt><big>(</big><em>x</em>, <em>model</em>, <em>data=None</em>, <em>qmin=None</em>, <em>qmax=None</em>, <em>smearer=None</em>, <em>completefn=None</em>, <em>updatefn=None</em>, <em>yieldtime=0.01</em>, <em>worktime=0.01</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D" title="Permalink to this definition">¶</a></dt>
63<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">data_util.calcthread.CalcThread</span></tt></p>
64<p>Compute 1D data</p>
65<dl class="method">
66<dt id="sans.perspectives.fitting.model_thread.Calc1D.complete">
67<tt class="descname">complete</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.complete" title="Permalink to this definition">¶</a></dt>
68<dd>Update the GUI with the completed results from a work unit.</dd></dl>
69
70<dl class="method">
71<dt id="sans.perspectives.fitting.model_thread.Calc1D.compute">
72<tt class="descname">compute</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.compute" title="Permalink to this definition">¶</a></dt>
73<dd>Compute model 1d value given qmin , qmax , x value</dd></dl>
74
75<dl class="method">
76<dt id="sans.perspectives.fitting.model_thread.Calc1D.interrupt">
77<tt class="descname">interrupt</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.interrupt" title="Permalink to this definition">¶</a></dt>
78<dd>Stop the current work item.  To clear the work queue as
79well call the stop() method.</dd></dl>
80
81<dl class="method">
82<dt id="sans.perspectives.fitting.model_thread.Calc1D.isquit">
83<tt class="descname">isquit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.isquit" title="Permalink to this definition">¶</a></dt>
84<dd>Check for interrupts.  Should be called frequently to
85provide user responsiveness.  Also yields to other running
86threads, which is required for good performance on OS X.</dd></dl>
87
88<dl class="method">
89<dt id="sans.perspectives.fitting.model_thread.Calc1D.isrunning">
90<tt class="descname">isrunning</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.isrunning" title="Permalink to this definition">¶</a></dt>
91<dd></dd></dl>
92
93<dl class="method">
94<dt id="sans.perspectives.fitting.model_thread.Calc1D.queue">
95<tt class="descname">queue</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.queue" title="Permalink to this definition">¶</a></dt>
96<dd>Add a work unit to the end of the queue.  See the compute()
97method for details of the arguments to the work unit.</dd></dl>
98
99<dl class="method">
100<dt id="sans.perspectives.fitting.model_thread.Calc1D.ready">
101<tt class="descname">ready</tt><big>(</big><em>delay=0.0</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.ready" title="Permalink to this definition">¶</a></dt>
102<dd>Ready for another update after delay=t seconds.  Call
103this for threads which can show intermediate results from
104long calculations.</dd></dl>
105
106<dl class="method">
107<dt id="sans.perspectives.fitting.model_thread.Calc1D.requeue">
108<tt class="descname">requeue</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.requeue" title="Permalink to this definition">¶</a></dt>
109<dd>Replace the work unit on the end of the queue.  See the compute()
110method for details of the arguments to the work unit.</dd></dl>
111
112<dl class="method">
113<dt id="sans.perspectives.fitting.model_thread.Calc1D.reset">
114<tt class="descname">reset</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.reset" title="Permalink to this definition">¶</a></dt>
115<dd>Clear the queue and start a new work unit.  See the compute()
116method for details of the arguments to the work unit.</dd></dl>
117
118<dl class="method">
119<dt id="sans.perspectives.fitting.model_thread.Calc1D.results">
120<tt class="descname">results</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.results" title="Permalink to this definition">¶</a></dt>
121<dd>Send resuts of the computation</dd></dl>
122
123<dl class="method">
124<dt id="sans.perspectives.fitting.model_thread.Calc1D.stop">
125<tt class="descname">stop</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.stop" title="Permalink to this definition">¶</a></dt>
126<dd>Clear the queue and stop the thread.  New items may be
127queued after stop.  To stop just the current work item, and
128continue the rest of the queue call the interrupt method</dd></dl>
129
130<dl class="method">
131<dt id="sans.perspectives.fitting.model_thread.Calc1D.update">
132<tt class="descname">update</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.update" title="Permalink to this definition">¶</a></dt>
133<dd>Update GUI with the lastest results from the current work unit.</dd></dl>
134
135</dd></dl>
136
137<dl class="class">
138<dt id="sans.perspectives.fitting.model_thread.Calc2D">
139<em class="property">class </em><tt class="descclassname">sans.perspectives.fitting.model_thread.</tt><tt class="descname">Calc2D</tt><big>(</big><em>x</em>, <em>y</em>, <em>data</em>, <em>model</em>, <em>smearer</em>, <em>qmin</em>, <em>qmax</em>, <em>qstep</em>, <em>completefn=None</em>, <em>updatefn=None</em>, <em>yieldtime=0.01</em>, <em>worktime=0.01</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D" title="Permalink to this definition">¶</a></dt>
140<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">data_util.calcthread.CalcThread</span></tt></p>
141<p>Compute 2D model
142This calculation assumes a 2-fold symmetry of the model
143where points are computed for one half of the detector
144and I(qx, qy) = I(-qx, -qy) is assumed.</p>
145<dl class="method">
146<dt id="sans.perspectives.fitting.model_thread.Calc2D.complete">
147<tt class="descname">complete</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.complete" title="Permalink to this definition">¶</a></dt>
148<dd>Update the GUI with the completed results from a work unit.</dd></dl>
149
150<dl class="method">
151<dt id="sans.perspectives.fitting.model_thread.Calc2D.compute">
152<tt class="descname">compute</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.compute" title="Permalink to this definition">¶</a></dt>
153<dd>Compute the data given a model function</dd></dl>
154
155<dl class="method">
156<dt id="sans.perspectives.fitting.model_thread.Calc2D.interrupt">
157<tt class="descname">interrupt</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.interrupt" title="Permalink to this definition">¶</a></dt>
158<dd>Stop the current work item.  To clear the work queue as
159well call the stop() method.</dd></dl>
160
161<dl class="method">
162<dt id="sans.perspectives.fitting.model_thread.Calc2D.isquit">
163<tt class="descname">isquit</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.isquit" title="Permalink to this definition">¶</a></dt>
164<dd>Check for interrupts.  Should be called frequently to
165provide user responsiveness.  Also yields to other running
166threads, which is required for good performance on OS X.</dd></dl>
167
168<dl class="method">
169<dt id="sans.perspectives.fitting.model_thread.Calc2D.isrunning">
170<tt class="descname">isrunning</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.isrunning" title="Permalink to this definition">¶</a></dt>
171<dd></dd></dl>
172
173<dl class="method">
174<dt id="sans.perspectives.fitting.model_thread.Calc2D.queue">
175<tt class="descname">queue</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.queue" title="Permalink to this definition">¶</a></dt>
176<dd>Add a work unit to the end of the queue.  See the compute()
177method for details of the arguments to the work unit.</dd></dl>
178
179<dl class="method">
180<dt id="sans.perspectives.fitting.model_thread.Calc2D.ready">
181<tt class="descname">ready</tt><big>(</big><em>delay=0.0</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.ready" title="Permalink to this definition">¶</a></dt>
182<dd>Ready for another update after delay=t seconds.  Call
183this for threads which can show intermediate results from
184long calculations.</dd></dl>
185
186<dl class="method">
187<dt id="sans.perspectives.fitting.model_thread.Calc2D.requeue">
188<tt class="descname">requeue</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.requeue" title="Permalink to this definition">¶</a></dt>
189<dd>Replace the work unit on the end of the queue.  See the compute()
190method for details of the arguments to the work unit.</dd></dl>
191
192<dl class="method">
193<dt id="sans.perspectives.fitting.model_thread.Calc2D.reset">
194<tt class="descname">reset</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.reset" title="Permalink to this definition">¶</a></dt>
195<dd>Clear the queue and start a new work unit.  See the compute()
196method for details of the arguments to the work unit.</dd></dl>
197
198<dl class="method">
199<dt id="sans.perspectives.fitting.model_thread.Calc2D.stop">
200<tt class="descname">stop</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.stop" title="Permalink to this definition">¶</a></dt>
201<dd>Clear the queue and stop the thread.  New items may be
202queued after stop.  To stop just the current work item, and
203continue the rest of the queue call the interrupt method</dd></dl>
204
205<dl class="method">
206<dt id="sans.perspectives.fitting.model_thread.Calc2D.update">
207<tt class="descname">update</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.update" title="Permalink to this definition">¶</a></dt>
208<dd>Update GUI with the lastest results from the current work unit.</dd></dl>
209
210</dd></dl>
211
212</div>
213</div>
214
215
216          </div>
217        </div>
218      </div>
219      <div class="sphinxsidebar">
220        <div class="sphinxsidebarwrapper">
221  <h3><a href="../../../index.html">Table Of Contents</a></h3>
222  <ul>
223<li><a class="reference internal" href="#">model_thread</a><ul>
224<li><a class="reference internal" href="#module-sans.perspectives.fitting.model_thread"><tt class="docutils literal"><span class="pre">sans.perspectives.fitting.model_thread</span></tt></a></li>
225</ul>
226</li>
227</ul>
228
229  <h4>Previous topic</h4>
230  <p class="topless"><a href="hint_fitpage.html"
231                        title="previous chapter">hint_fitpage</a></p>
232  <h4>Next topic</h4>
233  <p class="topless"><a href="models.html"
234                        title="next chapter">models</a></p>
235  <h3>This Page</h3>
236  <ul class="this-page-menu">
237    <li><a href="../../../_sources/api/perspectives/fitting/model_thread.txt"
238           rel="nofollow">Show Source</a></li>
239  </ul>
240<div id="searchbox" style="display: none">
241  <h3>Quick search</h3>
242    <form class="search" action="../../../search.html" method="get">
243      <input type="text" name="q" size="18" />
244      <input type="submit" value="Go" />
245      <input type="hidden" name="check_keywords" value="yes" />
246      <input type="hidden" name="area" value="default" />
247    </form>
248    <p class="searchtip" style="font-size: 90%">
249    Enter search terms or a module, class or function name.
250    </p>
251</div>
252<script type="text/javascript">$('#searchbox').show(0);</script>
253        </div>
254      </div>
255      <div class="clearer"></div>
256    </div>
257    <div class="related">
258      <h3>Navigation</h3>
259      <ul>
260        <li class="right" style="margin-right: 10px">
261          <a href="../../../genindex.html" title="General Index"
262             >index</a></li>
263        <li class="right" >
264          <a href="../../../py-modindex.html" title="Python Module Index"
265             >modules</a> |</li>
266        <li class="right" >
267          <a href="models.html" title="models"
268             >next</a> |</li>
269        <li class="right" >
270          <a href="hint_fitpage.html" title="hint_fitpage"
271             >previous</a> |</li>
272        <li><a href="../../../index.html">sansview v0.1.0 documentation</a> &raquo;</li>
273          <li><a href="index.html" >Reference</a> &raquo;</li> 
274      </ul>
275    </div>
276    <div class="footer">
277        &copy; Copyright 2010, sans group.
278      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0b1.
279    </div>
280  </body>
281</html>
Note: See TracBrowser for help on using the repository browser.