source: sasview/fittingview/docs/sphinx/html/api/perspectives/fitting/model_thread.html @ 09e89b7

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

edit doc

  • Property mode set to 100644
File size: 17.0 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
7<html xmlns="http://www.w3.org/1999/xhtml">
8  <head>
9    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10   
11    <title>model_thread &mdash; sansview 0.1.0 documentation</title>
12   
13    <link rel="stylesheet" href="../../../_static/default.css" type="text/css" />
14    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
15   
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>
28    <link rel="top" title="sansview 0.1.0 documentation" href="../../../index.html" />
29    <link rel="up" title="Reference" href="index.html" />
30    <link rel="next" title="pagestate" href="pagestate.html" />
31    <link rel="prev" title="models" href="models.html" /> 
32  </head>
33  <body>
34    <div class="related">
35      <h3>Navigation</h3>
36      <ul>
37        <li class="right" style="margin-right: 10px">
38          <a href="../../../genindex.html" title="General Index"
39             accesskey="I">index</a></li>
40        <li class="right" >
41          <a href="../../../py-modindex.html" title="Python Module Index"
42             >modules</a> |</li>
43        <li class="right" >
44          <a href="pagestate.html" title="pagestate"
45             accesskey="N">next</a> |</li>
46        <li class="right" >
47          <a href="models.html" title="models"
48             accesskey="P">previous</a> |</li>
49        <li><a href="../../../index.html">sansview 0.1.0 documentation</a> &raquo;</li>
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="model-thread">
60<h1>model_thread<a class="headerlink" href="#model-thread" title="Permalink to this headline">¶</a></h1>
61<div class="section" id="sans-perspectives-fitting-model-thread">
62<h2><a class="reference internal" href="#module-sans.perspectives.fitting.model_thread" title="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="#sans-perspectives-fitting-model-thread" title="Permalink to this headline">¶</a></h2>
63<span class="target" id="module-sans.perspectives.fitting.model_thread"></span><dl class="class">
64<dt id="sans.perspectives.fitting.model_thread.Calc1D">
65<em class="property">class </em><tt class="descclassname">sans.perspectives.fitting.model_thread.</tt><tt class="descname">Calc1D</tt><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D" title="Permalink to this definition">¶</a></dt>
66<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">data_util.calcthread.CalcThread</span></tt></p>
67<p>Compute 1D data</p>
68<dl class="method">
69<dt id="sans.perspectives.fitting.model_thread.Calc1D.__init__">
70<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.__init__" title="Permalink to this definition">¶</a></dt>
71<dd></dd></dl>
72
73<dl class="attribute">
74<dt id="sans.perspectives.fitting.model_thread.Calc1D.__module__">
75<tt class="descname">__module__</tt><em class="property"> = 'sans.perspectives.fitting.model_thread'</em><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.__module__" title="Permalink to this definition">¶</a></dt>
76<dd></dd></dl>
77
78<dl class="method">
79<dt id="sans.perspectives.fitting.model_thread.Calc1D._run">
80<tt class="descname">_run</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D._run" title="Permalink to this definition">¶</a></dt>
81<dd><p>Internal function to manage the thread.</p>
82</dd></dl>
83
84<dl class="method">
85<dt id="sans.perspectives.fitting.model_thread.Calc1D.complete">
86<tt class="descname">complete</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.complete" title="Permalink to this definition">¶</a></dt>
87<dd><p>Update the GUI with the completed results from a work unit.</p>
88</dd></dl>
89
90<dl class="method">
91<dt id="sans.perspectives.fitting.model_thread.Calc1D.compute">
92<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>
93<dd><p>Compute model 1d value given qmin , qmax , x value</p>
94</dd></dl>
95
96<dl class="method">
97<dt id="sans.perspectives.fitting.model_thread.Calc1D.interrupt">
98<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>
99<dd><p>Stop the current work item.  To clear the work queue as
100well call the stop() method.</p>
101</dd></dl>
102
103<dl class="method">
104<dt id="sans.perspectives.fitting.model_thread.Calc1D.isquit">
105<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>
106<dd><p>Check for interrupts.  Should be called frequently to
107provide user responsiveness.  Also yields to other running
108threads, which is required for good performance on OS X.</p>
109</dd></dl>
110
111<dl class="method">
112<dt id="sans.perspectives.fitting.model_thread.Calc1D.isrunning">
113<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>
114<dd></dd></dl>
115
116<dl class="method">
117<dt id="sans.perspectives.fitting.model_thread.Calc1D.queue">
118<tt class="descname">queue</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.queue" title="Permalink to this definition">¶</a></dt>
119<dd><p>Add a work unit to the end of the queue.  See the compute()
120method for details of the arguments to the work unit.</p>
121</dd></dl>
122
123<dl class="method">
124<dt id="sans.perspectives.fitting.model_thread.Calc1D.ready">
125<tt class="descname">ready</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.ready" title="Permalink to this definition">¶</a></dt>
126<dd><p>Ready for another update after delay=t seconds.  Call
127this for threads which can show intermediate results from
128long calculations.</p>
129</dd></dl>
130
131<dl class="method">
132<dt id="sans.perspectives.fitting.model_thread.Calc1D.requeue">
133<tt class="descname">requeue</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.requeue" title="Permalink to this definition">¶</a></dt>
134<dd><p>Replace the work unit on the end of the queue.  See the compute()
135method for details of the arguments to the work unit.</p>
136</dd></dl>
137
138<dl class="method">
139<dt id="sans.perspectives.fitting.model_thread.Calc1D.reset">
140<tt class="descname">reset</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.reset" title="Permalink to this definition">¶</a></dt>
141<dd><p>Clear the queue and start a new work unit.  See the compute()
142method for details of the arguments to the work unit.</p>
143</dd></dl>
144
145<dl class="method">
146<dt id="sans.perspectives.fitting.model_thread.Calc1D.results">
147<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>
148<dd><p>Send resuts of the computation</p>
149</dd></dl>
150
151<dl class="method">
152<dt id="sans.perspectives.fitting.model_thread.Calc1D.stop">
153<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>
154<dd><p>Clear the queue and stop the thread.  New items may be
155queued after stop.  To stop just the current work item, and
156continue the rest of the queue call the interrupt method</p>
157</dd></dl>
158
159<dl class="method">
160<dt id="sans.perspectives.fitting.model_thread.Calc1D.update">
161<tt class="descname">update</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc1D.update" title="Permalink to this definition">¶</a></dt>
162<dd><p>Update GUI with the lastest results from the current work unit.</p>
163</dd></dl>
164
165</dd></dl>
166
167<dl class="class">
168<dt id="sans.perspectives.fitting.model_thread.Calc2D">
169<em class="property">class </em><tt class="descclassname">sans.perspectives.fitting.model_thread.</tt><tt class="descname">Calc2D</tt><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D" title="Permalink to this definition">¶</a></dt>
170<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">data_util.calcthread.CalcThread</span></tt></p>
171<p>Compute 2D model
172This calculation assumes a 2-fold symmetry of the model
173where points are computed for one half of the detector
174and I(qx, qy) = I(-qx, -qy) is assumed.</p>
175<dl class="method">
176<dt id="sans.perspectives.fitting.model_thread.Calc2D.__init__">
177<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.__init__" title="Permalink to this definition">¶</a></dt>
178<dd></dd></dl>
179
180<dl class="attribute">
181<dt id="sans.perspectives.fitting.model_thread.Calc2D.__module__">
182<tt class="descname">__module__</tt><em class="property"> = 'sans.perspectives.fitting.model_thread'</em><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.__module__" title="Permalink to this definition">¶</a></dt>
183<dd></dd></dl>
184
185<dl class="method">
186<dt id="sans.perspectives.fitting.model_thread.Calc2D._run">
187<tt class="descname">_run</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D._run" title="Permalink to this definition">¶</a></dt>
188<dd><p>Internal function to manage the thread.</p>
189</dd></dl>
190
191<dl class="method">
192<dt id="sans.perspectives.fitting.model_thread.Calc2D.complete">
193<tt class="descname">complete</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.complete" title="Permalink to this definition">¶</a></dt>
194<dd><p>Update the GUI with the completed results from a work unit.</p>
195</dd></dl>
196
197<dl class="method">
198<dt id="sans.perspectives.fitting.model_thread.Calc2D.compute">
199<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>
200<dd><p>Compute the data given a model function</p>
201</dd></dl>
202
203<dl class="method">
204<dt id="sans.perspectives.fitting.model_thread.Calc2D.interrupt">
205<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>
206<dd><p>Stop the current work item.  To clear the work queue as
207well call the stop() method.</p>
208</dd></dl>
209
210<dl class="method">
211<dt id="sans.perspectives.fitting.model_thread.Calc2D.isquit">
212<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>
213<dd><p>Check for interrupts.  Should be called frequently to
214provide user responsiveness.  Also yields to other running
215threads, which is required for good performance on OS X.</p>
216</dd></dl>
217
218<dl class="method">
219<dt id="sans.perspectives.fitting.model_thread.Calc2D.isrunning">
220<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>
221<dd></dd></dl>
222
223<dl class="method">
224<dt id="sans.perspectives.fitting.model_thread.Calc2D.queue">
225<tt class="descname">queue</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.queue" title="Permalink to this definition">¶</a></dt>
226<dd><p>Add a work unit to the end of the queue.  See the compute()
227method for details of the arguments to the work unit.</p>
228</dd></dl>
229
230<dl class="method">
231<dt id="sans.perspectives.fitting.model_thread.Calc2D.ready">
232<tt class="descname">ready</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.ready" title="Permalink to this definition">¶</a></dt>
233<dd><p>Ready for another update after delay=t seconds.  Call
234this for threads which can show intermediate results from
235long calculations.</p>
236</dd></dl>
237
238<dl class="method">
239<dt id="sans.perspectives.fitting.model_thread.Calc2D.requeue">
240<tt class="descname">requeue</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.requeue" title="Permalink to this definition">¶</a></dt>
241<dd><p>Replace the work unit on the end of the queue.  See the compute()
242method for details of the arguments to the work unit.</p>
243</dd></dl>
244
245<dl class="method">
246<dt id="sans.perspectives.fitting.model_thread.Calc2D.reset">
247<tt class="descname">reset</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.reset" title="Permalink to this definition">¶</a></dt>
248<dd><p>Clear the queue and start a new work unit.  See the compute()
249method for details of the arguments to the work unit.</p>
250</dd></dl>
251
252<dl class="method">
253<dt id="sans.perspectives.fitting.model_thread.Calc2D.stop">
254<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>
255<dd><p>Clear the queue and stop the thread.  New items may be
256queued after stop.  To stop just the current work item, and
257continue the rest of the queue call the interrupt method</p>
258</dd></dl>
259
260<dl class="method">
261<dt id="sans.perspectives.fitting.model_thread.Calc2D.update">
262<tt class="descname">update</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.fitting.model_thread.Calc2D.update" title="Permalink to this definition">¶</a></dt>
263<dd><p>Update GUI with the lastest results from the current work unit.</p>
264</dd></dl>
265
266</dd></dl>
267
268</div>
269</div>
270
271
272          </div>
273        </div>
274      </div>
275      <div class="sphinxsidebar">
276        <div class="sphinxsidebarwrapper">
277  <h3><a href="../../../index.html">Table Of Contents</a></h3>
278  <ul>
279<li><a class="reference internal" href="#">model_thread</a><ul>
280<li><a class="reference internal" href="#sans-perspectives-fitting-model-thread"><tt class="docutils literal"><span class="pre">sans.perspectives.fitting.model_thread</span></tt></a></li>
281</ul>
282</li>
283</ul>
284
285  <h4>Previous topic</h4>
286  <p class="topless"><a href="models.html"
287                        title="previous chapter">models</a></p>
288  <h4>Next topic</h4>
289  <p class="topless"><a href="pagestate.html"
290                        title="next chapter">pagestate</a></p>
291  <h3>This Page</h3>
292  <ul class="this-page-menu">
293    <li><a href="../../../_sources/api/perspectives/fitting/model_thread.txt"
294           rel="nofollow">Show Source</a></li>
295  </ul>
296<div id="searchbox" style="display: none">
297  <h3>Quick search</h3>
298    <form class="search" action="../../../search.html" method="get">
299      <input type="text" name="q" />
300      <input type="submit" value="Go" />
301      <input type="hidden" name="check_keywords" value="yes" />
302      <input type="hidden" name="area" value="default" />
303    </form>
304    <p class="searchtip" style="font-size: 90%">
305    Enter search terms or a module, class or function name.
306    </p>
307</div>
308<script type="text/javascript">$('#searchbox').show(0);</script>
309        </div>
310      </div>
311      <div class="clearer"></div>
312    </div>
313    <div class="related">
314      <h3>Navigation</h3>
315      <ul>
316        <li class="right" style="margin-right: 10px">
317          <a href="../../../genindex.html" title="General Index"
318             >index</a></li>
319        <li class="right" >
320          <a href="../../../py-modindex.html" title="Python Module Index"
321             >modules</a> |</li>
322        <li class="right" >
323          <a href="pagestate.html" title="pagestate"
324             >next</a> |</li>
325        <li class="right" >
326          <a href="models.html" title="models"
327             >previous</a> |</li>
328        <li><a href="../../../index.html">sansview 0.1.0 documentation</a> &raquo;</li>
329          <li><a href="index.html" >Reference</a> &raquo;</li> 
330      </ul>
331    </div>
332    <div class="footer">
333        &copy; Copyright 2010, sans group.
334      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.
335    </div>
336  </body>
337</html>
Note: See TracBrowser for help on using the repository browser.