source: sasview/invariantview/docs/sphinx/html/api/invariant.html @ 4ad076b

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 4ad076b was bb46557, checked in by Jessica Tumarkin <jtumarki@…>, 13 years ago

HTML folder generated by Sphinx

  • Property mode set to 100644
File size: 20.7 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>invariant &mdash; invariantview 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="invariantview v0.1.0 documentation" href="../index.html" />
26    <link rel="up" title="Reference" href="index.html" />
27    <link rel="prev" title="invariant_widgets" href="invariant_widgets.html" /> 
28  </head>
29  <body>
30    <div class="related">
31      <h3>Navigation</h3>
32      <ul>
33        <li class="right" style="margin-right: 10px">
34          <a href="../genindex.html" title="General Index"
35             accesskey="I">index</a></li>
36        <li class="right" >
37          <a href="../py-modindex.html" title="Python Module Index"
38             >modules</a> |</li>
39        <li class="right" >
40          <a href="invariant_widgets.html" title="invariant_widgets"
41             accesskey="P">previous</a> |</li>
42        <li><a href="../index.html">invariantview v0.1.0 documentation</a> &raquo;</li>
43          <li><a href="index.html" accesskey="U">Reference</a> &raquo;</li> 
44      </ul>
45    </div> 
46
47    <div class="document">
48      <div class="documentwrapper">
49        <div class="bodywrapper">
50          <div class="body">
51           
52  <div class="section" id="invariant">
53<h1>invariant<a class="headerlink" href="#invariant" title="Permalink to this headline">¶</a></h1>
54<div class="section" id="module-sans.perspectives.invariant.invariant">
55<span id="sans-perspectives-invariant-invariant"></span><h2><a class="reference internal" href="#module-sans.perspectives.invariant.invariant" title="sans.perspectives.invariant.invariant"><tt class="xref py py-mod docutils literal"><span class="pre">sans.perspectives.invariant.invariant</span></tt></a><a class="headerlink" href="#module-sans.perspectives.invariant.invariant" title="Permalink to this headline">¶</a></h2>
56<dl class="class">
57<dt id="sans.perspectives.invariant.invariant.Plugin">
58<em class="property">class </em><tt class="descclassname">sans.perspectives.invariant.invariant.</tt><tt class="descname">Plugin</tt><big>(</big><em>standalone=False</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin" title="Permalink to this definition">¶</a></dt>
59<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">sans.guiframe.plugin_base.PluginBase</span></tt></p>
60<p>This class defines the interface for invariant Plugin class
61that can be used by the gui_manager.</p>
62<dl class="method">
63<dt id="sans.perspectives.invariant.invariant.Plugin.add_color">
64<tt class="descname">add_color</tt><big>(</big><em>color</em>, <em>id</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.add_color" title="Permalink to this definition">¶</a></dt>
65<dd><p>Adds color to a plugin</p>
66</dd></dl>
67
68<dl class="method">
69<dt id="sans.perspectives.invariant.invariant.Plugin.can_load_data">
70<tt class="descname">can_load_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.can_load_data" title="Permalink to this definition">¶</a></dt>
71<dd><p>if return True, then call handler to laod data</p>
72</dd></dl>
73
74<dl class="method">
75<dt id="sans.perspectives.invariant.invariant.Plugin.clear_panel">
76<tt class="descname">clear_panel</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.clear_panel" title="Permalink to this definition">¶</a></dt>
77<dd></dd></dl>
78
79<dl class="method">
80<dt id="sans.perspectives.invariant.invariant.Plugin.compute_helper">
81<tt class="descname">compute_helper</tt><big>(</big><em>data</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.compute_helper" title="Permalink to this definition">¶</a></dt>
82<dd></dd></dl>
83
84<dl class="method">
85<dt id="sans.perspectives.invariant.invariant.Plugin.delete_data">
86<tt class="descname">delete_data</tt><big>(</big><em>data_id</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.delete_data" title="Permalink to this definition">¶</a></dt>
87<dd></dd></dl>
88
89<dl class="method">
90<dt id="sans.perspectives.invariant.invariant.Plugin.get_context_menu">
91<tt class="descname">get_context_menu</tt><big>(</big><em>plotpanel=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.get_context_menu" title="Permalink to this definition">¶</a></dt>
92<dd><p>This method is optional.</p>
93<p>When the context menu of a plot is rendered, the
94get_context_menu method will be called to give you a
95chance to add a menu item to the context menu.</p>
96<p>A ref to a Graph object is passed so that you can
97investigate the plot content and decide whether you
98need to add items to the context menu.</p>
99<p>This method returns a list of menu items.
100Each item is itself a list defining the text to
101appear in the menu, a tool-tip help text, and a
102call-back method.</p>
103<table class="docutils field-list" frame="void" rules="none">
104<col class="field-name" />
105<col class="field-body" />
106<tbody valign="top">
107<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>graph</strong> &#8211; the Graph object to which we attach the context menu</td>
108</tr>
109<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a list of menu items with call-back function</td>
110</tr>
111</tbody>
112</table>
113</dd></dl>
114
115<dl class="method">
116<dt id="sans.perspectives.invariant.invariant.Plugin.get_data">
117<tt class="descname">get_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.get_data" title="Permalink to this definition">¶</a></dt>
118<dd></dd></dl>
119
120<dl class="method">
121<dt id="sans.perspectives.invariant.invariant.Plugin.get_extensions">
122<tt class="descname">get_extensions</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.get_extensions" title="Permalink to this definition">¶</a></dt>
123<dd><p>return state reader and its extensions</p>
124</dd></dl>
125
126<dl class="method">
127<dt id="sans.perspectives.invariant.invariant.Plugin.get_panels">
128<tt class="descname">get_panels</tt><big>(</big><em>parent</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.get_panels" title="Permalink to this definition">¶</a></dt>
129<dd><p>Create and return the list of wx.Panels for your plug-in.
130Define the plug-in perspective.</p>
131<p>Panels should inherit from DefaultPanel defined below,
132or should present the same interface. They must define
133&#8220;window_caption&#8221; and &#8220;window_name&#8221;.</p>
134<table class="docutils field-list" frame="void" rules="none">
135<col class="field-name" />
136<col class="field-body" />
137<tbody valign="top">
138<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>parent</strong> &#8211; parent window</td>
139</tr>
140<tr class="field"><th class="field-name">Returns:</th><td class="field-body">list of panels</td>
141</tr>
142</tbody>
143</table>
144</dd></dl>
145
146<dl class="method">
147<dt id="sans.perspectives.invariant.invariant.Plugin.get_perspective">
148<tt class="descname">get_perspective</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.get_perspective" title="Permalink to this definition">¶</a></dt>
149<dd><p>Get the list of panel names for this perspective</p>
150</dd></dl>
151
152<dl class="method">
153<dt id="sans.perspectives.invariant.invariant.Plugin.get_tools">
154<tt class="descname">get_tools</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.get_tools" title="Permalink to this definition">¶</a></dt>
155<dd><p>Returns a set of menu entries for tools</p>
156</dd></dl>
157
158<dl class="method">
159<dt id="sans.perspectives.invariant.invariant.Plugin.help">
160<tt class="descname">help</tt><big>(</big><em>evt</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.help" title="Permalink to this definition">¶</a></dt>
161<dd><p>Show a general help dialog.</p>
162</dd></dl>
163
164<dl class="method">
165<dt id="sans.perspectives.invariant.invariant.Plugin.is_always_active">
166<tt class="descname">is_always_active</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.is_always_active" title="Permalink to this definition">¶</a></dt>
167<dd><p>return True is this plugin is always active and it is local to guiframe
168even if the user is switching between perspectives</p>
169</dd></dl>
170
171<dl class="method">
172<dt id="sans.perspectives.invariant.invariant.Plugin.is_in_use">
173<tt class="descname">is_in_use</tt><big>(</big><em>data_id</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.is_in_use" title="Permalink to this definition">¶</a></dt>
174<dd><dl class="docutils">
175<dt>get a  data id a list of data name if data data is</dt>
176<dd>currently used by the plugin and the name of the plugin</dd>
177</dl>
178<p>data_name = &#8216;None&#8217;
179in_use = False
180example [(data_name, self.sub_menu)]</p>
181</dd></dl>
182
183<dl class="method">
184<dt id="sans.perspectives.invariant.invariant.Plugin.load_data">
185<tt class="descname">load_data</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.load_data" title="Permalink to this definition">¶</a></dt>
186<dd><p>Load  data</p>
187</dd></dl>
188
189<dl class="method">
190<dt id="sans.perspectives.invariant.invariant.Plugin.load_folder">
191<tt class="descname">load_folder</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.load_folder" title="Permalink to this definition">¶</a></dt>
192<dd><p>Load entire folder</p>
193</dd></dl>
194
195<dl class="method">
196<dt id="sans.perspectives.invariant.invariant.Plugin.on_batch_selection">
197<tt class="descname">on_batch_selection</tt><big>(</big><em>flag</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.on_batch_selection" title="Permalink to this definition">¶</a></dt>
198<dd><p>need to be overwritten by the derivated class</p>
199</dd></dl>
200
201<dl class="method">
202<dt id="sans.perspectives.invariant.invariant.Plugin.on_perspective">
203<tt class="descname">on_perspective</tt><big>(</big><em>event=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.on_perspective" title="Permalink to this definition">¶</a></dt>
204<dd><p>Call back function for the perspective menu item.
205We notify the parent window that the perspective
206has changed.</p>
207<table class="docutils field-list" frame="void" rules="none">
208<col class="field-name" />
209<col class="field-body" />
210<tbody valign="top">
211<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; menu event</td>
212</tr>
213</tbody>
214</table>
215</dd></dl>
216
217<dl class="method">
218<dt id="sans.perspectives.invariant.invariant.Plugin.on_set_state_helper">
219<tt class="descname">on_set_state_helper</tt><big>(</big><em>event=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.on_set_state_helper" title="Permalink to this definition">¶</a></dt>
220<dd><p>Set the state when called by EVT_STATE_UPDATE event from guiframe
221after a .inv/.svs file is loaded</p>
222</dd></dl>
223
224<dl class="method">
225<dt id="sans.perspectives.invariant.invariant.Plugin.plot_data">
226<tt class="descname">plot_data</tt><big>(</big><em>scale</em>, <em>background</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.plot_data" title="Permalink to this definition">¶</a></dt>
227<dd><p>replot the current data if the user enters a new scale or background</p>
228</dd></dl>
229
230<dl class="method">
231<dt id="sans.perspectives.invariant.invariant.Plugin.plot_theory">
232<tt class="descname">plot_theory</tt><big>(</big><em>data=None</em>, <em>name=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.plot_theory" title="Permalink to this definition">¶</a></dt>
233<dd><p>Receive a data set and post a NewPlotEvent to parent.</p>
234<table class="docutils field-list" frame="void" rules="none">
235<col class="field-name" />
236<col class="field-body" />
237<tbody valign="top">
238<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
239<li><strong>data</strong> &#8211; extrapolated data to be plotted</li>
240<li><strong>name</strong> &#8211; Data&#8217;s name to use for the legend</li>
241</ul>
242</td>
243</tr>
244</tbody>
245</table>
246</dd></dl>
247
248<dl class="method">
249<dt id="sans.perspectives.invariant.invariant.Plugin.populate_file_menu">
250<tt class="descname">populate_file_menu</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.populate_file_menu" title="Permalink to this definition">¶</a></dt>
251<dd><p>Append menu item under file menu item of the frame</p>
252</dd></dl>
253
254<dl class="method">
255<dt id="sans.perspectives.invariant.invariant.Plugin.populate_menu">
256<tt class="descname">populate_menu</tt><big>(</big><em>parent</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.populate_menu" title="Permalink to this definition">¶</a></dt>
257<dd><p>Create and return the list of application menu
258items for the plug-in.</p>
259<table class="docutils field-list" frame="void" rules="none">
260<col class="field-name" />
261<col class="field-body" />
262<tbody valign="top">
263<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>parent</strong> &#8211; parent window</td>
264</tr>
265<tr class="field"><th class="field-name">Returns:</th><td class="field-body">plug-in menu</td>
266</tr>
267</tbody>
268</table>
269</dd></dl>
270
271<dl class="method">
272<dt id="sans.perspectives.invariant.invariant.Plugin.post_init">
273<tt class="descname">post_init</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.post_init" title="Permalink to this definition">¶</a></dt>
274<dd><p>Post initialization call back to close the loose ends</p>
275</dd></dl>
276
277<dl class="method">
278<dt id="sans.perspectives.invariant.invariant.Plugin.save_file">
279<tt class="descname">save_file</tt><big>(</big><em>filepath</em>, <em>state=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.save_file" title="Permalink to this definition">¶</a></dt>
280<dd><p>Save data in provided state object.</p>
281<table class="docutils field-list" frame="void" rules="none">
282<col class="field-name" />
283<col class="field-body" />
284<tbody valign="top">
285<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
286<li><strong>filepath</strong> &#8211; path of file to write to</li>
287<li><strong>state</strong> &#8211; invariant state</li>
288</ul>
289</td>
290</tr>
291</tbody>
292</table>
293</dd></dl>
294
295<dl class="method">
296<dt id="sans.perspectives.invariant.invariant.Plugin.set_batch_selection">
297<tt class="descname">set_batch_selection</tt><big>(</big><em>flag</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.set_batch_selection" title="Permalink to this definition">¶</a></dt>
298<dd><p>the plugin to its batch state if flag is True</p>
299</dd></dl>
300
301<dl class="method">
302<dt id="sans.perspectives.invariant.invariant.Plugin.set_data">
303<tt class="descname">set_data</tt><big>(</big><em>data_list=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.set_data" title="Permalink to this definition">¶</a></dt>
304<dd><p>receive a list of data and compute invariant</p>
305</dd></dl>
306
307<dl class="method">
308<dt id="sans.perspectives.invariant.invariant.Plugin.set_default_perspective">
309<tt class="descname">set_default_perspective</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.set_default_perspective" title="Permalink to this definition">¶</a></dt>
310<dd><p>Call back method that True to notify the parent that the current plug-in
311can be set as default  perspective.
312when returning False, the plug-in is not candidate for an automatic
313default perspective setting</p>
314</dd></dl>
315
316<dl class="method">
317<dt id="sans.perspectives.invariant.invariant.Plugin.set_is_active">
318<tt class="descname">set_is_active</tt><big>(</big><em>active=False</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.set_is_active" title="Permalink to this definition">¶</a></dt>
319<dd></dd></dl>
320
321<dl class="method">
322<dt id="sans.perspectives.invariant.invariant.Plugin.set_state">
323<tt class="descname">set_state</tt><big>(</big><em>state=None</em>, <em>datainfo=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.set_state" title="Permalink to this definition">¶</a></dt>
324<dd><p>Call-back method for the state reader.
325This method is called when a .inv/.svs file is loaded.</p>
326<table class="docutils field-list" frame="void" rules="none">
327<col class="field-name" />
328<col class="field-body" />
329<tbody valign="top">
330<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>state</strong> &#8211; State object</td>
331</tr>
332</tbody>
333</table>
334</dd></dl>
335
336<dl class="method">
337<dt id="sans.perspectives.invariant.invariant.Plugin.set_theory">
338<tt class="descname">set_theory</tt><big>(</big><em>theory_list=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.set_theory" title="Permalink to this definition">¶</a></dt>
339<dd><table class="docutils field-list" frame="void" rules="none">
340<col class="field-name" />
341<col class="field-body" />
342<tbody valign="top">
343<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>theory_list</strong> &#8211; list of information
344related to available theory state</td>
345</tr>
346</tbody>
347</table>
348</dd></dl>
349
350<dl class="method">
351<dt id="sans.perspectives.invariant.invariant.Plugin.use_data">
352<tt class="descname">use_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.use_data" title="Permalink to this definition">¶</a></dt>
353<dd><p>return True if these plugin use data</p>
354</dd></dl>
355
356</dd></dl>
357
358</div>
359</div>
360
361
362          </div>
363        </div>
364      </div>
365      <div class="sphinxsidebar">
366        <div class="sphinxsidebarwrapper">
367  <h3><a href="../index.html">Table Of Contents</a></h3>
368  <ul>
369<li><a class="reference internal" href="#">invariant</a><ul>
370<li><a class="reference internal" href="#module-sans.perspectives.invariant.invariant"><tt class="docutils literal"><span class="pre">sans.perspectives.invariant.invariant</span></tt></a></li>
371</ul>
372</li>
373</ul>
374
375  <h4>Previous topic</h4>
376  <p class="topless"><a href="invariant_widgets.html"
377                        title="previous chapter">invariant_widgets</a></p>
378  <h3>This Page</h3>
379  <ul class="this-page-menu">
380    <li><a href="../_sources/api/invariant.txt"
381           rel="nofollow">Show Source</a></li>
382  </ul>
383<div id="searchbox" style="display: none">
384  <h3>Quick search</h3>
385    <form class="search" action="../search.html" method="get">
386      <input type="text" name="q" size="18" />
387      <input type="submit" value="Go" />
388      <input type="hidden" name="check_keywords" value="yes" />
389      <input type="hidden" name="area" value="default" />
390    </form>
391    <p class="searchtip" style="font-size: 90%">
392    Enter search terms or a module, class or function name.
393    </p>
394</div>
395<script type="text/javascript">$('#searchbox').show(0);</script>
396        </div>
397      </div>
398      <div class="clearer"></div>
399    </div>
400    <div class="related">
401      <h3>Navigation</h3>
402      <ul>
403        <li class="right" style="margin-right: 10px">
404          <a href="../genindex.html" title="General Index"
405             >index</a></li>
406        <li class="right" >
407          <a href="../py-modindex.html" title="Python Module Index"
408             >modules</a> |</li>
409        <li class="right" >
410          <a href="invariant_widgets.html" title="invariant_widgets"
411             >previous</a> |</li>
412        <li><a href="../index.html">invariantview v0.1.0 documentation</a> &raquo;</li>
413          <li><a href="index.html" >Reference</a> &raquo;</li> 
414      </ul>
415    </div>
416    <div class="footer">
417        &copy; Copyright 2010, sans group.
418      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
419    </div>
420  </body>
421</html>
Note: See TracBrowser for help on using the repository browser.