source: sasview/sansguiframe/docs/sphinx/html/api/state_reader.html @ 425e49ca

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 425e49ca was 96cbb53, checked in by Jessica Tumarkin <jtumarki@…>, 13 years ago

HTML folder generated by Sphinx

  • Property mode set to 100644
File size: 12.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>state_reader &mdash; guiframe 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="guiframe v0.1.0 documentation" href="../index.html" />
26    <link rel="up" title="Reference" href="index.html" />
27    <link rel="next" title="utils" href="utils.html" />
28    <link rel="prev" title="startup_configuration" href="startup_configuration.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="utils.html" title="utils"
42             accesskey="N">next</a> |</li>
43        <li class="right" >
44          <a href="startup_configuration.html" title="startup_configuration"
45             accesskey="P">previous</a> |</li>
46        <li><a href="../index.html">guiframe 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="state-reader">
57<h1>state_reader<a class="headerlink" href="#state-reader" title="Permalink to this headline">¶</a></h1>
58<div class="section" id="module-sans.guiframe.state_reader">
59<span id="sans-guiframe-state-reader"></span><h2><a class="reference internal" href="#module-sans.guiframe.state_reader" title="sans.guiframe.state_reader"><tt class="xref py py-mod docutils literal"><span class="pre">sans.guiframe.state_reader</span></tt></a><a class="headerlink" href="#module-sans.guiframe.state_reader" title="Permalink to this headline">¶</a></h2>
60<dl class="class">
61<dt id="sans.guiframe.state_reader.Reader1D">
62<em class="property">class </em><tt class="descclassname">sans.guiframe.state_reader.</tt><tt class="descname">Reader1D</tt><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D" title="Permalink to this definition">¶</a></dt>
63<dd><p>read state of a plugin  and available data</p>
64<table class="docutils field-list" frame="void" rules="none">
65<col class="field-name" />
66<col class="field-body" />
67<tbody valign="top">
68<tr class="field"><th class="field-name">Dependencies :</th><td class="field-body">The CanSas reader requires PyXML 0.8.4 or later.</td>
69</tr>
70</tbody>
71</table>
72<dl class="method">
73<dt id="sans.guiframe.state_reader.Reader1D.read">
74<tt class="descname">read</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D.read" title="Permalink to this definition">¶</a></dt>
75<dd><p>Load data file</p>
76<table class="docutils field-list" frame="void" rules="none">
77<col class="field-name" />
78<col class="field-body" />
79<tbody valign="top">
80<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>path</strong> &#8211; file path</p>
81</td>
82</tr>
83<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Data1D object if a single SASentry was found,
84or a list of Data1D objects if multiple entries were found,
85or None of nothing was found</p>
86</td>
87</tr>
88<tr class="field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
89<li><strong>RuntimeError</strong> &#8211; when the file can&#8217;t be opened</li>
90<li><strong>ValueError</strong> &#8211; when the length of the data vectors are inconsistent</li>
91</ul>
92</td>
93</tr>
94</tbody>
95</table>
96</dd></dl>
97
98<dl class="method">
99<dt id="sans.guiframe.state_reader.Reader1D.write">
100<tt class="descname">write</tt><big>(</big><em>filename</em>, <em>datainfo</em><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D.write" title="Permalink to this definition">¶</a></dt>
101<dd><p>Write the content of a Data1D as a CanSAS XML file</p>
102<table class="docutils field-list" frame="void" rules="none">
103<col class="field-name" />
104<col class="field-body" />
105<tbody valign="top">
106<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
107<li><strong>filename</strong> &#8211; name of the file to write</li>
108<li><strong>datainfo</strong> &#8211; Data1D object</li>
109</ul>
110</td>
111</tr>
112</tbody>
113</table>
114</dd></dl>
115
116</dd></dl>
117
118<dl class="class">
119<dt id="sans.guiframe.state_reader.Reader2D">
120<em class="property">class </em><tt class="descclassname">sans.guiframe.state_reader.</tt><tt class="descname">Reader2D</tt><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D" title="Permalink to this definition">¶</a></dt>
121<dd><p>Class to load a basic guiframe state</p>
122<dl class="method">
123<dt id="sans.guiframe.state_reader.Reader2D.read">
124<tt class="descname">read</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.read" title="Permalink to this definition">¶</a></dt>
125<dd><p>Load a new P(r) inversion state from file</p>
126<table class="docutils field-list" frame="void" rules="none">
127<col class="field-name" />
128<col class="field-body" />
129<tbody valign="top">
130<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> &#8211; file path</td>
131</tr>
132</tbody>
133</table>
134</dd></dl>
135
136<dl class="method">
137<dt id="sans.guiframe.state_reader.Reader2D.write">
138<tt class="descname">write</tt><big>(</big><em>filename</em>, <em>datainfo=None</em>, <em>fitstate=None</em><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.write" title="Permalink to this definition">¶</a></dt>
139<dd><p>Write the content of a Data1D as a CanSAS XML file only for standalone</p>
140<table class="docutils field-list" frame="void" rules="none">
141<col class="field-name" />
142<col class="field-body" />
143<tbody valign="top">
144<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
145<li><strong>filename</strong> &#8211; name of the file to write</li>
146<li><strong>datainfo</strong> &#8211; Data1D object</li>
147<li><strong>fitstate</strong> &#8211; PageState object</li>
148</ul>
149</td>
150</tr>
151</tbody>
152</table>
153</dd></dl>
154
155<dl class="method">
156<dt id="sans.guiframe.state_reader.Reader2D.write_toXML">
157<tt class="descname">write_toXML</tt><big>(</big><em>datainfo=None</em>, <em>state=None</em><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.write_toXML" title="Permalink to this definition">¶</a></dt>
158<dd><p>Write toXML, a helper for write() , could be used by guimanager._on_save()</p>
159<p>: return: xml doc</p>
160</dd></dl>
161
162</dd></dl>
163
164<dl class="function">
165<dt id="sans.guiframe.state_reader.get_content">
166<tt class="descclassname">sans.guiframe.state_reader.</tt><tt class="descname">get_content</tt><big>(</big><em>location</em>, <em>node</em><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.get_content" title="Permalink to this definition">¶</a></dt>
167<dd><p>Get the first instance of the content of a xpath location.</p>
168<table class="docutils field-list" frame="void" rules="none">
169<col class="field-name" />
170<col class="field-body" />
171<tbody valign="top">
172<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
173<li><strong>location</strong> &#8211; xpath location</li>
174<li><strong>node</strong> &#8211; node to start at</li>
175</ul>
176</td>
177</tr>
178<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Element, or None</p>
179</td>
180</tr>
181</tbody>
182</table>
183</dd></dl>
184
185<dl class="function">
186<dt id="sans.guiframe.state_reader.get_float">
187<tt class="descclassname">sans.guiframe.state_reader.</tt><tt class="descname">get_float</tt><big>(</big><em>location</em>, <em>node</em><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.get_float" title="Permalink to this definition">¶</a></dt>
188<dd><p>Get the content of a node as a float</p>
189<table class="docutils field-list" frame="void" rules="none">
190<col class="field-name" />
191<col class="field-body" />
192<tbody valign="top">
193<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
194<li><strong>location</strong> &#8211; xpath location</li>
195<li><strong>node</strong> &#8211; node to start at</li>
196</ul>
197</td>
198</tr>
199</tbody>
200</table>
201</dd></dl>
202
203<dl class="function">
204<dt id="sans.guiframe.state_reader.write_node">
205<tt class="descclassname">sans.guiframe.state_reader.</tt><tt class="descname">write_node</tt><big>(</big><em>doc</em>, <em>parent</em>, <em>name</em>, <em>value</em>, <em>attr={}</em><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.write_node" title="Permalink to this definition">¶</a></dt>
206<dd><table class="docutils field-list" frame="void" rules="none">
207<col class="field-name" />
208<col class="field-body" />
209<tbody valign="top">
210<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
211<li><strong>doc</strong> &#8211; document DOM</li>
212<li><strong>parent</strong> &#8211; parent node</li>
213<li><strong>name</strong> &#8211; tag of the element</li>
214<li><strong>value</strong> &#8211; value of the child text node</li>
215<li><strong>attr</strong> &#8211; attribute dictionary</li>
216</ul>
217</td>
218</tr>
219<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">True if something was appended, otherwise False</p>
220</td>
221</tr>
222</tbody>
223</table>
224</dd></dl>
225
226</div>
227</div>
228
229
230          </div>
231        </div>
232      </div>
233      <div class="sphinxsidebar">
234        <div class="sphinxsidebarwrapper">
235  <h3><a href="../index.html">Table Of Contents</a></h3>
236  <ul>
237<li><a class="reference internal" href="#">state_reader</a><ul>
238<li><a class="reference internal" href="#module-sans.guiframe.state_reader"><tt class="docutils literal"><span class="pre">sans.guiframe.state_reader</span></tt></a></li>
239</ul>
240</li>
241</ul>
242
243  <h4>Previous topic</h4>
244  <p class="topless"><a href="startup_configuration.html"
245                        title="previous chapter">startup_configuration</a></p>
246  <h4>Next topic</h4>
247  <p class="topless"><a href="utils.html"
248                        title="next chapter">utils</a></p>
249  <h3>This Page</h3>
250  <ul class="this-page-menu">
251    <li><a href="../_sources/api/state_reader.txt"
252           rel="nofollow">Show Source</a></li>
253  </ul>
254<div id="searchbox" style="display: none">
255  <h3>Quick search</h3>
256    <form class="search" action="../search.html" method="get">
257      <input type="text" name="q" size="18" />
258      <input type="submit" value="Go" />
259      <input type="hidden" name="check_keywords" value="yes" />
260      <input type="hidden" name="area" value="default" />
261    </form>
262    <p class="searchtip" style="font-size: 90%">
263    Enter search terms or a module, class or function name.
264    </p>
265</div>
266<script type="text/javascript">$('#searchbox').show(0);</script>
267        </div>
268      </div>
269      <div class="clearer"></div>
270    </div>
271    <div class="related">
272      <h3>Navigation</h3>
273      <ul>
274        <li class="right" style="margin-right: 10px">
275          <a href="../genindex.html" title="General Index"
276             >index</a></li>
277        <li class="right" >
278          <a href="../py-modindex.html" title="Python Module Index"
279             >modules</a> |</li>
280        <li class="right" >
281          <a href="utils.html" title="utils"
282             >next</a> |</li>
283        <li class="right" >
284          <a href="startup_configuration.html" title="startup_configuration"
285             >previous</a> |</li>
286        <li><a href="../index.html">guiframe v0.1.0 documentation</a> &raquo;</li>
287          <li><a href="index.html" >Reference</a> &raquo;</li> 
288      </ul>
289    </div>
290    <div class="footer">
291        &copy; Copyright 2010, sans group.
292      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
293    </div>
294  </body>
295</html>
Note: See TracBrowser for help on using the repository browser.