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/GSASIIstrIO.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-11-28 21:16:02 -0600 (Thu, 28 Nov 2013) $</span>
     55<span class="c"># $Date: 2014-01-02 14:18:25 -0600 (Thu, 02 Jan 2014) $</span>
    5656<span class="c"># $Author: toby $</span>
    57 <span class="c"># $Revision: 1160 $</span>
     57<span class="c"># $Revision: 1181 $</span>
    5858<span class="c"># $URL: https://subversion.xor.aps.anl.gov/pyGSAS/trunk/GSASIIstrIO.py $</span>
    59 <span class="c"># $Id: GSASIIstrIO.py 1160 2013-11-29 03:16:02Z toby $</span>
     59<span class="c"># $Id: GSASIIstrIO.py 1181 2014-01-02 20:18:25Z toby $</span>
    6060<span class="c">########### SVN repository information ###################</span>
    6161<span class="sd">&#39;&#39;&#39;</span>
     
    7777<span class="kn">import</span> <span class="nn">scipy.optimize</span> <span class="kn">as</span> <span class="nn">so</span>
    7878<span class="kn">import</span> <span class="nn">GSASIIpath</span>
    79 <span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 1160 $&quot;</span><span class="p">)</span>
     79<span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 1181 $&quot;</span><span class="p">)</span>
    8080<span class="kn">import</span> <span class="nn">GSASIIElem</span> <span class="kn">as</span> <span class="nn">G2el</span>
    8181<span class="kn">import</span> <span class="nn">GSASIIgrid</span> <span class="kn">as</span> <span class="nn">G2gd</span>
     
    22722272        <span class="n">sampDict</span> <span class="o">=</span> <span class="p">{</span><span class="n">hfx</span><span class="o">+</span><span class="s">&#39;Gonio. radius&#39;</span><span class="p">:</span><span class="n">Sample</span><span class="p">[</span><span class="s">&#39;Gonio. radius&#39;</span><span class="p">],</span><span class="n">hfx</span><span class="o">+</span><span class="s">&#39;Omega&#39;</span><span class="p">:</span><span class="n">Sample</span><span class="p">[</span><span class="s">&#39;Omega&#39;</span><span class="p">],</span>
    22732273            <span class="n">hfx</span><span class="o">+</span><span class="s">&#39;Chi&#39;</span><span class="p">:</span><span class="n">Sample</span><span class="p">[</span><span class="s">&#39;Chi&#39;</span><span class="p">],</span><span class="n">hfx</span><span class="o">+</span><span class="s">&#39;Phi&#39;</span><span class="p">:</span><span class="n">Sample</span><span class="p">[</span><span class="s">&#39;Phi&#39;</span><span class="p">]}</span>
     2274        <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="p">(</span><span class="s">&#39;Temperature&#39;</span><span class="p">,</span><span class="s">&#39;Pressure&#39;</span><span class="p">,</span><span class="s">&#39;FreePrm1&#39;</span><span class="p">,</span><span class="s">&#39;FreePrm2&#39;</span><span class="p">,</span><span class="s">&#39;FreePrm3&#39;</span><span class="p">):</span>
     2275            <span class="k">if</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">Sample</span><span class="p">:</span>
     2276                <span class="n">sampDict</span><span class="p">[</span><span class="n">hfx</span><span class="o">+</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">Sample</span><span class="p">[</span><span class="n">key</span><span class="p">]</span>
    22742277        <span class="n">Type</span> <span class="o">=</span> <span class="n">Sample</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]</span>
    22752278        <span class="k">if</span> <span class="s">&#39;Bragg&#39;</span> <span class="ow">in</span> <span class="n">Type</span><span class="p">:</span>             <span class="c">#Bragg-Brentano</span>
    2276             <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="p">[</span><span class="s">&#39;Scale&#39;</span><span class="p">,</span><span class="s">&#39;Shift&#39;</span><span class="p">,</span><span class="s">&#39;Transparency&#39;</span><span class="p">]:</span>       <span class="c">#surface roughness?, diffuse scattering?</span>
     2279            <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="p">[</span><span class="s">&#39;Scale&#39;</span><span class="p">,</span><span class="s">&#39;Shift&#39;</span><span class="p">,</span><span class="s">&#39;Transparency&#39;</span><span class="p">,</span><span class="s">&#39;SurfRoughA&#39;</span><span class="p">,</span><span class="s">&#39;SurfRoughB&#39;</span><span class="p">]:</span>
    22772280                <span class="n">sampDict</span><span class="p">[</span><span class="n">hfx</span><span class="o">+</span><span class="n">item</span><span class="p">]</span> <span class="o">=</span> <span class="n">Sample</span><span class="p">[</span><span class="n">item</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
    22782281                <span class="k">if</span> <span class="n">Sample</span><span class="p">[</span><span class="n">item</span><span class="p">][</span><span class="mi">1</span><span class="p">]:</span>
     
    23472350        <span class="n">varstr</span> <span class="o">=</span> <span class="s">&#39; refine:&#39;</span>
    23482351        <span class="k">if</span> <span class="s">&#39;Bragg&#39;</span> <span class="ow">in</span> <span class="n">Sample</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]:</span>
    2349             <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="p">[</span><span class="s">&#39;Scale&#39;</span><span class="p">,</span><span class="s">&#39;Shift&#39;</span><span class="p">,</span><span class="s">&#39;Transparency&#39;</span><span class="p">]:</span>
     2352            <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="p">[</span><span class="s">&#39;Scale&#39;</span><span class="p">,</span><span class="s">&#39;Shift&#39;</span><span class="p">,</span><span class="s">&#39;Transparency&#39;</span><span class="p">,</span><span class="s">&#39;SurfRoughA&#39;</span><span class="p">,</span><span class="s">&#39;SurfRoughB&#39;</span><span class="p">]:</span>
    23502353                <span class="n">ptlbls</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="si">%14s</span><span class="s">&#39;</span><span class="o">%</span><span class="p">(</span><span class="n">item</span><span class="p">)</span>
    23512354                <span class="n">ptstr</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="si">%14.4f</span><span class="s">&#39;</span><span class="o">%</span><span class="p">(</span><span class="n">Sample</span><span class="p">[</span><span class="n">item</span><span class="p">][</span><span class="mi">0</span><span class="p">])</span>
     
    24722475    <span class="k">def</span> <span class="nf">SetSampleParms</span><span class="p">(</span><span class="n">pfx</span><span class="p">,</span><span class="n">Sample</span><span class="p">,</span><span class="n">parmDict</span><span class="p">,</span><span class="n">sigDict</span><span class="p">):</span>
    24732476        <span class="k">if</span> <span class="s">&#39;Bragg&#39;</span> <span class="ow">in</span> <span class="n">Sample</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]:</span>             <span class="c">#Bragg-Brentano</span>
    2474             <span class="n">sampSig</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">)]</span>
    2475             <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">item</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">([</span><span class="s">&#39;Scale&#39;</span><span class="p">,</span><span class="s">&#39;Shift&#39;</span><span class="p">,</span><span class="s">&#39;Transparency&#39;</span><span class="p">]):</span>       <span class="c">#surface roughness?, diffuse scattering?</span>
     2477            <span class="n">sampSig</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">5</span><span class="p">)]</span>
     2478            <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">item</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">([</span><span class="s">&#39;Scale&#39;</span><span class="p">,</span><span class="s">&#39;Shift&#39;</span><span class="p">,</span><span class="s">&#39;Transparency&#39;</span><span class="p">,</span><span class="s">&#39;SurfRoughA&#39;</span><span class="p">,</span><span class="s">&#39;SurfRoughB&#39;</span><span class="p">]):</span>
    24762479                <span class="n">Sample</span><span class="p">[</span><span class="n">item</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">parmDict</span><span class="p">[</span><span class="n">pfx</span><span class="o">+</span><span class="n">item</span><span class="p">]</span>
    24772480                <span class="k">if</span> <span class="n">pfx</span><span class="o">+</span><span class="n">item</span> <span class="ow">in</span> <span class="n">sigDict</span><span class="p">:</span>
     
    25662569        <span class="n">refine</span> <span class="o">=</span> <span class="bp">False</span>
    25672570        <span class="k">if</span> <span class="s">&#39;Bragg&#39;</span> <span class="ow">in</span> <span class="n">Sample</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]:</span>
    2568             <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">item</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">([</span><span class="s">&#39;Scale&#39;</span><span class="p">,</span><span class="s">&#39;Shift&#39;</span><span class="p">,</span><span class="s">&#39;Transparency&#39;</span><span class="p">]):</span>
     2571            <span class="k">for</span> <span class="n">i</span><span class="p">,</span><span class="n">item</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">([</span><span class="s">&#39;Scale&#39;</span><span class="p">,</span><span class="s">&#39;Shift&#39;</span><span class="p">,</span><span class="s">&#39;Transparency&#39;</span><span class="p">,</span><span class="s">&#39;SurfRoughA&#39;</span><span class="p">,</span><span class="s">&#39;SurfRoughB&#39;</span><span class="p">]):</span>
    25692572                <span class="n">ptlbls</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="si">%14s</span><span class="s">&#39;</span><span class="o">%</span><span class="p">(</span><span class="n">item</span><span class="p">)</span>
    25702573                <span class="n">ptstr</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="si">%14.4f</span><span class="s">&#39;</span><span class="o">%</span><span class="p">(</span><span class="n">Sample</span><span class="p">[</span><span class="n">item</span><span class="p">][</span><span class="mi">0</span><span class="p">])</span>
Note: See TracChangeset for help on using the changeset viewer.