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