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/GSASIIpwdGUI.html

    r1168 r1183  
    5454<span class="c">#GSASIIpwdGUI - powder data display routines</span>
    5555<span class="c">########### SVN repository information ###################</span>
    56 <span class="c"># $Date: 2013-11-22 16:24:29 -0600 (Fri, 22 Nov 2013) $</span>
    57 <span class="c"># $Author: toby $</span>
    58 <span class="c"># $Revision: 1147 $</span>
     56<span class="c"># $Date: 2013-12-19 13:34:54 -0600 (Thu, 19 Dec 2013) $</span>
     57<span class="c"># $Author: vondreele $</span>
     58<span class="c"># $Revision: 1177 $</span>
    5959<span class="c"># $URL: https://subversion.xor.aps.anl.gov/pyGSAS/trunk/GSASIIpwdGUI.py $</span>
    60 <span class="c"># $Id: GSASIIpwdGUI.py 1147 2013-11-22 22:24:29Z toby $</span>
     60<span class="c"># $Id: GSASIIpwdGUI.py 1177 2013-12-19 19:34:54Z vondreele $</span>
    6161<span class="c">########### SVN repository information ###################</span>
    6262<span class="sd">&#39;&#39;&#39;</span>
     
    8080<span class="kn">import</span> <span class="nn">cPickle</span>
    8181<span class="kn">import</span> <span class="nn">GSASIIpath</span>
    82 <span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 1147 $&quot;</span><span class="p">)</span>
     82<span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 1177 $&quot;</span><span class="p">)</span>
    8383<span class="kn">import</span> <span class="nn">GSASIImath</span> <span class="kn">as</span> <span class="nn">G2mth</span>
    8484<span class="kn">import</span> <span class="nn">GSASIIpwd</span> <span class="kn">as</span> <span class="nn">G2pwd</span>
     
    11521152                <span class="n">copyNames</span> <span class="o">+=</span> <span class="p">[</span><span class="s">&#39;DisplaceX&#39;</span><span class="p">,</span><span class="s">&#39;DisplaceY&#39;</span><span class="p">,</span><span class="s">&#39;Absorption&#39;</span><span class="p">]</span>
    11531153            <span class="k">else</span><span class="p">:</span>       <span class="c">#Bragg-Brentano</span>
    1154                 <span class="n">copyNames</span> <span class="o">+=</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>
     1154                <span class="n">copyNames</span> <span class="o">+=</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>
    11551155        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">addNames</span><span class="p">):</span>
    11561156         <span class="n">copyNames</span> <span class="o">+=</span> <span class="n">addNames</span>
     
    13631363    <span class="k">if</span> <span class="s">&#39;FreePrm3&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">data</span><span class="p">:</span>
    13641364        <span class="n">data</span><span class="p">[</span><span class="s">&#39;FreePrm3&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">0.</span>
     1365    <span class="k">if</span> <span class="s">&#39;SurfRoughA&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">data</span><span class="p">:</span>
     1366        <span class="n">data</span><span class="p">[</span><span class="s">&#39;SurfRoughA&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="mf">0.</span><span class="p">,</span><span class="bp">False</span><span class="p">]</span>
     1367        <span class="n">data</span><span class="p">[</span><span class="s">&#39;SurfRoughB&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="mf">0.</span><span class="p">,</span><span class="bp">False</span><span class="p">]</span>
    13651368<span class="c">#patch end</span>
    13661369   
    13671370    <span class="n">parms</span> <span class="o">=</span> <span class="p">[]</span>
    1368     <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Scale&#39;</span><span class="p">,</span><span class="s">&#39;Histogram scale factor: &#39;</span><span class="p">])</span>
    1369     <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Gonio. radius&#39;</span><span class="p">,</span><span class="s">&#39;Goniometer radius (mm): &#39;</span><span class="p">])</span>
     1371    <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Scale&#39;</span><span class="p">,</span><span class="s">&#39;Histogram scale factor: &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">4</span><span class="p">]])</span>
     1372    <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Gonio. radius&#39;</span><span class="p">,</span><span class="s">&#39;Goniometer radius (mm): &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">3</span><span class="p">]])</span>
    13701373    <span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;Debye-Scherrer&#39;</span><span class="p">:</span>
    1371         <span class="n">parms</span> <span class="o">+=</span> <span class="p">[[</span><span class="s">&#39;DisplaceX&#39;</span><span class="p">,</span><span class="s">u&#39;Sample X displ. perp. to beam (</span><span class="se">\xb5</span><span class="s">m): &#39;</span><span class="p">],</span>
    1372             <span class="p">[</span><span class="s">&#39;DisplaceY&#39;</span><span class="p">,</span><span class="s">u&#39;Sample Y displ. || to beam (</span><span class="se">\xb5</span><span class="s">m): &#39;</span><span class="p">],</span>
    1373             <span class="p">[</span><span class="s">&#39;Absorption&#39;</span><span class="p">,</span><span class="s">u&#39;Sample absorption (</span><span class="se">\xb5\xb7</span><span class="s">r): &#39;</span><span class="p">],]</span>
     1374        <span class="n">parms</span> <span class="o">+=</span> <span class="p">[[</span><span class="s">&#39;DisplaceX&#39;</span><span class="p">,</span><span class="s">u&#39;Sample X displ. perp. to beam (</span><span class="se">\xb5</span><span class="s">m): &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">3</span><span class="p">]],</span>
     1375            <span class="p">[</span><span class="s">&#39;DisplaceY&#39;</span><span class="p">,</span><span class="s">u&#39;Sample Y displ. || to beam (</span><span class="se">\xb5</span><span class="s">m): &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">3</span><span class="p">]],</span>
     1376            <span class="p">[</span><span class="s">&#39;Absorption&#39;</span><span class="p">,</span><span class="s">u&#39;Sample absorption (</span><span class="se">\xb5\xb7</span><span class="s">r): &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">4</span><span class="p">]],]</span>
    13741377    <span class="k">elif</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;Bragg-Brentano&#39;</span><span class="p">:</span>
    1375         <span class="n">parms</span> <span class="o">+=</span> <span class="p">[[</span><span class="s">&#39;Shift&#39;</span><span class="p">,</span><span class="s">u&#39;Sample displacement(</span><span class="se">\xb5</span><span class="s">m): &#39;</span><span class="p">],</span>
    1376             <span class="p">[</span><span class="s">&#39;Transparency&#39;</span><span class="p">,</span><span class="s">u&#39;Sample transparency(1/</span><span class="se">\xb5</span><span class="s">eff, cm): &#39;</span><span class="p">],]</span>
    1377     <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Omega&#39;</span><span class="p">,</span><span class="s">&#39;Goniometer omega:&#39;</span><span class="p">,])</span>
    1378     <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Chi&#39;</span><span class="p">,</span><span class="s">&#39;Goniometer chi:&#39;</span><span class="p">,])</span>
    1379     <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Phi&#39;</span><span class="p">,</span><span class="s">&#39;Goniometer phi:&#39;</span><span class="p">,])</span>
    1380     <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Temperature&#39;</span><span class="p">,</span><span class="s">&#39;Sample temperature (K): &#39;</span><span class="p">,])</span>
    1381     <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Pressure&#39;</span><span class="p">,</span><span class="s">&#39;Sample pressure (MPa): &#39;</span><span class="p">,])</span>
     1378        <span class="n">parms</span> <span class="o">+=</span> <span class="p">[[</span><span class="s">&#39;Shift&#39;</span><span class="p">,</span><span class="s">u&#39;Sample displacement(</span><span class="se">\xb5</span><span class="s">m): &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">4</span><span class="p">]],</span>
     1379            <span class="p">[</span><span class="s">&#39;Transparency&#39;</span><span class="p">,</span><span class="s">u&#39;Sample transparency(1/</span><span class="se">\xb5</span><span class="s">eff, cm): &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">3</span><span class="p">]],</span>
     1380            <span class="p">[</span><span class="s">&#39;SurfRoughA&#39;</span><span class="p">,</span><span class="s">&#39;Surface roughness A: &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">4</span><span class="p">]],</span>
     1381            <span class="p">[</span><span class="s">&#39;SurfRoughB&#39;</span><span class="p">,</span><span class="s">&#39;Surface roughness B: &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">4</span><span class="p">]]]</span>
     1382    <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Omega&#39;</span><span class="p">,</span><span class="s">&#39;Goniometer omega:&#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">3</span><span class="p">]])</span>
     1383    <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Chi&#39;</span><span class="p">,</span><span class="s">&#39;Goniometer chi:&#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">3</span><span class="p">]])</span>
     1384    <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Phi&#39;</span><span class="p">,</span><span class="s">&#39;Goniometer phi:&#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">3</span><span class="p">]])</span>
     1385    <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Temperature&#39;</span><span class="p">,</span><span class="s">&#39;Sample temperature (K): &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">3</span><span class="p">]])</span>
     1386    <span class="n">parms</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&#39;Pressure&#39;</span><span class="p">,</span><span class="s">&#39;Sample pressure (MPa): &#39;</span><span class="p">,[</span><span class="mi">10</span><span class="p">,</span><span class="mi">3</span><span class="p">]])</span>
    13821387               
    13831388    <span class="n">mainSizer</span> <span class="o">=</span> <span class="n">wx</span><span class="o">.</span><span class="n">BoxSizer</span><span class="p">(</span><span class="n">wx</span><span class="o">.</span><span class="n">VERTICAL</span><span class="p">)</span>
     
    14101415
    14111416    <span class="n">parmSizer</span> <span class="o">=</span> <span class="n">wx</span><span class="o">.</span><span class="n">FlexGridSizer</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span>
    1412     <span class="k">for</span> <span class="n">key</span><span class="p">,</span><span class="n">lbl</span> <span class="ow">in</span> <span class="n">parms</span><span class="p">:</span>
     1417    <span class="k">for</span> <span class="n">key</span><span class="p">,</span><span class="n">lbl</span><span class="p">,</span><span class="n">nDig</span> <span class="ow">in</span> <span class="n">parms</span><span class="p">:</span>
    14131418        <span class="k">if</span> <span class="s">&#39;list&#39;</span> <span class="ow">in</span> <span class="nb">str</span><span class="p">(</span><span class="nb">type</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="n">key</span><span class="p">])):</span>
    14141419            <span class="n">parmRef</span> <span class="o">=</span> <span class="n">G2gd</span><span class="o">.</span><span class="n">G2CheckBox</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataDisplay</span><span class="p">,</span><span class="s">&#39; &#39;</span><span class="o">+</span><span class="n">lbl</span><span class="p">,</span><span class="n">data</span><span class="p">[</span><span class="n">key</span><span class="p">],</span><span class="mi">1</span><span class="p">)</span>
    14151420            <span class="n">parmSizer</span><span class="o">.</span><span class="n">Add</span><span class="p">(</span><span class="n">parmRef</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="n">wx</span><span class="o">.</span><span class="n">ALIGN_CENTER_VERTICAL</span><span class="o">|</span><span class="n">wx</span><span class="o">.</span><span class="n">EXPAND</span><span class="p">)</span>
    1416             <span class="n">parmVal</span> <span class="o">=</span> <span class="n">G2gd</span><span class="o">.</span><span class="n">ValidatedTxtCtrl</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataDisplay</span><span class="p">,</span><span class="n">data</span><span class="p">[</span><span class="n">key</span><span class="p">],</span><span class="mi">0</span><span class="p">,</span><span class="n">typeHint</span><span class="o">=</span><span class="nb">float</span><span class="p">)</span>
     1421            <span class="n">parmVal</span> <span class="o">=</span> <span class="n">G2gd</span><span class="o">.</span><span class="n">ValidatedTxtCtrl</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataDisplay</span><span class="p">,</span><span class="n">data</span><span class="p">[</span><span class="n">key</span><span class="p">],</span><span class="mi">0</span><span class="p">,</span><span class="n">nDig</span><span class="o">=</span><span class="n">nDig</span><span class="p">,</span><span class="n">typeHint</span><span class="o">=</span><span class="nb">float</span><span class="p">)</span>
    14171422        <span class="k">else</span><span class="p">:</span>
    14181423            <span class="n">parmSizer</span><span class="o">.</span><span class="n">Add</span><span class="p">(</span><span class="n">wx</span><span class="o">.</span><span class="n">StaticText</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataDisplay</span><span class="p">,</span><span class="n">label</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="o">+</span><span class="n">lbl</span><span class="p">),</span>
Note: See TracChangeset for help on using the changeset viewer.