Ignore:
Timestamp:
Jan 5, 2014 9:22:22 AM (8 years ago)
Author:
toby
Message:

fixup number formatting; update produced doc files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sphinxdocs/build/html/_modules/G2pwd_xye.html

    r1168 r1183  
    5353<span class="c"># -*- coding: utf-8 -*-</span>
    5454<span class="c">########### SVN repository information ###################</span>
    55 <span class="c"># $Date: 2013-10-25 14:24:22 -0500 (Fri, 25 Oct 2013) $</span>
     55<span class="c"># $Date: 2013-12-16 10:43:01 -0600 (Mon, 16 Dec 2013) $</span>
    5656<span class="c"># $Author: toby $</span>
    57 <span class="c"># $Revision: 1123 $</span>
     57<span class="c"># $Revision: 1168 $</span>
    5858<span class="c"># $URL: https://subversion.xor.aps.anl.gov/pyGSAS/trunk/imports/G2pwd_xye.py $</span>
    59 <span class="c"># $Id: G2pwd_xye.py 1123 2013-10-25 19:24:22Z toby $</span>
     59<span class="c"># $Id: G2pwd_xye.py 1168 2013-12-16 16:43:01Z toby $</span>
    6060<span class="c">########### SVN repository information ###################</span>
    6161<span class="sd">&#39;&#39;&#39;</span>
     
    7272<span class="kn">import</span> <span class="nn">GSASIIIO</span> <span class="kn">as</span> <span class="nn">G2IO</span>
    7373<span class="kn">import</span> <span class="nn">GSASIIpath</span>
    74 <span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 1123 $&quot;</span><span class="p">)</span>
     74<span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 1168 $&quot;</span><span class="p">)</span>
    7575
    7676<div class="viewcode-block" id="xye_ReaderClass"><a class="viewcode-back" href="../imports.html#G2pwd_xye.xye_ReaderClass">[docs]</a><span class="k">class</span> <span class="nc">xye_ReaderClass</span><span class="p">(</span><span class="n">G2IO</span><span class="o">.</span><span class="n">ImportPowderData</span><span class="p">):</span>
     
    8686    <span class="c"># Validate the contents -- make sure we only have valid lines</span>
    8787<div class="viewcode-block" id="xye_ReaderClass.ContentsValidator"><a class="viewcode-back" href="../imports.html#G2pwd_xye.xye_ReaderClass.ContentsValidator">[docs]</a>    <span class="k">def</span> <span class="nf">ContentsValidator</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filepointer</span><span class="p">):</span>
    88         <span class="c">#print &#39;ContentsValidator: &#39;+self.formatName</span>
     88        <span class="s">&#39;Look through the file for expected types of lines in a valid Topas file&#39;</span>
    8989        <span class="n">gotCcomment</span> <span class="o">=</span> <span class="bp">False</span>
    9090        <span class="n">begin</span> <span class="o">=</span> <span class="bp">True</span>
     
    107107                <span class="k">continue</span>
    108108            <span class="k">else</span><span class="p">:</span>
    109                 <span class="k">print</span> <span class="s">&#39;ContentsValidator: &#39;</span><span class="o">+</span><span class="bp">self</span><span class="o">.</span><span class="n">formatName</span>
    110                 <span class="k">print</span> <span class="s">&#39;Unexpected information in line:&#39;</span><span class="p">,</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span> <span class="c"># debug info</span>
    111                 <span class="k">print</span> <span class="n">S</span>
     109                <span class="bp">self</span><span class="o">.</span><span class="n">errors</span> <span class="o">=</span> <span class="s">&#39;Unexpected information in line: &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
     110                <span class="bp">self</span><span class="o">.</span><span class="n">errors</span> <span class="o">+=</span> <span class="s">&#39;  &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">S</span><span class="p">)</span>
    112111                <span class="k">return</span> <span class="bp">False</span>
    113112        <span class="k">return</span> <span class="bp">True</span> <span class="c"># no errors encountered</span>
    114113</div>
    115114<div class="viewcode-block" id="xye_ReaderClass.Reader"><a class="viewcode-back" href="../imports.html#G2pwd_xye.xye_ReaderClass.Reader">[docs]</a>    <span class="k">def</span> <span class="nf">Reader</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">filename</span><span class="p">,</span><span class="n">filepointer</span><span class="p">,</span> <span class="n">ParentFrame</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="o">**</span><span class="n">unused</span><span class="p">):</span>
     115        <span class="s">&#39;Read a Topas file&#39;</span>
    116116        <span class="n">x</span> <span class="o">=</span> <span class="p">[]</span>
    117117        <span class="n">y</span> <span class="o">=</span> <span class="p">[]</span>
     
    121121            <span class="n">begin</span> <span class="o">=</span> <span class="bp">True</span>
    122122            <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">S</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">filepointer</span><span class="p">):</span>
     123                <span class="bp">self</span><span class="o">.</span><span class="n">errors</span> <span class="o">=</span> <span class="s">&#39;Error reading line: &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
    123124                <span class="c"># or a block of comments delimited by /* and */</span>
    124125                <span class="c"># or (GSAS style) each line can begin with &#39;#&#39;</span>
     
    180181            <span class="k">return</span> <span class="bp">True</span>
    181182        <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">detail</span><span class="p">:</span>
     183            <span class="bp">self</span><span class="o">.</span><span class="n">errors</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">  &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">detail</span><span class="p">)</span>
    182184            <span class="k">print</span> <span class="bp">self</span><span class="o">.</span><span class="n">formatName</span><span class="o">+</span><span class="s">&#39; read error:&#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">detail</span><span class="p">)</span> <span class="c"># for testing</span>
    183185            <span class="kn">import</span> <span class="nn">traceback</span>
Note: See TracChangeset for help on using the changeset viewer.