Ignore:
Timestamp:
Oct 24, 2011 2:02:30 PM (13 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
70ecd530
Parents:
a4f04f2
Message:

updates docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansdataloader/docs/sphinx/html/api/readers/cansas_reader.html

    rfc5d49e3 r7247844  
    33<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    44  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     5 
    56 
    67<html xmlns="http://www.w3.org/1999/xhtml"> 
     
    89    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    910     
    10     <title>cansas_reader &mdash; DataLoader v0.1.0 documentation</title> 
     11    <title>cansas_reader &mdash; DataLoader 0.1.0 documentation</title> 
     12     
    1113    <link rel="stylesheet" href="../../_static/default.css" type="text/css" /> 
    1214    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> 
     15     
    1316    <script type="text/javascript"> 
    1417      var DOCUMENTATION_OPTIONS = { 
     
    2326    <script type="text/javascript" src="../../_static/underscore.js"></script> 
    2427    <script type="text/javascript" src="../../_static/doctools.js"></script> 
    25     <link rel="top" title="DataLoader v0.1.0 documentation" href="../../index.html" /> 
     28    <link rel="top" title="DataLoader 0.1.0 documentation" href="../../index.html" /> 
    2629    <link rel="up" title="Readers" href="index.html" /> 
    2730    <link rel="next" title="danse_reader" href="danse_reader.html" /> 
     
    4447          <a href="associations.html" title="associations" 
    4548             accesskey="P">previous</a> |</li> 
    46         <li><a href="../../index.html">DataLoader v0.1.0 documentation</a> &raquo;</li> 
     49        <li><a href="../../index.html">DataLoader 0.1.0 documentation</a> &raquo;</li> 
    4750          <li><a href="index.html" accesskey="U">Readers</a> &raquo;</li>  
    4851      </ul> 
     
    5659  <div class="section" id="cansas-reader"> 
    5760<h1>cansas_reader<a class="headerlink" href="#cansas-reader" title="Permalink to this headline">¶</a></h1> 
    58 <div class="section" id="module-DataLoader.readers.cansas_reader"> 
    59 <span id="dataloader-readers-cansas-reader"></span><h2><a class="reference internal" href="#module-DataLoader.readers.cansas_reader" title="DataLoader.readers.cansas_reader"><tt class="xref py py-mod docutils literal"><span class="pre">DataLoader.readers.cansas_reader</span></tt></a><a class="headerlink" href="#module-DataLoader.readers.cansas_reader" title="Permalink to this headline">¶</a></h2> 
    60 <dl class="class"> 
    61 <dt id="DataLoader.readers.cansas_reader.Reader"> 
    62 <em class="property">class </em><tt class="descclassname">DataLoader.readers.cansas_reader.</tt><tt class="descname">Reader</tt><a class="headerlink" href="#DataLoader.readers.cansas_reader.Reader" title="Permalink to this definition">¶</a></dt> 
     61<div class="section" id="sans-dataloader-readers-cansas-reader"> 
     62<h2><a class="reference internal" href="#module-sans.dataloader.readers.cansas_reader" title="sans.dataloader.readers.cansas_reader"><tt class="xref py py-mod docutils literal"><span class="pre">sans.dataloader.readers.cansas_reader</span></tt></a><a class="headerlink" href="#sans-dataloader-readers-cansas-reader" title="Permalink to this headline">¶</a></h2> 
     63<span class="target" id="module-sans.dataloader.readers.cansas_reader"></span><dl class="class"> 
     64<dt id="sans.dataloader.readers.cansas_reader.Reader"> 
     65<em class="property">class </em><tt class="descclassname">sans.dataloader.readers.cansas_reader.</tt><tt class="descname">Reader</tt><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader" title="Permalink to this definition">¶</a></dt> 
    6366<dd><p>Class to load cansas 1D XML files</p> 
    6467<table class="docutils field-list" frame="void" rules="none"> 
     
    6669<col class="field-body" /> 
    6770<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="DataLoader.readers.cansas_reader.Reader.read"> 
    74 <tt class="descname">read</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#DataLoader.readers.cansas_reader.Reader.read" title="Permalink to this definition">¶</a></dt> 
     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.dataloader.readers.cansas_reader.Reader.__init__"> 
     77<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader.__init__" title="Permalink to this definition">¶</a></dt> 
     78<dd></dd></dl> 
     79 
     80<dl class="attribute"> 
     81<dt id="sans.dataloader.readers.cansas_reader.Reader.__module__"> 
     82<tt class="descname">__module__</tt><em class="property"> = 'sans.dataloader.readers.cansas_reader'</em><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader.__module__" title="Permalink to this definition">¶</a></dt> 
     83<dd></dd></dl> 
     84 
     85<dl class="method"> 
     86<dt id="sans.dataloader.readers.cansas_reader.Reader._parse_entry"> 
     87<tt class="descname">_parse_entry</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader._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> &#8211; SASentry node</td> 
     94</tr> 
     95<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Data1D object</td> 
     96</tr> 
     97</tbody> 
     98</table> 
     99</dd></dl> 
     100 
     101<dl class="method"> 
     102<dt id="sans.dataloader.readers.cansas_reader.Reader._store_content"> 
     103<tt class="descname">_store_content</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader._store_content" title="Permalink to this definition">¶</a></dt> 
     104<dd><p>Get the content of a xpath location and store 
     105the result. The value is treated as a string.</p> 
     106<p>The xpath location might or might not exist. 
     107If 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> &#8211; xpath location to fetch</li> 
     114<li><strong>node</strong> &#8211; node to read the data from</li> 
     115<li><strong>variable</strong> &#8211; name of the data member to store it in [string]</li> 
     116<li><strong>storage</strong> &#8211; data object that has the &#8216;variable&#8217; 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.dataloader.readers.cansas_reader.Reader._store_float"> 
     129<tt class="descname">_store_float</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader._store_float" title="Permalink to this definition">¶</a></dt> 
     130<dd><p>Get the content of a xpath location and store 
     131the result. Check that the units are compatible 
     132with the destination. The value is expected to 
     133be a float.</p> 
     134<p>The xpath location might or might not exist. 
     135If 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> &#8211; xpath location to fetch</li> 
     142<li><strong>node</strong> &#8211; node to read the data from</li> 
     143<li><strong>variable</strong> &#8211; name of the data member to store it in [string]</li> 
     144<li><strong>storage</strong> &#8211; data object that has the &#8216;variable&#8217; data member</li> 
     145<li><strong>optional</strong> &#8211; if True, no exception will be raised  
     146if unit conversion can&#8217;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>&nbsp;</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.dataloader.readers.cansas_reader.Reader._to_xml_doc"> 
     160<tt class="descname">_to_xml_doc</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader._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> &#8211; Data1D object</td> 
     167</tr> 
     168</tbody> 
     169</table> 
     170</dd></dl> 
     171 
     172<dl class="attribute"> 
     173<dt id="sans.dataloader.readers.cansas_reader.Reader.ext"> 
     174<tt class="descname">ext</tt><em class="property"> = ['.xml', '.XML', '.avex', '.AVEx', '.absx', 'ABSx']</em><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader.ext" title="Permalink to this definition">¶</a></dt> 
     175<dd></dd></dl> 
     176 
     177<dl class="method"> 
     178<dt id="sans.dataloader.readers.cansas_reader.Reader.read"> 
     179<tt class="descname">read</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader.read" title="Permalink to this definition">¶</a></dt> 
    75180<dd><p>Load data file</p> 
    76181<table class="docutils field-list" frame="void" rules="none"> 
     
    78183<col class="field-body" /> 
    79184<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,  
     185<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>path</strong> &#8211; file path</p> 
     186</td> 
     187</tr> 
     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,  
    84189or a list of Data1D objects if multiple entries were found, 
    85190or None of nothing was found</p> 
    86191</td> 
    87192</tr> 
    88 <tr class="field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> 
     193<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> 
    89194<li><strong>RuntimeError</strong> &#8211; when the file can&#8217;t be opened</li> 
    90195<li><strong>ValueError</strong> &#8211; when the length of the data vectors are inconsistent</li> 
     
    96201</dd></dl> 
    97202 
    98 <dl class="method"> 
    99 <dt id="DataLoader.readers.cansas_reader.Reader.write"> 
    100 <tt class="descname">write</tt><big>(</big><em>filename</em>, <em>datainfo</em><big>)</big><a class="headerlink" href="#DataLoader.readers.cansas_reader.Reader.write" title="Permalink to this definition">¶</a></dt> 
     203<dl class="attribute"> 
     204<dt id="sans.dataloader.readers.cansas_reader.Reader.type"> 
     205<tt class="descname">type</tt><em class="property"> = ['CanSAS 1D files (*.xml)|*.xml', 'CanSAS 1D AVE files (*.AVEx)|*.AVEx', 'CanSAS 1D AVE files (*.ABSx)|*.ABSx']</em><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader.type" title="Permalink to this definition">¶</a></dt> 
     206<dd></dd></dl> 
     207 
     208<dl class="attribute"> 
     209<dt id="sans.dataloader.readers.cansas_reader.Reader.type_name"> 
     210<tt class="descname">type_name</tt><em class="property"> = 'CanSAS 1D'</em><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader.type_name" title="Permalink to this definition">¶</a></dt> 
     211<dd></dd></dl> 
     212 
     213<dl class="attribute"> 
     214<dt id="sans.dataloader.readers.cansas_reader.Reader.version"> 
     215<tt class="descname">version</tt><em class="property"> = '1.0'</em><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader.version" title="Permalink to this definition">¶</a></dt> 
     216<dd></dd></dl> 
     217 
     218<dl class="method"> 
     219<dt id="sans.dataloader.readers.cansas_reader.Reader.write"> 
     220<tt class="descname">write</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.Reader.write" title="Permalink to this definition">¶</a></dt> 
    101221<dd><p>Write the content of a Data1D as a CanSAS XML file</p> 
    102222<table class="docutils field-list" frame="void" rules="none"> 
     
    104224<col class="field-body" /> 
    105225<tbody valign="top"> 
    106 <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> 
     226<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> 
    107227<li><strong>filename</strong> &#8211; name of the file to write</li> 
    108228<li><strong>datainfo</strong> &#8211; Data1D object</li> 
     
    117237 
    118238<dl class="function"> 
    119 <dt id="DataLoader.readers.cansas_reader.get_content"> 
    120 <tt class="descclassname">DataLoader.readers.cansas_reader.</tt><tt class="descname">get_content</tt><big>(</big><em>location</em>, <em>node</em><big>)</big><a class="headerlink" href="#DataLoader.readers.cansas_reader.get_content" title="Permalink to this definition">¶</a></dt> 
     239<dt id="sans.dataloader.readers.cansas_reader.get_content"> 
     240<tt class="descclassname">sans.dataloader.readers.cansas_reader.</tt><tt class="descname">get_content</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.get_content" title="Permalink to this definition">¶</a></dt> 
    121241<dd><p>Get the first instance of the content of a xpath location.</p> 
    122242<table class="docutils field-list" frame="void" rules="none"> 
     
    124244<col class="field-body" /> 
    125245<tbody valign="top"> 
    126 <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> 
     246<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> 
    127247<li><strong>location</strong> &#8211; xpath location</li> 
    128248<li><strong>node</strong> &#8211; node to start at</li> 
     
    130250</td> 
    131251</tr> 
    132 <tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Element, or None</p> 
     252<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Element, or None</p> 
    133253</td> 
    134254</tr> 
     
    138258 
    139259<dl class="function"> 
    140 <dt id="DataLoader.readers.cansas_reader.get_float"> 
    141 <tt class="descclassname">DataLoader.readers.cansas_reader.</tt><tt class="descname">get_float</tt><big>(</big><em>location</em>, <em>node</em><big>)</big><a class="headerlink" href="#DataLoader.readers.cansas_reader.get_float" title="Permalink to this definition">¶</a></dt> 
     260<dt id="sans.dataloader.readers.cansas_reader.get_float"> 
     261<tt class="descclassname">sans.dataloader.readers.cansas_reader.</tt><tt class="descname">get_float</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.get_float" title="Permalink to this definition">¶</a></dt> 
    142262<dd><p>Get the content of a node as a float</p> 
    143263<table class="docutils field-list" frame="void" rules="none"> 
     
    145265<col class="field-body" /> 
    146266<tbody valign="top"> 
    147 <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> 
     267<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> 
    148268<li><strong>location</strong> &#8211; xpath location</li> 
    149269<li><strong>node</strong> &#8211; node to start at</li> 
     
    156276 
    157277<dl class="function"> 
    158 <dt id="DataLoader.readers.cansas_reader.write_node"> 
    159 <tt class="descclassname">DataLoader.readers.cansas_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="#DataLoader.readers.cansas_reader.write_node" title="Permalink to this definition">¶</a></dt> 
     278<dt id="sans.dataloader.readers.cansas_reader.write_node"> 
     279<tt class="descclassname">sans.dataloader.readers.cansas_reader.</tt><tt class="descname">write_node</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.dataloader.readers.cansas_reader.write_node" title="Permalink to this definition">¶</a></dt> 
    160280<dd><table class="docutils field-list" frame="void" rules="none"> 
    161281<col class="field-name" /> 
    162282<col class="field-body" /> 
    163283<tbody valign="top"> 
    164 <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> 
     284<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> 
    165285<li><strong>doc</strong> &#8211; document DOM</li> 
    166286<li><strong>parent</strong> &#8211; parent node</li> 
     
    171291</td> 
    172292</tr> 
    173 <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> 
     293<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> 
    174294</td> 
    175295</tr> 
     
    190310  <ul> 
    191311<li><a class="reference internal" href="#">cansas_reader</a><ul> 
    192 <li><a class="reference internal" href="#module-DataLoader.readers.cansas_reader"><tt class="docutils literal"><span class="pre">DataLoader.readers.cansas_reader</span></tt></a></li> 
     312<li><a class="reference internal" href="#sans-dataloader-readers-cansas-reader"><tt class="docutils literal"><span class="pre">sans.dataloader.readers.cansas_reader</span></tt></a></li> 
    193313</ul> 
    194314</li> 
     
    209329  <h3>Quick search</h3> 
    210330    <form class="search" action="../../search.html" method="get"> 
    211       <input type="text" name="q" size="18" /> 
     331      <input type="text" name="q" /> 
    212332      <input type="submit" value="Go" /> 
    213333      <input type="hidden" name="check_keywords" value="yes" /> 
     
    238358          <a href="associations.html" title="associations" 
    239359             >previous</a> |</li> 
    240         <li><a href="../../index.html">DataLoader v0.1.0 documentation</a> &raquo;</li> 
     360        <li><a href="../../index.html">DataLoader 0.1.0 documentation</a> &raquo;</li> 
    241361          <li><a href="index.html" >Readers</a> &raquo;</li>  
    242362      </ul> 
     
    244364    <div class="footer"> 
    245365        &copy; Copyright 2010, sans group. 
    246       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. 
     366      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1. 
    247367    </div> 
    248368  </body> 
Note: See TracChangeset for help on using the changeset viewer.