[96cbb53] | 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 | |
---|
[bce8148] | 6 | |
---|
[96cbb53] | 7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
| 8 | <head> |
---|
| 9 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
| 10 | |
---|
[bce8148] | 11 | <title>state_reader — guiframe 0.1.0 documentation</title> |
---|
| 12 | |
---|
[96cbb53] | 13 | <link rel="stylesheet" href="../_static/default.css" type="text/css" /> |
---|
| 14 | <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> |
---|
[bce8148] | 15 | |
---|
[96cbb53] | 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> |
---|
[bce8148] | 28 | <link rel="top" title="guiframe 0.1.0 documentation" href="../index.html" /> |
---|
[96cbb53] | 29 | <link rel="up" title="Reference" href="index.html" /> |
---|
| 30 | <link rel="next" title="utils" href="utils.html" /> |
---|
| 31 | <link rel="prev" title="startup_configuration" href="startup_configuration.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="utils.html" title="utils" |
---|
| 45 | accesskey="N">next</a> |</li> |
---|
| 46 | <li class="right" > |
---|
| 47 | <a href="startup_configuration.html" title="startup_configuration" |
---|
| 48 | accesskey="P">previous</a> |</li> |
---|
[bce8148] | 49 | <li><a href="../index.html">guiframe 0.1.0 documentation</a> »</li> |
---|
[96cbb53] | 50 | <li><a href="index.html" accesskey="U">Reference</a> »</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="state-reader"> |
---|
| 60 | <h1>state_reader<a class="headerlink" href="#state-reader" title="Permalink to this headline">¶</a></h1> |
---|
[bce8148] | 61 | <div class="section" id="sans-guiframe-state-reader"> |
---|
| 62 | <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="#sans-guiframe-state-reader" title="Permalink to this headline">¶</a></h2> |
---|
| 63 | <span class="target" id="module-sans.guiframe.state_reader"></span><dl class="class"> |
---|
[96cbb53] | 64 | <dt id="sans.guiframe.state_reader.Reader1D"> |
---|
| 65 | <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> |
---|
| 66 | <dd><p>read state of a plugin and available data</p> |
---|
| 67 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 68 | <col class="field-name" /> |
---|
| 69 | <col class="field-body" /> |
---|
| 70 | <tbody valign="top"> |
---|
[bce8148] | 71 | <tr class="field-odd field"><th class="field-name">Dependencies :</th><td class="field-body">The CanSas reader requires PyXML 0.8.4 or later.</td> |
---|
| 72 | </tr> |
---|
| 73 | </tbody> |
---|
| 74 | </table> |
---|
| 75 | <dl class="method"> |
---|
| 76 | <dt id="sans.guiframe.state_reader.Reader1D.__init__"> |
---|
| 77 | <tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D.__init__" title="Permalink to this definition">¶</a></dt> |
---|
| 78 | <dd></dd></dl> |
---|
| 79 | |
---|
| 80 | <dl class="attribute"> |
---|
| 81 | <dt id="sans.guiframe.state_reader.Reader1D.__module__"> |
---|
| 82 | <tt class="descname">__module__</tt><em class="property"> = 'sans.guiframe.state_reader'</em><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D.__module__" title="Permalink to this definition">¶</a></dt> |
---|
| 83 | <dd></dd></dl> |
---|
| 84 | |
---|
| 85 | <dl class="method"> |
---|
| 86 | <dt id="sans.guiframe.state_reader.Reader1D._parse_entry"> |
---|
| 87 | <tt class="descname">_parse_entry</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D._parse_entry" title="Permalink to this definition">¶</a></dt> |
---|
| 88 | <dd><p>Parse a SASentry</p> |
---|
| 89 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 90 | <col class="field-name" /> |
---|
| 91 | <col class="field-body" /> |
---|
| 92 | <tbody valign="top"> |
---|
| 93 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>node</strong> – SASentry node</td> |
---|
| 94 | </tr> |
---|
| 95 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Data1D object</td> |
---|
[96cbb53] | 96 | </tr> |
---|
| 97 | </tbody> |
---|
| 98 | </table> |
---|
[bce8148] | 99 | </dd></dl> |
---|
| 100 | |
---|
| 101 | <dl class="method"> |
---|
| 102 | <dt id="sans.guiframe.state_reader.Reader1D._store_content"> |
---|
| 103 | <tt class="descname">_store_content</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D._store_content" title="Permalink to this definition">¶</a></dt> |
---|
| 104 | <dd><p>Get the content of a xpath location and store |
---|
| 105 | the result. The value is treated as a string.</p> |
---|
| 106 | <p>The xpath location might or might not exist. |
---|
| 107 | If it does not exist, nothing is done</p> |
---|
| 108 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 109 | <col class="field-name" /> |
---|
| 110 | <col class="field-body" /> |
---|
| 111 | <tbody valign="top"> |
---|
| 112 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
| 113 | <li><strong>location</strong> – xpath location to fetch</li> |
---|
| 114 | <li><strong>node</strong> – node to read the data from</li> |
---|
| 115 | <li><strong>variable</strong> – name of the data member to store it in [string]</li> |
---|
| 116 | <li><strong>storage</strong> – data object that has the ‘variable’ data member</li> |
---|
| 117 | </ul> |
---|
| 118 | </td> |
---|
| 119 | </tr> |
---|
| 120 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">return a list of errors</p> |
---|
| 121 | </td> |
---|
| 122 | </tr> |
---|
| 123 | </tbody> |
---|
| 124 | </table> |
---|
| 125 | </dd></dl> |
---|
| 126 | |
---|
| 127 | <dl class="method"> |
---|
| 128 | <dt id="sans.guiframe.state_reader.Reader1D._store_float"> |
---|
| 129 | <tt class="descname">_store_float</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D._store_float" title="Permalink to this definition">¶</a></dt> |
---|
| 130 | <dd><p>Get the content of a xpath location and store |
---|
| 131 | the result. Check that the units are compatible |
---|
| 132 | with the destination. The value is expected to |
---|
| 133 | be a float.</p> |
---|
| 134 | <p>The xpath location might or might not exist. |
---|
| 135 | If it does not exist, nothing is done</p> |
---|
| 136 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 137 | <col class="field-name" /> |
---|
| 138 | <col class="field-body" /> |
---|
| 139 | <tbody valign="top"> |
---|
| 140 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
| 141 | <li><strong>location</strong> – xpath location to fetch</li> |
---|
| 142 | <li><strong>node</strong> – node to read the data from</li> |
---|
| 143 | <li><strong>variable</strong> – name of the data member to store it in [string]</li> |
---|
| 144 | <li><strong>storage</strong> – data object that has the ‘variable’ data member</li> |
---|
| 145 | <li><strong>optional</strong> – if True, no exception will be raised |
---|
| 146 | if unit conversion can’t be done</li> |
---|
| 147 | </ul> |
---|
| 148 | </td> |
---|
| 149 | </tr> |
---|
| 150 | <tr class="field-even field"><th class="field-name" colspan="2">Raises ValueError:</th></tr> |
---|
| 151 | <tr class="field-even field"><td> </td><td class="field-body"><p class="first last">raised when the units are not recognized</p> |
---|
| 152 | </td> |
---|
| 153 | </tr> |
---|
| 154 | </tbody> |
---|
| 155 | </table> |
---|
| 156 | </dd></dl> |
---|
| 157 | |
---|
| 158 | <dl class="method"> |
---|
| 159 | <dt id="sans.guiframe.state_reader.Reader1D._to_xml_doc"> |
---|
| 160 | <tt class="descname">_to_xml_doc</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D._to_xml_doc" title="Permalink to this definition">¶</a></dt> |
---|
| 161 | <dd><p>Create an XML document to contain the content of a Data1D</p> |
---|
| 162 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 163 | <col class="field-name" /> |
---|
| 164 | <col class="field-body" /> |
---|
| 165 | <tbody valign="top"> |
---|
| 166 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>datainfo</strong> – Data1D object</td> |
---|
| 167 | </tr> |
---|
| 168 | </tbody> |
---|
| 169 | </table> |
---|
| 170 | </dd></dl> |
---|
| 171 | |
---|
| 172 | <dl class="attribute"> |
---|
| 173 | <dt id="sans.guiframe.state_reader.Reader1D.ext"> |
---|
| 174 | <tt class="descname">ext</tt><em class="property"> = []</em><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D.ext" title="Permalink to this definition">¶</a></dt> |
---|
| 175 | <dd></dd></dl> |
---|
| 176 | |
---|
[96cbb53] | 177 | <dl class="method"> |
---|
| 178 | <dt id="sans.guiframe.state_reader.Reader1D.read"> |
---|
[bce8148] | 179 | <tt class="descname">read</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D.read" title="Permalink to this definition">¶</a></dt> |
---|
[96cbb53] | 180 | <dd><p>Load data file</p> |
---|
| 181 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 182 | <col class="field-name" /> |
---|
| 183 | <col class="field-body" /> |
---|
| 184 | <tbody valign="top"> |
---|
[bce8148] | 185 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>path</strong> – file path</p> |
---|
[96cbb53] | 186 | </td> |
---|
| 187 | </tr> |
---|
[bce8148] | 188 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Data1D object if a single SASentry was found, |
---|
[96cbb53] | 189 | or a list of Data1D objects if multiple entries were found, |
---|
| 190 | or None of nothing was found</p> |
---|
| 191 | </td> |
---|
| 192 | </tr> |
---|
[bce8148] | 193 | <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> |
---|
[96cbb53] | 194 | <li><strong>RuntimeError</strong> – when the file can’t be opened</li> |
---|
| 195 | <li><strong>ValueError</strong> – when the length of the data vectors are inconsistent</li> |
---|
| 196 | </ul> |
---|
| 197 | </td> |
---|
| 198 | </tr> |
---|
| 199 | </tbody> |
---|
| 200 | </table> |
---|
| 201 | </dd></dl> |
---|
| 202 | |
---|
[bce8148] | 203 | <dl class="attribute"> |
---|
| 204 | <dt id="sans.guiframe.state_reader.Reader1D.type"> |
---|
| 205 | <tt class="descname">type</tt><em class="property"> = []</em><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D.type" title="Permalink to this definition">¶</a></dt> |
---|
| 206 | <dd></dd></dl> |
---|
| 207 | |
---|
| 208 | <dl class="attribute"> |
---|
| 209 | <dt id="sans.guiframe.state_reader.Reader1D.type_name"> |
---|
| 210 | <tt class="descname">type_name</tt><em class="property"> = 'CanSAS 1D'</em><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D.type_name" title="Permalink to this definition">¶</a></dt> |
---|
| 211 | <dd></dd></dl> |
---|
| 212 | |
---|
| 213 | <dl class="attribute"> |
---|
| 214 | <dt id="sans.guiframe.state_reader.Reader1D.version"> |
---|
| 215 | <tt class="descname">version</tt><em class="property"> = '1.0'</em><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D.version" title="Permalink to this definition">¶</a></dt> |
---|
| 216 | <dd></dd></dl> |
---|
| 217 | |
---|
[96cbb53] | 218 | <dl class="method"> |
---|
| 219 | <dt id="sans.guiframe.state_reader.Reader1D.write"> |
---|
[bce8148] | 220 | <tt class="descname">write</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader1D.write" title="Permalink to this definition">¶</a></dt> |
---|
[96cbb53] | 221 | <dd><p>Write the content of a Data1D as a CanSAS XML file</p> |
---|
| 222 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 223 | <col class="field-name" /> |
---|
| 224 | <col class="field-body" /> |
---|
| 225 | <tbody valign="top"> |
---|
[bce8148] | 226 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
[96cbb53] | 227 | <li><strong>filename</strong> – name of the file to write</li> |
---|
| 228 | <li><strong>datainfo</strong> – Data1D object</li> |
---|
| 229 | </ul> |
---|
| 230 | </td> |
---|
| 231 | </tr> |
---|
| 232 | </tbody> |
---|
| 233 | </table> |
---|
| 234 | </dd></dl> |
---|
| 235 | |
---|
| 236 | </dd></dl> |
---|
| 237 | |
---|
| 238 | <dl class="class"> |
---|
| 239 | <dt id="sans.guiframe.state_reader.Reader2D"> |
---|
| 240 | <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> |
---|
| 241 | <dd><p>Class to load a basic guiframe state</p> |
---|
| 242 | <dl class="method"> |
---|
[bce8148] | 243 | <dt id="sans.guiframe.state_reader.Reader2D.__init__"> |
---|
| 244 | <tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.__init__" title="Permalink to this definition">¶</a></dt> |
---|
| 245 | <dd></dd></dl> |
---|
| 246 | |
---|
| 247 | <dl class="attribute"> |
---|
| 248 | <dt id="sans.guiframe.state_reader.Reader2D.__module__"> |
---|
| 249 | <tt class="descname">__module__</tt><em class="property"> = 'sans.guiframe.state_reader'</em><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.__module__" title="Permalink to this definition">¶</a></dt> |
---|
| 250 | <dd></dd></dl> |
---|
| 251 | |
---|
| 252 | <dl class="method"> |
---|
| 253 | <dt id="sans.guiframe.state_reader.Reader2D._parse_entry"> |
---|
| 254 | <tt class="descname">_parse_entry</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D._parse_entry" title="Permalink to this definition">¶</a></dt> |
---|
| 255 | <dd><p>Parse a SASentry</p> |
---|
| 256 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 257 | <col class="field-name" /> |
---|
| 258 | <col class="field-body" /> |
---|
| 259 | <tbody valign="top"> |
---|
| 260 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>node</strong> – SASentry node</td> |
---|
| 261 | </tr> |
---|
| 262 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Data1D/Data2D object</td> |
---|
| 263 | </tr> |
---|
| 264 | </tbody> |
---|
| 265 | </table> |
---|
| 266 | </dd></dl> |
---|
| 267 | |
---|
| 268 | <dl class="method"> |
---|
| 269 | <dt id="sans.guiframe.state_reader.Reader2D._parse_state"> |
---|
| 270 | <tt class="descname">_parse_state</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D._parse_state" title="Permalink to this definition">¶</a></dt> |
---|
| 271 | <dd><p>Read a fit result from an XML node</p> |
---|
| 272 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 273 | <col class="field-name" /> |
---|
| 274 | <col class="field-body" /> |
---|
| 275 | <tbody valign="top"> |
---|
| 276 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>entry</strong> – XML node to read from</td> |
---|
| 277 | </tr> |
---|
| 278 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">PageState object</td> |
---|
| 279 | </tr> |
---|
| 280 | </tbody> |
---|
| 281 | </table> |
---|
| 282 | </dd></dl> |
---|
| 283 | |
---|
| 284 | <dl class="method"> |
---|
| 285 | <dt id="sans.guiframe.state_reader.Reader2D._read_cansas"> |
---|
| 286 | <tt class="descname">_read_cansas</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D._read_cansas" title="Permalink to this definition">¶</a></dt> |
---|
| 287 | <dd><p>Load data and P(r) information from a CanSAS XML file.</p> |
---|
| 288 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 289 | <col class="field-name" /> |
---|
| 290 | <col class="field-body" /> |
---|
| 291 | <tbody valign="top"> |
---|
| 292 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>path</strong> – file path</p> |
---|
| 293 | </td> |
---|
| 294 | </tr> |
---|
| 295 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Data1D object if a single SASentry was found, |
---|
| 296 | or a list of Data1D objects if multiple entries were found, |
---|
| 297 | or None of nothing was found</p> |
---|
| 298 | </td> |
---|
| 299 | </tr> |
---|
| 300 | <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> |
---|
| 301 | <li><strong>RuntimeError</strong> – when the file can’t be opened</li> |
---|
| 302 | <li><strong>ValueError</strong> – when the length of the data vectors are inconsistent</li> |
---|
| 303 | </ul> |
---|
| 304 | </td> |
---|
| 305 | </tr> |
---|
| 306 | </tbody> |
---|
| 307 | </table> |
---|
| 308 | </dd></dl> |
---|
| 309 | |
---|
| 310 | <dl class="method"> |
---|
| 311 | <dt id="sans.guiframe.state_reader.Reader2D._to_xml_doc"> |
---|
| 312 | <tt class="descname">_to_xml_doc</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D._to_xml_doc" title="Permalink to this definition">¶</a></dt> |
---|
| 313 | <dd><p>Create an XML document to contain the content of a Data2D</p> |
---|
| 314 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 315 | <col class="field-name" /> |
---|
| 316 | <col class="field-body" /> |
---|
| 317 | <tbody valign="top"> |
---|
| 318 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>datainfo</strong> – Data2D object</td> |
---|
| 319 | </tr> |
---|
| 320 | </tbody> |
---|
| 321 | </table> |
---|
| 322 | </dd></dl> |
---|
| 323 | |
---|
| 324 | <dl class="attribute"> |
---|
| 325 | <dt id="sans.guiframe.state_reader.Reader2D.ext"> |
---|
| 326 | <tt class="descname">ext</tt><em class="property"> = ['.fitv', '.FITV', '.svs', 'SVS']</em><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.ext" title="Permalink to this definition">¶</a></dt> |
---|
| 327 | <dd></dd></dl> |
---|
| 328 | |
---|
| 329 | <dl class="method"> |
---|
[96cbb53] | 330 | <dt id="sans.guiframe.state_reader.Reader2D.read"> |
---|
[bce8148] | 331 | <tt class="descname">read</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.read" title="Permalink to this definition">¶</a></dt> |
---|
[96cbb53] | 332 | <dd><p>Load a new P(r) inversion state from file</p> |
---|
| 333 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 334 | <col class="field-name" /> |
---|
| 335 | <col class="field-body" /> |
---|
| 336 | <tbody valign="top"> |
---|
[bce8148] | 337 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> – file path</td> |
---|
[96cbb53] | 338 | </tr> |
---|
| 339 | </tbody> |
---|
| 340 | </table> |
---|
| 341 | </dd></dl> |
---|
| 342 | |
---|
[bce8148] | 343 | <dl class="attribute"> |
---|
| 344 | <dt id="sans.guiframe.state_reader.Reader2D.type"> |
---|
| 345 | <tt class="descname">type</tt><em class="property"> = ['Fitting files (*.fitv)|*.fitvSANSView file (*.svs)|*.svs']</em><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.type" title="Permalink to this definition">¶</a></dt> |
---|
| 346 | <dd></dd></dl> |
---|
| 347 | |
---|
| 348 | <dl class="attribute"> |
---|
| 349 | <dt id="sans.guiframe.state_reader.Reader2D.type_name"> |
---|
| 350 | <tt class="descname">type_name</tt><em class="property"> = 'Fitting'</em><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.type_name" title="Permalink to this definition">¶</a></dt> |
---|
| 351 | <dd></dd></dl> |
---|
| 352 | |
---|
[96cbb53] | 353 | <dl class="method"> |
---|
| 354 | <dt id="sans.guiframe.state_reader.Reader2D.write"> |
---|
[bce8148] | 355 | <tt class="descname">write</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.write" title="Permalink to this definition">¶</a></dt> |
---|
[96cbb53] | 356 | <dd><p>Write the content of a Data1D as a CanSAS XML file only for standalone</p> |
---|
| 357 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 358 | <col class="field-name" /> |
---|
| 359 | <col class="field-body" /> |
---|
| 360 | <tbody valign="top"> |
---|
[bce8148] | 361 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
[96cbb53] | 362 | <li><strong>filename</strong> – name of the file to write</li> |
---|
| 363 | <li><strong>datainfo</strong> – Data1D object</li> |
---|
| 364 | <li><strong>fitstate</strong> – PageState object</li> |
---|
| 365 | </ul> |
---|
| 366 | </td> |
---|
| 367 | </tr> |
---|
| 368 | </tbody> |
---|
| 369 | </table> |
---|
| 370 | </dd></dl> |
---|
| 371 | |
---|
| 372 | <dl class="method"> |
---|
| 373 | <dt id="sans.guiframe.state_reader.Reader2D.write_toXML"> |
---|
[bce8148] | 374 | <tt class="descname">write_toXML</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.Reader2D.write_toXML" title="Permalink to this definition">¶</a></dt> |
---|
[96cbb53] | 375 | <dd><p>Write toXML, a helper for write() , could be used by guimanager._on_save()</p> |
---|
| 376 | <p>: return: xml doc</p> |
---|
| 377 | </dd></dl> |
---|
| 378 | |
---|
| 379 | </dd></dl> |
---|
| 380 | |
---|
| 381 | <dl class="function"> |
---|
| 382 | <dt id="sans.guiframe.state_reader.get_content"> |
---|
[bce8148] | 383 | <tt class="descclassname">sans.guiframe.state_reader.</tt><tt class="descname">get_content</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.get_content" title="Permalink to this definition">¶</a></dt> |
---|
[96cbb53] | 384 | <dd><p>Get the first instance of the content of a xpath location.</p> |
---|
| 385 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 386 | <col class="field-name" /> |
---|
| 387 | <col class="field-body" /> |
---|
| 388 | <tbody valign="top"> |
---|
[bce8148] | 389 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
[96cbb53] | 390 | <li><strong>location</strong> – xpath location</li> |
---|
| 391 | <li><strong>node</strong> – node to start at</li> |
---|
| 392 | </ul> |
---|
| 393 | </td> |
---|
| 394 | </tr> |
---|
[bce8148] | 395 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Element, or None</p> |
---|
[96cbb53] | 396 | </td> |
---|
| 397 | </tr> |
---|
| 398 | </tbody> |
---|
| 399 | </table> |
---|
| 400 | </dd></dl> |
---|
| 401 | |
---|
| 402 | <dl class="function"> |
---|
| 403 | <dt id="sans.guiframe.state_reader.get_float"> |
---|
[bce8148] | 404 | <tt class="descclassname">sans.guiframe.state_reader.</tt><tt class="descname">get_float</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.get_float" title="Permalink to this definition">¶</a></dt> |
---|
[96cbb53] | 405 | <dd><p>Get the content of a node as a float</p> |
---|
| 406 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 407 | <col class="field-name" /> |
---|
| 408 | <col class="field-body" /> |
---|
| 409 | <tbody valign="top"> |
---|
[bce8148] | 410 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
[96cbb53] | 411 | <li><strong>location</strong> – xpath location</li> |
---|
| 412 | <li><strong>node</strong> – node to start at</li> |
---|
| 413 | </ul> |
---|
| 414 | </td> |
---|
| 415 | </tr> |
---|
| 416 | </tbody> |
---|
| 417 | </table> |
---|
| 418 | </dd></dl> |
---|
| 419 | |
---|
| 420 | <dl class="function"> |
---|
| 421 | <dt id="sans.guiframe.state_reader.write_node"> |
---|
[bce8148] | 422 | <tt class="descclassname">sans.guiframe.state_reader.</tt><tt class="descname">write_node</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.state_reader.write_node" title="Permalink to this definition">¶</a></dt> |
---|
[96cbb53] | 423 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
| 424 | <col class="field-name" /> |
---|
| 425 | <col class="field-body" /> |
---|
| 426 | <tbody valign="top"> |
---|
[bce8148] | 427 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
[96cbb53] | 428 | <li><strong>doc</strong> – document DOM</li> |
---|
| 429 | <li><strong>parent</strong> – parent node</li> |
---|
| 430 | <li><strong>name</strong> – tag of the element</li> |
---|
| 431 | <li><strong>value</strong> – value of the child text node</li> |
---|
| 432 | <li><strong>attr</strong> – attribute dictionary</li> |
---|
| 433 | </ul> |
---|
| 434 | </td> |
---|
| 435 | </tr> |
---|
[bce8148] | 436 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">True if something was appended, otherwise False</p> |
---|
[96cbb53] | 437 | </td> |
---|
| 438 | </tr> |
---|
| 439 | </tbody> |
---|
| 440 | </table> |
---|
| 441 | </dd></dl> |
---|
| 442 | |
---|
| 443 | </div> |
---|
| 444 | </div> |
---|
| 445 | |
---|
| 446 | |
---|
| 447 | </div> |
---|
| 448 | </div> |
---|
| 449 | </div> |
---|
| 450 | <div class="sphinxsidebar"> |
---|
| 451 | <div class="sphinxsidebarwrapper"> |
---|
| 452 | <h3><a href="../index.html">Table Of Contents</a></h3> |
---|
| 453 | <ul> |
---|
| 454 | <li><a class="reference internal" href="#">state_reader</a><ul> |
---|
[bce8148] | 455 | <li><a class="reference internal" href="#sans-guiframe-state-reader"><tt class="docutils literal"><span class="pre">sans.guiframe.state_reader</span></tt></a></li> |
---|
[96cbb53] | 456 | </ul> |
---|
| 457 | </li> |
---|
| 458 | </ul> |
---|
| 459 | |
---|
| 460 | <h4>Previous topic</h4> |
---|
| 461 | <p class="topless"><a href="startup_configuration.html" |
---|
| 462 | title="previous chapter">startup_configuration</a></p> |
---|
| 463 | <h4>Next topic</h4> |
---|
| 464 | <p class="topless"><a href="utils.html" |
---|
| 465 | title="next chapter">utils</a></p> |
---|
| 466 | <h3>This Page</h3> |
---|
| 467 | <ul class="this-page-menu"> |
---|
| 468 | <li><a href="../_sources/api/state_reader.txt" |
---|
| 469 | rel="nofollow">Show Source</a></li> |
---|
| 470 | </ul> |
---|
| 471 | <div id="searchbox" style="display: none"> |
---|
| 472 | <h3>Quick search</h3> |
---|
| 473 | <form class="search" action="../search.html" method="get"> |
---|
[bce8148] | 474 | <input type="text" name="q" /> |
---|
[96cbb53] | 475 | <input type="submit" value="Go" /> |
---|
| 476 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
| 477 | <input type="hidden" name="area" value="default" /> |
---|
| 478 | </form> |
---|
| 479 | <p class="searchtip" style="font-size: 90%"> |
---|
| 480 | Enter search terms or a module, class or function name. |
---|
| 481 | </p> |
---|
| 482 | </div> |
---|
| 483 | <script type="text/javascript">$('#searchbox').show(0);</script> |
---|
| 484 | </div> |
---|
| 485 | </div> |
---|
| 486 | <div class="clearer"></div> |
---|
| 487 | </div> |
---|
| 488 | <div class="related"> |
---|
| 489 | <h3>Navigation</h3> |
---|
| 490 | <ul> |
---|
| 491 | <li class="right" style="margin-right: 10px"> |
---|
| 492 | <a href="../genindex.html" title="General Index" |
---|
| 493 | >index</a></li> |
---|
| 494 | <li class="right" > |
---|
| 495 | <a href="../py-modindex.html" title="Python Module Index" |
---|
| 496 | >modules</a> |</li> |
---|
| 497 | <li class="right" > |
---|
| 498 | <a href="utils.html" title="utils" |
---|
| 499 | >next</a> |</li> |
---|
| 500 | <li class="right" > |
---|
| 501 | <a href="startup_configuration.html" title="startup_configuration" |
---|
| 502 | >previous</a> |</li> |
---|
[bce8148] | 503 | <li><a href="../index.html">guiframe 0.1.0 documentation</a> »</li> |
---|
[96cbb53] | 504 | <li><a href="index.html" >Reference</a> »</li> |
---|
| 505 | </ul> |
---|
| 506 | </div> |
---|
| 507 | <div class="footer"> |
---|
| 508 | © Copyright 2010, sans group. |
---|
[bce8148] | 509 | Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1. |
---|
[96cbb53] | 510 | </div> |
---|
| 511 | </body> |
---|
| 512 | </html> |
---|