source: sphinxdocs/build/html/GSASIIobj.html @ 1998

Last change on this file since 1998 was 1998, checked in by toby, 7 years ago

rebuild docs

  • Property svn:mime-type set to text/html
File size: 110.5 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4
5<html xmlns="http://www.w3.org/1999/xhtml">
6  <head>
7    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8   
9    <title>GSASIIobj: Data objects &mdash; GSAS-II 0.2.0 documentation</title>
10   
11    <link rel="stylesheet" href="_static/default.css" type="text/css" />
12    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13   
14    <script type="text/javascript">
15      var DOCUMENTATION_OPTIONS = {
16        URL_ROOT:    './',
17        VERSION:     '0.2.0',
18        COLLAPSE_INDEX: false,
19        FILE_SUFFIX: '.html',
20        HAS_SOURCE:  true
21      };
22    </script>
23    <script type="text/javascript" src="_static/jquery.js"></script>
24    <script type="text/javascript" src="_static/underscore.js"></script>
25    <script type="text/javascript" src="_static/doctools.js"></script>
26    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
27    <link rel="top" title="GSAS-II 0.2.0 documentation" href="index.html" />
28    <link rel="next" title="GSAS-II Utility Modules" href="GSASIIutil.html" />
29    <link rel="prev" title="GSAS-II Main Module" href="GSASII.html" /> 
30  </head>
31  <body>
32    <div class="related">
33      <h3>Navigation</h3>
34      <ul>
35        <li class="right" style="margin-right: 10px">
36          <a href="genindex.html" title="General Index"
37             accesskey="I">index</a></li>
38        <li class="right" >
39          <a href="py-modindex.html" title="Python Module Index"
40             >modules</a> |</li>
41        <li class="right" >
42          <a href="GSASIIutil.html" title="GSAS-II Utility Modules"
43             accesskey="N">next</a> |</li>
44        <li class="right" >
45          <a href="GSASII.html" title="GSAS-II Main Module"
46             accesskey="P">previous</a> |</li>
47        <li><a href="index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li> 
48      </ul>
49    </div> 
50
51    <div class="document">
52      <div class="documentwrapper">
53        <div class="bodywrapper">
54          <div class="body">
55           
56  <span class="target" id="module-GSASIIobj"></span><div class="section" id="gsasiiobj-data-objects">
57<h1><em>GSASIIobj: Data objects</em><a class="headerlink" href="#gsasiiobj-data-objects" title="Permalink to this headline">¶</a></h1>
58<p>This module defines and/or documents the data structures used in GSAS-II, as well
59as provides misc. support routines.</p>
60<div class="section" id="constraints-tree-item">
61<h2>Constraints Tree Item<a class="headerlink" href="#constraints-tree-item" title="Permalink to this headline">¶</a></h2>
62<span class="target" id="constraints-table"></span><p id="index-0">Constraints are stored in a dict, separated into groups.
63Note that parameter are named in the following pattern,
64p:h:&lt;var&gt;:n, where p is the phase number, h is the histogram number
65&lt;var&gt; is a variable name and n is the parameter number.
66If a parameter does not depend on a histogram or phase or is unnumbered, that
67number is omitted.
68Note that the contents of each dict item is a List where each element in the
69list is a <a class="reference internal" href="#constraint-definitions-table"><em>constraint definition objects</em></a>.
70The constraints in this form are converted in
71<a class="reference internal" href="GSASIIstruc.html#GSASIIstrIO.ProcessConstraints" title="GSASIIstrIO.ProcessConstraints"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIstrIO.ProcessConstraints()</span></tt></a> to the form used in <a class="reference internal" href="GSASIImapvars.html#module-GSASIImapvars" title="GSASIImapvars"><tt class="xref py py-mod docutils literal"><span class="pre">GSASIImapvars</span></tt></a></p>
72<p>The keys in the Constraints dict are:</p>
73<table border="1" class="docutils">
74<colgroup>
75<col width="16%" />
76<col width="84%" />
77</colgroup>
78<thead valign="bottom">
79<tr class="row-odd"><th class="head">key</th>
80<th class="head">explanation</th>
81</tr>
82</thead>
83<tbody valign="top">
84<tr class="row-even"><td>Hist</td>
85<td>This specifies a list of constraints on
86histogram-related parameters,
87which will be of form :h:&lt;var&gt;:n.</td>
88</tr>
89<tr class="row-odd"><td>HAP</td>
90<td>This specifies a list of constraints on parameters
91that are defined for every histogram in each phase
92and are of form p:h:&lt;var&gt;:n.</td>
93</tr>
94<tr class="row-even"><td>Phase</td>
95<td>This specifies a list of constraints on phase
96parameters,
97which will be of form p::&lt;var&gt;:n.</td>
98</tr>
99<tr class="row-odd"><td>Global</td>
100<td>This specifies a list of constraints on parameters
101that are not tied to a histogram or phase and
102are of form ::&lt;var&gt;:n</td>
103</tr>
104</tbody>
105</table>
106<span class="target" id="constraint-definitions-table"></span><p id="index-1">Each constraint is defined as an item in a list. Each constraint is of form:</p>
107<div class="highlight-python"><div class="highlight"><pre>[[&lt;mult1&gt;, &lt;var1&gt;], [&lt;mult2&gt;, &lt;var2&gt;],..., &lt;fixedval&gt;, &lt;varyflag&gt;, &lt;constype&gt;]
108</pre></div>
109</div>
110<p>Where the variable pair list item containing two values [&lt;mult&gt;, &lt;var&gt;], where:</p>
111<blockquote>
112<div><ul>
113<li><p class="first">&lt;mult&gt; is a multiplier for the constraint (float)</p>
114</li>
115<li><dl class="first docutils">
116<dt>&lt;var&gt; a <a class="reference internal" href="#GSASIIobj.G2VarObj" title="GSASIIobj.G2VarObj"><tt class="xref py py-class docutils literal"><span class="pre">G2VarObj</span></tt></a> object (previously a str variable name of form</dt>
117<dd><p class="first last">&#8216;p:h:name[:at]&#8217;)</p>
118</dd>
119</dl>
120</li>
121</ul>
122</div></blockquote>
123<p>Note that the last three items in the list play a special role:</p>
124<blockquote>
125<div><ul>
126<li><p class="first">&lt;fixedval&gt; is the fixed value for a <cite>constant equation</cite> (<tt class="docutils literal"><span class="pre">constype=c</span></tt>)
127constraint or is None. For a <cite>New variable</cite> (<tt class="docutils literal"><span class="pre">constype=f</span></tt>) constraint,
128a variable name can be specified as a str (used for externally
129generated constraints)</p>
130</li>
131<li><p class="first">&lt;varyflag&gt; is True or False for <cite>New variable</cite> (<tt class="docutils literal"><span class="pre">constype=f</span></tt>) constraints
132or is None. This will be implemented in the future to indicate if these variables
133should be refined.</p>
134</li>
135<li><p class="first">&lt;constype&gt; is one of four letters, &#8216;e&#8217;, &#8216;c&#8217;, &#8216;h&#8217;, &#8216;f&#8217; that determines the type of constraint:</p>
136<blockquote>
137<div><ul class="simple">
138<li>&#8216;e&#8217; defines a set of equivalent variables. Only the first variable is refined (if the
139appropriate refine flag is set) and and all other equivalent variables in the list
140are generated from that variable, using the appropriate multipliers.</li>
141<li>&#8216;c&#8217; defines a constraint equation of form,
142<span class="math">\(m_1 \times var_1 + m_2 \times var_2 + ... = c\)</span></li>
143<li>&#8216;h&#8217; defines a variable to hold (not vary). Any variable on this list is not varied,
144even if its refinement flag is set. Only one [mult,var] pair is allowed in a hold
145constraint and the mult value is ignored.
146This is of particular value when needing to hold one or more variables where a
147single flag controls a set of variables such as, coordinates,
148the reciprocal metric tensor or anisotropic displacement parameter.</li>
149<li>&#8216;f&#8217; defines a new variable (function) according to relationship
150<span class="math">\(newvar = m_1 \times var_1 + m_2 \times var_2 + ...\)</span></li>
151</ul>
152</div></blockquote>
153</li>
154</ul>
155</div></blockquote>
156</div>
157<div class="section" id="covariance-tree-item">
158<h2>Covariance Tree Item<a class="headerlink" href="#covariance-tree-item" title="Permalink to this headline">¶</a></h2>
159<span class="target" id="covariance-table"></span><p id="index-2">The Covariance tree item has results from the last least-squares run. They
160are stored in a dict with these keys:</p>
161<table border="1" class="docutils">
162<colgroup>
163<col width="16%" />
164<col width="19%" />
165<col width="65%" />
166</colgroup>
167<thead valign="bottom">
168<tr class="row-odd"><th class="head">key</th>
169<th class="head">sub-key</th>
170<th class="head">explanation</th>
171</tr>
172</thead>
173<tbody valign="top">
174<tr class="row-even"><td>newCellDict</td>
175<td></td>
176<td>dict with lattice parameters computed by
177<a class="reference internal" href="GSASIIstruc.html#GSASIIstrMath.GetNewCellParms" title="GSASIIstrMath.GetNewCellParms"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIstrMath.GetNewCellParms()</span></tt></a> (dict)</td>
178</tr>
179<tr class="row-odd"><td>title</td>
180<td></td>
181<td>Name of gpx file(?) (str)</td>
182</tr>
183<tr class="row-even"><td>variables</td>
184<td></td>
185<td>Values for all N refined variables
186(list of float values, length N,
187ordered to match varyList)</td>
188</tr>
189<tr class="row-odd"><td>sig</td>
190<td></td>
191<td>Uncertainty values for all N refined variables
192(list of float values, length N,
193ordered to match varyList)</td>
194</tr>
195<tr class="row-even"><td>varyList</td>
196<td></td>
197<td>List of directly refined variables
198(list of str values, length N)</td>
199</tr>
200<tr class="row-odd"><td>newAtomDict</td>
201<td></td>
202<td>dict with atom position values computed in
203<a class="reference internal" href="GSASIIstruc.html#GSASIIstrMath.ApplyXYZshifts" title="GSASIIstrMath.ApplyXYZshifts"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIstrMath.ApplyXYZshifts()</span></tt></a> (dict)</td>
204</tr>
205<tr class="row-even"><td>Rvals</td>
206<td></td>
207<td>R-factors, GOF, Marquardt value for last
208refinement cycle (dict)</td>
209</tr>
210<tr class="row-odd"><td></td>
211<td>Nobs</td>
212<td>Number of observed data points (int)</td>
213</tr>
214<tr class="row-even"><td></td>
215<td>Rwp</td>
216<td>overall weighted profile R-factor (%, float)</td>
217</tr>
218<tr class="row-odd"><td></td>
219<td>chisq</td>
220<td>sum[w*(Iobs-Icalc)**2] for all data
221note this is not the reduced chi squared (float)</td>
222</tr>
223<tr class="row-even"><td></td>
224<td>lamMax</td>
225<td>Marquardt value applied to Hessian diagonal
226(float)</td>
227</tr>
228<tr class="row-odd"><td></td>
229<td>GOF</td>
230<td>The goodness-of-fit, aka square root of
231the reduced chi squared. (float)</td>
232</tr>
233<tr class="row-even"><td>covMatrix</td>
234<td></td>
235<td>The (NxN) covVariance matrix (np.array)</td>
236</tr>
237</tbody>
238</table>
239</div>
240<div class="section" id="phase-tree-items">
241<h2>Phase Tree Items<a class="headerlink" href="#phase-tree-items" title="Permalink to this headline">¶</a></h2>
242<span class="target" id="phase-table"></span><p id="index-3">Phase information is stored in the GSAS-II data tree as children of the
243Phases item in a dict with keys:</p>
244<table border="1" class="docutils">
245<colgroup>
246<col width="10%" />
247<col width="15%" />
248<col width="75%" />
249</colgroup>
250<thead valign="bottom">
251<tr class="row-odd"><th class="head">key</th>
252<th class="head">sub-key</th>
253<th class="head">explanation</th>
254</tr>
255</thead>
256<tbody valign="top">
257<tr class="row-even"><td>General</td>
258<td></td>
259<td>Overall information for the phase (dict)</td>
260</tr>
261<tr class="row-odd"><td></td>
262<td>AtomPtrs</td>
263<td>list of four locations to use to pull info
264from the atom records (list)</td>
265</tr>
266<tr class="row-even"><td></td>
267<td>F000X</td>
268<td>x-ray F(000) intensity (float)</td>
269</tr>
270<tr class="row-odd"><td></td>
271<td>F000N</td>
272<td>neutron F(000) intensity (float)</td>
273</tr>
274<tr class="row-even"><td></td>
275<td>Mydir</td>
276<td>directory of current .gpx file (str)</td>
277</tr>
278<tr class="row-odd"><td></td>
279<td>MCSA controls</td>
280<td>Monte Carlo-Simulated Annealing controls (dict)</td>
281</tr>
282<tr class="row-even"><td></td>
283<td>Cell</td>
284<td>List with 8 items: cell refinement flag (bool)
285a, b, c, (Angstrom, float)
286alpha, beta &amp; gamma (degrees, float)
287volume (A^3, float)</td>
288</tr>
289<tr class="row-odd"><td></td>
290<td>Type</td>
291<td>&#8216;nuclear&#8217; or &#8216;macromolecular&#8217; for now (str)</td>
292</tr>
293<tr class="row-even"><td></td>
294<td>Map</td>
295<td>dict of map parameters</td>
296</tr>
297<tr class="row-odd"><td></td>
298<td>SH Texture</td>
299<td>dict of spherical harmonic preferred orientation
300parameters</td>
301</tr>
302<tr class="row-even"><td></td>
303<td>Isotope</td>
304<td>dict of isotopes for each atom type</td>
305</tr>
306<tr class="row-odd"><td></td>
307<td>Isotopes</td>
308<td>dict of scattering lengths for each isotope
309combination for each element in phase</td>
310</tr>
311<tr class="row-even"><td></td>
312<td>Name</td>
313<td>phase name (str)</td>
314</tr>
315<tr class="row-odd"><td></td>
316<td>SGData</td>
317<td>Space group details as a <a class="reference internal" href="#sgdata-table"><em>space group (SGData) object</em></a>
318as defined in <a class="reference internal" href="GSASIIutil.html#GSASIIspc.SpcGroup" title="GSASIIspc.SpcGroup"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIspc.SpcGroup()</span></tt></a>.</td>
319</tr>
320<tr class="row-even"><td></td>
321<td>Pawley neg wt</td>
322<td>Restraint value for negative Pawley intensities
323(float)</td>
324</tr>
325<tr class="row-odd"><td></td>
326<td>Flip</td>
327<td>dict of Charge flip controls</td>
328</tr>
329<tr class="row-even"><td></td>
330<td>Data plot type</td>
331<td>data plot type (&#8216;Mustrain&#8217;, &#8216;Size&#8217; or
332&#8216;Preferred orientation&#8217;) for powder data (str)</td>
333</tr>
334<tr class="row-odd"><td></td>
335<td>Mass</td>
336<td>Mass of unit cell contents in g/mol</td>
337</tr>
338<tr class="row-even"><td></td>
339<td>POhkl</td>
340<td>March-Dollase preferred orientation direction</td>
341</tr>
342<tr class="row-odd"><td></td>
343<td>Z</td>
344<td>dict of atomic numbers for each atom type</td>
345</tr>
346<tr class="row-even"><td></td>
347<td>vdWRadii</td>
348<td>dict of van der Waals radii for each atom type</td>
349</tr>
350<tr class="row-odd"><td></td>
351<td>Color</td>
352<td>Colors for atoms (list of (r,b,g) triplets)</td>
353</tr>
354<tr class="row-even"><td></td>
355<td>AtomTypes</td>
356<td>List of atom types</td>
357</tr>
358<tr class="row-odd"><td></td>
359<td>AtomMass</td>
360<td>List of masses for atoms</td>
361</tr>
362<tr class="row-even"><td></td>
363<td>doPawley</td>
364<td>Flag for Pawley intensity extraction (bool)</td>
365</tr>
366<tr class="row-odd"><td></td>
367<td>NoAtoms</td>
368<td>Number of atoms per unit cell of each type (dict)</td>
369</tr>
370<tr class="row-even"><td></td>
371<td>Pawley dmin</td>
372<td>maximum Q (as d-space) to use for Pawley
373extraction (float)</td>
374</tr>
375<tr class="row-odd"><td></td>
376<td>BondRadii</td>
377<td>Default radius for each atom used to compute
378interatomic distances (list of floats)</td>
379</tr>
380<tr class="row-even"><td></td>
381<td>AngleRadii</td>
382<td>Default radius for each atom used to compute
383interatomic angles (list of floats)</td>
384</tr>
385<tr class="row-odd"><td></td>
386<td>DisAglCtls</td>
387<td>Dict with distance/angle search controls,
388which has keys &#8216;Name&#8217;, &#8216;AtomTypes&#8217;,
389&#8216;BondRadii&#8217;, &#8216;AngleRadii&#8217; which are as above
390except are possibly edited. Also contains
391&#8216;Factors&#8217;, which is a 2 element list with
392a multiplier for bond and angle search range
393[typically (0.85,0.85)].</td>
394</tr>
395<tr class="row-even"><td>ranId</td>
396<td></td>
397<td>unique random number Id for phase (int)</td>
398</tr>
399<tr class="row-odd"><td>pId</td>
400<td></td>
401<td>Phase Id number for current project (int).</td>
402</tr>
403<tr class="row-even"><td>Atoms</td>
404<td></td>
405<td>Atoms in phase as a list of lists. The outer list
406is for each atom, the inner list contains varying
407items depending on the type of phase, see
408the <a class="reference internal" href="#atoms-table"><em>Atom Records</em></a> description.
409(list of lists)</td>
410</tr>
411<tr class="row-odd"><td>Drawing</td>
412<td></td>
413<td>Display parameters (dict)</td>
414</tr>
415<tr class="row-even"><td></td>
416<td>ballScale</td>
417<td>Size of spheres in ball-and-stick display (float)</td>
418</tr>
419<tr class="row-odd"><td></td>
420<td>bondList</td>
421<td>dict with bonds</td>
422</tr>
423<tr class="row-even"><td></td>
424<td>contourLevel</td>
425<td>map contour level in e/A^3 (float)</td>
426</tr>
427<tr class="row-odd"><td></td>
428<td>showABC</td>
429<td>Flag to show view point triplet (bool). True=show.</td>
430</tr>
431<tr class="row-even"><td></td>
432<td>viewDir</td>
433<td>cartesian viewing direction (np.array with three
434elements)</td>
435</tr>
436<tr class="row-odd"><td></td>
437<td>Zclip</td>
438<td>clipping distance in A (float)</td>
439</tr>
440<tr class="row-even"><td></td>
441<td>backColor</td>
442<td>background for plot as and R,G,B triplet
443(default = [0, 0, 0], black).
444(list with three atoms)</td>
445</tr>
446<tr class="row-odd"><td></td>
447<td>selectedAtoms</td>
448<td>List of selected atoms (list of int values)</td>
449</tr>
450<tr class="row-even"><td></td>
451<td>showRigidBodies</td>
452<td>Flag to highlight rigid body placement</td>
453</tr>
454<tr class="row-odd"><td></td>
455<td>sizeH</td>
456<td>Size ratio for H atoms (float)</td>
457</tr>
458<tr class="row-even"><td></td>
459<td>bondRadius</td>
460<td>Size of binds in A (float)</td>
461</tr>
462<tr class="row-odd"><td></td>
463<td>atomPtrs</td>
464<td>positions of x, type, site sym, ADP flag in Draw Atoms (list)</td>
465</tr>
466<tr class="row-even"><td></td>
467<td>viewPoint</td>
468<td>list of lists. First item in list is [x,y,z]
469in fractional coordinates for the center of
470the plot. Second item list of previous &amp; current
471atom number viewed (may be [0,0])</td>
472</tr>
473<tr class="row-odd"><td></td>
474<td>showHydrogen</td>
475<td>Flag to control plotting of H atoms.</td>
476</tr>
477<tr class="row-even"><td></td>
478<td>unitCellBox</td>
479<td>Flag to control display of the unit cell.</td>
480</tr>
481<tr class="row-odd"><td></td>
482<td>ellipseProb</td>
483<td>Probability limit for display of thermal
484ellipsoids in % (float).</td>
485</tr>
486<tr class="row-even"><td></td>
487<td>vdwScale</td>
488<td>Multiplier of van der Waals radius for
489display of vdW spheres.</td>
490</tr>
491<tr class="row-odd"><td></td>
492<td>Atoms</td>
493<td>A list of lists with an entry for each atom
494that is plotted.</td>
495</tr>
496<tr class="row-even"><td></td>
497<td>Zstep</td>
498<td>Step to de/increase Z-clip (float)</td>
499</tr>
500<tr class="row-odd"><td></td>
501<td>Quaternion</td>
502<td>Viewing quaternion (4 element np.array)</td>
503</tr>
504<tr class="row-even"><td></td>
505<td>radiusFactor</td>
506<td>Distance ratio for searching for bonds. ? Bonds
507are located that are within r(Ra+Rb) and (Ra+Rb)/r
508where Ra and Rb are the atomic radii.</td>
509</tr>
510<tr class="row-odd"><td></td>
511<td>oldxy</td>
512<td>previous view point (list with two floats)</td>
513</tr>
514<tr class="row-even"><td></td>
515<td>cameraPos</td>
516<td>Viewing position in A for plot (float)</td>
517</tr>
518<tr class="row-odd"><td></td>
519<td>depthFog</td>
520<td>True if use depthFog on plot - set currently as False (bool)</td>
521</tr>
522<tr class="row-even"><td>RBModels</td>
523<td></td>
524<td>Rigid body assignments (note Rigid body definitions
525are stored in their own main top-level tree entry.)</td>
526</tr>
527<tr class="row-odd"><td>Pawley ref</td>
528<td></td>
529<td>Pawley reflections</td>
530</tr>
531<tr class="row-even"><td>Histograms</td>
532<td></td>
533<td>A dict of dicts. The key for the outer dict is
534the histograms tied to this phase. The inner
535dict contains the combined phase/histogram
536parameters for items such as scale factors,
537size and strain parameters. (dict)</td>
538</tr>
539<tr class="row-odd"><td>MCSA</td>
540<td></td>
541<td>Monte-Carlo simulated annealing parameters (dict)</td>
542</tr>
543<tr class="row-even"><td></td>
544<td>&nbsp;</td>
545<td>&nbsp;</td>
546</tr>
547</tbody>
548</table>
549</div>
550<div class="section" id="rigid-body-objects">
551<h2>Rigid Body Objects<a class="headerlink" href="#rigid-body-objects" title="Permalink to this headline">¶</a></h2>
552<span class="target" id="rbdata-table"></span><p id="index-4">Rigid body descriptions are available for two types of rigid bodies: &#8216;Vector&#8217; 
553and &#8216;Residue&#8217;. Vector rigid bodies are developed by a sequence of translations each
554with a refinable magnitude and Residue rigid bodies are described as Cartesian coordinates
555with defined refinable torsion angles.</p>
556<table border="1" class="docutils">
557<colgroup>
558<col width="10%" />
559<col width="14%" />
560<col width="76%" />
561</colgroup>
562<thead valign="bottom">
563<tr class="row-odd"><th class="head">key</th>
564<th class="head">sub-key</th>
565<th class="head">explanation</th>
566</tr>
567</thead>
568<tbody valign="top">
569<tr class="row-even"><td>Vector</td>
570<td>RBId</td>
571<td>vector rigid bodies (dict of dict)</td>
572</tr>
573<tr class="row-odd"><td></td>
574<td>AtInfo</td>
575<td>Drad, Color: atom drawing radius &amp; color for each atom type (dict)</td>
576</tr>
577<tr class="row-even"><td></td>
578<td>RBname</td>
579<td>Name assigned by user to rigid body (str)</td>
580</tr>
581<tr class="row-odd"><td></td>
582<td>VectMag</td>
583<td>vector magnitudes in A (list)</td>
584</tr>
585<tr class="row-even"><td></td>
586<td>rbXYZ</td>
587<td>Cartesian coordinates for Vector rigid body (list of 3 float)</td>
588</tr>
589<tr class="row-odd"><td></td>
590<td>rbRef</td>
591<td>3 assigned reference atom nos. in rigid body for origin
592definition, use center of atoms flag (list of 3 int &amp; 1 bool)</td>
593</tr>
594<tr class="row-even"><td></td>
595<td>VectRef</td>
596<td>refinement flags for VectMag values (list of bool)</td>
597</tr>
598<tr class="row-odd"><td></td>
599<td>rbTypes</td>
600<td>Atom types for each atom in rigid body (list of str)</td>
601</tr>
602<tr class="row-even"><td></td>
603<td>rbVect</td>
604<td>Cartesian vectors for each translation used to build rigid body (list of lists)</td>
605</tr>
606<tr class="row-odd"><td></td>
607<td>useCount</td>
608<td>Number of times rigid body is used in any structure (int)</td>
609</tr>
610<tr class="row-even"><td>Residue</td>
611<td>RBId</td>
612<td>residue rigid bodies (dict of dict)</td>
613</tr>
614<tr class="row-odd"><td></td>
615<td>AtInfo</td>
616<td>Drad, Color: atom drawing radius &amp; color for each atom type(dict)</td>
617</tr>
618<tr class="row-even"><td></td>
619<td>RBname</td>
620<td>Name assigned by user to rigid body (str)</td>
621</tr>
622<tr class="row-odd"><td></td>
623<td>rbXYZ</td>
624<td>Cartesian coordinates for Residue rigid body (list of 3 float)</td>
625</tr>
626<tr class="row-even"><td></td>
627<td>rbTypes</td>
628<td>Atom types for each atom in rigid body (list of str)</td>
629</tr>
630<tr class="row-odd"><td></td>
631<td>atNames</td>
632<td>Names of each atom in rigid body (e.g. C1,N2...) (list of str)</td>
633</tr>
634<tr class="row-even"><td></td>
635<td>rbRef</td>
636<td>3 assigned reference atom nos. in rigid body for origin
637definition, use center of atoms flag (list of 3 int &amp; 1 bool)</td>
638</tr>
639<tr class="row-odd"><td></td>
640<td>rbSeq</td>
641<td>Orig,Piv,angle,Riding (list): definition of internal rigid body
642torsion; origin atom (int), pivot atom (int), torsion angle (float),
643riding atoms (list of int)</td>
644</tr>
645<tr class="row-even"><td></td>
646<td>SelSeq</td>
647<td>[int,int] used by SeqSizer to identify objects</td>
648</tr>
649<tr class="row-odd"><td></td>
650<td>useCount</td>
651<td>Number of times rigid body is used in any structure (int)</td>
652</tr>
653<tr class="row-even"><td>RBIds</td>
654<td></td>
655<td>unique Ids generated upon creation of each rigid body (dict)</td>
656</tr>
657<tr class="row-odd"><td></td>
658<td>Vector</td>
659<td>Ids for each Vector rigid body (list)</td>
660</tr>
661<tr class="row-even"><td></td>
662<td>Residue</td>
663<td>Ids for each Residue rigid body (list)</td>
664</tr>
665</tbody>
666</table>
667</div>
668<div class="section" id="space-group-objects">
669<h2>Space Group Objects<a class="headerlink" href="#space-group-objects" title="Permalink to this headline">¶</a></h2>
670<span class="target" id="sgdata-table"></span><p id="index-5">Space groups are interpreted by <a class="reference internal" href="GSASIIutil.html#GSASIIspc.SpcGroup" title="GSASIIspc.SpcGroup"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIspc.SpcGroup()</span></tt></a> 
671and the information is placed in a SGdata object
672which is a dict with these keys:</p>
673<table border="1" class="docutils">
674<colgroup>
675<col width="16%" />
676<col width="84%" />
677</colgroup>
678<thead valign="bottom">
679<tr class="row-odd"><th class="head">key</th>
680<th class="head">explanation</th>
681</tr>
682</thead>
683<tbody valign="top">
684<tr class="row-even"><td>SpGrp</td>
685<td>space group symbol (str)</td>
686</tr>
687<tr class="row-odd"><td>Laue</td>
688<td>one of the following 14 Laue classes:
689-1, 2/m, mmm, 4/m, 4/mmm, 3R,
6903mR, 3, 3m1, 31m, 6/m, 6/mmm, m3, m3m (str)</td>
691</tr>
692<tr class="row-even"><td>SGInv</td>
693<td>True if centrosymmetric, False if not (bool)</td>
694</tr>
695<tr class="row-odd"><td>SGLatt</td>
696<td>Lattice centering type. Will be one of
697P, A, B, C, I, F, R (str)</td>
698</tr>
699<tr class="row-even"><td>SGUniq</td>
700<td>unique axis if monoclinic. Will be
701a, b, or c for monoclinic space groups.
702Will be blank for non-monoclinic. (str)</td>
703</tr>
704<tr class="row-odd"><td>SGCen</td>
705<td>Symmetry cell centering vectors. A (n,3) np.array
706of centers. Will always have at least one row:
707<tt class="docutils literal"><span class="pre">np.array([[0,</span> <span class="pre">0,</span> <span class="pre">0]])</span></tt></td>
708</tr>
709<tr class="row-even"><td>SGOps</td>
710<td>symmetry operations as a list of form
711<tt class="docutils literal"><span class="pre">[[M1,T1],</span> <span class="pre">[M2,T2],...]</span></tt>
712where <span class="math">\(M_n\)</span> is a 3x3 np.array
713and <span class="math">\(T_n\)</span> is a length 3 np.array.
714Atom coordinates are transformed where the
715Asymmetric unit coordinates [X is (x,y,z)]
716are transformed using
717<span class="math">\(X^\prime = M_n*X+T_n\)</span></td>
718</tr>
719<tr class="row-odd"><td>SGSys</td>
720<td>symmetry unit cell: type one of
721&#8216;triclinic&#8217;, &#8216;monoclinic&#8217;, &#8216;orthorhombic&#8217;,
722&#8216;tetragonal&#8217;, &#8216;rhombohedral&#8217;, &#8216;trigonal&#8217;,
723&#8216;hexagonal&#8217;, &#8216;cubic&#8217; (str)</td>
724</tr>
725<tr class="row-even"><td>SGPolax</td>
726<td>Axes for space group polarity. Will be one of
727&#8216;&#8217;, &#8216;x&#8217;, &#8216;y&#8217;, &#8216;x y&#8217;, &#8216;z&#8217;, &#8216;x z&#8217;, &#8216;y z&#8217;,
728&#8216;xyz&#8217;. In the case where axes are arbitrary
729&#8216;111&#8217; is used (P 1, and ?).</td>
730</tr>
731</tbody>
732</table>
733<span class="target" id="ssgdata-table"></span><p id="index-6">Superspace groups [3+1] are interpreted by <a class="reference internal" href="GSASIIutil.html#GSASIIspc.SSpcGroup" title="GSASIIspc.SSpcGroup"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIspc.SSpcGroup()</span></tt></a> 
734and the information is placed in a SSGdata object
735which is a dict with these keys:</p>
736<table border="1" class="docutils">
737<colgroup>
738<col width="16%" />
739<col width="84%" />
740</colgroup>
741<thead valign="bottom">
742<tr class="row-odd"><th class="head">key</th>
743<th class="head">explanation</th>
744</tr>
745</thead>
746<tbody valign="top">
747<tr class="row-even"><td>SSpGrp</td>
748<td>superspace group symbol extension to space group
749symbol, accidental spaces removed</td>
750</tr>
751<tr class="row-odd"><td>SSGCen</td>
752<td>4D cell centering vectors [0,0,0,0] at least</td>
753</tr>
754<tr class="row-even"><td>SSGOps</td>
755<td>4D symmetry operations as [M,T] so that M*x+T = x&#8217;</td>
756</tr>
757</tbody>
758</table>
759</div>
760<div class="section" id="atom-records">
761<h2>Atom Records<a class="headerlink" href="#atom-records" title="Permalink to this headline">¶</a></h2>
762<span class="target" id="atoms-table"></span><p id="index-7">If <tt class="docutils literal"><span class="pre">phasedict</span></tt> points to the phase information in the data tree, then
763atoms are contained in a list of atom records (list) in
764<tt class="docutils literal"><span class="pre">phasedict['Atoms']</span></tt>. Also needed to read atom information
765are four pointers, <tt class="docutils literal"><span class="pre">cx,ct,cs,cia</span> <span class="pre">=</span> <span class="pre">phasedict['General']['atomPtrs']</span></tt>,
766which define locations in the atom record, as shown below. Items shown are
767always present; additional ones for macromolecular phases are marked &#8216;mm&#8217;</p>
768<table border="1" class="docutils">
769<colgroup>
770<col width="21%" />
771<col width="79%" />
772</colgroup>
773<thead valign="bottom">
774<tr class="row-odd"><th class="head">location</th>
775<th class="head">explanation</th>
776</tr>
777</thead>
778<tbody valign="top">
779<tr class="row-even"><td>ct-4</td>
780<td>mm - residue number (str)</td>
781</tr>
782<tr class="row-odd"><td>ct-3</td>
783<td>mm - residue name (e.g. ALA) (str)</td>
784</tr>
785<tr class="row-even"><td>ct-2</td>
786<td>mm - chain label (str)</td>
787</tr>
788<tr class="row-odd"><td>ct-1</td>
789<td>atom label (str)</td>
790</tr>
791<tr class="row-even"><td>ct</td>
792<td>atom type (str)</td>
793</tr>
794<tr class="row-odd"><td>ct+1</td>
795<td>refinement flags; combination of &#8216;F&#8217;, &#8216;X&#8217;, &#8216;U&#8217; (str)</td>
796</tr>
797<tr class="row-even"><td>cx,cx+1,cx+2</td>
798<td>the x,y and z coordinates (3 floats)</td>
799</tr>
800<tr class="row-odd"><td>cs</td>
801<td>site symmetry (str)</td>
802</tr>
803<tr class="row-even"><td>cs+1</td>
804<td>site multiplicity (int)</td>
805</tr>
806<tr class="row-odd"><td>cia</td>
807<td>ADP flag: Isotropic (&#8216;I&#8217;) or Anisotropic (&#8216;A&#8217;)</td>
808</tr>
809<tr class="row-even"><td>cia+1</td>
810<td>Uiso (float)</td>
811</tr>
812<tr class="row-odd"><td>cia+2...cia+7</td>
813<td>U11, U22, U33, U12, U13, U23 (6 floats)</td>
814</tr>
815<tr class="row-even"><td>atom[cia+8]</td>
816<td>unique atom identifier (int)</td>
817</tr>
818</tbody>
819</table>
820</div>
821<div class="section" id="drawing-atom-records">
822<h2>Drawing Atom Records<a class="headerlink" href="#drawing-atom-records" title="Permalink to this headline">¶</a></h2>
823<span class="target" id="drawing-atoms-table"></span><p id="index-8">If <tt class="docutils literal"><span class="pre">phasedict</span></tt> points to the phase information in the data tree, then
824drawing atoms are contained in a list of drawing atom records (list) in
825<tt class="docutils literal"><span class="pre">phasedict['Drawing']['Atoms']</span></tt>. Also needed to read atom information
826are four pointers, <tt class="docutils literal"><span class="pre">cx,ct,cs,ci</span> <span class="pre">=</span> <span class="pre">phasedict['Drawing']['AtomPtrs']</span></tt>,
827which define locations in the atom record, as shown below. Items shown are
828always present; additional ones for macromolecular phases are marked &#8216;mm&#8217;</p>
829<table border="1" class="docutils">
830<colgroup>
831<col width="17%" />
832<col width="83%" />
833</colgroup>
834<thead valign="bottom">
835<tr class="row-odd"><th class="head">location</th>
836<th class="head">explanation</th>
837</tr>
838</thead>
839<tbody valign="top">
840<tr class="row-even"><td>ct-4</td>
841<td>mm - residue number (str)</td>
842</tr>
843<tr class="row-odd"><td>ct-3</td>
844<td>mm - residue name (e.g. ALA) (str)</td>
845</tr>
846<tr class="row-even"><td>ct-2</td>
847<td>mm - chain label (str)</td>
848</tr>
849<tr class="row-odd"><td>ct-1</td>
850<td>atom label (str)</td>
851</tr>
852<tr class="row-even"><td>ct</td>
853<td>atom type (str)</td>
854</tr>
855<tr class="row-odd"><td>cx,cx+1,cx+2</td>
856<td>the x,y and z coordinates (3 floats)</td>
857</tr>
858<tr class="row-even"><td>cs-1</td>
859<td>Sym Op symbol; sym. op number + unit cell id (e.g. &#8216;1,0,-1&#8217;) (str)</td>
860</tr>
861<tr class="row-odd"><td>cs</td>
862<td>atom drawing style; e.g. &#8216;balls &amp; sticks&#8217; (str)</td>
863</tr>
864<tr class="row-even"><td>cs+1</td>
865<td>atom label style (e.g. &#8216;name&#8217;) (str)</td>
866</tr>
867<tr class="row-odd"><td>cs+2</td>
868<td>atom color (RBG triplet) (int)</td>
869</tr>
870<tr class="row-even"><td>cs+3</td>
871<td>ADP flag: Isotropic (&#8216;I&#8217;) or Anisotropic (&#8216;A&#8217;)</td>
872</tr>
873<tr class="row-odd"><td>cs+4</td>
874<td>Uiso (float)</td>
875</tr>
876<tr class="row-even"><td>cs+5...cs+11</td>
877<td>U11, U22, U33, U12, U13, U23 (6 floats)</td>
878</tr>
879<tr class="row-odd"><td>ci</td>
880<td>unique atom identifier; matches source atom Id in Atom Records (int)</td>
881</tr>
882</tbody>
883</table>
884</div>
885<div class="section" id="powder-diffraction-tree-items">
886<h2>Powder Diffraction Tree Items<a class="headerlink" href="#powder-diffraction-tree-items" title="Permalink to this headline">¶</a></h2>
887<span class="target" id="powder-table"></span><p id="index-9">Every powder diffraction histogram is stored in the GSAS-II data tree
888with a top-level entry named beginning with the string &#8220;PWDR &#8221;. The
889diffraction data for that information are directly associated with
890that tree item and there are a series of children to that item. The
891routines <a class="reference internal" href="GSASII.html#GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree" title="GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree"><tt class="xref py py-func docutils literal"><span class="pre">GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree()</span></tt></a>
892and <a class="reference internal" href="GSASIIstruc.html#GSASIIstrIO.GetUsedHistogramsAndPhases" title="GSASIIstrIO.GetUsedHistogramsAndPhases"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIstrIO.GetUsedHistogramsAndPhases()</span></tt></a> will
893load this information into a dictionary where the child tree name is
894used as a key, and the information in the main entry is assigned
895a key of <tt class="docutils literal"><span class="pre">Data</span></tt>, as outlined below.</p>
896<table border="1" class="docutils">
897<colgroup>
898<col width="24%" />
899<col width="17%" />
900<col width="59%" />
901</colgroup>
902<thead valign="bottom">
903<tr class="row-odd"><th class="head">key</th>
904<th class="head">sub-key</th>
905<th class="head">explanation</th>
906</tr>
907</thead>
908<tbody valign="top">
909<tr class="row-even"><td>Comments</td>
910<td></td>
911<td>Text strings extracted from the original powder
912data header. These cannot be changed by the user;
913it may be empty.</td>
914</tr>
915<tr class="row-odd"><td>Limits</td>
916<td></td>
917<td>A list of two two element lists, as [[Ld,Hd],[L,H]]
918where L and Ld are the current and default lowest
919two-theta value to be used and
920where H and Hd are the current and default highest
921two-theta value to be used.</td>
922</tr>
923<tr class="row-even"><td>Reflection Lists</td>
924<td></td>
925<td>A dict with an entry for each phase in the
926histogram. The contents of each dict item
927is a dict containing reflections, as described in
928the <a class="reference internal" href="#powderrefl-table"><em>Powder Reflections</em></a>
929description.</td>
930</tr>
931<tr class="row-odd"><td>Instrument Parameters</td>
932<td></td>
933<td>A list containing two dicts where the possible
934keys in each dict are listed below. The value
935for each item is a list containing three values:
936the initial value, the current value and a
937refinement flag which can have a value of
938True, False or 0 where 0 indicates a value that
939cannot be refined. The first and second
940values are floats unless otherwise noted.
941Items in the first dict are noted as [1]</td>
942</tr>
943<tr class="row-even"><td></td>
944<td>Lam</td>
945<td>Specifies a wavelength in Angstroms [1]</td>
946</tr>
947<tr class="row-odd"><td></td>
948<td>Lam1</td>
949<td>Specifies the primary wavelength in
950Angstrom, when an alpha1, alpha2
951source is used [1]</td>
952</tr>
953<tr class="row-even"><td></td>
954<td><p class="first">Lam2</p>
955<p class="last">I(L2)/I(L1)</p>
956</td>
957<td>Specifies the secondary wavelength in
958Angstrom, when an alpha1, alpha2
959source is used [1]
960Ratio of Lam2 to Lam1 [1]</td>
961</tr>
962<tr class="row-odd"><td></td>
963<td>Type</td>
964<td><dl class="first last docutils">
965<dt>Histogram type (str) [1]:</dt>
966<dd><ul class="first last simple">
967<li>&#8216;PXC&#8217; for constant wavelength x-ray</li>
968<li>&#8216;PNC&#8217; for constant wavelength neutron</li>
969<li>&#8216;PNT&#8217; for time of flight neutron</li>
970</ul>
971</dd>
972</dl>
973</td>
974</tr>
975<tr class="row-even"><td></td>
976<td>Zero</td>
977<td>Two-theta zero correction in <em>degrees</em> [1]</td>
978</tr>
979<tr class="row-odd"><td></td>
980<td>Azimuth</td>
981<td>Azimuthal setting angle for data recorded
982with differing setting angles [1]</td>
983</tr>
984<tr class="row-even"><td></td>
985<td>U, V, W</td>
986<td>Cagliotti profile coefficients
987for Gaussian instrumental broadening, where the
988FWHM goes as
989<span class="math">\(U \tan^2\theta + V \tan\theta + W\)</span> [1]</td>
990</tr>
991<tr class="row-odd"><td></td>
992<td>X, Y</td>
993<td>Cauchy (Lorentzian) instrumental broadening
994coefficients [1]</td>
995</tr>
996<tr class="row-even"><td></td>
997<td>SH/L</td>
998<td>Variant of the Finger-Cox-Jephcoat asymmetric
999peak broadening ratio. Note that this is the
1000average between S/L and H/L where S is
1001sample height, H is the slit height and
1002L is the goniometer diameter. [1]</td>
1003</tr>
1004<tr class="row-odd"><td></td>
1005<td>Polariz.</td>
1006<td>Polarization coefficient. [1]</td>
1007</tr>
1008<tr class="row-even"><td>wtFactor</td>
1009<td></td>
1010<td>A weighting factor to increase or decrease
1011the leverage of data in the histogram (float).
1012A value of 1.0 weights the data with their
1013standard uncertainties and a larger value
1014increases the weighting of the data (equivalent
1015to decreasing the uncertainties).</td>
1016</tr>
1017<tr class="row-odd"><td>Sample Parameters</td>
1018<td></td>
1019<td>Specifies a dict with parameters that describe how
1020the data were collected, as listed
1021below. Refinable parameters are a list containing
1022a float and a bool, where the second value
1023specifies if the value is refined, otherwise
1024the value is a float unless otherwise noted.</td>
1025</tr>
1026<tr class="row-even"><td></td>
1027<td>Scale</td>
1028<td>The histogram scale factor (refinable)</td>
1029</tr>
1030<tr class="row-odd"><td></td>
1031<td>Absorption</td>
1032<td>The sample absorption coefficient as
1033<span class="math">\(\mu r\)</span> where r is the radius
1034(refinable). Only valid for Debye-Scherrer geometry.</td>
1035</tr>
1036<tr class="row-even"><td></td>
1037<td>SurfaceRoughA</td>
1038<td>Surface roughness parameter A as defined by
1039Surotti,J. Appl. Cryst, 5,325-331, 1972.(refinable -
1040only valid for Bragg-Brentano geometry)</td>
1041</tr>
1042<tr class="row-odd"><td></td>
1043<td>SurfaceRoughB</td>
1044<td>Surface roughness parameter B (refinable -
1045only valid for Bragg-Brentano geometry)</td>
1046</tr>
1047<tr class="row-even"><td></td>
1048<td>DisplaceX,
1049DisplaceY</td>
1050<td>Sample displacement from goniometer center
1051where Y is along the beam direction and
1052X is perpendicular. Units are <span class="math">\(\mu m\)</span>
1053(refinable).</td>
1054</tr>
1055<tr class="row-odd"><td></td>
1056<td>Phi, Chi,
1057Omega</td>
1058<td>Goniometer sample setting angles, in degrees.</td>
1059</tr>
1060<tr class="row-even"><td></td>
1061<td>Gonio. radius</td>
1062<td>Radius of the diffractometer in mm</td>
1063</tr>
1064<tr class="row-odd"><td></td>
1065<td>InstrName</td>
1066<td>A name for the instrument, used in preparing
1067a CIF (str).</td>
1068</tr>
1069<tr class="row-even"><td></td>
1070<td>Force,
1071Temperature,
1072Humidity,
1073Pressure,
1074Voltage</td>
1075<td>Variables that describe how the measurement
1076was performed. Not used directly in
1077any computations.</td>
1078</tr>
1079<tr class="row-odd"><td></td>
1080<td>ranId</td>
1081<td>The random-number Id for the histogram
1082(same value as where top-level key is ranId)</td>
1083</tr>
1084<tr class="row-even"><td></td>
1085<td>Type</td>
1086<td>Type of diffraction data, may be &#8216;Debye-Scherrer&#8217;
1087or &#8216;Bragg-Brentano&#8217; (str).</td>
1088</tr>
1089<tr class="row-odd"><td></td>
1090<td>Diffuse</td>
1091<td>not in use?</td>
1092</tr>
1093<tr class="row-even"><td>hId</td>
1094<td></td>
1095<td>The number assigned to the histogram when
1096the project is loaded or edited (can change)</td>
1097</tr>
1098<tr class="row-odd"><td>ranId</td>
1099<td></td>
1100<td>A random number id for the histogram
1101that does not change</td>
1102</tr>
1103<tr class="row-even"><td>Background</td>
1104<td></td>
1105<td>The background is stored as a list with where
1106the first item in the list is list and the second
1107item is a dict. The list contains the background
1108function and its coefficients; the dict contains
1109Debye diffuse terms and background peaks.
1110(TODO: this needs to be expanded.)</td>
1111</tr>
1112<tr class="row-odd"><td>Data</td>
1113<td></td>
1114<td><p class="first">The data consist of a list of 6 np.arrays
1115containing in order:</p>
1116<blockquote class="last">
1117<div><ol class="arabic simple" start="0">
1118<li>the x-postions (two-theta in degrees),</li>
1119<li>the intensity values (Yobs),</li>
1120<li>the weights for each Yobs value</li>
1121<li>the computed intensity values (Ycalc)</li>
1122<li>the background values</li>
1123<li>Yobs-Ycalc</li>
1124</ol>
1125</div></blockquote>
1126</td>
1127</tr>
1128</tbody>
1129</table>
1130</div>
1131<div class="section" id="powder-reflection-data-structure">
1132<h2>Powder Reflection Data Structure<a class="headerlink" href="#powder-reflection-data-structure" title="Permalink to this headline">¶</a></h2>
1133<span class="target" id="powderrefl-table"></span><p id="index-10">For every phase in a histogram, the <tt class="docutils literal"><span class="pre">Reflection</span> <span class="pre">Lists</span></tt> value is a dict
1134one element of which is <cite>&#8216;RefList&#8217;</cite>, which is a np.array containing
1135reflections. The columns in that array are documented below.</p>
1136<table border="1" class="docutils">
1137<colgroup>
1138<col width="14%" />
1139<col width="86%" />
1140</colgroup>
1141<thead valign="bottom">
1142<tr class="row-odd"><th class="head">index</th>
1143<th class="head">explanation</th>
1144</tr>
1145</thead>
1146<tbody valign="top">
1147<tr class="row-even"><td>0,1,2</td>
1148<td>h,k,l (float)</td>
1149</tr>
1150<tr class="row-odd"><td>3</td>
1151<td>multiplicity</td>
1152</tr>
1153<tr class="row-even"><td>4</td>
1154<td>d-space, Angstrom</td>
1155</tr>
1156<tr class="row-odd"><td>5</td>
1157<td>pos, two-theta</td>
1158</tr>
1159<tr class="row-even"><td>6</td>
1160<td>sig, Gaussian width</td>
1161</tr>
1162<tr class="row-odd"><td>7</td>
1163<td>gam, Lorenzian width</td>
1164</tr>
1165<tr class="row-even"><td>8</td>
1166<td><span class="math">\(F_{obs}^2\)</span></td>
1167</tr>
1168<tr class="row-odd"><td>9</td>
1169<td><span class="math">\(F_{calc}^2\)</span></td>
1170</tr>
1171<tr class="row-even"><td>10</td>
1172<td>reflection phase, in degrees</td>
1173</tr>
1174<tr class="row-odd"><td>11</td>
1175<td>intensity correction for reflection, this times
1176<span class="math">\(F_{obs}^2\)</span> or <span class="math">\(F_{calc}^2\)</span> gives Iobs or Icalc</td>
1177</tr>
1178</tbody>
1179</table>
1180</div>
1181<div class="section" id="single-crystal-tree-items">
1182<h2>Single Crystal Tree Items<a class="headerlink" href="#single-crystal-tree-items" title="Permalink to this headline">¶</a></h2>
1183<span class="target" id="xtal-table"></span><p id="index-11">Every single crystal diffraction histogram is stored in the GSAS-II data tree
1184with a top-level entry named beginning with the string &#8220;HKLF &#8221;. The
1185diffraction data for that information are directly associated with
1186that tree item and there are a series of children to that item. The
1187routines <a class="reference internal" href="GSASII.html#GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree" title="GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree"><tt class="xref py py-func docutils literal"><span class="pre">GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree()</span></tt></a>
1188and <a class="reference internal" href="GSASIIstruc.html#GSASIIstrIO.GetUsedHistogramsAndPhases" title="GSASIIstrIO.GetUsedHistogramsAndPhases"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIstrIO.GetUsedHistogramsAndPhases()</span></tt></a> will
1189load this information into a dictionary where the child tree name is
1190used as a key, and the information in the main entry is assigned
1191a key of <tt class="docutils literal"><span class="pre">Data</span></tt>, as outlined below.</p>
1192<table border="1" class="docutils">
1193<colgroup>
1194<col width="25%" />
1195<col width="17%" />
1196<col width="58%" />
1197</colgroup>
1198<thead valign="bottom">
1199<tr class="row-odd"><th class="head">key</th>
1200<th class="head">sub-key</th>
1201<th class="head">explanation</th>
1202</tr>
1203</thead>
1204<tbody valign="top">
1205<tr class="row-even"><td>Data</td>
1206<td></td>
1207<td>A dict that contains the
1208reflection table,
1209as described in the
1210<a class="reference internal" href="#xtalrefl-table"><em>Single Crystal Reflections</em></a>
1211description.</td>
1212</tr>
1213<tr class="row-odd"><td>Instrument Parameters</td>
1214<td></td>
1215<td>A list containing two dicts where the possible
1216keys in each dict are listed below. The value
1217for most items is a list containing two values:
1218the initial value, the current value.
1219The first and second
1220values are floats unless otherwise noted.</td>
1221</tr>
1222<tr class="row-even"><td></td>
1223<td>Lam</td>
1224<td>Specifies a wavelength in Angstroms (two floats)</td>
1225</tr>
1226<tr class="row-odd"><td></td>
1227<td>Type</td>
1228<td><dl class="first last docutils">
1229<dt>Histogram type (two str values):</dt>
1230<dd><ul class="first last simple">
1231<li>&#8216;SXC&#8217; for constant wavelength x-ray</li>
1232<li>&#8216;SNC&#8217; for constant wavelength neutron</li>
1233<li>&#8216;SNT&#8217; for time of flight neutron</li>
1234</ul>
1235</dd>
1236</dl>
1237</td>
1238</tr>
1239<tr class="row-even"><td></td>
1240<td>InstrName</td>
1241<td>A name for the instrument, used in preparing
1242a CIF (str).</td>
1243</tr>
1244<tr class="row-odd"><td>wtFactor</td>
1245<td></td>
1246<td>A weighting factor to increase or decrease
1247the leverage of data in the histogram (float).
1248A value of 1.0 weights the data with their
1249standard uncertainties and a larger value
1250increases the weighting of the data (equivalent
1251to decreasing the uncertainties).</td>
1252</tr>
1253<tr class="row-even"><td>hId</td>
1254<td></td>
1255<td>The number assigned to the histogram when
1256the project is loaded or edited (can change)</td>
1257</tr>
1258<tr class="row-odd"><td>ranId</td>
1259<td></td>
1260<td>A random number id for the histogram
1261that does not change</td>
1262</tr>
1263</tbody>
1264</table>
1265</div>
1266<div class="section" id="single-crystal-reflection-data-structure">
1267<h2>Single Crystal Reflection Data Structure<a class="headerlink" href="#single-crystal-reflection-data-structure" title="Permalink to this headline">¶</a></h2>
1268<span class="target" id="xtalrefl-table"></span><p id="index-12">For every single crystal a histogram, the <tt class="docutils literal"><span class="pre">'Data'</span></tt> item contains
1269the structure factors as an np.array in item <cite>&#8216;RefList&#8217;</cite>.
1270The columns in that array are documented below.</p>
1271<table border="1" class="docutils">
1272<colgroup>
1273<col width="16%" />
1274<col width="84%" />
1275</colgroup>
1276<thead valign="bottom">
1277<tr class="row-odd"><th class="head">index</th>
1278<th class="head">explanation</th>
1279</tr>
1280</thead>
1281<tbody valign="top">
1282<tr class="row-even"><td>0,1,2</td>
1283<td>h,k,l (float)</td>
1284</tr>
1285<tr class="row-odd"><td>3</td>
1286<td>multiplicity</td>
1287</tr>
1288<tr class="row-even"><td>4</td>
1289<td>d-space, Angstrom</td>
1290</tr>
1291<tr class="row-odd"><td>5</td>
1292<td><span class="math">\(F_{obs}^2\)</span></td>
1293</tr>
1294<tr class="row-even"><td>6</td>
1295<td><span class="math">\(\sigma(F_{obs}^2)\)</span></td>
1296</tr>
1297<tr class="row-odd"><td>7</td>
1298<td><span class="math">\(F_{calc}^2\)</span></td>
1299</tr>
1300<tr class="row-even"><td>8</td>
1301<td><span class="math">\(F_{obs}^2T\)</span></td>
1302</tr>
1303<tr class="row-odd"><td>9</td>
1304<td><span class="math">\(F_{calc}^2T\)</span></td>
1305</tr>
1306<tr class="row-even"><td>10</td>
1307<td>reflection phase, in degrees</td>
1308</tr>
1309<tr class="row-odd"><td>11</td>
1310<td>intensity correction for reflection, this times
1311<span class="math">\(F_{obs}^2\)</span> or <span class="math">\(F_{calc}^2\)</span>
1312gives Iobs or Icalc</td>
1313</tr>
1314</tbody>
1315</table>
1316</div>
1317<div class="section" id="image-data-structure">
1318<h2>Image Data Structure<a class="headerlink" href="#image-data-structure" title="Permalink to this headline">¶</a></h2>
1319<span class="target" id="image-table"></span><p id="index-13">Every 2-dimensional image is stored in the GSAS-II data tree
1320with a top-level entry named beginning with the string &#8220;IMG &#8221;. The
1321image data are directly associated with that tree item and there
1322are a series of children to that item. The routines <a class="reference internal" href="GSASII.html#GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree" title="GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree"><tt class="xref py py-func docutils literal"><span class="pre">GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree()</span></tt></a>
1323and <a class="reference internal" href="GSASIIstruc.html#GSASIIstrIO.GetUsedHistogramsAndPhases" title="GSASIIstrIO.GetUsedHistogramsAndPhases"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIstrIO.GetUsedHistogramsAndPhases()</span></tt></a> will
1324load this information into a dictionary where the child tree name is
1325used as a key, and the information in the main entry is assigned
1326a key of <tt class="docutils literal"><span class="pre">Data</span></tt>, as outlined below.</p>
1327<table border="1" class="docutils">
1328<colgroup>
1329<col width="14%" />
1330<col width="14%" />
1331<col width="73%" />
1332</colgroup>
1333<thead valign="bottom">
1334<tr class="row-odd"><th class="head">key</th>
1335<th class="head">sub-key</th>
1336<th class="head">explanation</th>
1337</tr>
1338</thead>
1339<tbody valign="top">
1340<tr class="row-even"><td>Comments</td>
1341<td></td>
1342<td>Text strings extracted from the original image data
1343header or a metafile. These cannot be changed by
1344the user; it may be empty.</td>
1345</tr>
1346<tr class="row-odd"><td>Image Controls</td>
1347<td>azmthOff</td>
1348<td>(float) The offset to be applied to an azimuthal
1349value. Accomodates
1350detector orientations other than with the detector
1351X-axis
1352horizontal.</td>
1353</tr>
1354<tr class="row-even"><td></td>
1355<td>background image</td>
1356<td>(list:str,float) The name of a tree item (&#8220;IMG ...&#8221;) that is to be subtracted
1357during image integration multiplied by value. It must have the same size/shape as
1358the integrated image. NB: value &lt; 0 for subtraction.</td>
1359</tr>
1360<tr class="row-odd"><td></td>
1361<td>calibrant</td>
1362<td>(str) The material used for determining the position/orientation
1363of the image. The data is obtained from <a class="reference internal" href="GSASIIutil.html#module-ImageCalibrants" title="ImageCalibrants"><tt class="xref py py-func docutils literal"><span class="pre">ImageCalibrants()</span></tt></a>
1364and UserCalibrants.py (supplied by user).</td>
1365</tr>
1366<tr class="row-even"><td></td>
1367<td>calibdmin</td>
1368<td>(float) The minimum d-spacing used during the last calibration run.</td>
1369</tr>
1370<tr class="row-odd"><td></td>
1371<td>calibskip</td>
1372<td>(int) The number of expected diffraction lines skipped during the last
1373calibration run.</td>
1374</tr>
1375<tr class="row-even"><td></td>
1376<td>center</td>
1377<td>(list:floats) The [X,Y] point in detector coordinates (mm) where the direct beam
1378strikes the detector plane as determined by calibration. This point
1379does not have to be within the limits of the detector boundaries.</td>
1380</tr>
1381<tr class="row-odd"><td></td>
1382<td>centerAzm</td>
1383<td>(bool) If True then the azimuth reported for the integrated slice
1384of the image is at the center line otherwise it is at the leading edge.</td>
1385</tr>
1386<tr class="row-even"><td></td>
1387<td>color</td>
1388<td>(str) The name of the colormap used to display the image. Default = &#8216;Paired&#8217;.</td>
1389</tr>
1390<tr class="row-odd"><td></td>
1391<td>cutoff</td>
1392<td>(float) The minimum value of I/Ib for a point selected in a diffraction ring for
1393calibration calculations. See pixLimit for details as how point is found.</td>
1394</tr>
1395<tr class="row-even"><td></td>
1396<td>DetDepth</td>
1397<td>(float) Coefficient for penetration correction to distance; accounts for diffraction
1398ring offset at higher angles. Optionally determined by calibration.</td>
1399</tr>
1400<tr class="row-odd"><td></td>
1401<td>DetDepthRef</td>
1402<td>(bool) If True then refine DetDepth during calibration/recalibration calculation.</td>
1403</tr>
1404<tr class="row-even"><td></td>
1405<td>distance</td>
1406<td>(float) The distance (mm) from sample to detector plane.</td>
1407</tr>
1408<tr class="row-odd"><td></td>
1409<td>ellipses</td>
1410<td>(list:lists) Each object in ellipses is a list [center,phi,radii,color] where
1411center (list) is location (mm) of the ellipse center on the detector plane, phi is the
1412rotation of the ellipse minor axis from the x-axis, and radii are the minor &amp; major
1413radii of the ellipse. If radii[0] is negative then parameters describe a hyperbola. Color
1414is the selected drawing color (one of &#8216;b&#8217;, &#8216;g&#8217; ,&#8217;r&#8217;) for the ellipse/hyperbola.</td>
1415</tr>
1416<tr class="row-even"><td></td>
1417<td>edgemin</td>
1418<td>(float) Not used;  parameter in EdgeFinder code.</td>
1419</tr>
1420<tr class="row-odd"><td></td>
1421<td>fullIntegrate</td>
1422<td>(bool) If True then integrate over full 360 deg azimuthal range.</td>
1423</tr>
1424<tr class="row-even"><td></td>
1425<td>GonioAngles</td>
1426<td>(list:floats) The &#8216;Omega&#8217;,&#8217;Chi&#8217;,&#8217;Phi&#8217; goniometer angles used for this image.
1427Required for texture calculations.</td>
1428</tr>
1429<tr class="row-odd"><td></td>
1430<td>invert_x</td>
1431<td>(bool) If True display the image with the x-axis inverted.</td>
1432</tr>
1433<tr class="row-even"><td></td>
1434<td>invert_y</td>
1435<td>(bool) If True display the image with the y-axis inverted.</td>
1436</tr>
1437<tr class="row-odd"><td></td>
1438<td>IOtth</td>
1439<td>(list:floats) The minimum and maximum 2-theta values to be used for integration.</td>
1440</tr>
1441<tr class="row-even"><td></td>
1442<td>LRazimuth</td>
1443<td>(list:floats) The minimum and maximum azimuth values to be used for integration.</td>
1444</tr>
1445<tr class="row-odd"><td></td>
1446<td>Oblique</td>
1447<td>(list:float,bool) If True apply a detector absorption correction using the value to the
1448intensities obtained during integration.</td>
1449</tr>
1450<tr class="row-even"><td></td>
1451<td>outAzimuths</td>
1452<td>(int) The number of azimuth pie slices.</td>
1453</tr>
1454<tr class="row-odd"><td></td>
1455<td>outChannels</td>
1456<td>(int) The number of 2-theta steps.</td>
1457</tr>
1458<tr class="row-even"><td></td>
1459<td>pixelSize</td>
1460<td>(list:ints) The X,Y dimensions (microns) of each pixel.</td>
1461</tr>
1462<tr class="row-odd"><td></td>
1463<td>pixLimit</td>
1464<td>(int) A box in the image with 2*pixLimit+1 edges is searched to find the maximum.
1465This value (I) along with the minimum (Ib) in the box is reported by <a class="reference internal" href="GSASIIimage.html#GSASIIimage.ImageLocalMax" title="GSASIIimage.ImageLocalMax"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIimage.ImageLocalMax()</span></tt></a>
1466and subject to cutoff in <a class="reference internal" href="GSASIIimage.html#GSASIIimage.makeRing" title="GSASIIimage.makeRing"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIimage.makeRing()</span></tt></a>.
1467Locations are used to construct rings of points for calibration calcualtions.</td>
1468</tr>
1469<tr class="row-even"><td></td>
1470<td>PolaVal</td>
1471<td>(list:float,bool) If type=&#8217;SASD&#8217; and if True, apply polarization correction to intensities from
1472integration using value.</td>
1473</tr>
1474<tr class="row-odd"><td></td>
1475<td>rings</td>
1476<td>(list:lists) Each entry is [X,Y,dsp] where X &amp; Y are lists of x,y coordinates around a
1477diffraction ring with the same d-spacing (dsp)</td>
1478</tr>
1479<tr class="row-even"><td></td>
1480<td>ring</td>
1481<td>(list) The x,y coordinates of the &gt;5 points on an inner ring
1482selected by the user,</td>
1483</tr>
1484<tr class="row-odd"><td></td>
1485<td>Range</td>
1486<td>(list) The minimum &amp; maximum values of the image</td>
1487</tr>
1488<tr class="row-even"><td></td>
1489<td>rotation</td>
1490<td>(float) The angle between the x-axis and the vector about which the
1491detector is tilted. Constrained to -180 to 180 deg.</td>
1492</tr>
1493<tr class="row-odd"><td></td>
1494<td>SampleShape</td>
1495<td>(str) Currently only &#8216;Cylinder&#8217;. Sample shape for Debye-Scherrer experiments; used for absorption
1496calculations.</td>
1497</tr>
1498<tr class="row-even"><td></td>
1499<td>SampleAbs</td>
1500<td>(list: float,bool) Value of absorption coefficient for Debye-Scherrer experimnents, flag if True
1501to cause correction to be applied.</td>
1502</tr>
1503<tr class="row-odd"><td></td>
1504<td>setDefault</td>
1505<td>(bool) If True the use the image controls values for all new images to be read. (might be removed)</td>
1506</tr>
1507<tr class="row-even"><td></td>
1508<td>setRings</td>
1509<td>(bool) If True then display all the selected x,y ring positions (vida supra rings) used in the calibration.</td>
1510</tr>
1511<tr class="row-odd"><td></td>
1512<td>showLines</td>
1513<td>(bool) If True then isplay the integration limits to be used.</td>
1514</tr>
1515<tr class="row-even"><td></td>
1516<td>size</td>
1517<td>(list:int) The number of pixels on the image x &amp; y axes</td>
1518</tr>
1519<tr class="row-odd"><td></td>
1520<td>type</td>
1521<td>(str) One of &#8216;PWDR&#8217;, &#8216;SASD&#8217; or &#8216;REFL&#8217; for powder, small angle or reflectometry data, respectively.</td>
1522</tr>
1523<tr class="row-even"><td></td>
1524<td>tilt</td>
1525<td>(float) The angle the detector normal makes with the incident beam; range -90 to 90.</td>
1526</tr>
1527<tr class="row-odd"><td></td>
1528<td>wavelength</td>
1529<td>(float) Tha radiation wavelength (Angstroms) as entered by the user (or someday obtained from the image header).</td>
1530</tr>
1531<tr class="row-even"><td>Masks</td>
1532<td>Arcs</td>
1533<td>(list: lists) Each entry [2-theta,[azimuth[0],azimuth[1]],thickness] describes an arc mask
1534to be excluded from integration</td>
1535</tr>
1536<tr class="row-odd"><td></td>
1537<td>Frames</td>
1538<td>(list:lists) Each entry describes the x,y points (3 or more - mm) that describe a frame outside
1539of which is excluded from recalibration and integration. Only one frame is allowed.</td>
1540</tr>
1541<tr class="row-even"><td></td>
1542<td>Points</td>
1543<td>(list:lists) Each entry [x,y,radius] (mm) describes an excluded spot on the image to be excluded
1544from integration.</td>
1545</tr>
1546<tr class="row-odd"><td></td>
1547<td>Polygons</td>
1548<td>(list:lists) Each entry is a list of 3+ [x,y] points (mm) that describe a polygon on the image
1549to be excluded from integration.</td>
1550</tr>
1551<tr class="row-even"><td></td>
1552<td>Rings</td>
1553<td>(list: lists) Each entry [2-theta,thickness] describes a ring mask
1554to be excluded from integration.</td>
1555</tr>
1556<tr class="row-odd"><td></td>
1557<td>Thresholds</td>
1558<td>(list:[tuple,list]) [(Imin,Imax),[Imin,Imax]] This gives lower and upper limits for points on the image to be included
1559in integrsation. The tuple is the image intensity limits and the list are those set by the user.</td>
1560</tr>
1561<tr class="row-even"><td>Stress/Strain</td>
1562<td>Sample phi</td>
1563<td>(float) Sample rotation about vertical axis.</td>
1564</tr>
1565<tr class="row-odd"><td></td>
1566<td>Sample z</td>
1567<td>(float) Sample translation from the calibration sample position (for Sample phi = 0)
1568These will be restricted by space group symmetry; result of strain fit refinement.</td>
1569</tr>
1570<tr class="row-even"><td></td>
1571<td>Type</td>
1572<td>(str) &#8216;True&#8217; or &#8216;Conventional&#8217;: The strain model used for the calculation.</td>
1573</tr>
1574<tr class="row-odd"><td></td>
1575<td>d-zero</td>
1576<td>(list:dict) Each item is for a diffraction ring on the image; all items are from the same phase
1577and are used to determine the strain tensor.
1578The dictionary items are:
1579&#8216;Dset&#8217;: (float) True d-spacing for the diffraction ring; entered by the user.
1580&#8216;Dcalc&#8217;: (float) Average calculated d-spacing determined from strain coeff.
1581&#8216;Emat&#8217;: (list: float) The strain tensor elements e11, e12 &amp; e22 (e21=e12, rest are 0)
1582&#8216;Esig&#8217;: (list: float) Esds for Emat from fitting.
1583&#8216;pixLimit&#8217;: (int) Search range to find highest point on ring for each data point
1584&#8216;cutoff&#8217;: (float) I/Ib cutoff for searching.
1585&#8216;ImxyObs&#8217;: (list: lists) [[X],[Y]] observed points to be used for strain calculations.
1586&#8216;ImtaObs&#8217;: (list: lists) [[d],[azm]] transformed via detector calibration from ImxyObs.
1587&#8216;ImtaCalc&#8217;: (list: lists [[d],[azm]] calculated d-spacing &amp; azimuth from fit.</td>
1588</tr>
1589</tbody>
1590</table>
1591</div>
1592<div class="section" id="parameter-dictionary">
1593<h2>Parameter Dictionary<a class="headerlink" href="#parameter-dictionary" title="Permalink to this headline">¶</a></h2>
1594<span class="target" id="parmdict-table"></span><p id="index-14">The parameter dictionary contains all of the variable parameters for the refinement.
1595The dictionary keys are the name of the parameter (&lt;phase&gt;:&lt;hist&gt;:&lt;name&gt;:&lt;atom&gt;).
1596It is prepared in two ways. When loaded from the tree
1597(in <a class="reference internal" href="GSASII.html#GSASII.GSASII.MakeLSParmDict" title="GSASII.GSASII.MakeLSParmDict"><tt class="xref py py-meth docutils literal"><span class="pre">GSASII.GSASII.MakeLSParmDict()</span></tt></a> and
1598<a class="reference internal" href="GSASIIGUIr.html#GSASIIIO.ExportBaseclass.loadParmDict" title="GSASIIIO.ExportBaseclass.loadParmDict"><tt class="xref py py-meth docutils literal"><span class="pre">GSASIIIO.ExportBaseclass.loadParmDict()</span></tt></a>),
1599the values are lists with two elements: <tt class="docutils literal"><span class="pre">[value,</span> <span class="pre">refine</span> <span class="pre">flag]</span></tt></p>
1600<p>When loaded from the GPX file (in
1601<a class="reference internal" href="GSASIIstruc.html#GSASIIstrMain.Refine" title="GSASIIstrMain.Refine"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIstrMain.Refine()</span></tt></a> and <a class="reference internal" href="GSASIIstruc.html#GSASIIstrMain.SeqRefine" title="GSASIIstrMain.SeqRefine"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIstrMain.SeqRefine()</span></tt></a>), the value in the
1602dict is the actual parameter value (usually a float, but sometimes a
1603letter or string flag value (such as I or A for iso/anisotropic).</p>
1604</div>
1605<div class="section" id="classes-and-routines">
1606<h2><em>Classes and routines</em><a class="headerlink" href="#classes-and-routines" title="Permalink to this headline">¶</a></h2>
1607<dl class="data">
1608<dt id="GSASIIobj.AtomIdLookup">
1609<tt class="descclassname">GSASIIobj.</tt><tt class="descname">AtomIdLookup</tt><em class="property"> = {}</em><a class="headerlink" href="#GSASIIobj.AtomIdLookup" title="Permalink to this definition">¶</a></dt>
1610<dd><p>dict listing for each phase index as a str, the atom label and atom random Id,
1611keyed by atom sequential index as a str;
1612best to access this using <a class="reference internal" href="#GSASIIobj.LookupAtomLabel" title="GSASIIobj.LookupAtomLabel"><tt class="xref py py-func docutils literal"><span class="pre">LookupAtomLabel()</span></tt></a></p>
1613</dd></dl>
1614
1615<dl class="data">
1616<dt id="GSASIIobj.AtomRanIdLookup">
1617<tt class="descclassname">GSASIIobj.</tt><tt class="descname">AtomRanIdLookup</tt><em class="property"> = {}</em><a class="headerlink" href="#GSASIIobj.AtomRanIdLookup" title="Permalink to this definition">¶</a></dt>
1618<dd><p>dict listing for each phase the atom sequential index keyed by atom random Id;
1619best to access this using <a class="reference internal" href="#GSASIIobj.LookupAtomId" title="GSASIIobj.LookupAtomId"><tt class="xref py py-func docutils literal"><span class="pre">LookupAtomId()</span></tt></a></p>
1620</dd></dl>
1621
1622<dl class="function">
1623<dt id="GSASIIobj.CompileVarDesc">
1624<tt class="descclassname">GSASIIobj.</tt><tt class="descname">CompileVarDesc</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#CompileVarDesc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.CompileVarDesc" title="Permalink to this definition">¶</a></dt>
1625<dd><p>Set the values in the variable description lookup table (<a class="reference internal" href="#GSASIIobj.VarDesc" title="GSASIIobj.VarDesc"><tt class="xref py py-attr docutils literal"><span class="pre">VarDesc</span></tt></a>)
1626into <a class="reference internal" href="#GSASIIobj.reVarDesc" title="GSASIIobj.reVarDesc"><tt class="xref py py-attr docutils literal"><span class="pre">reVarDesc</span></tt></a>. This is called in <a class="reference internal" href="#GSASIIobj.getDescr" title="GSASIIobj.getDescr"><tt class="xref py py-func docutils literal"><span class="pre">getDescr()</span></tt></a> so the initialization
1627is always done before use.</p>
1628<p>Note that keys may contain regular expressions, where &#8216;[xyz]&#8217;
1629matches &#8216;x&#8217; &#8216;y&#8217; or &#8216;z&#8217; (equivalently &#8216;[x-z]&#8217; describes this as range of values).
1630&#8216;.*&#8217; matches any string. For example:</p>
1631<div class="highlight-python"><div class="highlight"><pre>&#39;AUiso&#39;:&#39;Atomic isotropic displacement parameter&#39;,
1632</pre></div>
1633</div>
1634<p>will match variable <tt class="docutils literal"><span class="pre">'p::AUiso:a'</span></tt>.
1635If parentheses are used in the key, the contents of those parentheses can be
1636used in the value, such as:</p>
1637<div class="highlight-python"><div class="highlight"><pre>&#39;AU([123][123])&#39;:&#39;Atomic anisotropic displacement parameter U\1&#39;,
1638</pre></div>
1639</div>
1640<p>will match <tt class="docutils literal"><span class="pre">AU11</span></tt>, <tt class="docutils literal"><span class="pre">AU23</span></tt>,.. and <cite>U11</cite>, <cite>U23</cite> etc will be displayed
1641in the value when used.</p>
1642</dd></dl>
1643
1644<dl class="data">
1645<dt id="GSASIIobj.DefaultControls">
1646<tt class="descclassname">GSASIIobj.</tt><tt class="descname">DefaultControls</tt><em class="property"> = {'SeqPseudoVars': {}, 'Author': 'no name', 'Reverse Seq': False, 'Copy2Next': False, 'SeqParFitEqList': [], 'max cyc': 3, 'F**2': False, 'shift factor': 1.0, 'deriv type': 'analytic Hessian', 'ShowCell': False, 'HatomFix': False, 'FreePrm2': 'Sample voltage (V)', 'FreePrm1': 'Sample humidity (%)', 'FreePrm3': 'Applied load (MN)', 'UsrReject': {'MaxDF/F': 100.0, 'MinD': 0.05, 'MinExt': 0.01, 'minF/sig': 0, 'MaxD': 500.0}, 'min dM/M': 0.0001}</em><a class="headerlink" href="#GSASIIobj.DefaultControls" title="Permalink to this definition">¶</a></dt>
1647<dd><p>Values to be used as defaults for the initial contents of the <tt class="docutils literal"><span class="pre">Controls</span></tt>
1648data tree item.</p>
1649</dd></dl>
1650
1651<dl class="class">
1652<dt id="GSASIIobj.ExpressionCalcObj">
1653<em class="property">class </em><tt class="descclassname">GSASIIobj.</tt><tt class="descname">ExpressionCalcObj</tt><big>(</big><em>exprObj</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionCalcObj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj" title="Permalink to this definition">¶</a></dt>
1654<dd><p>An object used to evaluate an expression from a <a class="reference internal" href="#GSASIIobj.ExpressionObj" title="GSASIIobj.ExpressionObj"><tt class="xref py py-class docutils literal"><span class="pre">ExpressionObj</span></tt></a>
1655object.</p>
1656<table class="docutils field-list" frame="void" rules="none">
1657<col class="field-name" />
1658<col class="field-body" />
1659<tbody valign="top">
1660<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>exprObj</strong> (<em>ExpressionObj</em>) &#8211; a <a class="reference internal" href="#GSASIIobj.ExpressionObj" title="GSASIIobj.ExpressionObj"><tt class="xref py py-class docutils literal"><span class="pre">ExpressionObj</span></tt></a> expression object with
1661an expression string and mappings for the parameter labels in that object.</td>
1662</tr>
1663</tbody>
1664</table>
1665<dl class="method">
1666<dt id="GSASIIobj.ExpressionCalcObj.EvalExpression">
1667<tt class="descname">EvalExpression</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionCalcObj.EvalExpression"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj.EvalExpression" title="Permalink to this definition">¶</a></dt>
1668<dd><p>Evaluate an expression. Note that the expression
1669and mapping are taken from the <a class="reference internal" href="#GSASIIobj.ExpressionObj" title="GSASIIobj.ExpressionObj"><tt class="xref py py-class docutils literal"><span class="pre">ExpressionObj</span></tt></a> expression object
1670and the parameter values were specified in <a class="reference internal" href="#GSASIIobj.ExpressionCalcObj.SetupCalc" title="GSASIIobj.ExpressionCalcObj.SetupCalc"><tt class="xref py py-meth docutils literal"><span class="pre">SetupCalc()</span></tt></a>.
1671:returns: a single value for the expression. If parameter
1672values are arrays (for example, from wild-carded variable names),
1673the sum of the resulting expression is returned.</p>
1674<p>For example, if the expression is <tt class="docutils literal"><span class="pre">'A*B'</span></tt>,
1675where A is 2.0 and B maps to <tt class="docutils literal"><span class="pre">'1::Afrac:*'</span></tt>, which evaluates to:</p>
1676<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="mf">0.5</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]</span>
1677</pre></div>
1678</div>
1679<p>then the result will be <tt class="docutils literal"><span class="pre">4.0</span></tt>.</p>
1680</dd></dl>
1681
1682<dl class="method">
1683<dt id="GSASIIobj.ExpressionCalcObj.SetupCalc">
1684<tt class="descname">SetupCalc</tt><big>(</big><em>parmDict</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionCalcObj.SetupCalc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj.SetupCalc" title="Permalink to this definition">¶</a></dt>
1685<dd><p>Do all preparations to use the expression for computation.
1686Adds the free parameter values to the parameter dict (parmDict).</p>
1687</dd></dl>
1688
1689<dl class="method">
1690<dt id="GSASIIobj.ExpressionCalcObj.UpdateDict">
1691<tt class="descname">UpdateDict</tt><big>(</big><em>parmDict</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionCalcObj.UpdateDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj.UpdateDict" title="Permalink to this definition">¶</a></dt>
1692<dd><p>Update the dict for the expression with values in a dict
1693:param list parmDict: a dict of values some of which may be in use here</p>
1694</dd></dl>
1695
1696<dl class="method">
1697<dt id="GSASIIobj.ExpressionCalcObj.UpdateVars">
1698<tt class="descname">UpdateVars</tt><big>(</big><em>varList</em>, <em>valList</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionCalcObj.UpdateVars"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj.UpdateVars" title="Permalink to this definition">¶</a></dt>
1699<dd><p>Update the dict for the expression with a set of values
1700:param list varList: a list of variable names
1701:param list valList: a list of corresponding values</p>
1702</dd></dl>
1703
1704<dl class="attribute">
1705<dt id="GSASIIobj.ExpressionCalcObj.compiledExpr">
1706<tt class="descname">compiledExpr</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj.compiledExpr" title="Permalink to this definition">¶</a></dt>
1707<dd><p>The expression as compiled byte-code</p>
1708</dd></dl>
1709
1710<dl class="attribute">
1711<dt id="GSASIIobj.ExpressionCalcObj.eObj">
1712<tt class="descname">eObj</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj.eObj" title="Permalink to this definition">¶</a></dt>
1713<dd><p>The expression and mappings; a <a class="reference internal" href="#GSASIIobj.ExpressionObj" title="GSASIIobj.ExpressionObj"><tt class="xref py py-class docutils literal"><span class="pre">ExpressionObj</span></tt></a> object</p>
1714</dd></dl>
1715
1716<dl class="attribute">
1717<dt id="GSASIIobj.ExpressionCalcObj.exprDict">
1718<tt class="descname">exprDict</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj.exprDict" title="Permalink to this definition">¶</a></dt>
1719<dd><p>dict that defines values for labels used in expression and packages
1720referenced by functions</p>
1721</dd></dl>
1722
1723<dl class="attribute">
1724<dt id="GSASIIobj.ExpressionCalcObj.fxnpkgdict">
1725<tt class="descname">fxnpkgdict</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj.fxnpkgdict" title="Permalink to this definition">¶</a></dt>
1726<dd><p>a dict with references to packages needed to
1727find functions referenced in the expression.</p>
1728</dd></dl>
1729
1730<dl class="attribute">
1731<dt id="GSASIIobj.ExpressionCalcObj.lblLookup">
1732<tt class="descname">lblLookup</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj.lblLookup" title="Permalink to this definition">¶</a></dt>
1733<dd><p>Lookup table that specifies the expression label name that is
1734tied to a particular GSAS-II parameters in the parmDict.</p>
1735</dd></dl>
1736
1737<dl class="attribute">
1738<dt id="GSASIIobj.ExpressionCalcObj.varLookup">
1739<tt class="descname">varLookup</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIobj.ExpressionCalcObj.varLookup" title="Permalink to this definition">¶</a></dt>
1740<dd><p>Lookup table that specifies the GSAS-II variable(s)
1741indexed by the expression label name. (Used for only for diagnostics
1742not evaluation of expression.)</p>
1743</dd></dl>
1744
1745</dd></dl>
1746
1747<dl class="class">
1748<dt id="GSASIIobj.ExpressionObj">
1749<em class="property">class </em><tt class="descclassname">GSASIIobj.</tt><tt class="descname">ExpressionObj</tt><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj" title="Permalink to this definition">¶</a></dt>
1750<dd><p>Defines an object with a user-defined expression, to be used for
1751secondary fits or restraints. Object is created null, but is changed
1752using <a class="reference internal" href="#GSASIIobj.ExpressionObj.LoadExpression" title="GSASIIobj.ExpressionObj.LoadExpression"><tt class="xref py py-meth docutils literal"><span class="pre">LoadExpression()</span></tt></a>. This contains only the minimum
1753information that needs to be stored to save and load the expression
1754and how it is mapped to GSAS-II variables.</p>
1755<dl class="method">
1756<dt id="GSASIIobj.ExpressionObj.CheckVars">
1757<tt class="descname">CheckVars</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj.CheckVars"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj.CheckVars" title="Permalink to this definition">¶</a></dt>
1758<dd><p>Check that the expression can be parsed, all functions are
1759defined and that input loaded into the object is internally
1760consistent. If not an Exception is raised.</p>
1761<table class="docutils field-list" frame="void" rules="none">
1762<col class="field-name" />
1763<col class="field-body" />
1764<tbody valign="top">
1765<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a dict with references to packages needed to
1766find functions referenced in the expression.</td>
1767</tr>
1768</tbody>
1769</table>
1770</dd></dl>
1771
1772<dl class="method">
1773<dt id="GSASIIobj.ExpressionObj.EditExpression">
1774<tt class="descname">EditExpression</tt><big>(</big><em>exprVarLst</em>, <em>varSelect</em>, <em>varName</em>, <em>varValue</em>, <em>varRefflag</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj.EditExpression"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj.EditExpression" title="Permalink to this definition">¶</a></dt>
1775<dd><p>Load the expression and associated settings from the object into
1776arrays used for editing.</p>
1777<table class="docutils field-list" frame="void" rules="none">
1778<col class="field-name" />
1779<col class="field-body" />
1780<tbody valign="top">
1781<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1782<li><strong>exprVarLst</strong> (<em>list</em>) &#8211; parameter labels found in the expression</li>
1783<li><strong>varSelect</strong> (<em>dict</em>) &#8211; this will be 0 for Free parameters
1784and non-zero for expression labels linked to G2 variables.</li>
1785<li><strong>varName</strong> (<em>dict</em>) &#8211; Defines a name (str) associated with each free parameter</li>
1786<li><strong>varValue</strong> (<em>dict</em>) &#8211; Defines a value (float) associated with each free parameter</li>
1787<li><strong>varRefflag</strong> (<em>dict</em>) &#8211; Defines a refinement flag (bool)
1788associated with each free parameter</li>
1789</ul>
1790</td>
1791</tr>
1792<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the expression as a str</p>
1793</td>
1794</tr>
1795</tbody>
1796</table>
1797</dd></dl>
1798
1799<dl class="method">
1800<dt id="GSASIIobj.ExpressionObj.GetDepVar">
1801<tt class="descname">GetDepVar</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj.GetDepVar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj.GetDepVar" title="Permalink to this definition">¶</a></dt>
1802<dd><p>return the dependent variable, or None</p>
1803</dd></dl>
1804
1805<dl class="method">
1806<dt id="GSASIIobj.ExpressionObj.GetIndependentVars">
1807<tt class="descname">GetIndependentVars</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj.GetIndependentVars"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj.GetIndependentVars" title="Permalink to this definition">¶</a></dt>
1808<dd><p>Returns the names of the required independent parameters used in expression</p>
1809</dd></dl>
1810
1811<dl class="method">
1812<dt id="GSASIIobj.ExpressionObj.GetVaried">
1813<tt class="descname">GetVaried</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj.GetVaried"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj.GetVaried" title="Permalink to this definition">¶</a></dt>
1814<dd><p>Returns the names of the free parameters that will be refined</p>
1815</dd></dl>
1816
1817<dl class="method">
1818<dt id="GSASIIobj.ExpressionObj.GetVariedVarVal">
1819<tt class="descname">GetVariedVarVal</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj.GetVariedVarVal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj.GetVariedVarVal" title="Permalink to this definition">¶</a></dt>
1820<dd><p>Returns the names and values of the free parameters that will be refined</p>
1821</dd></dl>
1822
1823<dl class="method">
1824<dt id="GSASIIobj.ExpressionObj.LoadExpression">
1825<tt class="descname">LoadExpression</tt><big>(</big><em>expr</em>, <em>exprVarLst</em>, <em>varSelect</em>, <em>varName</em>, <em>varValue</em>, <em>varRefflag</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj.LoadExpression"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj.LoadExpression" title="Permalink to this definition">¶</a></dt>
1826<dd><p>Load the expression and associated settings into the object. Raises
1827an exception if the expression is not parsed, if not all functions
1828are defined or if not all needed parameter labels in the expression
1829are defined.</p>
1830<p>This will not test if the variable referenced in these definitions
1831are actually in the parameter dictionary. This is checked when the
1832computation for the expression is done in <tt class="xref py py-meth docutils literal"><span class="pre">SetupCalc()</span></tt>.</p>
1833<table class="docutils field-list" frame="void" rules="none">
1834<col class="field-name" />
1835<col class="field-body" />
1836<tbody valign="top">
1837<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1838<li><strong>expr</strong> (<em>str</em>) &#8211; the expression</li>
1839<li><strong>exprVarLst</strong> (<em>list</em>) &#8211; parameter labels found in the expression</li>
1840<li><strong>varSelect</strong> (<em>dict</em>) &#8211; this will be 0 for Free parameters
1841and non-zero for expression labels linked to G2 variables.</li>
1842<li><strong>varName</strong> (<em>dict</em>) &#8211; Defines a name (str) associated with each free parameter</li>
1843<li><strong>varValue</strong> (<em>dict</em>) &#8211; Defines a value (float) associated with each free parameter</li>
1844<li><strong>varRefflag</strong> (<em>dict</em>) &#8211; Defines a refinement flag (bool)
1845associated with each free parameter</li>
1846</ul>
1847</td>
1848</tr>
1849</tbody>
1850</table>
1851</dd></dl>
1852
1853<dl class="method">
1854<dt id="GSASIIobj.ExpressionObj.ParseExpression">
1855<tt class="descname">ParseExpression</tt><big>(</big><em>expr</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj.ParseExpression"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj.ParseExpression" title="Permalink to this definition">¶</a></dt>
1856<dd><p>Parse an expression and return a dict of called functions and
1857the variables used in the expression. Returns None in case an error
1858is encountered. If packages are referenced in functions, they are loaded
1859and the functions are looked up into the modules global
1860workspace.</p>
1861<p>Note that no changes are made to the object other than
1862saving an error message, so that this can be used for testing prior
1863to the save.</p>
1864<table class="docutils field-list" frame="void" rules="none">
1865<col class="field-name" />
1866<col class="field-body" />
1867<tbody valign="top">
1868<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a list of used variables</td>
1869</tr>
1870</tbody>
1871</table>
1872</dd></dl>
1873
1874<dl class="method">
1875<dt id="GSASIIobj.ExpressionObj.SetDepVar">
1876<tt class="descname">SetDepVar</tt><big>(</big><em>var</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj.SetDepVar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj.SetDepVar" title="Permalink to this definition">¶</a></dt>
1877<dd><p>Set the dependent variable, if used</p>
1878</dd></dl>
1879
1880<dl class="method">
1881<dt id="GSASIIobj.ExpressionObj.UpdateVariedVars">
1882<tt class="descname">UpdateVariedVars</tt><big>(</big><em>varyList</em>, <em>values</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#ExpressionObj.UpdateVariedVars"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.ExpressionObj.UpdateVariedVars" title="Permalink to this definition">¶</a></dt>
1883<dd><p>Updates values for the free parameters (after a refinement); only updates refined vars</p>
1884</dd></dl>
1885
1886<dl class="attribute">
1887<dt id="GSASIIobj.ExpressionObj.assgnVars">
1888<tt class="descname">assgnVars</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIobj.ExpressionObj.assgnVars" title="Permalink to this definition">¶</a></dt>
1889<dd><p>A dict where keys are label names in the expression mapping to a GSAS-II
1890variable. The value a G2 variable name.
1891Note that the G2 variable name may contain a wild-card and correspond to
1892multiple values.</p>
1893</dd></dl>
1894
1895<dl class="attribute">
1896<dt id="GSASIIobj.ExpressionObj.expression">
1897<tt class="descname">expression</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIobj.ExpressionObj.expression" title="Permalink to this definition">¶</a></dt>
1898<dd><p>The expression as a text string</p>
1899</dd></dl>
1900
1901<dl class="attribute">
1902<dt id="GSASIIobj.ExpressionObj.freeVars">
1903<tt class="descname">freeVars</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIobj.ExpressionObj.freeVars" title="Permalink to this definition">¶</a></dt>
1904<dd><p>A dict where keys are label names in the expression mapping to a free
1905parameter. The value is a list with:</p>
1906<blockquote>
1907<div><ul class="simple">
1908<li>a name assigned to the parameter</li>
1909<li>a value for to the parameter and</li>
1910<li>a flag to determine if the variable is refined.</li>
1911</ul>
1912</div></blockquote>
1913</dd></dl>
1914
1915<dl class="attribute">
1916<dt id="GSASIIobj.ExpressionObj.lastError">
1917<tt class="descname">lastError</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIobj.ExpressionObj.lastError" title="Permalink to this definition">¶</a></dt>
1918<dd><p>Shows last encountered error in processing expression
1919(list of 1-3 str values)</p>
1920</dd></dl>
1921
1922</dd></dl>
1923
1924<dl class="class">
1925<dt id="GSASIIobj.G2VarObj">
1926<em class="property">class </em><tt class="descclassname">GSASIIobj.</tt><tt class="descname">G2VarObj</tt><big>(</big><em>*args</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#G2VarObj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.G2VarObj" title="Permalink to this definition">¶</a></dt>
1927<dd><p>Defines a GSAS-II variable either using the phase/atom/histogram
1928unique Id numbers or using a character string that specifies
1929variables by phase/atom/histogram number (which can change).
1930Note that <tt class="xref py py-func docutils literal"><span class="pre">LoadID()</span></tt> should be used to (re)load the current Ids
1931before creating or later using the G2VarObj object.</p>
1932<p>This can store rigid body variables, but does not translate the residue # and
1933body # to/from random Ids</p>
1934<p>A <a class="reference internal" href="#GSASIIobj.G2VarObj" title="GSASIIobj.G2VarObj"><tt class="xref py py-class docutils literal"><span class="pre">G2VarObj</span></tt></a> object can be created with a single parameter:</p>
1935<table class="docutils field-list" frame="void" rules="none">
1936<col class="field-name" />
1937<col class="field-body" />
1938<tbody valign="top">
1939<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>varname</strong> (<em>str/tuple</em>) &#8211; <dl class="docutils">
1940<dt>a single value can be used to create a <a class="reference internal" href="#GSASIIobj.G2VarObj" title="GSASIIobj.G2VarObj"><tt class="xref py py-class docutils literal"><span class="pre">G2VarObj</span></tt></a></dt>
1941<dd>object. If a string, it must be of form &#8220;p:h:var&#8221; or &#8220;p:h:var:a&#8221;, where</dd>
1942</dl>
1943<ul class="simple">
1944<li>p is the phase number (which may be left blank or may be &#8216;*&#8217; to indicate all phases);</li>
1945<li>h is the histogram number (which may be left blank or may be &#8216;*&#8217; to indicate all histograms);</li>
1946<li>a is the atom number (which may be left blank in which case the third colon is omitted).
1947The atom number can be specified as &#8216;*&#8217; if a phase number is specified (not as &#8216;*&#8217;).
1948For rigid body variables, specify a will be a string of form &#8220;residue:body#&#8221;</li>
1949</ul>
1950<blockquote>
1951<div>Alternately a single tuple of form (Phase,Histogram,VarName,AtomID) can be used, where
1952Phase, Histogram, and AtomID are None or are ranId values (or one can be &#8216;*&#8217;)
1953and VarName is a string. Note that if Phase is &#8216;*&#8217; then the AtomID is an atom number.
1954For a rigid body variables, AtomID is a string of form &#8220;residue:body#&#8221;.</div></blockquote>
1955</td>
1956</tr>
1957</tbody>
1958</table>
1959<p>If four positional arguments are supplied, they are:</p>
1960<table class="docutils field-list" frame="void" rules="none">
1961<col class="field-name" />
1962<col class="field-body" />
1963<tbody valign="top">
1964<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1965<li><strong>phasenum</strong> (<em>str/int</em>) &#8211; The number for the phase (or None or &#8216;*&#8217;)</li>
1966<li><strong>histnum</strong> (<em>str/int</em>) &#8211; The number for the histogram (or None or &#8216;*&#8217;)</li>
1967<li><strong>varname</strong> (<em>str</em>) &#8211; a single value can be used to create a <a class="reference internal" href="#GSASIIobj.G2VarObj" title="GSASIIobj.G2VarObj"><tt class="xref py py-class docutils literal"><span class="pre">G2VarObj</span></tt></a></li>
1968<li><strong>atomnum</strong> (<em>str/int</em>) &#8211; The number for the atom (or None or &#8216;*&#8217;)</li>
1969</ul>
1970</td>
1971</tr>
1972</tbody>
1973</table>
1974<dl class="method">
1975<dt id="GSASIIobj.G2VarObj.varname">
1976<tt class="descname">varname</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#G2VarObj.varname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.G2VarObj.varname" title="Permalink to this definition">¶</a></dt>
1977<dd><p>Formats the GSAS-II variable name as a &#8220;traditional&#8221; GSAS-II variable
1978string (p:h:&lt;var&gt;:a) or (p:h:&lt;var&gt;)</p>
1979<table class="docutils field-list" frame="void" rules="none">
1980<col class="field-name" />
1981<col class="field-body" />
1982<tbody valign="top">
1983<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the variable name as a str</td>
1984</tr>
1985</tbody>
1986</table>
1987</dd></dl>
1988
1989</dd></dl>
1990
1991<dl class="function">
1992<dt id="GSASIIobj.GenWildCard">
1993<tt class="descclassname">GSASIIobj.</tt><tt class="descname">GenWildCard</tt><big>(</big><em>varlist</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#GenWildCard"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.GenWildCard" title="Permalink to this definition">¶</a></dt>
1994<dd><p>Generate wildcard versions of G2 variables. These introduce &#8216;*&#8217;
1995for a phase, histogram or atom number (but only for one of these
1996fields) but only when there is more than one matching variable in the
1997input variable list. So if the input is this:</p>
1998<div class="highlight-python"><div class="highlight"><pre><span class="n">varlist</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;0::AUiso:0&#39;</span><span class="p">,</span> <span class="s">&#39;0::AUiso:1&#39;</span><span class="p">,</span> <span class="s">&#39;1::AUiso:0&#39;</span><span class="p">]</span>
1999</pre></div>
2000</div>
2001<p>then the output will be this:</p>
2002<div class="highlight-python"><div class="highlight"><pre><span class="n">wildList</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;*::AUiso:0&#39;</span><span class="p">,</span> <span class="s">&#39;0::AUiso:*&#39;</span><span class="p">]</span>
2003</pre></div>
2004</div>
2005<table class="docutils field-list" frame="void" rules="none">
2006<col class="field-name" />
2007<col class="field-body" />
2008<tbody valign="top">
2009<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>varlist</strong> (<em>list</em>) &#8211; an input list of GSAS-II variable names
2010(such as 0::AUiso:0)</td>
2011</tr>
2012<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">wildList, the generated list of wild card variable names.</td>
2013</tr>
2014</tbody>
2015</table>
2016</dd></dl>
2017
2018<dl class="data">
2019<dt id="GSASIIobj.HistIdLookup">
2020<tt class="descclassname">GSASIIobj.</tt><tt class="descname">HistIdLookup</tt><em class="property"> = {}</em><a class="headerlink" href="#GSASIIobj.HistIdLookup" title="Permalink to this definition">¶</a></dt>
2021<dd><p>dict listing histogram name and random Id, keyed by sequential histogram index as a str;
2022best to access this using <a class="reference internal" href="#GSASIIobj.LookupHistName" title="GSASIIobj.LookupHistName"><tt class="xref py py-func docutils literal"><span class="pre">LookupHistName()</span></tt></a></p>
2023</dd></dl>
2024
2025<dl class="data">
2026<dt id="GSASIIobj.HistRanIdLookup">
2027<tt class="descclassname">GSASIIobj.</tt><tt class="descname">HistRanIdLookup</tt><em class="property"> = {}</em><a class="headerlink" href="#GSASIIobj.HistRanIdLookup" title="Permalink to this definition">¶</a></dt>
2028<dd><p>dict listing histogram sequential index keyed by histogram random Id;
2029best to access this using <a class="reference internal" href="#GSASIIobj.LookupHistId" title="GSASIIobj.LookupHistId"><tt class="xref py py-func docutils literal"><span class="pre">LookupHistId()</span></tt></a></p>
2030</dd></dl>
2031
2032<dl class="function">
2033<dt id="GSASIIobj.IndexAllIds">
2034<tt class="descclassname">GSASIIobj.</tt><tt class="descname">IndexAllIds</tt><big>(</big><em>Histograms</em>, <em>Phases</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#IndexAllIds"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.IndexAllIds" title="Permalink to this definition">¶</a></dt>
2035<dd><p>Scan through the used phases &amp; histograms and create an index
2036to the random numbers of phases, histograms and atoms. While doing this,
2037confirm that assigned random numbers are unique &#8211; just in case lightning
2038strikes twice in the same place.</p>
2039<p>Note: this code assumes that the atom random Id (ranId) is the last
2040element each atom record.</p>
2041<p>This is called in three places (only): <a class="reference internal" href="GSASIIstruc.html#GSASIIstrIO.GetUsedHistogramsAndPhases" title="GSASIIstrIO.GetUsedHistogramsAndPhases"><tt class="xref py py-func docutils literal"><span class="pre">GSASIIstrIO.GetUsedHistogramsAndPhases()</span></tt></a>
2042(which loads the histograms and phases from a GPX file),
2043<a class="reference internal" href="GSASII.html#GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree" title="GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree"><tt class="xref py py-meth docutils literal"><span class="pre">GetUsedHistogramsAndPhasesfromTree()</span></tt></a>
2044(which loads the histograms and phases from the data tree.) and
2045<a class="reference internal" href="GSASIIGUI.html#GSASIIconstrGUI.UpdateConstraints" title="GSASIIconstrGUI.UpdateConstraints"><tt class="xref py py-meth docutils literal"><span class="pre">GSASIIconstrGUI.UpdateConstraints()</span></tt></a>
2046(which displays &amp; edits the constraints in a GUI)</p>
2047<p>TODO: do we need a lookup for rigid body variables?</p>
2048</dd></dl>
2049
2050<dl class="function">
2051<dt id="GSASIIobj.LookupAtomId">
2052<tt class="descclassname">GSASIIobj.</tt><tt class="descname">LookupAtomId</tt><big>(</big><em>pId</em>, <em>ranId</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#LookupAtomId"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.LookupAtomId" title="Permalink to this definition">¶</a></dt>
2053<dd><p>Get the atom number from a phase and atom random Id</p>
2054<table class="docutils field-list" frame="void" rules="none">
2055<col class="field-name" />
2056<col class="field-body" />
2057<tbody valign="top">
2058<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2059<li><strong>pId</strong> (<em>int/str</em>) &#8211; the sequential number of the phase</li>
2060<li><strong>ranId</strong> (<em>int</em>) &#8211; the random Id assigned to an atom</li>
2061</ul>
2062</td>
2063</tr>
2064<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the index number of the atom (str)</p>
2065</td>
2066</tr>
2067</tbody>
2068</table>
2069</dd></dl>
2070
2071<dl class="function">
2072<dt id="GSASIIobj.LookupAtomLabel">
2073<tt class="descclassname">GSASIIobj.</tt><tt class="descname">LookupAtomLabel</tt><big>(</big><em>pId</em>, <em>index</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#LookupAtomLabel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.LookupAtomLabel" title="Permalink to this definition">¶</a></dt>
2074<dd><p>Get the atom label from a phase and atom index number</p>
2075<table class="docutils field-list" frame="void" rules="none">
2076<col class="field-name" />
2077<col class="field-body" />
2078<tbody valign="top">
2079<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2080<li><strong>pId</strong> (<em>int/str</em>) &#8211; the sequential number of the phase</li>
2081<li><strong>index</strong> (<em>int</em>) &#8211; the index of the atom in the list of atoms</li>
2082</ul>
2083</td>
2084</tr>
2085<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the label for the atom (str) and the random Id of the atom (int)</p>
2086</td>
2087</tr>
2088</tbody>
2089</table>
2090</dd></dl>
2091
2092<dl class="function">
2093<dt id="GSASIIobj.LookupHistId">
2094<tt class="descclassname">GSASIIobj.</tt><tt class="descname">LookupHistId</tt><big>(</big><em>ranId</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#LookupHistId"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.LookupHistId" title="Permalink to this definition">¶</a></dt>
2095<dd><p>Get the histogram number and name from a histogram random Id</p>
2096<table class="docutils field-list" frame="void" rules="none">
2097<col class="field-name" />
2098<col class="field-body" />
2099<tbody valign="top">
2100<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ranId</strong> (<em>int</em>) &#8211; the random Id assigned to a histogram</td>
2101</tr>
2102<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the sequential Id (hId) number for the histogram (str)</td>
2103</tr>
2104</tbody>
2105</table>
2106</dd></dl>
2107
2108<dl class="function">
2109<dt id="GSASIIobj.LookupHistName">
2110<tt class="descclassname">GSASIIobj.</tt><tt class="descname">LookupHistName</tt><big>(</big><em>hId</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#LookupHistName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.LookupHistName" title="Permalink to this definition">¶</a></dt>
2111<dd><p>Get the histogram number and name from a histogram Id</p>
2112<table class="docutils field-list" frame="void" rules="none">
2113<col class="field-name" />
2114<col class="field-body" />
2115<tbody valign="top">
2116<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>hId</strong> (<em>int/str</em>) &#8211; the sequential assigned to a histogram</td>
2117</tr>
2118<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">(hist,ranId) where hist is the name of the histogram (str)
2119and ranId is the random # id for the histogram (int)</td>
2120</tr>
2121</tbody>
2122</table>
2123</dd></dl>
2124
2125<dl class="function">
2126<dt id="GSASIIobj.LookupPhaseId">
2127<tt class="descclassname">GSASIIobj.</tt><tt class="descname">LookupPhaseId</tt><big>(</big><em>ranId</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#LookupPhaseId"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.LookupPhaseId" title="Permalink to this definition">¶</a></dt>
2128<dd><p>Get the phase number and name from a phase random Id</p>
2129<table class="docutils field-list" frame="void" rules="none">
2130<col class="field-name" />
2131<col class="field-body" />
2132<tbody valign="top">
2133<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ranId</strong> (<em>int</em>) &#8211; the random Id assigned to a phase</td>
2134</tr>
2135<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the sequential Id (pId) number for the phase (str)</td>
2136</tr>
2137</tbody>
2138</table>
2139</dd></dl>
2140
2141<dl class="function">
2142<dt id="GSASIIobj.LookupPhaseName">
2143<tt class="descclassname">GSASIIobj.</tt><tt class="descname">LookupPhaseName</tt><big>(</big><em>pId</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#LookupPhaseName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.LookupPhaseName" title="Permalink to this definition">¶</a></dt>
2144<dd><p>Get the phase number and name from a phase Id</p>
2145<table class="docutils field-list" frame="void" rules="none">
2146<col class="field-name" />
2147<col class="field-body" />
2148<tbody valign="top">
2149<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pId</strong> (<em>int/str</em>) &#8211; the sequential assigned to a phase</td>
2150</tr>
2151<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">(phase,ranId) where phase is the name of the phase (str)
2152and ranId is the random # id for the phase (int)</td>
2153</tr>
2154</tbody>
2155</table>
2156</dd></dl>
2157
2158<dl class="function">
2159<dt id="GSASIIobj.LookupWildCard">
2160<tt class="descclassname">GSASIIobj.</tt><tt class="descname">LookupWildCard</tt><big>(</big><em>varname</em>, <em>varlist</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#LookupWildCard"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.LookupWildCard" title="Permalink to this definition">¶</a></dt>
2161<dd><p>returns a list of variable names from list varname
2162that match wildcard name in varname</p>
2163<table class="docutils field-list" frame="void" rules="none">
2164<col class="field-name" />
2165<col class="field-body" />
2166<tbody valign="top">
2167<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2168<li><strong>varname</strong> (<em>str</em>) &#8211; a G2 variable name containing a wildcard
2169(such as *::var)</li>
2170<li><strong>varlist</strong> (<em>list</em>) &#8211; the list of all variable names used in
2171the current project</li>
2172</ul>
2173</td>
2174</tr>
2175<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list of matching GSAS-II variables (may be empty)</p>
2176</td>
2177</tr>
2178</tbody>
2179</table>
2180</dd></dl>
2181
2182<dl class="function">
2183<dt id="GSASIIobj.MakeUniqueLabel">
2184<tt class="descclassname">GSASIIobj.</tt><tt class="descname">MakeUniqueLabel</tt><big>(</big><em>lbl</em>, <em>labellist</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#MakeUniqueLabel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.MakeUniqueLabel" title="Permalink to this definition">¶</a></dt>
2185<dd><p>Make sure that every a label is unique against a list by adding
2186digits at the end until it is not found in list.</p>
2187<table class="docutils field-list" frame="void" rules="none">
2188<col class="field-name" />
2189<col class="field-body" />
2190<tbody valign="top">
2191<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2192<li><strong>lbl</strong> (<em>str</em>) &#8211; the input label</li>
2193<li><strong>labellist</strong> (<em>list</em>) &#8211; the labels that have already been encountered</li>
2194</ul>
2195</td>
2196</tr>
2197<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">lbl if not found in labellist or lbl with <tt class="docutils literal"><span class="pre">_1-9</span></tt> (or
2198<tt class="docutils literal"><span class="pre">_10-99</span></tt>, etc.) appended at the end</p>
2199</td>
2200</tr>
2201</tbody>
2202</table>
2203</dd></dl>
2204
2205<dl class="data">
2206<dt id="GSASIIobj.PhaseIdLookup">
2207<tt class="descclassname">GSASIIobj.</tt><tt class="descname">PhaseIdLookup</tt><em class="property"> = {}</em><a class="headerlink" href="#GSASIIobj.PhaseIdLookup" title="Permalink to this definition">¶</a></dt>
2208<dd><p>dict listing phase name and random Id keyed by sequential phase index as a str;
2209best to access this using <a class="reference internal" href="#GSASIIobj.LookupPhaseName" title="GSASIIobj.LookupPhaseName"><tt class="xref py py-func docutils literal"><span class="pre">LookupPhaseName()</span></tt></a></p>
2210</dd></dl>
2211
2212<dl class="data">
2213<dt id="GSASIIobj.PhaseRanIdLookup">
2214<tt class="descclassname">GSASIIobj.</tt><tt class="descname">PhaseRanIdLookup</tt><em class="property"> = {}</em><a class="headerlink" href="#GSASIIobj.PhaseRanIdLookup" title="Permalink to this definition">¶</a></dt>
2215<dd><p>dict listing phase sequential index keyed by phase random Id;
2216best to access this using <a class="reference internal" href="#GSASIIobj.LookupPhaseId" title="GSASIIobj.LookupPhaseId"><tt class="xref py py-func docutils literal"><span class="pre">LookupPhaseId()</span></tt></a></p>
2217</dd></dl>
2218
2219<dl class="data">
2220<dt id="GSASIIobj.ShortHistNames">
2221<tt class="descclassname">GSASIIobj.</tt><tt class="descname">ShortHistNames</tt><em class="property"> = {}</em><a class="headerlink" href="#GSASIIobj.ShortHistNames" title="Permalink to this definition">¶</a></dt>
2222<dd><p>a dict containing a possibly shortened and when non-unique numbered
2223version of the histogram name. Keyed by the histogram sequential index.</p>
2224</dd></dl>
2225
2226<dl class="data">
2227<dt id="GSASIIobj.ShortPhaseNames">
2228<tt class="descclassname">GSASIIobj.</tt><tt class="descname">ShortPhaseNames</tt><em class="property"> = {}</em><a class="headerlink" href="#GSASIIobj.ShortPhaseNames" title="Permalink to this definition">¶</a></dt>
2229<dd><p>a dict containing a possibly shortened and when non-unique numbered
2230version of the phase name. Keyed by the phase sequential index.</p>
2231</dd></dl>
2232
2233<dl class="data">
2234<dt id="GSASIIobj.VarDesc">
2235<tt class="descclassname">GSASIIobj.</tt><tt class="descname">VarDesc</tt><em class="property"> = {}</em><a class="headerlink" href="#GSASIIobj.VarDesc" title="Permalink to this definition">¶</a></dt>
2236<dd><p>This dictionary lists descriptions for GSAS-II variables,
2237as set in <a class="reference internal" href="#GSASIIobj.CompileVarDesc" title="GSASIIobj.CompileVarDesc"><tt class="xref py py-func docutils literal"><span class="pre">CompileVarDesc()</span></tt></a>. See that function for a description
2238for how keys and values are written.</p>
2239</dd></dl>
2240
2241<dl class="function">
2242<dt id="GSASIIobj.VarDescr">
2243<tt class="descclassname">GSASIIobj.</tt><tt class="descname">VarDescr</tt><big>(</big><em>varname</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#VarDescr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.VarDescr" title="Permalink to this definition">¶</a></dt>
2244<dd><p>Return two strings with a more complete description for a GSAS-II variable</p>
2245<table class="docutils field-list" frame="void" rules="none">
2246<col class="field-name" />
2247<col class="field-body" />
2248<tbody valign="top">
2249<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>str</em>) &#8211; A full G2 variable name with 2 or 3 or 4
2250colons (&lt;p&gt;:&lt;h&gt;:name[:&lt;a&gt;] or &lt;p&gt;::RBname:&lt;r&gt;:&lt;t&gt;])</td>
2251</tr>
2252<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">(loc,meaning) where loc describes what item the variable is mapped
2253(phase, histogram, etc.) and meaning describes what the variable does.</td>
2254</tr>
2255</tbody>
2256</table>
2257</dd></dl>
2258
2259<dl class="function">
2260<dt id="GSASIIobj.fmtVarDescr">
2261<tt class="descclassname">GSASIIobj.</tt><tt class="descname">fmtVarDescr</tt><big>(</big><em>varname</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#fmtVarDescr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.fmtVarDescr" title="Permalink to this definition">¶</a></dt>
2262<dd><p>Return a string with a more complete description for a GSAS-II variable</p>
2263<table class="docutils field-list" frame="void" rules="none">
2264<col class="field-name" />
2265<col class="field-body" />
2266<tbody valign="top">
2267<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>varname</strong> (<em>str</em>) &#8211; A full G2 variable name with 2 or 3 or 4
2268colons (&lt;p&gt;:&lt;h&gt;:name[:&lt;a&gt;] or &lt;p&gt;::RBname:&lt;r&gt;:&lt;t&gt;])</td>
2269</tr>
2270<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a string with the description</td>
2271</tr>
2272</tbody>
2273</table>
2274</dd></dl>
2275
2276<dl class="function">
2277<dt id="GSASIIobj.getDescr">
2278<tt class="descclassname">GSASIIobj.</tt><tt class="descname">getDescr</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#getDescr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.getDescr" title="Permalink to this definition">¶</a></dt>
2279<dd><p>Return a short description for a GSAS-II variable</p>
2280<table class="docutils field-list" frame="void" rules="none">
2281<col class="field-name" />
2282<col class="field-body" />
2283<tbody valign="top">
2284<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>str</em>) &#8211; The descriptive part of the variable name without colons (:)</td>
2285</tr>
2286<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a short description or None if not found</td>
2287</tr>
2288</tbody>
2289</table>
2290</dd></dl>
2291
2292<dl class="function">
2293<dt id="GSASIIobj.getVarDescr">
2294<tt class="descclassname">GSASIIobj.</tt><tt class="descname">getVarDescr</tt><big>(</big><em>varname</em><big>)</big><a class="reference internal" href="_modules/GSASIIobj.html#getVarDescr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIobj.getVarDescr" title="Permalink to this definition">¶</a></dt>
2295<dd><p>Return a short description for a GSAS-II variable</p>
2296<table class="docutils field-list" frame="void" rules="none">
2297<col class="field-name" />
2298<col class="field-body" />
2299<tbody valign="top">
2300<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>str</em>) &#8211; A full G2 variable name with 2 or 3 or 4
2301colons (&lt;p&gt;:&lt;h&gt;:name[:&lt;a1&gt;][:&lt;a2&gt;])</td>
2302</tr>
2303<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a six element list as [<cite>p</cite>,`h`,`name`,`a1`,`a2`,`description`],
2304where <cite>p</cite>, <cite>h</cite>, <cite>a1</cite>, <cite>a2</cite> are str values or <cite>None</cite>, for the phase number,
2305the histogram number and the atom number; <cite>name</cite> will always be
2306a str; and <cite>description</cite> is str or <cite>None</cite>.
2307If the variable name is incorrectly formed (for example, wrong
2308number of colons), <cite>None</cite> is returned instead of a list.</td>
2309</tr>
2310</tbody>
2311</table>
2312</dd></dl>
2313
2314<dl class="data">
2315<dt id="GSASIIobj.reVarDesc">
2316<tt class="descclassname">GSASIIobj.</tt><tt class="descname">reVarDesc</tt><em class="property"> = {}</em><a class="headerlink" href="#GSASIIobj.reVarDesc" title="Permalink to this definition">¶</a></dt>
2317<dd><p>This dictionary lists descriptions for GSAS-II variables with
2318the same values as <a class="reference internal" href="#GSASIIobj.VarDesc" title="GSASIIobj.VarDesc"><tt class="xref py py-attr docutils literal"><span class="pre">VarDesc</span></tt></a> except that keys have been compiled as
2319regular expressions. Initialized in <a class="reference internal" href="#GSASIIobj.CompileVarDesc" title="GSASIIobj.CompileVarDesc"><tt class="xref py py-func docutils literal"><span class="pre">CompileVarDesc()</span></tt></a>.</p>
2320</dd></dl>
2321
2322</div>
2323</div>
2324
2325
2326          </div>
2327        </div>
2328      </div>
2329      <div class="sphinxsidebar">
2330        <div class="sphinxsidebarwrapper">
2331            <p class="logo"><a href="index.html">
2332              <img class="logo" src="_static/G2_html_logo.png" alt="Logo"/>
2333            </a></p>
2334  <h3><a href="index.html">Table Of Contents</a></h3>
2335  <ul>
2336<li><a class="reference internal" href="#"><em>GSASIIobj: Data objects</em></a><ul>
2337<li><a class="reference internal" href="#constraints-tree-item">Constraints Tree Item</a></li>
2338<li><a class="reference internal" href="#covariance-tree-item">Covariance Tree Item</a></li>
2339<li><a class="reference internal" href="#phase-tree-items">Phase Tree Items</a></li>
2340<li><a class="reference internal" href="#rigid-body-objects">Rigid Body Objects</a></li>
2341<li><a class="reference internal" href="#space-group-objects">Space Group Objects</a></li>
2342<li><a class="reference internal" href="#atom-records">Atom Records</a></li>
2343<li><a class="reference internal" href="#drawing-atom-records">Drawing Atom Records</a></li>
2344<li><a class="reference internal" href="#powder-diffraction-tree-items">Powder Diffraction Tree Items</a></li>
2345<li><a class="reference internal" href="#powder-reflection-data-structure">Powder Reflection Data Structure</a></li>
2346<li><a class="reference internal" href="#single-crystal-tree-items">Single Crystal Tree Items</a></li>
2347<li><a class="reference internal" href="#single-crystal-reflection-data-structure">Single Crystal Reflection Data Structure</a></li>
2348<li><a class="reference internal" href="#image-data-structure">Image Data Structure</a></li>
2349<li><a class="reference internal" href="#parameter-dictionary">Parameter Dictionary</a></li>
2350<li><a class="reference internal" href="#classes-and-routines"><em>Classes and routines</em></a></li>
2351</ul>
2352</li>
2353</ul>
2354
2355  <h4>Previous topic</h4>
2356  <p class="topless"><a href="GSASII.html"
2357                        title="previous chapter"><em>GSAS-II Main Module</em></a></p>
2358  <h4>Next topic</h4>
2359  <p class="topless"><a href="GSASIIutil.html"
2360                        title="next chapter"><em>GSAS-II Utility Modules</em></a></p>
2361  <h3>This Page</h3>
2362  <ul class="this-page-menu">
2363    <li><a href="_sources/GSASIIobj.txt"
2364           rel="nofollow">Show Source</a></li>
2365  </ul>
2366<div id="searchbox" style="display: none">
2367  <h3>Quick search</h3>
2368    <form class="search" action="search.html" method="get">
2369      <input type="text" name="q" />
2370      <input type="submit" value="Go" />
2371      <input type="hidden" name="check_keywords" value="yes" />
2372      <input type="hidden" name="area" value="default" />
2373    </form>
2374    <p class="searchtip" style="font-size: 90%">
2375    Enter search terms or a module, class or function name.
2376    </p>
2377</div>
2378<script type="text/javascript">$('#searchbox').show(0);</script>
2379        </div>
2380      </div>
2381      <div class="clearer"></div>
2382    </div>
2383    <div class="related">
2384      <h3>Navigation</h3>
2385      <ul>
2386        <li class="right" style="margin-right: 10px">
2387          <a href="genindex.html" title="General Index"
2388             >index</a></li>
2389        <li class="right" >
2390          <a href="py-modindex.html" title="Python Module Index"
2391             >modules</a> |</li>
2392        <li class="right" >
2393          <a href="GSASIIutil.html" title="GSAS-II Utility Modules"
2394             >next</a> |</li>
2395        <li class="right" >
2396          <a href="GSASII.html" title="GSAS-II Main Module"
2397             >previous</a> |</li>
2398        <li><a href="index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li> 
2399      </ul>
2400    </div>
2401    <div class="footer">
2402        &copy; Copyright 2013, Von Dreele and Toby for Argonne National Laboratory.
2403      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
2404    </div>
2405  </body>
2406</html>
Note: See TracBrowser for help on using the repository browser.