Changeset 911


Ignore:
Timestamp:
May 16, 2013 3:31:31 PM (9 years ago)
Author:
toby
Message:

more documentation additions

Location:
trunk/sphinxdocs
Files:
6 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/sphinxdocs/build/html/GSASIImapvars.html

    r907 r911  
    2727    <script type="text/javascript" src="_static/doctools.js"></script>
    2828    <link rel="top" title="GSAS-II 0.2.0 documentation" href="index.html" />
     29    <link rel="next" title="GSASIIgrid: Basic GUI routines" href="GSASIIgrid.html" />
    2930    <link rel="prev" title="GSAS-II Main Module" href="GSASII.html" />
    3031  </head>
     
    3940          <a href="py-modindex.html" title="Python Module Index"
    4041             >modules</a> |</li>
     42        <li class="right" >
     43          <a href="GSASIIgrid.html" title="GSASIIgrid: Basic GUI routines"
     44             accesskey="N">next</a> |</li>
    4145        <li class="right" >
    4246          <a href="GSASII.html" title="GSAS-II Main Module"
     
    502506  <p class="topless"><a href="GSASII.html"
    503507                        title="previous chapter"><em>GSAS-II Main Module</em></a></p>
     508  <h4>Next topic</h4>
     509  <p class="topless"><a href="GSASIIgrid.html"
     510                        title="next chapter"><em>GSASIIgrid: Basic GUI routines</em></a></p>
    504511  <h3>This Page</h3>
    505512  <ul class="this-page-menu">
     
    534541             >modules</a> |</li>
    535542        <li class="right" >
     543          <a href="GSASIIgrid.html" title="GSASIIgrid: Basic GUI routines"
     544             >next</a> |</li>
     545        <li class="right" >
    536546          <a href="GSASII.html" title="GSAS-II Main Module"
    537547             >previous</a> |</li>
  • trunk/sphinxdocs/build/html/GSASIIphsGUI.html

    r907 r911  
    2727    <script type="text/javascript" src="_static/doctools.js"></script>
    2828    <link rel="top" title="GSAS-II 0.2.0 documentation" href="index.html" />
    29     <link rel="prev" title="GSASIImapvars: Parameter constraints" href="GSASIImapvars.html" />
     29    <link rel="next" title="GSASIIddataGUI: Phase Diffraction Data GUI" href="GSASIIddataGUI.html" />
     30    <link rel="prev" title="GSASIIgrid: Basic GUI routines" href="GSASIIgrid.html" />
    3031  </head>
    3132  <body>
     
    4041             >modules</a> |</li>
    4142        <li class="right" >
    42           <a href="GSASIImapvars.html" title="GSASIImapvars: Parameter constraints"
     43          <a href="GSASIIddataGUI.html" title="GSASIIddataGUI: Phase Diffraction Data GUI"
     44             accesskey="N">next</a> |</li>
     45        <li class="right" >
     46          <a href="GSASIIgrid.html" title="GSASIIgrid: Basic GUI routines"
    4347             accesskey="P">previous</a> |</li>
    4448        <li><a href="index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li>
     
    5559<p>Module to create the GUI for display of phase information
    5660in the data display window when a phase is selected.
    57 (Items displayed by some tabs is found in other modules.)</p>
     61(pages displayed in response to some phase tabs are done in other modules,
     62such as GSASIIddata.)</p>
    5863<dl class="function">
    5964<dt id="GSASIIphsGUI.UpdatePhaseData">
     
    6166<dd><p>Create the data display window contents when a phase is clicked on
    6267in the man (data tree) window.
    63 Called only from <tt class="xref py py-mod docutils literal"><span class="pre">GSASIIgrid.MovePatternTreeToGrid</span></tt>,
     68Called only from <a class="reference internal" href="GSASIIgrid.html#GSASIIgrid.MovePatternTreeToGrid" title="GSASIIgrid.MovePatternTreeToGrid"><tt class="xref py py-mod docutils literal"><span class="pre">GSASIIgrid.MovePatternTreeToGrid</span></tt></a>,
    6469which in turn is called from <a class="reference internal" href="GSASII.html#GSASII.GSASII.OnPatternTreeSelChanged" title="GSASII.GSASII.OnPatternTreeSelChanged"><tt class="xref py py-mod docutils literal"><span class="pre">GSASII.GSASII.OnPatternTreeSelChanged</span></tt></a>
    6570when a tree item is selected.</p>
     
    7479<li><strong>oldPage</strong> (<em>int</em>) &#8211; This sets a tab to select when moving
    7580from one phase to another, in which case the same tab is selected
    76 to display first. The default is 0, which brings up the General tab.</li>
     81to display first. This is set only when the previous data tree
     82selection is a phase, if not the value is None. The default action
     83is to bring up the General tab.</li>
    7784</ul>
    7885</td>
     
    9198        <div class="sphinxsidebarwrapper">
    9299  <h4>Previous topic</h4>
    93   <p class="topless"><a href="GSASIImapvars.html"
    94                         title="previous chapter"><em>GSASIImapvars: Parameter constraints</em></a></p>
     100  <p class="topless"><a href="GSASIIgrid.html"
     101                        title="previous chapter"><em>GSASIIgrid: Basic GUI routines</em></a></p>
     102  <h4>Next topic</h4>
     103  <p class="topless"><a href="GSASIIddataGUI.html"
     104                        title="next chapter"><em>GSASIIddataGUI: Phase Diffraction Data GUI</em></a></p>
    95105  <h3>This Page</h3>
    96106  <ul class="this-page-menu">
     
    125135             >modules</a> |</li>
    126136        <li class="right" >
    127           <a href="GSASIImapvars.html" title="GSASIImapvars: Parameter constraints"
     137          <a href="GSASIIddataGUI.html" title="GSASIIddataGUI: Phase Diffraction Data GUI"
     138             >next</a> |</li>
     139        <li class="right" >
     140          <a href="GSASIIgrid.html" title="GSASIIgrid: Basic GUI routines"
    128141             >previous</a> |</li>
    129142        <li><a href="index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li>
  • trunk/sphinxdocs/build/html/_modules/GSASII.html

    r907 r911  
    5454<span class="c">#GSASII</span>
    5555<span class="c">########### SVN repository information ###################</span>
    56 <span class="c"># $Date: 2013-04-24 12:41:15 -0500 (Wed, 24 Apr 2013) $</span>
     56<span class="c"># $Date: 2013-05-15 18:18:22 -0500 (Wed, 15 May 2013) $</span>
    5757<span class="c"># $Author: toby $</span>
    58 <span class="c"># $Revision: 891 $</span>
     58<span class="c"># $Revision: 906 $</span>
    5959<span class="c"># $URL: https://subversion.xor.aps.anl.gov/pyGSAS/trunk/GSASII.py $</span>
    60 <span class="c"># $Id: GSASII.py 891 2013-04-24 17:41:15Z toby $</span>
     60<span class="c"># $Id: GSASII.py 906 2013-05-15 23:18:22Z toby $</span>
    6161<span class="c">########### SVN repository information ###################</span>
    6262<span class="sd">&#39;&#39;&#39;</span>
     
    114114<span class="c"># load the GSAS routines</span>
    115115<span class="kn">import</span> <span class="nn">GSASIIpath</span>
    116 <span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 891 $&quot;</span><span class="p">)</span>
     116<span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 906 $&quot;</span><span class="p">)</span>
    117117<span class="kn">import</span> <span class="nn">GSASIIIO</span> <span class="kn">as</span> <span class="nn">G2IO</span>
    118118<span class="kn">import</span> <span class="nn">GSASIIgrid</span> <span class="kn">as</span> <span class="nn">G2gd</span>
     
    306306
    307307<div class="viewcode-block" id="GSASII.OnImportGeneric"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnImportGeneric">[docs]</a>    <span class="k">def</span> <span class="nf">OnImportGeneric</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">reader</span><span class="p">,</span><span class="n">readerlist</span><span class="p">,</span><span class="n">label</span><span class="p">,</span><span class="n">multiple</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span>
    308         <span class="sd">&#39;&#39;&#39;Call the requested import reader or all of the appropriate</span>
    309 <span class="sd">        import readers in response to a menu item</span>
     308        <span class="sd">&#39;&#39;&#39;Used to import Phases, powder dataset or single</span>
     309<span class="sd">        crystal datasets (structure factor tables) using reader objects</span>
     310<span class="sd">        subclassed from GSASIIIO.ImportPhase, GSASIIIO.ImportStructFactor</span>
     311<span class="sd">        or GSASIIIO.ImportPowderData. If a reader is specified, only</span>
     312<span class="sd">        that will be attempted, but if no reader is specified, every one</span>
     313<span class="sd">        that is potentially compatible (by file extension) will</span>
     314<span class="sd">        be tried on the selected file(s). </span>
     315
     316<span class="sd">        :param readerobject reader: This will be a reference to</span>
     317<span class="sd">          a particular object to be used to read a file or None,</span>
     318<span class="sd">          if every appropriate reader should be used.</span>
     319
     320<span class="sd">        :param list readerlist: a list of reader objects appropriate for</span>
     321<span class="sd">          the current read attempt. At present, this will be either</span>
     322<span class="sd">          self.ImportPhaseReaderlist, self.ImportSfactReaderlist or</span>
     323<span class="sd">          self.ImportPowderReaderlist (defined in _init_Imports from</span>
     324<span class="sd">          the files found in the path), but in theory this list could</span>
     325<span class="sd">          be tailored. Used only when reader is None.</span>
     326
     327<span class="sd">        :param str label: string to place on the open file dialog:</span>
     328<span class="sd">          Open `label` input file</span>
     329
     330<span class="sd">        :param bool multiple: True if multiple files can be selected</span>
     331<span class="sd">          in the file dialog. False is default. At present True is used</span>
     332<span class="sd">          only for reading of powder data. </span>
     333<span class="sd">          </span>
     334<span class="sd">        :returns: a list of reader objects (rd_list) that were able</span>
     335<span class="sd">          to read the specified file(s). This list may be empty. </span>
    310336<span class="sd">        &#39;&#39;&#39;</span>
    311337        <span class="bp">self</span><span class="o">.</span><span class="n">lastimport</span> <span class="o">=</span> <span class="s">&#39;&#39;</span>
     
    487513
    488514<div class="viewcode-block" id="GSASII.OnImportPhase"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnImportPhase">[docs]</a>    <span class="k">def</span> <span class="nf">OnImportPhase</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     515        <span class="sd">&#39;&#39;&#39;Called in response to an Import/Phase/... menu item</span>
     516<span class="sd">        to read phase information.</span>
     517<span class="sd">        dict self.ImportMenuId is used to look up the specific</span>
     518<span class="sd">        reader item associated with the menu item, which will be</span>
     519<span class="sd">        None for the last menu item, which is the &quot;guess&quot; option</span>
     520<span class="sd">        where all appropriate formats will be tried.</span>
     521<span class="sd">        &#39;&#39;&#39;</span>
    489522        <span class="c"># look up which format was requested</span>
    490523        <span class="n">reqrdr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">ImportMenuId</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">GetId</span><span class="p">())</span>
     
    536569
    537570<div class="viewcode-block" id="GSASII.OnImportSfact"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnImportSfact">[docs]</a>    <span class="k">def</span> <span class="nf">OnImportSfact</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     571        <span class="sd">&#39;&#39;&#39;Called in response to an Import/Structure Factor/... menu item</span>
     572<span class="sd">        to read single crystal datasets. </span>
     573<span class="sd">        dict self.ImportMenuId is used to look up the specific</span>
     574<span class="sd">        reader item associated with the menu item, which will be</span>
     575<span class="sd">        None for the last menu item, which is the &quot;guess&quot; option</span>
     576<span class="sd">        where all appropriate formats will be tried.</span>
     577<span class="sd">        &#39;&#39;&#39;</span>
    538578        <span class="c"># look up which format was requested</span>
    539579        <span class="n">reqrdr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">ImportMenuId</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">GetId</span><span class="p">())</span>
     
    586626           
    587627<div class="viewcode-block" id="GSASII.ReadPowderInstprm"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.ReadPowderInstprm">[docs]</a>    <span class="k">def</span> <span class="nf">ReadPowderInstprm</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">instfile</span><span class="p">):</span>       <span class="c">#fix the write routine for [inst1,inst2] style</span>
    588         <span class="sd">&#39;&#39;&#39;Read a GSAS-II (new) instrument parameter file&#39;&#39;&#39;</span>
     628        <span class="sd">&#39;&#39;&#39;Read a GSAS-II (new) instrument parameter file</span>
     629
     630<span class="sd">        :param str instfile: name of instrument parameter file</span>
     631
     632<span class="sd">        &#39;&#39;&#39;</span>
    589633        <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">splitext</span><span class="p">(</span><span class="n">instfile</span><span class="p">)[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">!=</span> <span class="s">&#39;.instprm&#39;</span><span class="p">:</span> <span class="c"># invalid file</span>
    590634            <span class="k">return</span> <span class="bp">None</span>           
     
    614658        </div>
    615659<div class="viewcode-block" id="GSASII.ReadPowderIparm"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.ReadPowderIparm">[docs]</a>    <span class="k">def</span> <span class="nf">ReadPowderIparm</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">instfile</span><span class="p">,</span><span class="n">bank</span><span class="p">,</span><span class="n">databanks</span><span class="p">,</span><span class="n">rd</span><span class="p">):</span>
    616         <span class="sd">&#39;&#39;&#39;Read a GSAS (old) instrument parameter file&#39;&#39;&#39;</span>
     660        <span class="sd">&#39;&#39;&#39;Read a GSAS (old) instrument parameter file</span>
     661
     662<span class="sd">        :param str instfile: name of instrument parameter file</span>
     663
     664<span class="sd">        :param int bank: the bank number read in the raw data file</span>
     665
     666<span class="sd">        :param int databanks: the number of banks in the raw data file.</span>
     667<span class="sd">          If the number of banks in the data and instrument parameter files</span>
     668<span class="sd">          agree, then the sets of banks are assumed to match up and bank</span>
     669<span class="sd">          is used to select the instrument parameter file. If not, the user</span>
     670<span class="sd">          is asked to make a selection.</span>
     671
     672<span class="sd">        :param obj rd: the raw data (histogram) data object. This</span>
     673<span class="sd">          sets rd.instbank.</span>
     674
     675<span class="sd">        &#39;&#39;&#39;</span>
    617676        <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">instfile</span><span class="p">):</span> <span class="c"># no such file</span>
    618677            <span class="k">return</span> <span class="p">{}</span>
     
    661720        <span class="sd">&#39;&#39;&#39;Open and read an instrument parameter file for a data file</span>
    662721<span class="sd">        Returns the list of parameters used in the data tree</span>
     722
     723<span class="sd">        :param obj rd: the raw data (histogram) data object.</span>
     724
     725<span class="sd">        :param str prevIparm: not used</span>
     726
     727<span class="sd">        :param str lastIparmfile: Name of last instrument parameter</span>
     728<span class="sd">          file that was read, or a empty string. </span>
     729
     730<span class="sd">        :param str lastdatafile: Name of last data file that was read.</span>
     731
    663732<span class="sd">        &#39;&#39;&#39;</span>
    664733        <span class="k">def</span> <span class="nf">SetPowderInstParms</span><span class="p">(</span><span class="n">Iparm</span><span class="p">,</span> <span class="n">rd</span><span class="p">):</span>
     
    888957</div>
    889958<div class="viewcode-block" id="GSASII.OnImportPowder"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnImportPowder">[docs]</a>    <span class="k">def</span> <span class="nf">OnImportPowder</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
    890         <span class="sd">&#39;&#39;&#39;reads powder data using a variety of formats</span>
    891 <span class="sd">        reads an instrument parameter file for each dataset</span>
     959        <span class="sd">&#39;&#39;&#39;Called in response to an Import/Powder Data/... menu item</span>
     960<span class="sd">        to read a powder diffraction data set. </span>
     961<span class="sd">        dict self.ImportMenuId is used to look up the specific</span>
     962<span class="sd">        reader item associated with the menu item, which will be</span>
     963<span class="sd">        None for the last menu item, which is the &quot;guess&quot; option</span>
     964<span class="sd">        where all appropriate formats will be tried.</span>
     965
     966<span class="sd">        Also reads an instrument parameter file for each dataset.</span>
    892967<span class="sd">        &#39;&#39;&#39;</span>
    893968        <span class="n">reqrdr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">ImportMenuId</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">GetId</span><span class="p">())</span>  <span class="c"># look up which format was requested</span>
     
    11681243
    11691244<div class="viewcode-block" id="GSASII.OnSize"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnSize">[docs]</a>    <span class="k">def</span> <span class="nf">OnSize</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     1245        <span class="s">&#39;Called when the main window is resized. Not sure why&#39;</span>
    11701246        <span class="n">w</span><span class="p">,</span><span class="n">h</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">GetClientSizeTuple</span><span class="p">()</span>
    11711247        <span class="bp">self</span><span class="o">.</span><span class="n">mainPanel</span><span class="o">.</span><span class="n">SetSize</span><span class="p">(</span><span class="n">wx</span><span class="o">.</span><span class="n">Size</span><span class="p">(</span><span class="n">w</span><span class="p">,</span><span class="n">h</span><span class="p">))</span>
     
    11731249                        </div>
    11741250<div class="viewcode-block" id="GSASII.OnPatternTreeSelChanged"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnPatternTreeSelChanged">[docs]</a>    <span class="k">def</span> <span class="nf">OnPatternTreeSelChanged</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     1251        <span class="sd">&#39;&#39;&#39;Called when a data tree item is selected&#39;&#39;&#39;</span>
    11751252        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">TreeItemDelete</span><span class="p">:</span>
    11761253            <span class="bp">self</span><span class="o">.</span><span class="n">TreeItemDelete</span> <span class="o">=</span> <span class="bp">False</span>
     
    11861263        </div>
    11871264<div class="viewcode-block" id="GSASII.OnPatternTreeItemCollapsed"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnPatternTreeItemCollapsed">[docs]</a>    <span class="k">def</span> <span class="nf">OnPatternTreeItemCollapsed</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     1265        <span class="s">&#39;Called when a tree item is collapsed&#39;</span>
    11881266        <span class="n">event</span><span class="o">.</span><span class="n">Skip</span><span class="p">()</span>
    11891267</div>
    11901268<div class="viewcode-block" id="GSASII.OnPatternTreeItemExpanded"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnPatternTreeItemExpanded">[docs]</a>    <span class="k">def</span> <span class="nf">OnPatternTreeItemExpanded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     1269        <span class="s">&#39;Called when a tree item is expanded&#39;</span>
    11911270        <span class="n">event</span><span class="o">.</span><span class="n">Skip</span><span class="p">()</span>
    11921271        </div>
    11931272<div class="viewcode-block" id="GSASII.OnPatternTreeItemDelete"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnPatternTreeItemDelete">[docs]</a>    <span class="k">def</span> <span class="nf">OnPatternTreeItemDelete</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     1273        <span class="s">&#39;Called when a tree item is deleted -- not sure what this does&#39;</span>
    11941274        <span class="bp">self</span><span class="o">.</span><span class="n">TreeItemDelete</span> <span class="o">=</span> <span class="bp">True</span>
    11951275</div>
    11961276<div class="viewcode-block" id="GSASII.OnPatternTreeItemActivated"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnPatternTreeItemActivated">[docs]</a>    <span class="k">def</span> <span class="nf">OnPatternTreeItemActivated</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     1277        <span class="s">&#39;Called when a tree item is activated&#39;</span>
    11971278        <span class="n">event</span><span class="o">.</span><span class="n">Skip</span><span class="p">()</span>
    11981279        </div>
    11991280<div class="viewcode-block" id="GSASII.OnPatternTreeKeyDown"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnPatternTreeKeyDown">[docs]</a>    <span class="k">def</span> <span class="nf">OnPatternTreeKeyDown</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     1281        <span class="s">&#39;Not sure what this does&#39;</span>
    12001282        <span class="n">key</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">GetKeyCode</span><span class="p">()</span>
    12011283        <span class="n">item</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">PickId</span>
     
    12091291                </div>
    12101292<div class="viewcode-block" id="GSASII.OnReadPowderPeaks"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnReadPowderPeaks">[docs]</a>    <span class="k">def</span> <span class="nf">OnReadPowderPeaks</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     1293        <span class="s">&#39;Bound to menu Data/Read Powder Peaks -- still needed?&#39;</span>
    12111294        <span class="n">Cuka</span> <span class="o">=</span> <span class="mf">1.54052</span>
    12121295        <span class="bp">self</span><span class="o">.</span><span class="n">CheckNotebook</span><span class="p">()</span>
     
    12341317            </div>
    12351318<div class="viewcode-block" id="GSASII.OnImageRead"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnImageRead">[docs]</a>    <span class="k">def</span> <span class="nf">OnImageRead</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     1319        <span class="s">&#39;Called to read in an image in any known format&#39;</span>
    12361320        <span class="bp">self</span><span class="o">.</span><span class="n">CheckNotebook</span><span class="p">()</span>
    12371321        <span class="n">dlg</span> <span class="o">=</span> <span class="n">wx</span><span class="o">.</span><span class="n">FileDialog</span><span class="p">(</span>
     
    13201404</div>
    13211405<div class="viewcode-block" id="GSASII.CheckNotebook"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.CheckNotebook">[docs]</a>    <span class="k">def</span> <span class="nf">CheckNotebook</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    1322         <span class="sd">&#39;&#39;&#39;Make sure the data tree has the minimally expected controls</span>
     1406        <span class="sd">&#39;&#39;&#39;Make sure the data tree has the minimally expected controls.</span>
    13231407<span class="sd">        (BHT) correct?</span>
    13241408<span class="sd">        &#39;&#39;&#39;</span>
     
    13461430                </div>
    13471431<div class="viewcode-block" id="GSASII.CopyDialog"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.CopyDialog">[docs]</a>    <span class="k">class</span> <span class="nc">CopyDialog</span><span class="p">(</span><span class="n">wx</span><span class="o">.</span><span class="n">Dialog</span><span class="p">):</span>
     1432        <span class="sd">&#39;&#39;&#39;Creates a dialog for copying control settings between</span>
     1433<span class="sd">        data tree items&#39;&#39;&#39;</span>
    13481434        <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">parent</span><span class="p">,</span><span class="n">title</span><span class="p">,</span><span class="n">text</span><span class="p">,</span><span class="n">data</span><span class="p">):</span>
    13491435            <span class="n">wx</span><span class="o">.</span><span class="n">Dialog</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">parent</span><span class="p">,</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="n">title</span><span class="p">,</span>
     
    13971483        </div>
    13981484<div class="viewcode-block" id="GSASII.SumDialog"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.SumDialog">[docs]</a>    <span class="k">class</span> <span class="nc">SumDialog</span><span class="p">(</span><span class="n">wx</span><span class="o">.</span><span class="n">Dialog</span><span class="p">):</span>
     1485        <span class="s">&#39;Allows user to supply scale factor(s) when summing data&#39;</span>
    13991486        <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">parent</span><span class="p">,</span><span class="n">title</span><span class="p">,</span><span class="n">text</span><span class="p">,</span><span class="n">dataType</span><span class="p">,</span><span class="n">data</span><span class="p">):</span>
    14001487            <span class="n">wx</span><span class="o">.</span><span class="n">Dialog</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">parent</span><span class="p">,</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="n">title</span><span class="p">,</span>
     
    15371624            </div>
    15381625<div class="viewcode-block" id="GSASII.OnPwdrSum"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnPwdrSum">[docs]</a>    <span class="k">def</span> <span class="nf">OnPwdrSum</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     1626        <span class="s">&#39;Sum together powder data(?)&#39;</span>
    15391627        <span class="n">TextList</span> <span class="o">=</span> <span class="p">[]</span>
    15401628        <span class="n">DataList</span> <span class="o">=</span> <span class="p">[]</span>
     
    16331721</div>
    16341722<div class="viewcode-block" id="GSASII.OnImageSum"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnImageSum">[docs]</a>    <span class="k">def</span> <span class="nf">OnImageSum</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     1723        <span class="s">&#39;Sum together image data(?)&#39;</span>
    16351724        <span class="n">TextList</span> <span class="o">=</span> <span class="p">[]</span>
    16361725        <span class="n">DataList</span> <span class="o">=</span> <span class="p">[]</span>
     
    17351824                      </div>
    17361825<div class="viewcode-block" id="GSASII.OnAddPhase"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnAddPhase">[docs]</a>    <span class="k">def</span> <span class="nf">OnAddPhase</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     1826        <span class="s">&#39;Add a new, empty phase to the tree. Called by Data/Add Phase menu&#39;</span>
    17371827        <span class="k">if</span> <span class="ow">not</span> <span class="n">G2gd</span><span class="o">.</span><span class="n">GetPatternTreeItemId</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="p">,</span><span class="s">&#39;Phases&#39;</span><span class="p">):</span>
    17381828            <span class="n">sub</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">PatternTree</span><span class="o">.</span><span class="n">AppendItem</span><span class="p">(</span><span class="n">parent</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="p">,</span><span class="n">text</span><span class="o">=</span><span class="s">&#39;Phases&#39;</span><span class="p">)</span>
     
    17501840        </div>
    17511841<div class="viewcode-block" id="GSASII.OnDeletePhase"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnDeletePhase">[docs]</a>    <span class="k">def</span> <span class="nf">OnDeletePhase</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     1842        <span class="s">&#39;Delete a phase from the tree. Called by Data/Delete Phase menu&#39;</span>
    17521843        <span class="c">#Hmm, also need to delete this phase from Reflection Lists for each PWDR histogram</span>
    17531844        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">dataFrame</span><span class="p">:</span>
     
    17941885                </div>
    17951886<div class="viewcode-block" id="GSASII.OnRenameData"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnRenameData">[docs]</a>    <span class="k">def</span> <span class="nf">OnRenameData</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     1887        <span class="s">&#39;Renames an existing phase. Called by Data/Rename Phase menu&#39;</span>
    17961888        <span class="n">name</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">PatternTree</span><span class="o">.</span><span class="n">GetItemText</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">PickId</span><span class="p">)</span>     
    17971889        <span class="k">if</span> <span class="s">&#39;PWDR&#39;</span> <span class="ow">in</span> <span class="n">name</span> <span class="ow">or</span> <span class="s">&#39;HKLF&#39;</span> <span class="ow">in</span> <span class="n">name</span> <span class="ow">or</span> <span class="s">&#39;IMG&#39;</span> <span class="ow">in</span> <span class="n">name</span><span class="p">:</span>
     
    18061898        </div>
    18071899<div class="viewcode-block" id="GSASII.GetFileList"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.GetFileList">[docs]</a>    <span class="k">def</span> <span class="nf">GetFileList</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">fileType</span><span class="p">,</span><span class="n">skip</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>        <span class="c">#potentially useful?</span>
     1900        <span class="s">&#39;Appears unused. Note routine of same name in GSASIIpwdGUI&#39;</span>
    18081901        <span class="n">fileList</span> <span class="o">=</span> <span class="p">[]</span>
    18091902        <span class="n">Source</span> <span class="o">=</span> <span class="s">&#39;&#39;</span>
     
    18231916            </div>
    18241917<div class="viewcode-block" id="GSASII.OnDataDelete"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnDataDelete">[docs]</a>    <span class="k">def</span> <span class="nf">OnDataDelete</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     1918        <span class="sd">&#39;&#39;&#39;Delete one or more histograms from data tree. Called by the</span>
     1919<span class="sd">        Data/DeleteData menu</span>
     1920<span class="sd">        &#39;&#39;&#39;</span>
    18251921        <span class="n">TextList</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;All Data&#39;</span><span class="p">]</span>
    18261922        <span class="n">DelList</span> <span class="o">=</span> <span class="p">[]</span>
     
    18721968</div>
    18731969<div class="viewcode-block" id="GSASII.OnFileOpen"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnFileOpen">[docs]</a>    <span class="k">def</span> <span class="nf">OnFileOpen</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     1970        <span class="sd">&#39;&#39;&#39;Reads in a GSAS-II .gpx project file in response to the</span>
     1971<span class="sd">        File/Open Project menu button</span>
     1972<span class="sd">        &#39;&#39;&#39;</span>
    18741973        <span class="n">result</span> <span class="o">=</span> <span class="s">&#39;&#39;</span>
    18751974        <span class="n">Id</span> <span class="o">=</span> <span class="mi">0</span>
     
    19242023</div>
    19252024<div class="viewcode-block" id="GSASII.OnFileClose"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnFileClose">[docs]</a>    <span class="k">def</span> <span class="nf">OnFileClose</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     2025        <span class="sd">&#39;&#39;&#39;Clears the data tree in response to the</span>
     2026<span class="sd">        File/Close Project menu button. User is given option to save</span>
     2027<span class="sd">        the project.</span>
     2028<span class="sd">        &#39;&#39;&#39;</span>
    19262029        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">dataFrame</span><span class="p">:</span>
    19272030            <span class="bp">self</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">Clear</span><span class="p">()</span>
     
    19432046</div>
    19442047<div class="viewcode-block" id="GSASII.OnFileSave"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnFileSave">[docs]</a>    <span class="k">def</span> <span class="nf">OnFileSave</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     2048        <span class="sd">&#39;&#39;&#39;Save the current project in response to the</span>
     2049<span class="sd">        File/Save Project menu button</span>
     2050<span class="sd">        &#39;&#39;&#39;</span>
    19452051       
    19462052        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">GSASprojectfile</span><span class="p">:</span>
     
    19512057</div>
    19522058<div class="viewcode-block" id="GSASII.OnFileSaveas"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnFileSaveas">[docs]</a>    <span class="k">def</span> <span class="nf">OnFileSaveas</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     2059        <span class="sd">&#39;&#39;&#39;Save the current project in response to the</span>
     2060<span class="sd">        File/Save as menu button</span>
     2061<span class="sd">        &#39;&#39;&#39;</span>
    19532062        <span class="n">dlg</span> <span class="o">=</span> <span class="n">wx</span><span class="o">.</span><span class="n">FileDialog</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s">&#39;Choose GSAS-II project file name&#39;</span><span class="p">,</span> <span class="s">&#39;.&#39;</span><span class="p">,</span> <span class="s">&#39;&#39;</span><span class="p">,</span>
    19542063            <span class="s">&#39;GSAS-II project file (*.gpx)|*.gpx&#39;</span><span class="p">,</span><span class="n">wx</span><span class="o">.</span><span class="n">FD_SAVE</span><span class="o">|</span><span class="n">wx</span><span class="o">.</span><span class="n">FD_OVERWRITE_PROMPT</span><span class="o">|</span><span class="n">wx</span><span class="o">.</span><span class="n">CHANGE_DIR</span><span class="p">)</span>
     
    19662075</div>
    19672076<div class="viewcode-block" id="GSASII.ExitMain"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.ExitMain">[docs]</a>    <span class="k">def</span> <span class="nf">ExitMain</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     2077        <span class="sd">&#39;&#39;&#39;Called if the main window is closed&#39;&#39;&#39;</span>
    19682078        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">undofile</span><span class="p">:</span>
    19692079            <span class="n">os</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">undofile</span><span class="p">)</span>
     
    19712081        </div>
    19722082<div class="viewcode-block" id="GSASII.OnFileExit"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnFileExit">[docs]</a>    <span class="k">def</span> <span class="nf">OnFileExit</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
     2083        <span class="sd">&#39;&#39;&#39;Called in response to the File/Quit menu button&#39;&#39;&#39;</span>
    19732084        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">dataFrame</span><span class="p">:</span>
    19742085            <span class="bp">self</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">Clear</span><span class="p">()</span>
     
    20702181
    20712182<div class="viewcode-block" id="GSASII.OnMakePDFs"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnMakePDFs">[docs]</a>    <span class="k">def</span> <span class="nf">OnMakePDFs</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     2183        <span class="sd">&#39;&#39;&#39;Calculates PDFs</span>
     2184<span class="sd">        &#39;&#39;&#39;</span>
    20722185        <span class="n">tth2q</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">t</span><span class="p">,</span><span class="n">w</span><span class="p">:</span><span class="mf">4.0</span><span class="o">*</span><span class="n">math</span><span class="o">.</span><span class="n">pi</span><span class="o">*</span><span class="n">sind</span><span class="p">(</span><span class="n">t</span><span class="o">/</span><span class="mf">2.0</span><span class="p">)</span><span class="o">/</span><span class="n">w</span>
    20732186        <span class="n">TextList</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;All PWDR&#39;</span><span class="p">]</span>
     
    21142227<div class="viewcode-block" id="GSASII.GetPWDRdatafromTree"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.GetPWDRdatafromTree">[docs]</a>    <span class="k">def</span> <span class="nf">GetPWDRdatafromTree</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">PWDRname</span><span class="p">):</span>
    21152228        <span class="sd">&#39;&#39;&#39; Returns powder data from GSASII tree</span>
    2116 <span class="sd">        input: </span>
    2117 <span class="sd">            PWDRname = powder histogram name as obtained from GetHistogramNames</span>
    2118 <span class="sd">        return: </span>
    2119 <span class="sd">            PWDRdata = powder data dictionary with:</span>
    2120 <span class="sd">                Data - powder data arrays, Limits, Instrument Parameters, Sample Parameters            </span>
     2229
     2230<span class="sd">        :param str PWDRname: a powder histogram name as obtained from</span>
     2231<span class="sd">          :mod:`GSASIIstruct.GetHistogramNames`</span>
     2232
     2233<span class="sd">        :returns: PWDRdata = powder data dictionary with</span>
     2234<span class="sd">          Powder data arrays, Limits, Instrument Parameters,</span>
     2235<span class="sd">          Sample Parameters            </span>
    21212236<span class="sd">        &#39;&#39;&#39;</span>
    21222237        <span class="n">PWDRdata</span> <span class="o">=</span> <span class="p">{}</span>
     
    21382253<div class="viewcode-block" id="GSASII.GetHKLFdatafromTree"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.GetHKLFdatafromTree">[docs]</a>    <span class="k">def</span> <span class="nf">GetHKLFdatafromTree</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">HKLFname</span><span class="p">):</span>
    21392254        <span class="sd">&#39;&#39;&#39; Returns single crystal data from GSASII tree</span>
    2140 <span class="sd">        input: </span>
    2141 <span class="sd">            HKLFname = single crystal histogram name as obtained from GetHistogramNames</span>
    2142 <span class="sd">        return: </span>
    2143 <span class="sd">            HKLFdata = single crystal data list of reflections: for each reflection:</span>
    2144 <span class="sd">                HKLF = </span>
     2255
     2256<span class="sd">        :param str HKLFname: a single crystal histogram name as obtained</span>
     2257<span class="sd">          from</span>
     2258<span class="sd">          :mod:`GSASIIstruct.GetHistogramNames`</span>
     2259
     2260<span class="sd">        :returns: HKLFdata = single crystal data list of reflections</span>
     2261
    21452262<span class="sd">        &#39;&#39;&#39;</span>
    21462263        <span class="n">HKLFdata</span> <span class="o">=</span> <span class="p">{}</span>
     
    21542271        </div>
    21552272<div class="viewcode-block" id="GSASII.GetPhaseData"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.GetPhaseData">[docs]</a>    <span class="k">def</span> <span class="nf">GetPhaseData</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
     2273        <span class="sd">&#39;&#39;&#39;Returns a list of defined phases. Used only in GSASIIgrid</span>
     2274<span class="sd">        Note routine :mod:`GSASIIstruct.GetPhaseData` also exists.</span>
     2275<span class="sd">        &#39;&#39;&#39;</span>
    21562276        <span class="n">phaseData</span> <span class="o">=</span> <span class="p">{}</span>
    21572277        <span class="k">if</span> <span class="n">G2gd</span><span class="o">.</span><span class="n">GetPatternTreeItemId</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="p">,</span><span class="s">&#39;Phases&#39;</span><span class="p">):</span>
     
    21732293        <span class="sd">&#39;&#39;&#39; Returns all histograms that are found in any phase</span>
    21742294<span class="sd">        and any phase that uses a histogram</span>
    2175 <span class="sd">        return:</span>
    2176 <span class="sd">            Histograms = dictionary of histograms as {name:data,...}</span>
    2177 <span class="sd">            Phases = dictionary of phases that use histograms</span>
     2295<span class="sd">        :returns: two dicts:</span>
     2296
     2297<span class="sd">            * Histograms = dictionary of histograms as {name:data,...}</span>
     2298<span class="sd">            * Phases = dictionary of phases that use histograms</span>
    21782299<span class="sd">        &#39;&#39;&#39;</span>
    21792300        <span class="n">phaseData</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">GetPhaseData</span><span class="p">()</span>
     
    22042325        </div>
    22052326<div class="viewcode-block" id="GSASII.ViewParmDialog"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.ViewParmDialog">[docs]</a>    <span class="k">class</span> <span class="nc">ViewParmDialog</span><span class="p">(</span><span class="n">wx</span><span class="o">.</span><span class="n">Dialog</span><span class="p">):</span>
     2327        <span class="sd">&#39;&#39;&#39;Window to show all parameters in the refinement.</span>
     2328<span class="sd">        Called from :mod:`OnViewLSParms`</span>
     2329<span class="sd">        &#39;&#39;&#39;</span>
    22062330        <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">parent</span><span class="p">,</span><span class="n">title</span><span class="p">,</span><span class="n">parmDict</span><span class="p">):</span>
    22072331            <span class="n">wx</span><span class="o">.</span><span class="n">Dialog</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">parent</span><span class="p">,</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="n">title</span><span class="p">,</span><span class="n">size</span><span class="o">=</span><span class="p">(</span><span class="mi">300</span><span class="p">,</span><span class="mi">430</span><span class="p">),</span>
     
    22242348                            </div>
    22252349<div class="viewcode-block" id="GSASII.OnViewLSParms"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnViewLSParms">[docs]</a>    <span class="k">def</span> <span class="nf">OnViewLSParms</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     2350        <span class="sd">&#39;&#39;&#39;Displays a window showing all parameters in the refinement.</span>
     2351<span class="sd">        Called from the Calculate/View LS Parms menu.</span>
     2352<span class="sd">        &#39;&#39;&#39;</span>
    22262353        <span class="n">parmDict</span> <span class="o">=</span> <span class="p">{}</span>
    22272354        <span class="n">Histograms</span><span class="p">,</span><span class="n">Phases</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">GetUsedHistogramsAndPhasesfromTree</span><span class="p">()</span>
     
    22572384       </div>
    22582385<div class="viewcode-block" id="GSASII.OnRefine"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnRefine">[docs]</a>    <span class="k">def</span> <span class="nf">OnRefine</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     2386        <span class="sd">&#39;&#39;&#39;Perform a refinement.</span>
     2387<span class="sd">        Called from the Calculate/Refine menu.</span>
     2388<span class="sd">        &#39;&#39;&#39;</span>       
    22592389        <span class="bp">self</span><span class="o">.</span><span class="n">OnFileSave</span><span class="p">(</span><span class="n">event</span><span class="p">)</span>
    22602390        <span class="c"># check that constraints are OK here</span>
     
    23222452</div>
    23232453<div class="viewcode-block" id="GSASII.OnSeqRefine"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.OnSeqRefine">[docs]</a>    <span class="k">def</span> <span class="nf">OnSeqRefine</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">event</span><span class="p">):</span>
     2454        <span class="sd">&#39;&#39;&#39;Perform a sequential refinement.</span>
     2455<span class="sd">        Called from the Calculate/Sequential refine menu.</span>
     2456<span class="sd">        &#39;&#39;&#39;</span>       
    23242457        <span class="n">Id</span> <span class="o">=</span> <span class="n">G2gd</span><span class="o">.</span><span class="n">GetPatternTreeItemId</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="p">,</span><span class="s">&#39;Sequental results&#39;</span><span class="p">)</span>
    23252458        <span class="k">if</span> <span class="ow">not</span> <span class="n">Id</span><span class="p">:</span>
     
    23752508        </div>
    23762509<div class="viewcode-block" id="GSASII.ErrorDialog"><a class="viewcode-back" href="../GSASII.html#GSASII.GSASII.ErrorDialog">[docs]</a>    <span class="k">def</span> <span class="nf">ErrorDialog</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">title</span><span class="p">,</span><span class="n">message</span><span class="p">,</span><span class="n">parent</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">wtype</span><span class="o">=</span><span class="n">wx</span><span class="o">.</span><span class="n">OK</span><span class="p">):</span>
     2510        <span class="s">&#39;Display an error message&#39;</span>
    23772511        <span class="n">result</span> <span class="o">=</span> <span class="bp">None</span>
    23782512        <span class="k">if</span> <span class="n">parent</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
  • trunk/sphinxdocs/build/html/_modules/GSASIImapvars.html

    r907 r911  
    5252<span class="c"># -*- coding: utf-8 -*-</span>
    5353<span class="c">########### SVN repository information ###################</span>
    54 <span class="c"># $Date: 2012-09-23 16:57:51 -0500 (Sun, 23 Sep 2012) $</span>
     54<span class="c"># $Date: 2013-05-13 15:18:21 -0500 (Mon, 13 May 2013) $</span>
    5555<span class="c"># $Author: toby $</span>
    56 <span class="c"># $Revision: 762 $</span>
     56<span class="c"># $Revision: 903 $</span>
    5757<span class="c"># $URL: https://subversion.xor.aps.anl.gov/pyGSAS/trunk/GSASIImapvars.py $</span>
    58 <span class="c"># $Id: GSASIImapvars.py 762 2012-09-23 21:57:51Z toby $</span>
     58<span class="c"># $Id: GSASIImapvars.py 903 2013-05-13 20:18:21Z toby $</span>
    5959<span class="c">########### SVN repository information ###################</span>
    6060<span class="sd">&quot;&quot;&quot;</span>
    61 <span class="sd">*Module GSASIImapvars: Specify and apply parameter constraints*</span>
    62 <span class="sd">===============================================================</span>
    63 
    64 <span class="sd">Implements algebraic contraints, parameter redefinition</span>
     61<span class="sd">*GSASIImapvars: Parameter constraints*</span>
     62<span class="sd">======================================</span>
     63
     64<span class="sd">Module to implements algebraic contraints, parameter redefinition</span>
    6565<span class="sd">and parameter simplification contraints.</span>
    6666
     
    150150
    151151<span class="sd">To define a set of constrained and unconstrained relations, one</span>
    152 <span class="sd">calls InitVars, GroupConstraints and GenerateConstraints. It</span>
    153 <span class="sd">is best to supply all relations/equations in one call to these</span>
    154 <span class="sd">routines so that grouping is done correctly.</span>
    155 
    156 <span class="sd">   To implement parameter redefinition, one calls</span>
    157 <span class="sd">     StoreEquivalence. This should be called for every set of</span>
    158 <span class="sd">     equivalence relationships. There is no harm in using</span>
    159 <span class="sd">     StoreEquivalence with the same independent variable:</span>
     152<span class="sd">defines a list of dictionary defining constraint parameters and their</span>
     153<span class="sd">values, a list of fixed values for each constraint and a list of</span>
     154<span class="sd">parameters to be varied. In addition, one uses</span>
     155<span class="sd">:func:`StoreEquivalence` to define parameters that are equivalent. One</span>
     156<span class="sd">can then use :func:`CheckConstraints` to check that the input is</span>
     157<span class="sd">internally consistent and finally :func:`GroupConstraints` and</span>
     158<span class="sd">:func:`GenerateConstraints` to generate the internally used</span>
     159<span class="sd">tables. Routines :func:`Map2Dict` is used to initialize the parameter</span>
     160<span class="sd">dictionary and :func:`Dict2Map`, :func:`Dict2Deriv`, and</span>
     161<span class="sd">:func:`ComputeDepESD` are used to apply constraints. Routine</span>
     162<span class="sd">:func:`VarRemapShow` is used to print out the constraint information,</span>
     163<span class="sd">as stored by :func:`GenerateConstraints`.</span>
     164
     165<span class="sd">:func:`InitVars`</span>
     166<span class="sd">  This is optionally used to clear out all defined previously defined constraint information</span>
     167<span class="sd">  </span>
     168<span class="sd">:func:`StoreEquivalence`</span>
     169<span class="sd">  To implement parameter redefinition, one calls StoreEquivalence. This should be called for every set of</span>
     170<span class="sd">  equivalence relationships. There is no harm in using StoreEquivalence with the same independent variable:</span>
     171
     172<span class="sd">  .. code-block:: python</span>
     173
    160174<span class="sd">       StoreEquivalence(&#39;x&#39;,(&#39;y&#39;,))</span>
    161175<span class="sd">       StoreEquivalence(&#39;x&#39;,(&#39;z&#39;,))</span>
    162 <span class="sd">     (though StoreEquivalence(&#39;x&#39;,(&#39;y&#39;,&#39;z&#39;)) will run more</span>
    163 <span class="sd">     efficiently) but mixing independent and dependent variables is</span>
    164 <span class="sd">     problematic. This is not allowed:</span>
     176
     177<span class="sd">  or equivalently </span>
     178
     179<span class="sd">  .. code-block:: python</span>
     180
     181<span class="sd">       StoreEquivalence(&#39;x&#39;,(&#39;y&#39;,&#39;z&#39;))</span>
     182
     183<span class="sd">  The latter will run more efficiently. Note that mixing independent and dependent variables is</span>
     184<span class="sd">  problematic. This is not allowed:</span>
     185
     186<span class="sd">  .. code-block:: python</span>
     187
    165188<span class="sd">        StoreEquivalence(&#39;x&#39;,(&#39;y&#39;,))</span>
    166189<span class="sd">        StoreEquivalence(&#39;y&#39;,(&#39;z&#39;,))</span>
    167 <span class="sd">   Use StoreEquivalence before calling GenerateConstraints or</span>
    168 <span class="sd">      CheckConstraints</span>
    169 
     190<span class="sd">        </span>
     191<span class="sd">  Use StoreEquivalence before calling GenerateConstraints or CheckConstraints</span>
     192
     193<span class="sd">:func:`CheckConstraints`</span>
    170194<span class="sd">   To check that input in internally consistent, use CheckConstraints</span>
    171195
    172 <span class="sd">   To show a summary of the parameter remapping, one calls</span>
    173 <span class="sd">      VarRemapShow</span>
    174 
     196<span class="sd">:func:`Map2Dict`</span>
    175197<span class="sd">   To determine values for the parameters created in this module, one</span>
    176 <span class="sd">      calls Map2Dict. This will not apply contraints.</span>
    177 
     198<span class="sd">   calls Map2Dict. This will not apply contraints.</span>
     199
     200<span class="sd">:func:`Dict2Map`</span>
    178201<span class="sd">   To take values from the new independent parameters and constraints,</span>
    179 <span class="sd">      one calls Dict2Map. This will apply contraints.</span>
    180 
     202<span class="sd">   one calls Dict2Map. This will apply contraints.</span>
     203
     204<span class="sd">:func:`Dict2Deriv`</span>
    181205<span class="sd">   Use Dict2Deriv to determine derivatives on independent parameters</span>
    182 <span class="sd">      from those on dependent ones</span>
    183 <span class="sd">      </span>
     206<span class="sd">   from those on dependent ones</span>
     207
     208<span class="sd">:func:`ComputeDepESD`      </span>
    184209<span class="sd">   Use ComputeDepESD to compute uncertainties on dependent variables</span>
     210
     211<span class="sd">:func:`VarRemapShow`</span>
     212<span class="sd">   To show a summary of the parameter remapping, one calls VarRemapShow</span>
    185213
    186214<span class="sd">*Global Variables*</span>
    187215<span class="sd">------------------</span>
    188216
    189 <span class="sd">   dependentParmList: contains a list by group of lists of</span>
    190 <span class="sd">     parameters used in the group. Note that parameters listed in</span>
    191 <span class="sd">     dependentParmList should not be refined as they will not affect</span>
    192 <span class="sd">     the model</span>
    193 
    194 <span class="sd">   indParmList: a list of groups of Independent parameters defined in</span>
     217<span class="sd">dependentParmList:</span>
     218<span class="sd">   contains a list by group of lists of</span>
     219<span class="sd">   parameters used in the group. Note that parameters listed in</span>
     220<span class="sd">   dependentParmList should not be refined as they will not affect</span>
     221<span class="sd">   the model</span>
     222
     223<span class="sd">indParmList:</span>
     224<span class="sd">     a list of groups of Independent parameters defined in</span>
    195225<span class="sd">     each group. This contains both parameters used in parameter</span>
    196226<span class="sd">     redefinitions as well as names of generated new parameters.</span>
    197227
    198 <span class="sd">   fixedVarList: a list of variables that have been &#39;fixed&#39;</span>
     228<span class="sd">fixedVarList:</span>
     229<span class="sd">     a list of variables that have been &#39;fixed&#39;</span>
    199230<span class="sd">     by defining them as equal to a constant (::var: = 0). Note that</span>
    200231<span class="sd">     the constant value is ignored at present. These variables are</span>
    201232<span class="sd">     later removed from varyList which prevents them from being refined. </span>
    202233<span class="sd">     Unlikely to be used externally.</span>
    203 <span class="sd">   arrayList: a list by group of relationship matrices to relate</span>
     234
     235<span class="sd">arrayList:</span>
     236<span class="sd">     a list by group of relationship matrices to relate</span>
    204237<span class="sd">     parameters in dependentParmList to those in indParmList. Unlikely</span>
    205238<span class="sd">     to be used externally.</span>
    206 <span class="sd">   invarrayList: a list by group of relationship matrices to relate</span>
     239
     240<span class="sd">invarrayList:</span>
     241<span class="sd">     a list by group of relationship matrices to relate</span>
    207242<span class="sd">     parameters in indParmList to those in dependentParmList. Unlikely</span>
    208243<span class="sd">     to be used externally.</span>
    209 <span class="sd">   fixedDict: a dictionary containing the fixed values corresponding</span>
     244
     245<span class="sd">fixedDict:</span>
     246<span class="sd">     a dictionary containing the fixed values corresponding</span>
    210247<span class="sd">     to parameter equations.  The dict key is an ascii string, but the</span>
    211248<span class="sd">     dict value is a float.  Unlikely to be used externally.</span>
     249
     250<span class="sd">*Routines*</span>
     251<span class="sd">----------</span>
     252
     253<span class="sd">Note that parameter names in GSAS-II are strings of form ``&lt;ph&gt;:&lt;hst&gt;:&lt;nam&gt;``</span>
     254
    212255<span class="sd">&quot;&quot;&quot;</span>
    213256
     
    243286<div class="viewcode-block" id="GroupConstraints"><a class="viewcode-back" href="../GSASIImapvars.html#GSASIImapvars.GroupConstraints">[docs]</a><span class="k">def</span> <span class="nf">GroupConstraints</span><span class="p">(</span><span class="n">constrDict</span><span class="p">):</span>
    244287    <span class="sd">&quot;&quot;&quot;divide the constraints into groups that share no parameters.</span>
    245 <span class="sd">    Input</span>
    246 <span class="sd">       constrDict: a list of dicts defining relationships/constraints</span>
     288
     289<span class="sd">    :param dict constrDict: a list of dicts defining relationships/constraints</span>
     290
     291<span class="sd">    ::</span>
     292<span class="sd">    </span>
    247293<span class="sd">       constrDict = [{&lt;constr1&gt;}, {&lt;constr2&gt;}, ...]</span>
    248 <span class="sd">       where {&lt;constr1&gt;} is {&#39;param1&#39;: mult1, &#39;param2&#39;: mult2,...}</span>
    249 <span class="sd">    Returns two lists of lists:</span>
    250 <span class="sd">      a list of relationship list indices for each group pointing to</span>
    251 <span class="sd">        elements in constrDict and</span>
    252 <span class="sd">      a list containing the parameters used in each group</span>
     294
     295<span class="sd">    where {&lt;constr1&gt;} is {&#39;param1&#39;: mult1, &#39;param2&#39;: mult2,...}</span>
     296
     297<span class="sd">    :returns: two lists of lists:</span>
     298<span class="sd">    </span>
     299<span class="sd">      * a list of grouped contraints where each constraint grouped containts a list of indices for constraint constrDict entries</span>
     300<span class="sd">      * a list containing lists of parameter names contained in each group</span>
     301<span class="sd">      </span>
    253302<span class="sd">      &quot;&quot;&quot;</span>
    254303    <span class="n">assignedlist</span> <span class="o">=</span> <span class="p">[]</span> <span class="c"># relationships that have been used</span>
     
    281330<span class="sd">    constraints and checks for inconsistencies such as conflicts in</span>
    282331<span class="sd">    parameter/variable definitions and or inconsistently varied parameters.</span>
    283 <span class="sd">    Input: see GenerateConstraints</span>
    284 <span class="sd">    Output: returns two strings</span>
    285 <span class="sd">      the first lists conflicts internal to the specified constraints</span>
    286 <span class="sd">      the second lists conflicts where the varyList specifies some</span>
     332
     333<span class="sd">    :param list varyList: a list of parameters names that will be varied</span>
     334
     335<span class="sd">    :param dict constrDict: a list of dicts defining relationships/constraints (as defined in :func:`GroupConstraints`)</span>
     336
     337<span class="sd">    :param list fixedList: a list of values specifying a fixed value for each dict in constrDict. Values are</span>
     338<span class="sd">      either strings that can be converted to floats or None if the constraint defines a new parameter rather</span>
     339<span class="sd">      than a constant.</span>
     340
     341<span class="sd">    :returns: two strings: </span>
     342
     343<span class="sd">      * the first lists conflicts internal to the specified constraints</span>
     344<span class="sd">      * the second lists conflicts where the varyList specifies some</span>
    287345<span class="sd">        parameters in a constraint, but not all</span>
     346<span class="sd">        </span>
    288347<span class="sd">      If there are no errors, both strings will be empty</span>
    289348<span class="sd">    &#39;&#39;&#39;</span>
     
    387446                <span class="k">if</span> <span class="n">var</span> <span class="ow">in</span> <span class="n">fixVlist</span><span class="p">:</span>
    388447                    <span class="n">errmsg</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">Parameter &#39;</span><span class="o">+</span><span class="n">var</span><span class="o">+</span><span class="s">&quot; is Fixed and used in a constraint:</span><span class="se">\n\t</span><span class="s">&quot;</span>
    389                     <span class="n">errmsg</span> <span class="o">+=</span> <span class="n">FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span><span class="o">+</span><span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span>
     448                    <span class="n">errmsg</span> <span class="o">+=</span> <span class="n">_FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span><span class="o">+</span><span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span>
    390449            <span class="k">if</span> <span class="n">varied</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">varied</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">]):</span>
    391450                <span class="n">warnmsg</span> <span class="o">+=</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">Not all variables refined in constraint:</span><span class="se">\n\t</span><span class="s">&quot;</span>
    392                 <span class="n">warnmsg</span> <span class="o">+=</span> <span class="n">FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
     451                <span class="n">warnmsg</span> <span class="o">+=</span> <span class="n">_FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
    393452                <span class="n">warnmsg</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">Not refined: &#39;</span> <span class="o">+</span> <span class="n">notvaried</span> <span class="o">+</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">&#39;</span>
    394453    <span class="k">if</span> <span class="n">errmsg</span> <span class="ow">or</span> <span class="n">warnmsg</span><span class="p">:</span>
     
    404463            <span class="n">errmsg</span> <span class="o">+=</span> <span class="s">&quot;</span><span class="se">\n\t</span><span class="s">than variables &quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">varlist</span><span class="p">))</span> <span class="o">+</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span>
    405464            <span class="k">for</span> <span class="n">rel</span> <span class="ow">in</span> <span class="n">group</span><span class="p">:</span>
    406                 <span class="n">errmsg</span> <span class="o">+=</span> <span class="n">FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
     465                <span class="n">errmsg</span> <span class="o">+=</span> <span class="n">_FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
    407466                <span class="n">errmsg</span> <span class="o">+=</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span>
    408467                <span class="k">continue</span>
    409468        <span class="k">try</span><span class="p">:</span>
    410             <span class="n">multarr</span> <span class="o">=</span> <span class="n">FillArray</span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="n">constrDict</span><span class="p">,</span><span class="n">varlist</span><span class="p">)</span>
    411             <span class="n">RowEchelon</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">group</span><span class="p">),</span><span class="n">multarr</span><span class="p">,</span><span class="n">varlist</span><span class="p">)</span>
     469            <span class="n">multarr</span> <span class="o">=</span> <span class="n">_FillArray</span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="n">constrDict</span><span class="p">,</span><span class="n">varlist</span><span class="p">)</span>
     470            <span class="n">_RowEchelon</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">group</span><span class="p">),</span><span class="n">multarr</span><span class="p">,</span><span class="n">varlist</span><span class="p">)</span>
    412471        <span class="k">except</span><span class="p">:</span>
    413472            <span class="n">errmsg</span> <span class="o">+=</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">Singular input. &quot;</span>
    414473            <span class="n">errmsg</span> <span class="o">+=</span> <span class="s">&quot;There are internal inconsistencies in these constraints</span><span class="se">\n</span><span class="s">&quot;</span>
    415474            <span class="k">for</span> <span class="n">rel</span> <span class="ow">in</span> <span class="n">group</span><span class="p">:</span>
    416                 <span class="n">errmsg</span> <span class="o">+=</span> <span class="n">FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
     475                <span class="n">errmsg</span> <span class="o">+=</span> <span class="n">_FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
    417476                <span class="n">errmsg</span> <span class="o">+=</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span>
    418477            <span class="k">continue</span>
    419478        <span class="k">try</span><span class="p">:</span>
    420             <span class="n">multarr</span> <span class="o">=</span> <span class="n">FillArray</span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="n">constrDict</span><span class="p">,</span><span class="n">varlist</span><span class="p">,</span><span class="n">FillDiagonals</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
     479            <span class="n">multarr</span> <span class="o">=</span> <span class="n">_FillArray</span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="n">constrDict</span><span class="p">,</span><span class="n">varlist</span><span class="p">,</span><span class="n">FillDiagonals</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
    421480            <span class="n">GramSchmidtOrtho</span><span class="p">(</span><span class="n">multarr</span><span class="p">,</span><span class="nb">len</span><span class="p">(</span><span class="n">group</span><span class="p">))</span>
    422481        <span class="k">except</span><span class="p">:</span>
    423482            <span class="n">errmsg</span> <span class="o">+=</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">Unexpected singularity with constraints (in Gram-Schmidt)</span><span class="se">\n</span><span class="s">&quot;</span>
    424483            <span class="k">for</span> <span class="n">rel</span> <span class="ow">in</span> <span class="n">group</span><span class="p">:</span>
    425                 <span class="n">errmsg</span> <span class="o">+=</span> <span class="n">FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
     484                <span class="n">errmsg</span> <span class="o">+=</span> <span class="n">_FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
    426485                <span class="n">errmsg</span> <span class="o">+=</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span>
    427486            <span class="k">continue</span>
     
    459518                <span class="n">warnmsg</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">Please report this unexpected error</span><span class="se">\n</span><span class="s">&#39;</span>
    460519                <span class="k">for</span> <span class="n">rel</span> <span class="ow">in</span> <span class="n">group</span><span class="p">:</span>
    461                     <span class="n">warnmsg</span> <span class="o">+=</span> <span class="n">FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
     520                    <span class="n">warnmsg</span> <span class="o">+=</span> <span class="n">_FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
    462521                    <span class="n">warnmsg</span> <span class="o">+=</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span>
    463522                <span class="n">warnmsg</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="se">\n\t</span><span class="s">Not refined: &#39;</span> <span class="o">+</span> <span class="n">notvaried</span> <span class="o">+</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">&#39;</span>
     
    471530            <span class="n">errmsg</span> <span class="o">+=</span> <span class="s">&#39;Please report this unexpected error</span><span class="se">\n</span><span class="s">&#39;</span>
    472531            <span class="k">for</span> <span class="n">rel</span> <span class="ow">in</span> <span class="n">group</span><span class="p">:</span>
    473                 <span class="n">errmsg</span> <span class="o">+=</span> <span class="n">FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
     532                <span class="n">errmsg</span> <span class="o">+=</span> <span class="n">_FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
    474533                <span class="n">errmsg</span> <span class="o">+=</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span>
    475534    <span class="k">return</span> <span class="n">errmsg</span><span class="p">,</span><span class="n">warnmsg</span>
     
    480539<span class="sd">    and stores them in global variables Also checks for internal</span>
    481540<span class="sd">    conflicts or inconsistencies in parameter/variable definitions.</span>
    482 <span class="sd">    Input:</span>
    483 <span class="sd">       groups,parmlist: see GroupConstraints</span>
    484 <span class="sd">       varyList: a list of parameters that will be varied</span>
    485 <span class="sd">       constrDict: a list of dicts defining relationships/constraints</span>
    486 <span class="sd">         constrDict = [{&lt;constr1&gt;}, {&lt;constr2&gt;}, ...]</span>
    487 <span class="sd">         where {&lt;constr1&gt;} is {&#39;param1&#39;: mult1, &#39;param2&#39;: mult2,...}</span>
    488 <span class="sd">       fixedList: a list of values for each constraint/variable in</span>
    489 <span class="sd">          constrDict, value is either a float (contraint) or None (for</span>
    490 <span class="sd">          a new variable).</span>
     541
     542<span class="sd">    :param list groups: a list of grouped contraints where each constraint grouped containts a list of</span>
     543<span class="sd">      indices for constraint constrDict entries, created in :func:`GroupConstraints` (returned as 1st value)</span>
     544
     545<span class="sd">    :param list parmlist: a list containing lists of parameter names contained in each group,</span>
     546<span class="sd">      created in :func:`GroupConstraints` (returned as 1st value)</span>
     547
     548<span class="sd">    :param list varyList: a list of parameters names (strings of form ``&lt;ph&gt;:&lt;hst&gt;:&lt;nam&gt;``) that will be varied</span>
     549<span class="sd">    </span>
     550<span class="sd">    :param dict constrDict: a list of dicts defining relationships/constraints (as defined in :func:`GroupConstraints`)</span>
     551
     552<span class="sd">    :param list fixedList: a list of values specifying a fixed value for each dict in constrDict. Values are</span>
     553<span class="sd">      either strings that can be converted to floats, float values or None if the constraint defines a new</span>
     554<span class="sd">      parameter</span>
     555<span class="sd">      </span>
     556<span class="sd">    :param dict constrDict: a list of dicts defining relationships/constraints</span>
     557
    491558<span class="sd">    &#39;&#39;&#39;</span>
    492559    <span class="k">global</span> <span class="n">dependentParmList</span><span class="p">,</span><span class="n">arrayList</span><span class="p">,</span><span class="n">invarrayList</span><span class="p">,</span><span class="n">indParmList</span><span class="p">,</span><span class="n">consNum</span>
     
    597664                <span class="k">if</span> <span class="n">var</span> <span class="ow">in</span> <span class="n">fixedVarList</span><span class="p">:</span>
    598665                    <span class="n">msg</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">Error: parameter &#39;</span><span class="o">+</span><span class="n">var</span><span class="o">+</span><span class="s">&quot; is Fixed and used in a constraint:</span><span class="se">\n\t</span><span class="s">&quot;</span>
    599                     <span class="n">msg</span> <span class="o">+=</span> <span class="n">FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span><span class="o">+</span><span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span>
     666                    <span class="n">msg</span> <span class="o">+=</span> <span class="n">_FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span><span class="o">+</span><span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span>
    600667<span class="c">#                if var in equivVarList:</span>
    601668<span class="c">#                    msg += &#39;\nError: parameter &#39;+var+&quot; is Equivalenced and used in a constraint:\n\t&quot;</span>
    602 <span class="c">#                    msg += FormatConstraint(constrDict[rel],fixedList[rel])+&quot;\n&quot;</span>
     669<span class="c">#                    msg += _FormatConstraint(constrDict[rel],fixedList[rel])+&quot;\n&quot;</span>
    603670            <span class="k">if</span> <span class="n">varied</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">varied</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">]):</span>
    604671                <span class="n">msg</span> <span class="o">+=</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">Not all variables refined in constraint:</span><span class="se">\n\t</span><span class="s">&quot;</span>
    605                 <span class="n">msg</span> <span class="o">+=</span> <span class="n">FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
     672                <span class="n">msg</span> <span class="o">+=</span> <span class="n">_FormatConstraint</span><span class="p">(</span><span class="n">constrDict</span><span class="p">[</span><span class="n">rel</span><span class="p">],</span><span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">])</span>
    606673                <span class="n">msg</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">Not refined: &#39;</span> <span class="o">+</span> <span class="n">notvaried</span> <span class="o">+</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">&#39;</span>
    607674            <span class="k">if</span> <span class="n">fixedList</span><span class="p">[</span><span class="n">rel</span><span class="p">]</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span> <span class="ow">and</span> <span class="n">varied</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
     
    620687            <span class="n">msg</span> <span class="o">=</span> <span class="s">&#39;too many relationships&#39;</span>
    621688        <span class="k">try</span><span class="p">:</span>
    622             <span class="n">arr</span> <span class="o">=</span> <span class="n">FillArray</span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="n">constrDict</span><span class="p">,</span><span class="n">varlist</span><span class="p">)</span>
    623             <span class="n">RowEchelon</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">group</span><span class="p">),</span><span class="n">arr</span><span class="p">,</span><span class="n">varlist</span><span class="p">)</span>
    624             <span class="n">constrArr</span> <span class="o">=</span> <span class="n">FillArray</span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="n">constrDict</span><span class="p">,</span><span class="n">varlist</span><span class="p">,</span><span class="n">FillDiagonals</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
     689            <span class="n">arr</span> <span class="o">=</span> <span class="n">_FillArray</span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="n">constrDict</span><span class="p">,</span><span class="n">varlist</span><span class="p">)</span>
     690            <span class="n">_RowEchelon</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">group</span><span class="p">),</span><span class="n">arr</span><span class="p">,</span><span class="n">varlist</span><span class="p">)</span>
     691            <span class="n">constrArr</span> <span class="o">=</span> <span class="n">_FillArray</span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="n">constrDict</span><span class="p">,</span><span class="n">varlist</span><span class="p">,</span><span class="n">FillDiagonals</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
    625692            <span class="n">GramSchmidtOrtho</span><span class="p">(</span><span class="n">constrArr</span><span class="p">,</span><span class="nb">len</span><span class="p">(</span><span class="n">group</span><span class="p">))</span>
    626693        <span class="k">except</span><span class="p">:</span>
     
    693760    <span class="sd">&#39;&#39;&#39;Takes a list of dependent parameter(s) and stores their</span>
    694761<span class="sd">    relationship to a single independent parameter (independentVar)</span>
    695 <span class="sd">    input:</span>
    696 <span class="sd">       independentVar -- name of parameter that will set others (may</span>
    697 <span class="sd">         be varied)</span>
    698 <span class="sd">       dependentList -- list of parameter that will set from</span>
    699 <span class="sd">         independentVar (may not be varied). Each item can be a parameter</span>
     762
     763<span class="sd">    :param str independentVar: name of master parameter that will be used to determine the value</span>
     764<span class="sd">      to set the dependent variables</span>
     765
     766<span class="sd">    :param list dependentList: a list of parameters that will set from</span>
     767<span class="sd">         independentVar. Each item in the list can be a string with the parameter</span>
    700768<span class="sd">         name or a tuple containing a name and multiplier:</span>
    701 <span class="sd">         (&#39;parm1&#39;,(&#39;parm2&#39;,.5),)</span>
     769<span class="sd">         ``[&#39;parm1&#39;,(&#39;parm2&#39;,.5),]``</span>
     770
    702771<span class="sd">    &#39;&#39;&#39;</span>
    703772   
     
    723792<div class="viewcode-block" id="GetDependentVars"><a class="viewcode-back" href="../GSASIImapvars.html#GSASIImapvars.GetDependentVars">[docs]</a><span class="k">def</span> <span class="nf">GetDependentVars</span><span class="p">():</span>
    724793    <span class="sd">&#39;&#39;&#39;Return a list of dependent variables: e.g. variables that are</span>
    725 <span class="sd">    constrained in terms of other variables&#39;&#39;&#39;</span>
     794<span class="sd">    constrained in terms of other variables</span>
     795
     796<span class="sd">    :returns: a list of variable names</span>
     797
     798<span class="sd">    &#39;&#39;&#39;</span>
    726799    <span class="n">dependentVars</span> <span class="o">=</span> <span class="p">[]</span>
    727800    <span class="k">global</span> <span class="n">dependentParmList</span>
     
    732805<div class="viewcode-block" id="GetIndependentVars"><a class="viewcode-back" href="../GSASIImapvars.html#GSASIImapvars.GetIndependentVars">[docs]</a><span class="k">def</span> <span class="nf">GetIndependentVars</span><span class="p">():</span>
    733806    <span class="sd">&#39;&#39;&#39;Return a list of independent variables: e.g. variables that are</span>
    734 <span class="sd">    created by constraints of other variables&#39;&#39;&#39;</span>
     807<span class="sd">    created by constraints of other variables</span>
     808
     809<span class="sd">    :returns: a list of variable names</span>
     810
     811<span class="sd">    &#39;&#39;&#39;</span>
    735812    <span class="n">independentVars</span> <span class="o">=</span> <span class="p">[]</span>
    736813    <span class="k">global</span> <span class="n">indParmList</span><span class="p">,</span><span class="n">fixedDict</span>
     
    797874    <span class="k">return</span> <span class="n">sigmaDict</span>
    798875</div>
    799 <div class="viewcode-block" id="FormatConstraint"><a class="viewcode-back" href="../GSASIImapvars.html#GSASIImapvars.FormatConstraint">[docs]</a><span class="k">def</span> <span class="nf">FormatConstraint</span><span class="p">(</span><span class="n">RelDict</span><span class="p">,</span><span class="n">RelVal</span><span class="p">):</span>
     876<span class="k">def</span> <span class="nf">_FormatConstraint</span><span class="p">(</span><span class="n">RelDict</span><span class="p">,</span><span class="n">RelVal</span><span class="p">):</span>
    800877    <span class="sd">&#39;&#39;&#39;Formats a Constraint or Function for use in a convenient way&#39;&#39;&#39;</span>
    801878    <span class="n">linelen</span> <span class="o">=</span> <span class="mi">45</span>
     
    820897        <span class="n">s1</span> <span class="o">+=</span> <span class="n">s2</span>
    821898    <span class="k">return</span> <span class="n">s1</span>
    822 </div>
     899
    823900<div class="viewcode-block" id="VarRemapShow"><a class="viewcode-back" href="../GSASIImapvars.html#GSASIImapvars.VarRemapShow">[docs]</a><span class="k">def</span> <span class="nf">VarRemapShow</span><span class="p">(</span><span class="n">varyList</span><span class="p">):</span>
    824     <span class="sd">&#39;&#39;&#39;List out the saved relationships.</span>
    825 <span class="sd">    Returns a string containing the details.</span>
     901    <span class="sd">&#39;&#39;&#39;List out the saved relationships. This should be done after the constraints have been</span>
     902<span class="sd">    defined using :func:`StoreEquivalence`, :func:`GroupConstraints` and :func:`GenerateConstraints`.</span>
     903
     904<span class="sd">    :returns: a string containing the details of the contraint relationships</span>
    826905<span class="sd">    &#39;&#39;&#39;</span>
    827906    <span class="n">s</span> <span class="o">=</span> <span class="s">&#39;&#39;</span>
     
    872951    <span class="sd">&#39;&#39;&#39;Compute derivatives for Independent Parameters from the</span>
    873952<span class="sd">    derivatives for the original parameters</span>
     953
     954<span class="sd">    :param list varyList: a list of parameters names that will be varied</span>
     955
     956<span class="sd">    :param dict derivDict: a dict containing derivatives for parameter values keyed by the</span>
     957<span class="sd">      parameter names.</span>
     958
     959<span class="sd">    :param dict dMdv: a dict containing derivatives for dependent parameter computed from</span>
     960<span class="sd">      derivDict</span>
     961
    874962<span class="sd">    &#39;&#39;&#39;</span>
    875963    <span class="k">global</span> <span class="n">dependentParmList</span><span class="p">,</span><span class="n">arrayList</span><span class="p">,</span><span class="n">invarrayList</span><span class="p">,</span><span class="n">indParmList</span><span class="p">,</span><span class="n">invarrayList</span>
     
    896984<span class="sd">    Removes dependent variables from the varyList</span>
    897985
    898 <span class="sd">    This should be done once, before any variable refinement is done</span>
    899 <span class="sd">    to complete the parameter dictionary with the Independent Parameters</span>
     986<span class="sd">    This should be done once, after the constraints have been</span>
     987<span class="sd">    defined using :func:`StoreEquivalence`,</span>
     988<span class="sd">    :func:`GroupConstraints` and :func:`GenerateConstraints` and</span>
     989<span class="sd">    before any variable refinement is done</span>
     990<span class="sd">    to complete the parameter dictionary by defining independent</span>
     991<span class="sd">    parameters and satisfying the constraint equations. </span>
     992
     993<span class="sd">    :param dict parmDict: a dict containing parameter values keyed by the</span>
     994<span class="sd">      parameter names.</span>
     995<span class="sd">      This will contain updated values for both dependent and independent</span>
     996<span class="sd">      parameters after Dict2Map is called. It will also contain some</span>
     997<span class="sd">      unexpected entries of every constant value {&#39;0&#39;:0.0} &amp; {&#39;1.0&#39;:1.0},</span>
     998<span class="sd">      which do not cause any problems. </span>
     999
     1000<span class="sd">    :param list varyList: a list of parameters names that will be varied</span>
     1001<span class="sd">    </span>
     1002
    9001003<span class="sd">    &#39;&#39;&#39;</span>
    9011004    <span class="c"># process the Independent vars: remove dependent ones from varylist</span>
     
    9241027</div>
    9251028<div class="viewcode-block" id="Dict2Map"><a class="viewcode-back" href="../GSASIImapvars.html#GSASIImapvars.Dict2Map">[docs]</a><span class="k">def</span> <span class="nf">Dict2Map</span><span class="p">(</span><span class="n">parmDict</span><span class="p">,</span><span class="n">varyList</span><span class="p">):</span>
    926     <span class="sd">&#39;&#39;&#39;Convert the remapped values back to the original parameters</span>
     1029    <span class="sd">&#39;&#39;&#39;Applies the constraints defined using :func:`StoreEquivalence`,</span>
     1030<span class="sd">    :func:`GroupConstraints` and :func:`GenerateConstraints` by changing</span>
     1031<span class="sd">    values in a dict containing the parameters. This should be</span>
     1032<span class="sd">    done before the parameters are used for any computations</span>
     1033
     1034<span class="sd">    :param dict parmDict: a dict containing parameter values keyed by the</span>
     1035<span class="sd">      parameter names.</span>
     1036<span class="sd">      This will contain updated values for both dependent and independent</span>
     1037<span class="sd">      parameters after Dict2Map is called. It will also contain some</span>
     1038<span class="sd">      unexpected entries of every constant value {&#39;0&#39;:0.0} &amp; {&#39;1.0&#39;:1.0},</span>
     1039<span class="sd">      which do not cause any problems. </span>
     1040
     1041<span class="sd">    :param list varyList: a list of parameters names that will be varied</span>
    9271042<span class="sd">    </span>
    928 <span class="sd">    This should be done to apply constraints to parameter values (use</span>
    929 <span class="sd">    Map2Dict once first). It should be done as part of the Model function</span>
    930 <span class="sd">    evaluation, before any computation is done</span>
    931 <span class="sd">    &#39;&#39;&#39;</span>
    932     <span class="c">#I think this needs fixing to update parmDict with new values </span>
    933     <span class="c">#   from the constraints based on what is in varyList - RVD. Don&#39;t think so -- BHT</span>
     1043<span class="sd">    &#39;&#39;&#39;</span>
    9341044    <span class="k">global</span> <span class="n">dependentParmList</span><span class="p">,</span><span class="n">arrayList</span><span class="p">,</span><span class="n">invarrayList</span><span class="p">,</span><span class="n">indParmList</span><span class="p">,</span><span class="n">fixedDict</span>
    9351045    <span class="c"># reset fixed values (should not be needed, but very quick) </span>
     
    9701080    <span class="k">return</span> <span class="n">a</span>
    9711081</div>
    972 <div class="viewcode-block" id="FillArray"><a class="viewcode-back" href="../GSASIImapvars.html#GSASIImapvars.FillArray">[docs]</a><span class="k">def</span> <span class="nf">FillArray</span><span class="p">(</span><span class="n">sel</span><span class="p">,</span><span class="nb">dict</span><span class="p">,</span><span class="n">collist</span><span class="p">,</span><span class="n">FillDiagonals</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span>
     1082<span class="k">def</span> <span class="nf">_FillArray</span><span class="p">(</span><span class="n">sel</span><span class="p">,</span><span class="nb">dict</span><span class="p">,</span><span class="n">collist</span><span class="p">,</span><span class="n">FillDiagonals</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span>
    9731083    <span class="sd">&#39;&#39;&#39;Construct a n by n matrix (n = len(collist)</span>
    9741084<span class="sd">    filling in the rows using the relationships defined</span>
     
    9881098            <span class="n">arr</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">]</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">[</span><span class="n">cnum</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">var</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span>
    9891099    <span class="k">return</span> <span class="n">arr</span>
    990 </div>
    991 <div class="viewcode-block" id="SwapColumns"><a class="viewcode-back" href="../GSASIImapvars.html#GSASIImapvars.SwapColumns">[docs]</a><span class="k">def</span> <span class="nf">SwapColumns</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">m</span><span class="p">,</span><span class="n">v</span><span class="p">):</span>
     1100
     1101<span class="k">def</span> <span class="nf">_SwapColumns</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">m</span><span class="p">,</span><span class="n">v</span><span class="p">):</span>
    9921102    <span class="sd">&#39;&#39;&#39;Swap columns in matrix m as well as the labels in v </span>
    9931103<span class="sd">    so that element (i,i) is replaced by the first non-zero element in row i after that element</span>
     
    10021112    <span class="k">else</span><span class="p">:</span>
    10031113        <span class="k">raise</span> <span class="ne">Exception</span><span class="p">,</span><span class="s">&#39;Singular input&#39;</span>
    1004 </div>
    1005 <div class="viewcode-block" id="RowEchelon"><a class="viewcode-back" href="../GSASIImapvars.html#GSASIImapvars.RowEchelon">[docs]</a><span class="k">def</span> <span class="nf">RowEchelon</span><span class="p">(</span><span class="n">m</span><span class="p">,</span><span class="n">arr</span><span class="p">,</span><span class="n">collist</span><span class="p">):</span>
     1114
     1115<span class="k">def</span> <span class="nf">_RowEchelon</span><span class="p">(</span><span class="n">m</span><span class="p">,</span><span class="n">arr</span><span class="p">,</span><span class="n">collist</span><span class="p">):</span>
    10061116    <span class="sd">&#39;&#39;&#39;Convert the first m rows in Matrix arr to row-echelon form</span>
    10071117<span class="sd">    exchanging columns in the matrix and collist as needed.</span>
     
    10131123    <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="n">m</span><span class="p">):</span>
    10141124        <span class="k">if</span> <span class="n">np</span><span class="o">.</span><span class="n">allclose</span><span class="p">(</span><span class="n">arr</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">i</span><span class="p">],</span><span class="mi">0</span><span class="p">):</span>
    1015             <span class="n">SwapColumns</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">arr</span><span class="p">,</span><span class="n">collist</span><span class="p">)</span>
     1125            <span class="n">_SwapColumns</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="n">arr</span><span class="p">,</span><span class="n">collist</span><span class="p">)</span>
    10161126        <span class="n">arr</span><span class="p">[</span><span class="n">i</span><span class="p">,:]</span> <span class="o">/=</span> <span class="n">arr</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="n">i</span><span class="p">]</span> <span class="c"># normalize row</span>
    10171127        <span class="c"># subtract current row from subsequent rows to set values to left of diagonal to 0</span>
    10181128        <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span><span class="n">m</span><span class="p">):</span>
    10191129            <span class="n">arr</span><span class="p">[</span><span class="n">j</span><span class="p">,:]</span> <span class="o">-=</span> <span class="n">arr</span><span class="p">[</span><span class="n">i</span><span class="p">,:]</span> <span class="o">*</span> <span class="n">arr</span><span class="p">[</span><span class="n">j</span><span class="p">,</span><span class="n">i</span><span class="p">]</span>
    1020 </div>
     1130
    10211131<span class="k">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&quot;__main__&quot;</span><span class="p">:</span>
    10221132    <span class="n">parmdict</span> <span class="o">=</span> <span class="p">{}</span>
  • trunk/sphinxdocs/build/html/_modules/GSASIIphsGUI.html

    r907 r911  
    5353<span class="c">#GSASII - phase data display routines</span>
    5454<span class="c">########### SVN repository information ###################</span>
    55 <span class="c"># $Date: 2013-04-19 15:38:07 -0500 (Fri, 19 Apr 2013) $</span>
    56 <span class="c"># $Author: vondreele $</span>
    57 <span class="c"># $Revision: 889 $</span>
     55<span class="c"># $Date: 2013-05-15 18:18:22 -0500 (Wed, 15 May 2013) $</span>
     56<span class="c"># $Author: toby $</span>
     57<span class="c"># $Revision: 906 $</span>
    5858<span class="c"># $URL: https://subversion.xor.aps.anl.gov/pyGSAS/trunk/GSASIIphsGUI.py $</span>
    59 <span class="c"># $Id: GSASIIphsGUI.py 889 2013-04-19 20:38:07Z vondreele $</span>
     59<span class="c"># $Id: GSASIIphsGUI.py 906 2013-05-15 23:18:22Z toby $</span>
    6060<span class="c">########### SVN repository information ###################</span>
    6161<span class="sd">&#39;&#39;&#39;</span>
     
    6464<span class="sd">Module to create the GUI for display of phase information</span>
    6565<span class="sd">in the data display window when a phase is selected.</span>
    66 <span class="sd">(Items displayed by some tabs is found in other modules.)</span>
     66<span class="sd">(pages displayed in response to some phase tabs are done in other modules,</span>
     67<span class="sd">such as GSASIIddata.)</span>
    6768
    6869<span class="sd">&#39;&#39;&#39;</span>
     
    7980<span class="kn">import</span> <span class="nn">cPickle</span>
    8081<span class="kn">import</span> <span class="nn">GSASIIpath</span>
    81 <span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 889 $&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: 906 $&quot;</span><span class="p">)</span>
    8283<span class="kn">import</span> <span class="nn">GSASIIlattice</span> <span class="kn">as</span> <span class="nn">G2lat</span>
    8384<span class="kn">import</span> <span class="nn">GSASIIspc</span> <span class="kn">as</span> <span class="nn">G2spc</span>
     
    107108<span class="n">acosd</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="mf">180.</span><span class="o">*</span><span class="n">np</span><span class="o">.</span><span class="n">arccos</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="o">/</span><span class="n">np</span><span class="o">.</span><span class="n">pi</span>
    108109
     110
    109111<div class="viewcode-block" id="UpdatePhaseData"><a class="viewcode-back" href="../GSASIIphsGUI.html#GSASIIphsGUI.UpdatePhaseData">[docs]</a><span class="k">def</span> <span class="nf">UpdatePhaseData</span><span class="p">(</span><span class="n">G2frame</span><span class="p">,</span><span class="n">Item</span><span class="p">,</span><span class="n">data</span><span class="p">,</span><span class="n">oldPage</span><span class="p">):</span>
    110112    <span class="sd">&#39;&#39;&#39;Create the data display window contents when a phase is clicked on</span>
    111113<span class="sd">    in the man (data tree) window.</span>
    112 <span class="sd">    Called only from GSASIIgrid.MovePatternTreeToGrid, which in turn is</span>
    113 <span class="sd">    called from GSASII.GSASII.OnPatternTreeSelChanged when a tree item is</span>
    114 <span class="sd">    selected</span>
     114<span class="sd">    Called only from :mod:`GSASIIgrid.MovePatternTreeToGrid`,</span>
     115<span class="sd">    which in turn is called from :mod:`GSASII.GSASII.OnPatternTreeSelChanged`</span>
     116<span class="sd">    when a tree item is selected.</span>
    115117
    116118<span class="sd">    :param wx.frame G2frame: the main GSAS-II frame object</span>
     
    121123
    122124<span class="sd">    :param int oldPage: This sets a tab to select when moving</span>
    123 <span class="sd">      from one phase to another. </span>
     125<span class="sd">      from one phase to another, in which case the same tab is selected</span>
     126<span class="sd">      to display first. This is set only when the previous data tree</span>
     127<span class="sd">      selection is a phase, if not the value is None. The default action</span>
     128<span class="sd">      is to bring up the General tab.</span>
    124129
    125130<span class="sd">    &#39;&#39;&#39;</span>
     
    212217
    213218    <span class="k">def</span> <span class="nf">UpdateGeneral</span><span class="p">():</span>
     219        <span class="sd">&#39;&#39;&#39;Draw the controls for the General phase data subpage</span>
     220<span class="sd">        &#39;&#39;&#39;</span>
    214221       
    215         <span class="sd">&#39;&#39;&#39; default dictionary structure for phase data: (taken from GSASII.py)</span>
     222        <span class="sd">&quot;&quot;&quot; This is the default dictionary structure for phase data</span>
     223<span class="sd">        (taken from GSASII.py)</span>
    216224<span class="sd">        &#39;General&#39;:{</span>
    217225<span class="sd">            &#39;Name&#39;:PhaseName</span>
     
    225233<span class="sd">        &#39;Atoms&#39;:[]</span>
    226234<span class="sd">        &#39;Drawing&#39;:{}</span>
    227 <span class="sd">        &#39;&#39;&#39;</span>
    228        
     235<span class="sd">        &quot;&quot;&quot;</span>       
    229236        <span class="n">phaseTypes</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;nuclear&#39;</span><span class="p">,</span><span class="s">&#39;modulated&#39;</span><span class="p">,</span><span class="s">&#39;magnetic&#39;</span><span class="p">,</span><span class="s">&#39;macromolecular&#39;</span><span class="p">]</span>
    230237        <span class="n">SetupGeneral</span><span class="p">()</span>
     
    778785            <span class="n">mcsaSizer</span><span class="o">.</span><span class="n">Add</span><span class="p">(</span><span class="n">line3Sizer</span><span class="p">)</span>           
    779786            <span class="k">return</span> <span class="n">mcsaSizer</span>
    780                
     787
     788        <span class="c"># UpdateGeneral execution starts here</span>
    781789        <span class="n">General</span><span class="o">.</span><span class="n">DestroyChildren</span><span class="p">()</span>
    782790        <span class="n">dataDisplay</span> <span class="o">=</span> <span class="n">wx</span><span class="o">.</span><span class="n">Panel</span><span class="p">(</span><span class="n">General</span><span class="p">)</span>
     
    809817
    810818        <span class="n">dataDisplay</span><span class="o">.</span><span class="n">SetSizer</span><span class="p">(</span><span class="n">mainSizer</span><span class="p">)</span>
    811         <span class="n">Size</span> <span class="o">=</span> <span class="n">mainSizer</span><span class="o">.</span><span class="n">Fit</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="p">)</span>
    812         <span class="n">Size</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">+=</span> <span class="mi">35</span>                           <span class="c">#compensate for status bar</span>
    813         <span class="n">dataDisplay</span><span class="o">.</span><span class="n">SetSize</span><span class="p">(</span><span class="n">Size</span><span class="p">)</span>
     819        <span class="k">if</span> <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">PhaseUserSize</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
     820            <span class="n">Size</span> <span class="o">=</span> <span class="n">mainSizer</span><span class="o">.</span><span class="n">ComputeFittingWindowSize</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="p">)</span>  <span class="c"># get size needed by window</span>
     821            <span class="n">Size</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">+=</span> <span class="mi">35</span>                           <span class="c">#compensate for status bar</span>
     822            <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">setSizePosLeft</span><span class="p">(</span><span class="n">Size</span><span class="p">)</span>
     823        <span class="k">else</span><span class="p">:</span>
     824            <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">Update</span><span class="p">()</span>
     825        <span class="n">dataDisplay</span><span class="o">.</span><span class="n">SetSize</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">GetClientSize</span><span class="p">())</span>
    814826        <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">SetStatusText</span><span class="p">(</span><span class="s">&#39;&#39;</span><span class="p">)</span>
    815         <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">setSizePosLeft</span><span class="p">(</span><span class="n">Size</span><span class="p">)</span>
    816827
    817828<span class="c">################################################################################</span>
     
    820831
    821832    <span class="k">def</span> <span class="nf">FillAtomsGrid</span><span class="p">(</span><span class="n">Atoms</span><span class="p">):</span>
    822         <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">setSizePosLeft</span><span class="p">([</span><span class="mi">700</span><span class="p">,</span><span class="mi">300</span><span class="p">])</span>
    823         <span class="n">generalData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;General&#39;</span><span class="p">]</span>
    824         <span class="n">atomData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;Atoms&#39;</span><span class="p">]</span>
    825         <span class="n">DData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;Drawing&#39;</span><span class="p">]</span>
    826         <span class="n">resRBData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;RBModels&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;Residue&#39;</span><span class="p">,[])</span>
    827         <span class="n">vecRBData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;RBModels&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;Vector&#39;</span><span class="p">,[])</span>
    828         <span class="n">rbAtmDict</span> <span class="o">=</span> <span class="p">{}</span>
    829         <span class="k">for</span> <span class="n">rbObj</span> <span class="ow">in</span> <span class="n">resRBData</span><span class="o">+</span><span class="n">vecRBData</span><span class="p">:</span>
    830             <span class="n">exclList</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;X&#39;</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="nb">len</span><span class="p">(</span><span class="n">rbObj</span><span class="p">[</span><span class="s">&#39;Ids&#39;</span><span class="p">]))]</span>
    831             <span class="n">rbAtmDict</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="nb">dict</span><span class="p">(</span><span class="nb">zip</span><span class="p">(</span><span class="n">rbObj</span><span class="p">[</span><span class="s">&#39;Ids&#39;</span><span class="p">],</span><span class="n">exclList</span><span class="p">)))</span>
    832             <span class="k">if</span> <span class="n">rbObj</span><span class="p">[</span><span class="s">&#39;ThermalMotion&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">!=</span> <span class="s">&#39;None&#39;</span><span class="p">:</span>
    833                 <span class="k">for</span> <span class="nb">id</span> <span class="ow">in</span> <span class="n">rbObj</span><span class="p">[</span><span class="s">&#39;Ids&#39;</span><span class="p">]:</span>
    834                     <span class="n">rbAtmDict</span><span class="p">[</span><span class="nb">id</span><span class="p">]</span> <span class="o">+=</span> <span class="s">&#39;U&#39;</span>           
    835         <span class="c"># exclList will be &#39;x&#39; or &#39;xu&#39; if TLS used in RB</span>
    836         <span class="n">Items</span> <span class="o">=</span> <span class="p">[</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSEDITINSERT</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSEDITDELETE</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSREFINE</span><span class="p">,</span>
    837             <span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSMODIFY</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSTRANSFORM</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMVIEWINSERT</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMMOVE</span><span class="p">]</span>
    838         <span class="k">if</span> <span class="n">atomData</span><span class="p">:</span>
    839             <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">Items</span><span class="p">:</span>   
    840                 <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">AtomsMenu</span><span class="o">.</span><span class="n">Enable</span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="bp">True</span><span class="p">)</span>
    841         <span class="k">else</span><span class="p">:</span>
    842             <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">Items</span><span class="p">:</span>
    843                 <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">AtomsMenu</span><span class="o">.</span><span class="n">Enable</span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="bp">False</span><span class="p">)</span>
    844         <span class="n">Items</span> <span class="o">=</span> <span class="p">[</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMVIEWINSERT</span><span class="p">,</span> <span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSVIEWADD</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMMOVE</span><span class="p">]</span>
    845         <span class="k">if</span> <span class="s">&#39;showABC&#39;</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;Drawing&#39;</span><span class="p">]:</span>
    846             <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">Items</span><span class="p">:</span>
    847                 <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">AtomsMenu</span><span class="o">.</span><span class="n">Enable</span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="bp">True</span><span class="p">)</span>
    848         <span class="k">else</span><span class="p">:</span>
    849             <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">Items</span><span class="p">:</span>
    850                 <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">AtomsMenu</span><span class="o">.</span><span class="n">Enable</span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="bp">False</span><span class="p">)</span>
    851 
    852         <span class="n">AAchoice</span> <span class="o">=</span> <span class="s">&quot;: ,ALA,ARG,ASN,ASP,CYS,GLN,GLU,GLY,HIS,ILE,LEU,LYS,MET,PHE,PRO,SER,THR,TRP,TYR,VAL,MSE,HOH,UNK&quot;</span>
    853         <span class="n">Types</span> <span class="o">=</span> <span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">,</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">,</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_CHOICE</span><span class="o">+</span><span class="s">&quot;: ,X,XU,U,F,FX,FXU,FU&quot;</span><span class="p">,]</span><span class="o">+</span> \
    854             <span class="mi">3</span><span class="o">*</span><span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_FLOAT</span><span class="o">+</span><span class="s">&#39;:10,5&#39;</span><span class="p">,]</span><span class="o">+</span><span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_FLOAT</span><span class="o">+</span><span class="s">&#39;:10,4&#39;</span><span class="p">,</span> <span class="c">#x,y,z,frac</span>
    855             <span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">,</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">,</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_CHOICE</span><span class="o">+</span><span class="s">&quot;:I,A&quot;</span><span class="p">,]</span>
    856         <span class="n">Types</span> <span class="o">+=</span> <span class="mi">7</span><span class="o">*</span><span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_FLOAT</span><span class="o">+</span><span class="s">&#39;:10,5&#39;</span><span class="p">,]</span>
    857         <span class="n">colLabels</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;Name&#39;</span><span class="p">,</span><span class="s">&#39;Type&#39;</span><span class="p">,</span><span class="s">&#39;refine&#39;</span><span class="p">,</span><span class="s">&#39;x&#39;</span><span class="p">,</span><span class="s">&#39;y&#39;</span><span class="p">,</span><span class="s">&#39;z&#39;</span><span class="p">,</span><span class="s">&#39;frac&#39;</span><span class="p">,</span><span class="s">&#39;site sym&#39;</span><span class="p">,</span><span class="s">&#39;mult&#39;</span><span class="p">,</span><span class="s">&#39;I/A&#39;</span><span class="p">,</span><span class="s">&#39;Uiso&#39;</span><span class="p">,</span><span class="s">&#39;U11&#39;</span><span class="p">,</span><span class="s">&#39;U22&#39;</span><span class="p">,</span><span class="s">&#39;U33&#39;</span><span class="p">,</span><span class="s">&#39;U12&#39;</span><span class="p">,</span><span class="s">&#39;U13&#39;</span><span class="p">,</span><span class="s">&#39;U23&#39;</span><span class="p">]</span>
    858         <span class="k">if</span> <span class="n">generalData</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;magnetic&#39;</span><span class="p">:</span>
    859             <span class="n">colLabels</span> <span class="o">+=</span> <span class="p">[</span><span class="s">&#39;Mx&#39;</span><span class="p">,</span><span class="s">&#39;My&#39;</span><span class="p">,</span><span class="s">&#39;Mz&#39;</span><span class="p">]</span>
    860             <span class="n">Types</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">=</span> <span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_CHOICE</span><span class="o">+</span><span class="s">&quot;: ,X,XU,U,M,MX,MXU,MU,F,FX,FXU,FU,FM,FMX,FMU,&quot;</span>
    861             <span class="n">Types</span> <span class="o">+=</span> <span class="mi">3</span><span class="o">*</span><span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_FLOAT</span><span class="o">+</span><span class="s">&#39;:10,4&#39;</span><span class="p">,]</span>
    862         <span class="k">elif</span> <span class="n">generalData</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;macromolecular&#39;</span><span class="p">:</span>
    863             <span class="n">colLabels</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;res no&#39;</span><span class="p">,</span><span class="s">&#39;residue&#39;</span><span class="p">,</span><span class="s">&#39;chain&#39;</span><span class="p">]</span> <span class="o">+</span> <span class="n">colLabels</span>
    864             <span class="n">Types</span> <span class="o">=</span> <span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">,</span>
    865                 <span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_CHOICE</span><span class="o">+</span><span class="n">AAchoice</span><span class="p">,</span>
    866                 <span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">]</span> <span class="o">+</span> <span class="n">Types</span>
    867         <span class="k">elif</span> <span class="n">generalData</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;modulated&#39;</span><span class="p">:</span>
    868             <span class="n">Types</span> <span class="o">+=</span> <span class="p">[]</span>
    869             <span class="n">colLabels</span> <span class="o">+=</span> <span class="p">[]</span>
    870 
     833        <span class="sd">&#39;&#39;&#39;Display the contents of the Atoms tab</span>
     834<span class="sd">        &#39;&#39;&#39;</span>
    871835        <span class="k">def</span> <span class="nf">RefreshAtomGrid</span><span class="p">(</span><span class="n">event</span><span class="p">):</span>
    872836
     
    12031167            <span class="n">Atoms</span><span class="o">.</span><span class="n">AutoSizeColumns</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span>
    12041168
     1169        <span class="c"># FillAtomsGrid executable code starts here</span>
     1170        <span class="n">generalData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;General&#39;</span><span class="p">]</span>
     1171        <span class="n">atomData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;Atoms&#39;</span><span class="p">]</span>
     1172        <span class="n">DData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;Drawing&#39;</span><span class="p">]</span>
     1173        <span class="n">resRBData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;RBModels&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;Residue&#39;</span><span class="p">,[])</span>
     1174        <span class="n">vecRBData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;RBModels&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;Vector&#39;</span><span class="p">,[])</span>
     1175        <span class="n">rbAtmDict</span> <span class="o">=</span> <span class="p">{}</span>
     1176        <span class="k">for</span> <span class="n">rbObj</span> <span class="ow">in</span> <span class="n">resRBData</span><span class="o">+</span><span class="n">vecRBData</span><span class="p">:</span>
     1177            <span class="n">exclList</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;X&#39;</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="nb">len</span><span class="p">(</span><span class="n">rbObj</span><span class="p">[</span><span class="s">&#39;Ids&#39;</span><span class="p">]))]</span>
     1178            <span class="n">rbAtmDict</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="nb">dict</span><span class="p">(</span><span class="nb">zip</span><span class="p">(</span><span class="n">rbObj</span><span class="p">[</span><span class="s">&#39;Ids&#39;</span><span class="p">],</span><span class="n">exclList</span><span class="p">)))</span>
     1179            <span class="k">if</span> <span class="n">rbObj</span><span class="p">[</span><span class="s">&#39;ThermalMotion&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">!=</span> <span class="s">&#39;None&#39;</span><span class="p">:</span>
     1180                <span class="k">for</span> <span class="nb">id</span> <span class="ow">in</span> <span class="n">rbObj</span><span class="p">[</span><span class="s">&#39;Ids&#39;</span><span class="p">]:</span>
     1181                    <span class="n">rbAtmDict</span><span class="p">[</span><span class="nb">id</span><span class="p">]</span> <span class="o">+=</span> <span class="s">&#39;U&#39;</span>           
     1182        <span class="c"># exclList will be &#39;x&#39; or &#39;xu&#39; if TLS used in RB</span>
     1183        <span class="n">Items</span> <span class="o">=</span> <span class="p">[</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSEDITINSERT</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSEDITDELETE</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSREFINE</span><span class="p">,</span>
     1184            <span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSMODIFY</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSTRANSFORM</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMVIEWINSERT</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMMOVE</span><span class="p">]</span>
     1185        <span class="k">if</span> <span class="n">atomData</span><span class="p">:</span>
     1186            <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">Items</span><span class="p">:</span>   
     1187                <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">AtomsMenu</span><span class="o">.</span><span class="n">Enable</span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="bp">True</span><span class="p">)</span>
     1188        <span class="k">else</span><span class="p">:</span>
     1189            <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">Items</span><span class="p">:</span>
     1190                <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">AtomsMenu</span><span class="o">.</span><span class="n">Enable</span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="bp">False</span><span class="p">)</span>
     1191        <span class="n">Items</span> <span class="o">=</span> <span class="p">[</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMVIEWINSERT</span><span class="p">,</span> <span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMSVIEWADD</span><span class="p">,</span><span class="n">G2gd</span><span class="o">.</span><span class="n">wxID_ATOMMOVE</span><span class="p">]</span>
     1192        <span class="k">if</span> <span class="s">&#39;showABC&#39;</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;Drawing&#39;</span><span class="p">]:</span>
     1193            <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">Items</span><span class="p">:</span>
     1194                <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">AtomsMenu</span><span class="o">.</span><span class="n">Enable</span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="bp">True</span><span class="p">)</span>
     1195        <span class="k">else</span><span class="p">:</span>
     1196            <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">Items</span><span class="p">:</span>
     1197                <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">AtomsMenu</span><span class="o">.</span><span class="n">Enable</span><span class="p">(</span><span class="n">item</span><span class="p">,</span><span class="bp">False</span><span class="p">)</span>
     1198
     1199        <span class="n">AAchoice</span> <span class="o">=</span> <span class="s">&quot;: ,ALA,ARG,ASN,ASP,CYS,GLN,GLU,GLY,HIS,ILE,LEU,LYS,MET,PHE,PRO,SER,THR,TRP,TYR,VAL,MSE,HOH,UNK&quot;</span>
     1200        <span class="n">Types</span> <span class="o">=</span> <span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">,</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">,</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_CHOICE</span><span class="o">+</span><span class="s">&quot;: ,X,XU,U,F,FX,FXU,FU&quot;</span><span class="p">,]</span><span class="o">+</span> \
     1201            <span class="mi">3</span><span class="o">*</span><span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_FLOAT</span><span class="o">+</span><span class="s">&#39;:10,5&#39;</span><span class="p">,]</span><span class="o">+</span><span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_FLOAT</span><span class="o">+</span><span class="s">&#39;:10,4&#39;</span><span class="p">,</span> <span class="c">#x,y,z,frac</span>
     1202            <span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">,</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">,</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_CHOICE</span><span class="o">+</span><span class="s">&quot;:I,A&quot;</span><span class="p">,]</span>
     1203        <span class="n">Types</span> <span class="o">+=</span> <span class="mi">7</span><span class="o">*</span><span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_FLOAT</span><span class="o">+</span><span class="s">&#39;:10,5&#39;</span><span class="p">,]</span>
     1204        <span class="n">colLabels</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;Name&#39;</span><span class="p">,</span><span class="s">&#39;Type&#39;</span><span class="p">,</span><span class="s">&#39;refine&#39;</span><span class="p">,</span><span class="s">&#39;x&#39;</span><span class="p">,</span><span class="s">&#39;y&#39;</span><span class="p">,</span><span class="s">&#39;z&#39;</span><span class="p">,</span><span class="s">&#39;frac&#39;</span><span class="p">,</span><span class="s">&#39;site sym&#39;</span><span class="p">,</span><span class="s">&#39;mult&#39;</span><span class="p">,</span><span class="s">&#39;I/A&#39;</span><span class="p">,</span><span class="s">&#39;Uiso&#39;</span><span class="p">,</span><span class="s">&#39;U11&#39;</span><span class="p">,</span><span class="s">&#39;U22&#39;</span><span class="p">,</span><span class="s">&#39;U33&#39;</span><span class="p">,</span><span class="s">&#39;U12&#39;</span><span class="p">,</span><span class="s">&#39;U13&#39;</span><span class="p">,</span><span class="s">&#39;U23&#39;</span><span class="p">]</span>
     1205        <span class="k">if</span> <span class="n">generalData</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;magnetic&#39;</span><span class="p">:</span>
     1206            <span class="n">colLabels</span> <span class="o">+=</span> <span class="p">[</span><span class="s">&#39;Mx&#39;</span><span class="p">,</span><span class="s">&#39;My&#39;</span><span class="p">,</span><span class="s">&#39;Mz&#39;</span><span class="p">]</span>
     1207            <span class="n">Types</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">=</span> <span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_CHOICE</span><span class="o">+</span><span class="s">&quot;: ,X,XU,U,M,MX,MXU,MU,F,FX,FXU,FU,FM,FMX,FMU,&quot;</span>
     1208            <span class="n">Types</span> <span class="o">+=</span> <span class="mi">3</span><span class="o">*</span><span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_FLOAT</span><span class="o">+</span><span class="s">&#39;:10,4&#39;</span><span class="p">,]</span>
     1209        <span class="k">elif</span> <span class="n">generalData</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;macromolecular&#39;</span><span class="p">:</span>
     1210            <span class="n">colLabels</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;res no&#39;</span><span class="p">,</span><span class="s">&#39;residue&#39;</span><span class="p">,</span><span class="s">&#39;chain&#39;</span><span class="p">]</span> <span class="o">+</span> <span class="n">colLabels</span>
     1211            <span class="n">Types</span> <span class="o">=</span> <span class="p">[</span><span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">,</span>
     1212                <span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_CHOICE</span><span class="o">+</span><span class="n">AAchoice</span><span class="p">,</span>
     1213                <span class="n">wg</span><span class="o">.</span><span class="n">GRID_VALUE_STRING</span><span class="p">]</span> <span class="o">+</span> <span class="n">Types</span>
     1214        <span class="k">elif</span> <span class="n">generalData</span><span class="p">[</span><span class="s">&#39;Type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;modulated&#39;</span><span class="p">:</span>
     1215            <span class="n">Types</span> <span class="o">+=</span> <span class="p">[]</span>
     1216            <span class="n">colLabels</span> <span class="o">+=</span> <span class="p">[]</span>
    12051217        <span class="n">SGData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;General&#39;</span><span class="p">][</span><span class="s">&#39;SGData&#39;</span><span class="p">]</span>
    12061218        <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">SetStatusText</span><span class="p">(</span><span class="s">&#39;&#39;</span><span class="p">)</span>
     
    12131225        <span class="n">Atoms</span><span class="o">.</span><span class="n">Bind</span><span class="p">(</span><span class="n">wg</span><span class="o">.</span><span class="n">EVT_GRID_LABEL_RIGHT_CLICK</span><span class="p">,</span> <span class="n">ChangeSelection</span><span class="p">)</span>
    12141226        <span class="n">Atoms</span><span class="o">.</span><span class="n">SetMargins</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span>
     1227        <span class="k">if</span> <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">PhaseUserSize</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
     1228            <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">setSizePosLeft</span><span class="p">([</span><span class="mi">700</span><span class="p">,</span><span class="mi">300</span><span class="p">])</span>
     1229        <span class="k">else</span><span class="p">:</span>
     1230            <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">Update</span><span class="p">()</span>
    12151231        <span class="n">Paint</span><span class="p">()</span>
    12161232
     
    43784394        <span class="n">event</span><span class="o">.</span><span class="n">Skip</span><span class="p">()</span>
    43794395
     4396    <span class="k">def</span> <span class="nf">OnDataResize</span><span class="p">(</span><span class="n">event</span><span class="p">):</span>
     4397        <span class="s">&#39;Called when the data item window is resized by the user.&#39;</span>
     4398        <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">PhaseUserSize</span> <span class="o">=</span> <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">GetSize</span><span class="p">()</span>
     4399        <span class="k">print</span> <span class="s">&#39;Resize to&#39;</span><span class="p">,</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">PhaseUserSize</span>
     4400        <span class="n">event</span><span class="o">.</span><span class="n">Skip</span><span class="p">()</span>
     4401
    43804402    <span class="k">def</span> <span class="nf">OnPageChanged</span><span class="p">(</span><span class="n">event</span><span class="p">):</span>
     4403        <span class="sd">&#39;&#39;&#39;This is called every time that a Notebook tab button is pressed</span>
     4404<span class="sd">        on a Phase data item window</span>
     4405<span class="sd">        &#39;&#39;&#39;</span>
     4406        <span class="n">wx</span><span class="o">.</span><span class="n">Frame</span><span class="o">.</span><span class="n">Unbind</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="p">,</span><span class="n">wx</span><span class="o">.</span><span class="n">EVT_SIZE</span><span class="p">)</span> <span class="c"># ignore size events during this routine</span>
    43814407        <span class="n">page</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">GetSelection</span><span class="p">()</span>
    43824408        <span class="n">text</span> <span class="o">=</span> <span class="n">G2frame</span><span class="o">.</span><span class="n">dataDisplay</span><span class="o">.</span><span class="n">GetPageText</span><span class="p">(</span><span class="n">page</span><span class="p">)</span>
     
    44764502        <span class="k">else</span><span class="p">:</span>
    44774503            <span class="n">G2gd</span><span class="o">.</span><span class="n">SetDataMenuBar</span><span class="p">(</span><span class="n">G2frame</span><span class="p">)</span>
     4504        <span class="n">wx</span><span class="o">.</span><span class="n">Frame</span><span class="o">.</span><span class="n">Bind</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="p">,</span><span class="n">wx</span><span class="o">.</span><span class="n">EVT_SIZE</span><span class="p">,</span><span class="n">OnDataResize</span><span class="p">)</span> <span class="c"># capture user resize events</span>
    44784505        <span class="n">event</span><span class="o">.</span><span class="n">Skip</span><span class="p">()</span>
    44794506       
     4507    <span class="n">wx</span><span class="o">.</span><span class="n">Frame</span><span class="o">.</span><span class="n">Unbind</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="p">,</span><span class="n">wx</span><span class="o">.</span><span class="n">EVT_SIZE</span><span class="p">)</span> <span class="c"># ignore size events during this routine</span>
    44804508    <span class="n">General</span> <span class="o">=</span> <span class="n">wx</span><span class="o">.</span><span class="n">Window</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataDisplay</span><span class="p">)</span>
     4509    <span class="c"># General = wx.ScrolledWindow(G2frame.dataDisplay) # would like to change to this</span>
    44814510    <span class="n">G2frame</span><span class="o">.</span><span class="n">dataDisplay</span><span class="o">.</span><span class="n">AddPage</span><span class="p">(</span><span class="n">General</span><span class="p">,</span><span class="s">&#39;General&#39;</span><span class="p">)</span>
    44824511    <span class="n">DData</span> <span class="o">=</span> <span class="n">wx</span><span class="o">.</span><span class="n">ScrolledWindow</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataDisplay</span><span class="p">)</span>
     
    45044533
    45054534    <span class="n">G2gd</span><span class="o">.</span><span class="n">SetDataMenuBar</span><span class="p">(</span><span class="n">G2frame</span><span class="p">,</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">DataGeneral</span><span class="p">)</span>
    4506     <span class="n">SetupGeneral</span><span class="p">()</span>
     4535    <span class="n">SetupGeneral</span><span class="p">()</span> <span class="c"># this is done all over the place (including in</span>
     4536    <span class="c"># UpdateGeneral). Why here too?</span>
     4537   
    45074538    <span class="n">GeneralData</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;General&#39;</span><span class="p">]</span>
    4508     <span class="k">if</span> <span class="n">oldPage</span><span class="p">:</span>
     4539   
     4540    <span class="k">if</span> <span class="n">oldPage</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
     4541        <span class="c"># when entering a Phase data item from any other item,</span>
     4542        <span class="c"># reset a saved size, if any.</span>
     4543        <span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="o">.</span><span class="n">PhaseUserSize</span> <span class="o">=</span> <span class="bp">None</span>
     4544        <span class="n">UpdateGeneral</span><span class="p">()</span>
     4545    <span class="k">elif</span> <span class="n">oldPage</span><span class="p">:</span>
    45094546        <span class="n">G2frame</span><span class="o">.</span><span class="n">dataDisplay</span><span class="o">.</span><span class="n">SetSelection</span><span class="p">(</span><span class="n">oldPage</span><span class="p">)</span>
    45104547    <span class="k">else</span><span class="p">:</span>
    45114548        <span class="n">UpdateGeneral</span><span class="p">()</span>
    4512    
    4513 </pre></div></div>
     4549    <span class="n">wx</span><span class="o">.</span><span class="n">Frame</span><span class="o">.</span><span class="n">Bind</span><span class="p">(</span><span class="n">G2frame</span><span class="o">.</span><span class="n">dataFrame</span><span class="p">,</span><span class="n">wx</span><span class="o">.</span><span class="n">EVT_SIZE</span><span class="p">,</span><span class="n">OnDataResize</span><span class="p">)</span> <span class="c"># capture user resizing</span></div>
     4550</pre></div>
    45144551
    45154552          </div>
  • trunk/sphinxdocs/build/html/_modules/index.html

    r907 r911  
    4949  <h1>All modules for which code is available</h1>
    5050<ul><li><a href="GSASII.html">GSASII</a></li>
     51<li><a href="GSASIIddataGUI.html">GSASIIddataGUI</a></li>
     52<li><a href="GSASIIgrid.html">GSASIIgrid</a></li>
    5153<li><a href="GSASIImapvars.html">GSASIImapvars</a></li>
    5254<li><a href="GSASIIphsGUI.html">GSASIIphsGUI</a></li>
  • trunk/sphinxdocs/build/html/genindex.html

    r907 r911  
    5353
    5454<div class="genindex-jumpbox">
    55  <a href="#C"><strong>C</strong></a>
     55 <a href="#A"><strong>A</strong></a>
     56 | <a href="#B"><strong>B</strong></a>
     57 | <a href="#C"><strong>C</strong></a>
    5658 | <a href="#D"><strong>D</strong></a>
    5759 | <a href="#E"><strong>E</strong></a>
    5860 | <a href="#F"><strong>F</strong></a>
    5961 | <a href="#G"><strong>G</strong></a>
     62 | <a href="#H"><strong>H</strong></a>
    6063 | <a href="#I"><strong>I</strong></a>
    6164 | <a href="#M"><strong>M</strong></a>
     
    6467 | <a href="#R"><strong>R</strong></a>
    6568 | <a href="#S"><strong>S</strong></a>
     69 | <a href="#T"><strong>T</strong></a>
    6670 | <a href="#U"><strong>U</strong></a>
    6771 | <a href="#V"><strong>V</strong></a>
    6872 
    6973</div>
     74<h2 id="A">A</h2>
     75<table style="width: 100%" class="indextable genindextable"><tr>
     76  <td style="width: 33%" valign="top"><dl>
     77     
     78  <dt><a href="GSASIIgrid.html#GSASIIgrid.AddHelp">AddHelp (class in GSASIIgrid)</a>
     79  </dt>
     80
     81  </dl></td>
     82</tr></table>
     83
     84<h2 id="B">B</h2>
     85<table style="width: 100%" class="indextable genindextable"><tr>
     86  <td style="width: 33%" valign="top"><dl>
     87     
     88  <dt><a href="GSASIIgrid.html#GSASIIgrid.DataFrame.Bind">Bind() (GSASIIgrid.DataFrame method)</a>
     89  </dt>
     90
     91  </dl></td>
     92</tr></table>
     93
    7094<h2 id="C">C</h2>
    7195<table style="width: 100%" class="indextable genindextable"><tr>
     
    92116  <td style="width: 33%" valign="top"><dl>
    93117     
     118  <dt><a href="GSASIIgrid.html#GSASIIgrid.DataFrame">DataFrame (class in GSASIIgrid)</a>
     119  </dt>
     120
     121     
    94122  <dt><a href="GSASIImapvars.html#GSASIImapvars.Dict2Deriv">Dict2Deriv() (in module GSASIImapvars)</a>
    95123  </dt>
     
    101129  </dt>
    102130
     131     
     132  <dt><a href="GSASIIgrid.html#GSASIIgrid.DisAglDialog">DisAglDialog (class in GSASIIgrid)</a>
     133  </dt>
     134
    103135  </dl></td>
    104136</tr></table>
     
    134166  <td style="width: 33%" valign="top"><dl>
    135167     
     168  <dt><a href="GSASIIgrid.html#GSASIIgrid.G2HtmlWindow">G2HtmlWindow (class in GSASIIgrid)</a>
     169  </dt>
     170
     171     
    136172  <dt><a href="GSASIImapvars.html#GSASIImapvars.GenerateConstraints">GenerateConstraints() (in module GSASIImapvars)</a>
    137173  </dt>
     
    154190
    155191     
     192  <dt><a href="GSASIIgrid.html#GSASIIgrid.GetPatternTreeDataNames">GetPatternTreeDataNames() (in module GSASIIgrid)</a>
     193  </dt>
     194
     195     
     196  <dt><a href="GSASIIgrid.html#GSASIIgrid.GetPatternTreeItemId">GetPatternTreeItemId() (in module GSASIIgrid)</a>
     197  </dt>
     198
     199     
    156200  <dt><a href="GSASII.html#GSASII.GSASII.GetPhaseData">GetPhaseData() (GSASII.GSASII method)</a>
    157201  </dt>
     
    171215     
    172216  <dt><a href="GSASIImapvars.html#GSASIImapvars.GramSchmidtOrtho">GramSchmidtOrtho() (in module GSASIImapvars)</a>
     217  </dt>
     218
     219     
     220  <dt><a href="GSASIIgrid.html#GSASIIgrid.GridFractionEditor">GridFractionEditor (class in GSASIIgrid)</a>
    173221  </dt>
    174222
     
    206254
    207255     
     256  <dt><a href="GSASIIddataGUI.html#module-GSASIIddataGUI">GSASIIddataGUI (module)</a>
     257  </dt>
     258
     259     
     260  <dt><a href="GSASIIgrid.html#module-GSASIIgrid">GSASIIgrid (module)</a>
     261  </dt>
     262
     263     
    208264  <dt><a href="GSASII.html#GSASII.GSASIImain">GSASIImain (class in GSASII)</a>
    209265  </dt>
     
    217273  </dt>
    218274
     275     
     276  <dt><a href="GSASIIgrid.html#GSASIIgrid.GSGrid">GSGrid (class in GSASIIgrid)</a>
     277  </dt>
     278
     279     
     280  <dt><a href="GSASIIgrid.html#GSASIIgrid.GSNoteBook">GSNoteBook (class in GSASIIgrid)</a>
     281  </dt>
     282
     283  </dl></td>
     284</tr></table>
     285
     286<h2 id="H">H</h2>
     287<table style="width: 100%" class="indextable genindextable"><tr>
     288  <td style="width: 33%" valign="top"><dl>
     289     
     290  <dt><a href="GSASIIgrid.html#GSASIIgrid.HorizontalLine">HorizontalLine() (in module GSASIIgrid)</a>
     291  </dt>
     292
    219293  </dl></td>
    220294</tr></table>
     
    237311  </dt>
    238312
    239   </dl></td>
    240   <td style="width: 33%" valign="top"><dl>
    241313     
    242314  <dt><a href="GSASIImapvars.html#GSASIImapvars.Map2Dict">Map2Dict() (in module GSASIImapvars)</a>
    243315  </dt>
    244316
     317     
     318  <dt><a href="GSASIIgrid.html#GSASIIgrid.MovePatternTreeToGrid">MovePatternTreeToGrid() (in module GSASIIgrid)</a>
     319  </dt>
     320
     321  </dl></td>
     322  <td style="width: 33%" valign="top"><dl>
     323     
     324  <dt><a href="GSASIIgrid.html#GSASIIgrid.MyHelp">MyHelp (class in GSASIIgrid)</a>
     325  </dt>
     326
     327     
     328  <dt><a href="GSASIIgrid.html#GSASIIgrid.MyHtmlPanel">MyHtmlPanel (class in GSASIIgrid)</a>
     329  </dt>
     330
    245331  </dl></td>
    246332</tr></table>
     
    254340
    255341     
     342  <dt><a href="GSASIIgrid.html#GSASIIgrid.MyHelp.OnCheckUpdates">OnCheckUpdates() (GSASIIgrid.MyHelp method)</a>
     343  </dt>
     344
     345     
    256346  <dt><a href="GSASII.html#GSASII.GSASII.OnDataDelete">OnDataDelete() (GSASII.GSASII method)</a>
    257347  </dt>
     
    282372
    283373     
     374  <dt><a href="GSASIIgrid.html#GSASIIgrid.MyHelp.OnHelpAbout">OnHelpAbout() (GSASIIgrid.MyHelp method)</a>
     375  </dt>
     376
     377     
     378  <dt><a href="GSASIIgrid.html#GSASIIgrid.AddHelp.OnHelpById">OnHelpById() (GSASIIgrid.AddHelp method)</a>
     379  </dt>
     380
     381      <dd><dl>
     382       
     383  <dt><a href="GSASIIgrid.html#GSASIIgrid.MyHelp.OnHelpById">(GSASIIgrid.MyHelp method)</a>
     384  </dt>
     385
     386      </dl></dd>
     387     
    284388  <dt><a href="GSASII.html#GSASII.GSASII.OnImageRead">OnImageRead() (GSASII.GSASII method)</a>
    285389  </dt>
     
    301405  </dt>
    302406
     407  </dl></td>
     408  <td style="width: 33%" valign="top"><dl>
    303409     
    304410  <dt><a href="GSASII.html#GSASII.GSASII.OnImportSfact">OnImportSfact() (GSASII.GSASII method)</a>
     
    309415  </dt>
    310416
    311   </dl></td>
    312   <td style="width: 33%" valign="top"><dl>
    313417     
    314418  <dt><a href="GSASII.html#GSASII.GSASII.OnMakePDFs">OnMakePDFs() (GSASII.GSASII method)</a>
     
    374478  <td style="width: 33%" valign="top"><dl>
    375479     
     480  <dt><a href="GSASIIgrid.html#GSASIIgrid.PickTwoDialog">PickTwoDialog (class in GSASIIgrid)</a>
     481  </dt>
     482
     483     
     484  <dt><a href="GSASIIgrid.html#GSASIIgrid.DataFrame.PostfillDataMenu">PostfillDataMenu() (GSASIIgrid.DataFrame method)</a>
     485  </dt>
     486
     487  </dl></td>
     488  <td style="width: 33%" valign="top"><dl>
     489     
     490  <dt><a href="GSASIIgrid.html#GSASIIgrid.DataFrame.PrefillDataMenu">PrefillDataMenu() (GSASIIgrid.DataFrame method)</a>
     491  </dt>
     492
     493     
    376494  <dt><a href="GSASIImapvars.html#GSASIImapvars.PrintIndependentVars">PrintIndependentVars() (in module GSASIImapvars)</a>
    377495  </dt>
     
    400518  <td style="width: 33%" valign="top"><dl>
    401519     
     520  <dt><a href="GSASIIgrid.html#GSASIIgrid.SetDataMenuBar">SetDataMenuBar() (in module GSASIIgrid)</a>
     521  </dt>
     522
     523     
     524  <dt><a href="GSASIIgrid.html#GSASIIgrid.ShowHelp">ShowHelp() (in module GSASIIgrid)</a>
     525  </dt>
     526
     527     
     528  <dt><a href="GSASIIgrid.html#GSASIIgrid.SingleFloatDialog">SingleFloatDialog (class in GSASIIgrid)</a>
     529  </dt>
     530
     531  </dl></td>
     532  <td style="width: 33%" valign="top"><dl>
     533     
    402534  <dt><a href="GSASIImapvars.html#GSASIImapvars.StoreEquivalence">StoreEquivalence() (in module GSASIImapvars)</a>
    403535  </dt>
    404536
     537     
     538  <dt><a href="GSASIIgrid.html#GSASIIgrid.SymOpDialog">SymOpDialog (class in GSASIIgrid)</a>
     539  </dt>
     540
     541  </dl></td>
     542</tr></table>
     543
     544<h2 id="T">T</h2>
     545<table style="width: 100%" class="indextable genindextable"><tr>
     546  <td style="width: 33%" valign="top"><dl>
     547     
     548  <dt><a href="GSASIIgrid.html#GSASIIgrid.Table">Table (class in GSASIIgrid)</a>
     549  </dt>
     550
    405551  </dl></td>
    406552</tr></table>
     
    410556  <td style="width: 33%" valign="top"><dl>
    411557     
     558  <dt><a href="GSASIIgrid.html#GSASIIgrid.UpdateControls">UpdateControls() (in module GSASIIgrid)</a>
     559  </dt>
     560
     561     
     562  <dt><a href="GSASIIddataGUI.html#GSASIIddataGUI.UpdateDData">UpdateDData() (in module GSASIIddataGUI)</a>
     563  </dt>
     564
     565     
     566  <dt><a href="GSASIIgrid.html#GSASIIgrid.UpdateHKLControls">UpdateHKLControls() (in module GSASIIgrid)</a>
     567  </dt>
     568
     569     
     570  <dt><a href="GSASIIgrid.html#GSASIIgrid.UpdateNotebook">UpdateNotebook() (in module GSASIIgrid)</a>
     571  </dt>
     572
     573  </dl></td>
     574  <td style="width: 33%" valign="top"><dl>
     575     
    412576  <dt><a href="GSASIIphsGUI.html#GSASIIphsGUI.UpdatePhaseData">UpdatePhaseData() (in module GSASIIphsGUI)</a>
     577  </dt>
     578
     579     
     580  <dt><a href="GSASIIgrid.html#GSASIIgrid.UpdatePWHKPlot">UpdatePWHKPlot() (in module GSASIIgrid)</a>
     581  </dt>
     582
     583     
     584  <dt><a href="GSASIIgrid.html#GSASIIgrid.UpdateSeqResults">UpdateSeqResults() (in module GSASIIgrid)</a>
    413585  </dt>
    414586
  • trunk/sphinxdocs/build/html/index.html

    r907 r911  
    6262</ul>
    6363</li>
     64<li class="toctree-l1"><a class="reference internal" href="GSASIIgrid.html"><em>GSASIIgrid: Basic GUI routines</em></a></li>
    6465<li class="toctree-l1"><a class="reference internal" href="GSASIIphsGUI.html"><em>GSASIIphsGUI: Phase GUI</em></a></li>
     66<li class="toctree-l1"><a class="reference internal" href="GSASIIddataGUI.html"><em>GSASIIddataGUI: Phase Diffraction Data GUI</em></a></li>
    6567</ul>
    6668</div>
  • trunk/sphinxdocs/build/html/py-modindex.html

    r907 r911  
    7373       <td></td>
    7474       <td>
     75       <a href="GSASIIddataGUI.html#module-GSASIIddataGUI"><tt class="xref">GSASIIddataGUI</tt></a></td><td>
     76       <em></em></td></tr>
     77     <tr>
     78       <td></td>
     79       <td>
     80       <a href="GSASIIgrid.html#module-GSASIIgrid"><tt class="xref">GSASIIgrid</tt></a></td><td>
     81       <em></em></td></tr>
     82     <tr>
     83       <td></td>
     84       <td>
    7585       <a href="GSASIImapvars.html#module-GSASIImapvars"><tt class="xref">GSASIImapvars</tt></a></td><td>
    7686       <em></em></td></tr>
  • trunk/sphinxdocs/build/html/searchindex.js

    r907 r911  
    1 Search.setIndex({objects:{"":{GSASIImapvars:[0,0,1,""],GSASII:[1,0,1,""],GSASIIphsGUI:[2,0,1,""]},GSASIIphsGUI:{UpdatePhaseData:[2,2,1,""]},GSASIImapvars:{ComputeDepESD:[0,2,1,""],GenerateConstraints:[0,2,1,""],GetIndependentVars:[0,2,1,""],Map2Dict:[0,2,1,""],CheckConstraints:[0,2,1,""],GetDependentVars:[0,2,1,""],Dict2Map:[0,2,1,""],GramSchmidtOrtho:[0,2,1,""],InitVars:[0,2,1,""],VarRemapShow:[0,2,1,""],Dict2Deriv:[0,2,1,""],StoreEquivalence:[0,2,1,""],PrintIndependentVars:[0,2,1,""],GroupConstraints:[0,2,1,""]},GSASII:{GSASIImain:[1,3,1,""],GSASII:[1,3,1,""],main:[1,2,1,""]},"GSASII.GSASIImain":{OnInit:[1,1,1,""]},"GSASII.GSASII":{OnImportPhase:[1,1,1,""],CopyDialog:[1,3,1,""],OnPatternTreeItemDelete:[1,1,1,""],OnImportPowder:[1,1,1,""],OnSize:[1,1,1,""],SumDialog:[1,3,1,""],OnPatternTreeItemCollapsed:[1,1,1,""],OnRefine:[1,1,1,""],OnRenameData:[1,1,1,""],OnFileClose:[1,1,1,""],CheckNotebook:[1,1,1,""],OnFileExit:[1,1,1,""],OnFileSaveas:[1,1,1,""],GetPhaseData:[1,1,1,""],OnPatternTreeItemExpanded:[1,1,1,""],ErrorDialog:[1,1,1,""],OnPwdrSum:[1,1,1,""],ViewParmDialog:[1,3,1,""],OnReadPowderPeaks:[1,1,1,""],OnImageSum:[1,1,1,""],FillMainMenu:[1,1,1,""],GetUsedHistogramsAndPhasesfromTree:[1,1,1,""],OnSeqRefine:[1,1,1,""],OnImportSfact:[1,1,1,""],OnMakePDFs:[1,1,1,""],OnPatternTreeKeyDown:[1,1,1,""],OnViewLSParms:[1,1,1,""],GetPWDRdatafromTree:[1,1,1,""],OnFileSave:[1,1,1,""],ReadPowderIparm:[1,1,1,""],OnImageRead:[1,1,1,""],GetPowderIparm:[1,1,1,""],OnFileOpen:[1,1,1,""],GetHKLFdatafromTree:[1,1,1,""],OnAddPhase:[1,1,1,""],GetFileList:[1,1,1,""],ExitMain:[1,1,1,""],ReadPowderInstprm:[1,1,1,""],OnImportGeneric:[1,1,1,""],ConstraintDialog:[1,3,1,""],OnDataDelete:[1,1,1,""],OnPatternTreeItemActivated:[1,1,1,""],OnDeletePhase:[1,1,1,""],OnPatternTreeSelChanged:[1,1,1,""]}},terms:{all:[0,1,2],skip:1,global:[0,3],subclass:1,unconstrain:0,implement:0,row:0,depend:0,elsewher:0,program:[3,1],swap:[],sourc:[0,1,2],everi:[0,1],string:[0,1],fals:[0,1],sumdialog:1,affect:0,map2dict:0,orthonorm:0,tri:1,relval:[],dependentparmlist:0,exitmain:1,gui:[3,2],diffract:1,list:[0,1],item:[0,1,2],vector:0,form:0,varylist:0,prevent:0,importstructfactor:1,second:0,onpatterntreeselchang:[1,2],click:2,compat:1,what:1,appear:[0,1],sum:1,abl:1,"while":0,checknotebook:1,current:1,delet:1,usebestvisu:1,"new":[0,1],databank:1,gsasiistruct:1,copydialog:1,pyopengl:3,deriv:0,printindependentvar:0,gener:[0,2],matplotlib:3,satisfi:0,constrant:0,path:1,valu:[0,1],gsasiiio:1,onpatterntreeitemactiv:1,convert:0,fillmainmenu:1,involv:0,chang:0,onviewlsparm:1,appli:0,app:1,linearli:0,onfileexit:1,filenam:1,dict2deriv:0,"1st":0,instal:3,select:[1,2],from:[0,1,2],describ:0,containt:0,two:[0,1],equivalenc:0,call:[0,1,2],more:[0,1],oldpag:2,relat:0,fixeddict:0,particular:1,known:1,parm2:0,parm1:0,must:0,none:[0,1],importphasereaderlist:1,can:[0,1],those:0,problemat:0,control:1,process:0,gethistogramnam:1,share:0,indic:0,getphasedata:1,tab:2,multipl:1,divid:0,rather:0,anoth:[0,2],pwdrname:1,collaps:1,remap:0,express:0,algebra:0,after:0,reflect:1,befor:0,mac:1,readerlist:1,mai:1,oninit:1,getindependentvar:0,hklf:[],man:2,attempt:1,menubar:1,ny1:0,correspond:0,element:[],caus:0,constraintdialog:1,tailor:1,allow:[0,1],onrefin:1,onmakepdf:1,move:2,mx2:0,becaus:[],mx1:0,held:0,previparm:1,varremapshow:0,still:1,vari:0,paramet:[0,1,2,3],formatconstraint:[],group:0,fix:0,getdependentvar:0,window:[1,2],onc:0,main:[3,1,2],them:0,independ:0,"return":[0,1],thei:0,python:3,initi:0,readpowderinstprm:1,onimageread:1,now:0,bank:1,diagon:[],term:0,name:[0,1],edit:1,paramprefix:0,separ:1,compris:0,each:[0,1],found:[3,1,2],updat:0,button:1,harm:0,wxapp:1,replac:[],checkconstraint:0,expect:1,slave:0,onpwdrsum:1,event:1,out:0,variabl:[0,3],matrix:[],onaddphas:1,open:1,newli:0,singular:0,content:[1,2],readpowderiparm:1,rel:0,reader:1,print:0,correct:1,matric:0,model:0,onsiz:1,given:1,onfilesavea:1,theori:1,dictionari:[0,1,2],constr:0,ask:1,org:0,could:1,turn:2,place:1,summari:0,assign:0,first:[0,2],origin:0,exchang:[],arrai:[0,1],constrdict:0,number:[0,1],unlik:0,done:0,messag:1,agre:1,miss:0,guess:1,onreadpowderpeak:1,data:[1,2],construct:[],pwdrdata:1,master:0,arrayin:0,gpx:1,conveni:[],"final":0,store:0,storeequival:0,option:[0,1],relationship:0,parm:1,copi:1,specifi:[0,1],part:0,rst:[],onrenamedata:1,than:0,provid:0,remov:0,tree:[1,2],zero:0,structur:1,redefinit:0,project:1,param2:0,param1:0,were:1,thu:0,comput:0,gsasiigrid:[1,2],importpowderreaderlist:1,ani:[0,1],packag:3,gramschmidtortho:0,have:0,close:1,need:1,mjk:0,bht:1,squar:0,equival:0,inform:[0,1,2],gsasii:[1,2],note:[0,1,3],also:[0,1],build:0,which:[0,1,2,3],hklfname:1,parmlist:0,singl:[0,1],sure:1,pfile:0,multipli:0,object:[1,2],phase:[3,1,2],"class":1,readerobject:1,simplif:0,clear:[0,1],later:0,request:[],doe:1,determin:0,derivdict:0,constrain:0,rowechelon:[],show:[0,1],text:1,filetyp:1,bring:2,swapcolumn:[],onfileopen:1,find:0,generateconstraint:0,redirect:1,onli:[0,1,2],onimportpowd:1,menu:1,activ:1,should:[0,1],gsasiimapvar:[0,3],dict:[0,1,2],fillarrai:[],errordialog:1,unus:1,likewis:0,indparmlist:0,cannot:0,requir:3,initvar:0,gram:0,contain:[0,1],where:[0,1],view:1,wiki:0,arr:[],set:[0,1,2],frame:[1,2],datatyp:1,see:0,powder:1,respons:1,importmenuid:1,sel:[],best:[],dependentlist:0,parent:1,correctli:[],printal:0,wikipedia:0,label:1,between:[0,1],"import":1,parmdict:[0,1],str:[0,1],kei:0,extens:1,onimportphas:1,len:[],deletedata:1,addit:0,both:0,sigdict:0,arraylist:0,equal:0,inconsist:0,equat:0,pdf:1,uncertainti:0,onfileclos:1,simpli:0,point:[],filldiagon:[],suppli:[0,1],clearsigint:1,assum:1,quit:1,gethklfdatafromtre:1,contraint:0,creat:[0,1,2],updatephasedata:2,numpi:3,invers:0,empti:[0,1],reldict:[],mult2:0,mult1:0,importsfactreaderlist:1,imag:1,togeth:1,func:[],input:[0,1],last:1,present:[0,1],"case":[0,2],schmidt:0,look:1,raw:1,ondeletephas:1,onpatterntreekeydown:1,defin:[0,1],calcul:1,abov:0,error:[0,1],getpwdrdatafromtre:1,getpowderiparm:1,mz2:0,dmdv:0,tabl:[0,1],non:0,echelon:[],scipi:3,ascii:0,sever:0,develop:3,minim:1,perform:1,make:1,same:[0,1,2],onseqrefin:1,complex:0,treeitemid:2,document:3,conflict:0,complet:0,http:0,setvaryflag:0,effect:0,user:1,refin:[0,1],extern:[0,3],viewparmdialog:1,movepatterntreetogrid:2,expand:1,getusedhistogramsandphasesfromtre:1,redefin:0,appropri:1,entri:0,wtype:1,well:[0,1],gsa:[0,1,2,3],thi:[0,1,2,3],fixedvarlist:0,onpatterntreeitemcollaps:1,latter:0,lastiparmfil:1,getfilelist:1,obtain:1,equivalanc:0,covmatrix:0,previous:0,instbank:1,mix:0,except:[],param:[],instrument:1,add:1,hklfdata:1,save:[0,1],modul:[0,1,2,3],match:1,take:0,applic:1,format:1,read:1,onpatterntreeitemexpand:1,associ:1,specif:1,either:[0,1],output:0,resiz:1,onfilesav:1,old:1,constr1:0,importphas:1,some:[0,2],back:[],self:1,intern:0,wxpython:3,sampl:1,computedepesd:0,scale:[0,1],instfil:1,though:[],definit:0,lastdatafil:1,onimportgener:1,esd:0,unit:0,three:0,refer:1,plu:3,run:0,independentvar:0,gsasiimain:1,onimportsfact:1,hst:0,invarraylist:0,"throw":[],obj:1,constraint:[0,1,3],column:[],freedom:0,degre:0,dialog:1,routin:[0,1,3],effici:0,"_init_import":1,"float":0,bound:1,automat:1,dataset:1,nkeep:0,been:0,rd_list:1,factor:1,onpatterntreeitemdelet:1,groupconstraint:0,onimagesum:1,constr2:0,wai:[],why:1,start:1,"var":0,"function":[],unexpect:0,tupl:0,histogram:1,renam:1,"true":1,consist:0,possibl:0,"default":[1,2],fixedlist:0,displai:[1,2],crystal:1,limit:1,problem:0,constant:0,evalu:[],"int":[1,2],exist:[0,1],file:1,check:0,fill:[],gsasiipwdgui:1,nx1:0,titl:1,sequenti:[0,1],when:[1,2],detail:0,nam:0,importpowderdata:1,other:[0,2],bool:1,varieti:[],gsasiiphsgui:[3,2],g2frame:2,my1:0,peak:1,reduc:0,collist:[],ondatadelet:1,ignor:0,potenti:1,dict2map:0},objtypes:{"0":"py:module","1":"py:method","2":"py:function","3":"py:class"},titles:["<em>GSASIImapvars: Parameter constraints</em>","<em>GSAS-II Main Module</em>","<em>GSASIIphsGUI: Phase GUI</em>","GSAS-II Developer&#8217;s Documentation"],objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","function","Python function"],"3":["py","class","Python class"]},filenames:["GSASIImapvars","GSASII","GSASIIphsGUI","index"]})
     1Search.setIndex({objects:{"":{GSASIImapvars:[3,0,1,""],GSASII:[4,0,1,""],GSASIIphsGUI:[1,0,1,""],GSASIIgrid:[2,0,1,""],GSASIIddataGUI:[5,0,1,""]},GSASIIphsGUI:{UpdatePhaseData:[1,1,1,""]},GSASIIgrid:{AddHelp:[2,3,1,""],UpdatePWHKPlot:[2,1,1,""],MyHelp:[2,3,1,""],DataFrame:[2,3,1,""],GetPatternTreeItemId:[2,1,1,""],GridFractionEditor:[2,3,1,""],GetPatternTreeDataNames:[2,1,1,""],HorizontalLine:[2,1,1,""],UpdateSeqResults:[2,1,1,""],GSNoteBook:[2,3,1,""],GSGrid:[2,3,1,""],UpdateNotebook:[2,1,1,""],UpdateHKLControls:[2,1,1,""],MovePatternTreeToGrid:[2,1,1,""],ShowHelp:[2,1,1,""],PickTwoDialog:[2,3,1,""],DisAglDialog:[2,3,1,""],MyHtmlPanel:[2,3,1,""],G2HtmlWindow:[2,3,1,""],SingleFloatDialog:[2,3,1,""],SymOpDialog:[2,3,1,""],SetDataMenuBar:[2,1,1,""],UpdateControls:[2,1,1,""],Table:[2,3,1,""]},GSASIImapvars:{ComputeDepESD:[3,1,1,""],GenerateConstraints:[3,1,1,""],GetIndependentVars:[3,1,1,""],GroupConstraints:[3,1,1,""],CheckConstraints:[3,1,1,""],GetDependentVars:[3,1,1,""],GramSchmidtOrtho:[3,1,1,""],InitVars:[3,1,1,""],StoreEquivalence:[3,1,1,""],Dict2Map:[3,1,1,""],VarRemapShow:[3,1,1,""],PrintIndependentVars:[3,1,1,""],Map2Dict:[3,1,1,""],Dict2Deriv:[3,1,1,""]},GSASII:{GSASIImain:[4,3,1,""],GSASII:[4,3,1,""],main:[4,1,1,""]},"GSASII.GSASIImain":{OnInit:[4,2,1,""]},GSASIIddataGUI:{UpdateDData:[5,1,1,""]},"GSASIIgrid.MyHelp":{OnHelpById:[2,2,1,""],OnHelpAbout:[2,2,1,""],OnCheckUpdates:[2,2,1,""]},"GSASIIgrid.DataFrame":{PostfillDataMenu:[2,2,1,""],Bind:[2,2,1,""],PrefillDataMenu:[2,2,1,""]},"GSASIIgrid.AddHelp":{OnHelpById:[2,2,1,""]},"GSASII.GSASII":{OnImportPhase:[4,2,1,""],CopyDialog:[4,3,1,""],OnPatternTreeItemDelete:[4,2,1,""],OnImportPowder:[4,2,1,""],OnSize:[4,2,1,""],SumDialog:[4,3,1,""],OnPatternTreeItemCollapsed:[4,2,1,""],OnRefine:[4,2,1,""],OnFileClose:[4,2,1,""],CheckNotebook:[4,2,1,""],OnFileExit:[4,2,1,""],GetPhaseData:[4,2,1,""],OnImageRead:[4,2,1,""],OnPatternTreeItemExpanded:[4,2,1,""],OnRenameData:[4,2,1,""],OnPwdrSum:[4,2,1,""],ViewParmDialog:[4,3,1,""],OnReadPowderPeaks:[4,2,1,""],GetPWDRdatafromTree:[4,2,1,""],OnImageSum:[4,2,1,""],FillMainMenu:[4,2,1,""],GetUsedHistogramsAndPhasesfromTree:[4,2,1,""],OnSeqRefine:[4,2,1,""],OnImportSfact:[4,2,1,""],OnMakePDFs:[4,2,1,""],OnPatternTreeKeyDown:[4,2,1,""],OnViewLSParms:[4,2,1,""],OnFileSaveas:[4,2,1,""],OnFileSave:[4,2,1,""],ReadPowderIparm:[4,2,1,""],ErrorDialog:[4,2,1,""],GetPowderIparm:[4,2,1,""],OnFileOpen:[4,2,1,""],GetHKLFdatafromTree:[4,2,1,""],OnAddPhase:[4,2,1,""],GetFileList:[4,2,1,""],ExitMain:[4,2,1,""],ReadPowderInstprm:[4,2,1,""],OnImportGeneric:[4,2,1,""],ConstraintDialog:[4,3,1,""],OnDataDelete:[4,2,1,""],OnPatternTreeItemActivated:[4,2,1,""],OnDeletePhase:[4,2,1,""],OnPatternTreeSelChanged:[4,2,1,""]}},terms:{all:[3,4,1,2,5],skip:4,global:[0,3],rowlabel:2,subclass:4,unconstrain:3,follow:2,forceunit:2,acosd:[],row:3,depend:3,helplbl:2,aui:2,elsewher:3,program:[0,4],swap:[],showhelp:2,sourc:[3,4,1,2,5],everi:[3,4],string:[3,4],fals:[3,4,2],sumdialog:4,veri:2,affect:3,map2dict:3,orthonorm:3,tri:4,relval:[],dependentparmlist:3,exitmain:4,gui:[0,1,2,5],diffract:[0,4,5],list:[3,4,2],item:[3,4,1,2,5],vector:3,form:3,cosin:2,varylist:[3,2],prevent:3,importstructfactor:4,second:3,onpatterntreeselchang:[4,1],click:1,append:2,compat:4,what:[4,2],appear:[3,4],sum:4,abl:4,"while":3,checknotebook:4,cell:2,delet:4,usebestvisu:4,"new":[3,4,2],databank:4,gsasiistruct:4,thin:2,copydialog:4,pyopengl:0,deriv:3,printindependentvar:3,gener:[3,1],matplotlib:0,satisfi:3,constrant:3,path:4,sine:2,valu:[3,4,1,2,5],gsasiiio:4,onpatterntreeitemactiv:4,convert:3,fillmainmenu:4,onpwdrsum:4,getpatterntreedatanam:2,shift:2,action:1,chang:3,onviewlsparm:4,overrid:2,repositori:2,extra:2,appli:[3,2],app:[4,2],linearli:3,onfileexit:4,ask:4,dict2deriv:3,"1st":3,instal:0,select:[4,1,2,5],from:[3,4,1,2],describ:3,containt:3,two:[3,4,2],equivalenc:3,call:[3,4,1,2],type:2,more:[3,4],main:[0,4,1,2,5],updatehklcontrol:2,relat:3,fixeddict:3,particular:4,known:4,parm2:3,parm1:3,must:[3,2],none:[3,4,1,2],work:2,importphasereaderlist:4,can:[3,4,2],those:3,problemat:3,control:[4,2],prompt:2,process:[3,2],gethistogramnam:4,share:3,indic:3,getphasedata:4,tab:1,multipl:4,divid:3,rather:[3,2],anoth:[3,1],pwdrname:4,sig:2,instead:2,collaps:4,remap:3,express:3,algebra:3,myhelp:2,after:[3,2],reflect:4,befor:3,mac:[4,2],readerlist:4,mai:4,oninit:4,getindependentvar:3,hklf:[],diagon:[],man:1,attempt:4,menubar:4,bind:2,ny1:3,correspond:3,element:[],caus:3,constraintdialog:4,tailor:4,allow:[3,4,2],onrefin:4,order:2,itemtext:2,help:2,onmakepdf:4,over:2,move:[1,2],mx2:3,becaus:[],mx1:3,held:3,previparm:4,varremapshow:3,still:4,vari:3,paramet:[0,1,2,3,4,5],formatconstraint:[],style:2,group:3,fix:3,getdependentvar:3,getpatterntreeitemid:2,platform:2,window:[4,1,2,5],gsasiiddata:1,onc:3,gridfractioneditor:2,oncheckupd:2,them:3,independ:3,"return":[3,4],thei:3,python:0,overal:2,newatomdict:2,initi:3,readpowderinstprm:4,onimageread:4,now:3,bank:4,choic:2,term:3,singlefloatdialog:2,name:[3,4,2],edit:[4,2],close:4,paramprefix:3,separ:[4,2],compris:3,importpowderreaderlist:4,g2htmlwindow:2,found:[0,4],updat:[3,2],button:4,harm:3,wxapp:4,updateseqresult:2,replac:[],checkconstraint:3,each:[3,4,5],expect:4,slave:3,happen:2,gsnotebook:2,event:[4,2],out:3,variabl:[0,2,3],shown:5,matrix:2,onaddphas:4,open:[4,2],newli:3,singular:3,content:[4,1,2],readpowderiparm:4,rel:3,reader:4,print:3,correct:4,matric:3,model:3,onsiz:4,given:4,standard:2,onfilesavea:4,theori:4,dictionari:[3,4,1,2,5],constr:3,put:2,org:3,angl:2,could:4,turn:1,notebook:[2,5],place:4,summari:3,assign:3,first:[3,1],oper:2,exchang:[],arrai:[3,4],constrdict:3,number:[3,4],unlik:3,done:[3,1,2],messag:4,symmetri:2,blank:2,agre:4,miss:3,size:2,guess:4,helptyp:2,onreadpowderpeak:4,data:[0,4,1,2,5],top:2,system:2,construct:[],pwdrdata:4,master:3,arrayin:3,gpx:4,conveni:[],"final":3,store:3,storeequival:3,option:[3,4],relationship:3,parm:4,copi:4,specifi:[3,4],part:[3,2],rst:[],onrenamedata:4,than:3,wide:2,kind:2,provid:3,remov:3,tree:[4,1,2],zero:3,structur:4,redefinit:3,project:4,matter:2,param2:3,param1:3,were:4,thu:3,browser:2,comput:3,gsasiigrid:[0,4,1,2],ddata:5,arg:2,ani:[3,4,2],histnam:2,raw:4,gramschmidtortho:3,have:[3,2],tabl:[3,4,2],need:4,seem:2,mjk:3,bht:4,squar:3,equival:3,inform:[3,4,1,2,5],gsasii:[4,1,2],note:[0,4,2,3],also:[3,4],take:3,which:[0,4,1,2,3],hklfname:4,parmlist:3,noth:2,singl:[3,4,2],sure:[4,2],pfile:3,multipli:3,object:[4,1,5],phase:[0,4,1,5],"class":[4,2],readerobject:4,simplif:3,clear:[3,4],later:3,request:2,doe:[4,2],determin:3,derivdict:3,constrain:3,rowechelon:[],datafram:2,show:[3,4,2],text:[4,2],filetyp:4,bring:[1,2],swapcolumn:[],onfileopen:4,find:3,generateconstraint:3,newcelldict:2,involv:3,current:[4,2],onli:[3,4,1,2],locat:2,onimportpowd:4,menu:[4,2],activ:4,setdatamenubar:2,should:[3,4,2],gsasiimapvar:[0,3],dict:[3,4,1,2,5],fillarrai:[],errordialog:4,unus:4,variou:2,get:2,likewis:3,indparmlist:3,cannot:3,requir:0,initvar:3,disagldialog:2,gram:3,contain:[3,4,2],where:[3,4,2,5],view:4,wiki:3,arr:[],set:[3,4,1,2],frame:[4,1,2,5],morehelpitem:2,prefilldatamenu:2,datatyp:[4,2],see:3,powder:4,respons:[4,1],importmenuid:4,sel:[],ondatadelet:4,dependentlist:3,kei:3,correctli:2,redirect:4,sgdata:2,printal:3,wikipedia:3,label:4,between:[3,4],"import":4,parmdict:[3,4],str:[3,4],parent:[4,2],extens:[4,2],onimportphas:4,here:2,deletedata:4,addit:3,both:3,sigdict:3,arraylist:3,equal:3,len:[],inconsist:3,equat:3,pdf:4,uncertainti:3,onfileclos:4,schmidt:3,symopdialog:2,simpli:3,point:[],filldiagon:[],suppli:[3,4],respect:2,clearsigint:4,assum:4,duplic:2,quit:4,gethklfdatafromtre:4,contraint:3,creat:[3,4,1,2,5],gsgrid:2,updatephasedata:1,numpi:0,invers:3,empti:[3,4,2],reldict:[],basic:[0,2],mult2:3,mult1:3,box:2,importsfactreaderlist:4,onseqrefin:4,imag:4,togeth:4,func:[],input:[3,4],last:4,present:[3,4],"case":[3,1],ident:2,look:4,packag:0,ondeletephas:4,onpatterntreekeydown:4,defin:[3,4,2],calcul:4,abov:[3,2],error:[3,4],horizontallin:2,getpwdrdatafromtre:4,getpowderiparm:4,mz2:3,dmdv:3,best:[],access:2,oldpag:1,non:3,echelon:[],origin:3,kwarg:2,ascii:3,sever:3,result:2,horizont:2,develop:0,minim:4,perform:[4,2],make:4,same:[3,4,1,2],handl:2,scrolledwindow:5,complex:3,treeitemid:1,document:[0,2],conflict:3,complet:3,http:3,setvaryflag:3,effect:3,covari:2,user:[4,2],refin:[3,4,2],extern:[0,3],viewparmdialog:4,movepatterntreetogrid:[1,2],expand:4,getusedhistogramsandphasesfromtre:4,redefin:3,appropri:4,picktwodialog:2,entri:[3,2],wtype:4,well:[3,4,2],gsa:[0,1,2,3,4,5],command:2,thi:[0,4,1,2,3],fixedvarlist:3,onpatterntreeitemcollaps:4,latter:3,distanc:2,lastiparmfil:4,addhelp:2,getfilelist:4,obtain:[4,2],equivalanc:3,covmatrix:[3,2],previous:3,web:2,instbank:4,mix:3,except:[],param:[],instrument:4,add:[4,2],onhelpabout:2,primit:2,hklfdata:4,save:[3,4],modul:[0,1,2,3,4,5],match:4,build:3,applic:4,format:[4,2],read:4,onpatterntreeitemexpand:4,grid:2,press:2,associ:[4,5],updatecontrol:2,onhelpbyid:2,sizer:2,specif:4,filenam:4,html:2,either:[3,4],output:3,resiz:4,page:[1,2,5],onfilesav:4,old:4,constr1:3,importphas:4,linux:2,some:[3,1],back:[],self:[4,2],intern:3,wxpython:0,sampl:4,updateddata:5,computedepesd:3,scale:[3,4],implement:[3,2],instfil:4,though:[],definit:3,lastdatafil:4,updatepwhkplot:2,onimportgener:4,esd:[3,2],unit:3,three:3,refer:[4,2],plu:0,previou:1,run:3,independentvar:3,gsasiimain:4,onimportsfact:4,hst:3,parentid:2,invarraylist:3,"throw":[],panel:2,about:2,obj:4,constraint:[0,4,3],column:[],freedom:3,degre:3,dialog:[4,2],updatenotebook:2,postfilldatamenu:2,routin:[0,4,2,3],effici:3,"_init_import":4,"float":[3,2],bound:4,automat:4,dataset:4,nkeep:3,been:3,rd_list:4,factor:4,onpatterntreeitemdelet:4,groupconstraint:3,onimagesum:4,constr2:3,wai:[],why:4,start:[4,2],appl:2,editor:2,fraction:2,"var":3,individu:2,"function":2,properli:2,unexpect:3,tupl:3,histogram:[4,2,5],atom:2,renam:4,line:2,"true":[4,2],leastsq:2,consist:[3,2],possibl:3,"default":[4,1,2],fixedlist:3,displai:[4,1,2,5],gsasiiddatagui:[0,5],crystal:4,scipi:0,limit:[4,2],problem:3,constant:3,evalu:[],"int":[4,1],exist:[3,4],file:[4,2],check:[3,2],fill:[],gsasiipwdgui:4,nx1:3,collabel:2,titl:[4,2],sequenti:[3,4,2],when:[4,1,2,5],detail:3,nam:3,importpowderdata:4,other:[3,1,2],bool:4,varieti:[],draw:2,gsasiiphsgui:[0,1],g2frame:[1,2,5],my1:3,sequenc:2,peak:4,reduc:3,collist:[],myhtmlpanel:2,ignor:3,potenti:4,dict2map:3},objtypes:{"0":"py:module","1":"py:function","2":"py:method","3":"py:class"},titles:["GSAS-II Developer&#8217;s Documentation","<em>GSASIIphsGUI: Phase GUI</em>","<em>GSASIIgrid: Basic GUI routines</em>","<em>GSASIImapvars: Parameter constraints</em>","<em>GSAS-II Main Module</em>","<em>GSASIIddataGUI: Phase Diffraction Data GUI</em>"],objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","method","Python method"],"3":["py","class","Python class"]},filenames:["index","GSASIIphsGUI","GSASIIgrid","GSASIImapvars","GSASII","GSASIIddataGUI"]})
  • trunk/sphinxdocs/source/index.rst

    r907 r911  
    1010  GSASII.rst
    1111  GSASIImapvars.rst
    12 
     12  GSASIIgrid.rst
    1313  GSASIIphsGUI.rst
     14  GSASIIddataGUI.rst
    1415
    1516
Note: See TracChangeset for help on using the changeset viewer.