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