source: trunk/sphinxdocs/build/html/GSASIIutil.html @ 1183

Last change on this file since 1183 was 1183, checked in by toby, 8 years ago

fixup number formatting; update produced doc files

  • Property svn:mime-type set to text/html
File size: 117.1 KB
Line 
1
2
3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6
7<html xmlns="http://www.w3.org/1999/xhtml">
8  <head>
9    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10   
11    <title>GSAS-II Utility Modules &mdash; GSAS-II 0.2.0 documentation</title>
12   
13    <link rel="stylesheet" href="_static/default.css" type="text/css" />
14    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
15   
16    <script type="text/javascript">
17      var DOCUMENTATION_OPTIONS = {
18        URL_ROOT:    '',
19        VERSION:     '0.2.0',
20        COLLAPSE_INDEX: false,
21        FILE_SUFFIX: '.html',
22        HAS_SOURCE:  true
23      };
24    </script>
25    <script type="text/javascript" src="_static/jquery.js"></script>
26    <script type="text/javascript" src="_static/underscore.js"></script>
27    <script type="text/javascript" src="_static/doctools.js"></script>
28    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
29    <link rel="top" title="GSAS-II 0.2.0 documentation" href="index.html" />
30    <link rel="next" title="GSAS-II GUI Routines" href="GSASIIGUIr.html" />
31    <link rel="prev" title="GSASIIobj: Data objects" href="GSASIIobj.html" /> 
32  </head>
33  <body>
34    <div class="related">
35      <h3>Navigation</h3>
36      <ul>
37        <li class="right" style="margin-right: 10px">
38          <a href="genindex.html" title="General Index"
39             accesskey="I">index</a></li>
40        <li class="right" >
41          <a href="py-modindex.html" title="Python Module Index"
42             >modules</a> |</li>
43        <li class="right" >
44          <a href="GSASIIGUIr.html" title="GSAS-II GUI Routines"
45             accesskey="N">next</a> |</li>
46        <li class="right" >
47          <a href="GSASIIobj.html" title="GSASIIobj: Data objects"
48             accesskey="P">previous</a> |</li>
49        <li><a href="index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li> 
50      </ul>
51    </div> 
52
53    <div class="document">
54      <div class="documentwrapper">
55        <div class="bodywrapper">
56          <div class="body">
57           
58  <div class="section" id="module-GSASIIdata">
59<span id="gsas-ii-utility-modules"></span><h1><em>GSAS-II Utility Modules</em><a class="headerlink" href="#module-GSASIIdata" title="Permalink to this headline">¶</a></h1>
60<div class="section" id="gsasiidata-data-for-computations">
61<h2><em>GSASIIdata: Data for computations</em><a class="headerlink" href="#gsasiidata-data-for-computations" title="Permalink to this headline">¶</a></h2>
62<p>At present this module defines one dict, <tt class="docutils literal"><span class="pre">ramachandranDist</span></tt>,
63which contains arrays for All and specific amino acids</p>
64</div>
65<span class="target" id="module-ElementTable"></span><div class="section" id="elementtable-periodic-table-data">
66<h2><em>ElementTable: Periodic Table Data</em><a class="headerlink" href="#elementtable-periodic-table-data" title="Permalink to this headline">¶</a></h2>
67<p>Element table data for building periodic table with valences &amp; JMOL colors.
68Need these in case we go back to this periodic table coloring scheme.</p>
69<p>Defines list <tt class="docutils literal"><span class="pre">ElTable</span></tt> which contains all defined oxidation states for each
70element, the location in the table, an element name, a color, a size and a
71second color.</p>
72</div>
73<span class="target" id="module-FormFactors"></span><div class="section" id="formfactors-scattering-data">
74<h2><em>FormFactors: Scattering Data</em><a class="headerlink" href="#formfactors-scattering-data" title="Permalink to this headline">¶</a></h2>
75<p>Contains atomic scattering factors from
76&#8220;New Analytical Scattering Factor Functions for Free Atoms
77and Ions for Free Atoms and Ions&#8221;,
78D. Waasmaier &amp; A. Kirfel,
79<em>Acta Cryst.</em> <strong>(1995).</strong> A51, 416-413.</p>
80<p>Also, tabulated coefficients for calculation of Compton Cross Section as a function of sin(theta)/lambda from
81&#8220;Analytic Approximations to Incoherently Scattered X-Ray Intensities&#8221;,
82H. H. M. Balyuzi, <em>Acta Cryst.</em> <strong>(1975).</strong> A31, 600.</p>
83</div>
84<span class="target" id="module-ImageCalibrants"></span><div class="section" id="imagecalibrants-calibration-standards">
85<h2><em>ImageCalibrants: Calibration Standards</em><a class="headerlink" href="#imagecalibrants-calibration-standards" title="Permalink to this headline">¶</a></h2>
86<p>GSASII powder calibrants as a dictionary <tt class="docutils literal"><span class="pre">ImageCalibrants.Calibrants</span></tt> with substances
87commonly used for powder calibrations for image data.</p>
88<p>Each entry in <tt class="docutils literal"><span class="pre">ImageCalibrants</span></tt> consists of:</p>
89<div class="highlight-python"><pre>'key':([Bravais num,],[(a,b,c,alpha,beta,gamma),],no. lines skipped,(dmin,pixLimit,cutOff))</pre>
90</div>
91<p>as an example:</p>
92<div class="highlight-python"><pre>'LaB6  SRM660a':([2,],[(4.1569162,4.1569162,4.1569162,90,90,90),],0,(1.0,10,10)),</pre>
93</div>
94<p>or where &#8220;Bravais num&#8221; and &#8220;(a,b,...)&#8221; are repeated in the case of mixtures:</p>
95<div class="highlight-python"><pre>'LaB6 &amp; CeO2':([2,0], [(4.1569,4.1569,4.1569,90,90,90),(5.4117,5.4117,5.4117,90,90,90)], 0, (1.0,2,1)),</pre>
96</div>
97<p>To expand this list with locally needed additions, do not modify this file,
98because you may lose these changes during a software update. Instead
99duplicate the format of this file in a file named <cite>UserCalibrants.py</cite>
100and there define the material(s) you want:</p>
101<div class="highlight-python"><div class="highlight"><pre><span class="n">Calibrants</span><span class="o">=</span><span class="p">{</span>
102  <span class="s">&#39;LaB6 skip 2 lines&#39;</span><span class="p">:([</span><span class="mi">2</span><span class="p">,],[(</span><span class="mf">4.1569162</span><span class="p">,</span><span class="mf">4.1569162</span><span class="p">,</span><span class="mf">4.1569162</span><span class="p">,</span><span class="mi">90</span><span class="p">,</span><span class="mi">90</span><span class="p">,</span><span class="mi">90</span><span class="p">),],</span><span class="mi">2</span><span class="p">,(</span><span class="mf">1.0</span><span class="p">,</span><span class="mi">10</span><span class="p">,</span><span class="mi">10</span><span class="p">)),</span>
103<span class="p">}</span>
104</pre></div>
105</div>
106<p>New key values will be added to the list of options.
107If a key is duplicated, the information in  <cite>UserCalibrants.py</cite> will
108override the information in this file.</p>
109<p>Note, some useful Bravais numbers are: F-cubic=0, I-cubic=1, P-cubic=2, R3/m (hex)=3, P6=4, P4mmm=6</p>
110</div>
111<span class="target" id="module-GSASIIpath"></span><div class="section" id="gsasiipath-locations-updates">
112<h2><em>GSASIIpath: locations &amp; updates</em><a class="headerlink" href="#gsasiipath-locations-updates" title="Permalink to this headline">¶</a></h2>
113<p>Routines for dealing with file locations, etc.</p>
114<p>Determines the location of the compiled (.pyd or .so) libraries.</p>
115<p>Interfaces with subversion (svn):
116Determine the subversion release number by determining the highest version number
117where <a class="reference internal" href="#GSASIIpath.SetVersionNumber" title="GSASIIpath.SetVersionNumber"><tt class="xref py py-func docutils literal"><span class="pre">SetVersionNumber()</span></tt></a> is called (best done in every GSASII file).
118Other routines will update GSASII from the subversion server if svn can be
119found.</p>
120<dl class="function">
121<dt id="GSASIIpath.GetVersionNumber">
122<tt class="descclassname">GSASIIpath.</tt><tt class="descname">GetVersionNumber</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIpath.html#GetVersionNumber"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpath.GetVersionNumber" title="Permalink to this definition">¶</a></dt>
123<dd><p>Return the maximum version number seen in <a class="reference internal" href="#GSASIIpath.SetVersionNumber" title="GSASIIpath.SetVersionNumber"><tt class="xref py py-func docutils literal"><span class="pre">SetVersionNumber()</span></tt></a></p>
124</dd></dl>
125
126<dl class="function">
127<dt id="GSASIIpath.SetVersionNumber">
128<tt class="descclassname">GSASIIpath.</tt><tt class="descname">SetVersionNumber</tt><big>(</big><em>RevString</em><big>)</big><a class="reference internal" href="_modules/GSASIIpath.html#SetVersionNumber"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpath.SetVersionNumber" title="Permalink to this definition">¶</a></dt>
129<dd><p>Set the subversion version number</p>
130<table class="docutils field-list" frame="void" rules="none">
131<col class="field-name" />
132<col class="field-body" />
133<tbody valign="top">
134<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>RevString</strong> (<em>str</em>) &#8211; something like &#8220;$Revision: 1047 $&#8221;
135that is set by subversion when the file is retrieved from subversion.</td>
136</tr>
137</tbody>
138</table>
139<p>Place <tt class="docutils literal"><span class="pre">GSASIIpath.SetVersionNumber(&quot;$Revision:</span> <span class="pre">1047</span> <span class="pre">$&quot;)</span></tt> in every python
140file.</p>
141</dd></dl>
142
143<dl class="function">
144<dt id="GSASIIpath.svnFindLocalChanges">
145<tt class="descclassname">GSASIIpath.</tt><tt class="descname">svnFindLocalChanges</tt><big>(</big><em>fpath='/Users/toby/software/G2/GSASII'</em><big>)</big><a class="reference internal" href="_modules/GSASIIpath.html#svnFindLocalChanges"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpath.svnFindLocalChanges" title="Permalink to this definition">¶</a></dt>
146<dd><p>Returns a list of files that were changed locally. If no files are changed,
147the list has length 0</p>
148<table class="docutils field-list" frame="void" rules="none">
149<col class="field-name" />
150<col class="field-body" />
151<tbody valign="top">
152<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fpath</strong> &#8211; path to repository dictionary, defaults to directory where
153the current file is located</td>
154</tr>
155<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None if there is a subversion error (likely because the path is
156not a repository or svn is not found)</td>
157</tr>
158</tbody>
159</table>
160</dd></dl>
161
162<dl class="function">
163<dt id="GSASIIpath.svnGetLog">
164<tt class="descclassname">GSASIIpath.</tt><tt class="descname">svnGetLog</tt><big>(</big><em>fpath='/Users/toby/software/G2/GSASII'</em>, <em>version=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIpath.html#svnGetLog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpath.svnGetLog" title="Permalink to this definition">¶</a></dt>
165<dd><p>Get the revision log information for a specific version of the</p>
166<table class="docutils field-list" frame="void" rules="none">
167<col class="field-name" />
168<col class="field-body" />
169<tbody valign="top">
170<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
171<li><strong>fpath</strong> (<em>str</em>) &#8211; path to repository dictionary, defaults to directory where
172the current file is located.</li>
173<li><strong>version</strong> (<em>int</em>) &#8211; the version number to be looked up or None (default)
174for the latest version.</li>
175</ul>
176</td>
177</tr>
178<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a dictionary with keys (one hopes) &#8216;author&#8217;, &#8216;date&#8217;, &#8216;msg&#8217;, and &#8216;revision&#8217;</p>
179</td>
180</tr>
181</tbody>
182</table>
183</dd></dl>
184
185<dl class="function">
186<dt id="GSASIIpath.svnGetRev">
187<tt class="descclassname">GSASIIpath.</tt><tt class="descname">svnGetRev</tt><big>(</big><em>fpath='/Users/toby/software/G2/GSASII'</em>, <em>local=True</em><big>)</big><a class="reference internal" href="_modules/GSASIIpath.html#svnGetRev"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpath.svnGetRev" title="Permalink to this definition">¶</a></dt>
188<dd><p>Obtain the version number for the either the last update of the local version
189or contacts the subversion server to get the latest update version (# of Head).</p>
190<table class="docutils field-list" frame="void" rules="none">
191<col class="field-name" />
192<col class="field-body" />
193<tbody valign="top">
194<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
195<li><strong>fpath</strong> (<em>str</em>) &#8211; path to repository dictionary, defaults to directory where
196the current file is located</li>
197<li><strong>local</strong> (<em>bool</em>) &#8211; determines the type of version number, where
198True (default): returns the latest installed update
199False: returns the version number of Head on the server</li>
200</ul>
201</td>
202</tr>
203<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the version number as an str or
204None if there is a subversion error (likely because the path is
205not a repository or svn is not found)</p>
206</td>
207</tr>
208</tbody>
209</table>
210</dd></dl>
211
212<dl class="function">
213<dt id="GSASIIpath.svnUpdateDir">
214<tt class="descclassname">GSASIIpath.</tt><tt class="descname">svnUpdateDir</tt><big>(</big><em>fpath='/Users/toby/software/G2/GSASII'</em>, <em>version=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIpath.html#svnUpdateDir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpath.svnUpdateDir" title="Permalink to this definition">¶</a></dt>
215<dd><p>This performs an update of the files in a local directory from a server.</p>
216<table class="docutils field-list" frame="void" rules="none">
217<col class="field-name" />
218<col class="field-body" />
219<tbody valign="top">
220<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
221<li><strong>fpath</strong> (<em>str</em>) &#8211; path to repository dictionary, defaults to directory where
222the current file is located</li>
223<li><strong>version</strong> &#8211; the number of the version to be loaded. Used only
224cast as a string, but should be an integer or something that corresponds to a
225string representation of an integer value when cast. A value of None (default)
226causes the latest version on the server to be used.</li>
227</ul>
228</td>
229</tr>
230</tbody>
231</table>
232</dd></dl>
233
234<dl class="function">
235<dt id="GSASIIpath.svnUpdateProcess">
236<tt class="descclassname">GSASIIpath.</tt><tt class="descname">svnUpdateProcess</tt><big>(</big><em>version=None</em>, <em>projectfile=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIpath.html#svnUpdateProcess"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpath.svnUpdateProcess" title="Permalink to this definition">¶</a></dt>
237<dd><p>perform an update of GSAS-II in a separate python process</p>
238</dd></dl>
239
240<dl class="function">
241<dt id="GSASIIpath.whichsvn">
242<tt class="descclassname">GSASIIpath.</tt><tt class="descname">whichsvn</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIpath.html#whichsvn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpath.whichsvn" title="Permalink to this definition">¶</a></dt>
243<dd><p>Returns a path to the subversion exe file, if any is found.
244Searches the current path as well as subdirectory &#8220;svn&#8221; and
245&#8220;svn/bin&#8221; in the location of the GSASII source files.</p>
246<table class="docutils field-list" frame="void" rules="none">
247<col class="field-name" />
248<col class="field-body" />
249<tbody valign="top">
250<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None if svn is not found or an absolute path to the subversion
251executable file.</td>
252</tr>
253</tbody>
254</table>
255</dd></dl>
256
257</div>
258<span class="target" id="module-GSASIIElem"></span><div class="section" id="gsasiielem-functions-for-element-types">
259<h2><em>GSASIIElem: functions for element types</em><a class="headerlink" href="#gsasiielem-functions-for-element-types" title="Permalink to this headline">¶</a></h2>
260<dl class="function">
261<dt id="GSASIIElem.CheckElement">
262<tt class="descclassname">GSASIIElem.</tt><tt class="descname">CheckElement</tt><big>(</big><em>El</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#CheckElement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.CheckElement" title="Permalink to this definition">¶</a></dt>
263<dd><p>Check if element El is in the periodic table</p>
264<table class="docutils field-list" frame="void" rules="none">
265<col class="field-name" />
266<col class="field-body" />
267<tbody valign="top">
268<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>El</strong> (<em>str</em>) &#8211; One or two letter element symbol, capitaliztion ignored</td>
269</tr>
270<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True if the element is found</td>
271</tr>
272</tbody>
273</table>
274</dd></dl>
275
276<dl class="function">
277<dt id="GSASIIElem.ComptonFac">
278<tt class="descclassname">GSASIIElem.</tt><tt class="descname">ComptonFac</tt><big>(</big><em>El</em>, <em>SQ</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#ComptonFac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.ComptonFac" title="Permalink to this definition">¶</a></dt>
279<dd><p>compute Compton scattering factor</p>
280<table class="docutils field-list" frame="void" rules="none">
281<col class="field-name" />
282<col class="field-body" />
283<tbody valign="top">
284<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
285<li><strong>El</strong> &#8211; element dictionary</li>
286<li><strong>SQ</strong> &#8211; (sin-theta/lambda)**2</li>
287</ul>
288</td>
289</tr>
290<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">compton scattering factor</p>
291</td>
292</tr>
293</tbody>
294</table>
295</dd></dl>
296
297<dl class="function">
298<dt id="GSASIIElem.FPcalc">
299<tt class="descclassname">GSASIIElem.</tt><tt class="descname">FPcalc</tt><big>(</big><em>Orbs</em>, <em>KEv</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#FPcalc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.FPcalc" title="Permalink to this definition">¶</a></dt>
300<dd><p>Compute real &amp; imaginary resonant X-ray scattering factors</p>
301<table class="docutils field-list" frame="void" rules="none">
302<col class="field-name" />
303<col class="field-body" />
304<tbody valign="top">
305<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
306<li><strong>Orbs</strong> &#8211; list of orbital dictionaries as defined in GetXsectionCoeff</li>
307<li><strong>KEv</strong> &#8211; x-ray energy in keV</li>
308</ul>
309</td>
310</tr>
311<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">C: (f&#8217;,f&#8221;,mu): real, imaginary parts of resonant scattering &amp; atomic absorption coeff.</p>
312</td>
313</tr>
314</tbody>
315</table>
316</dd></dl>
317
318<dl class="function">
319<dt id="GSASIIElem.FixValence">
320<tt class="descclassname">GSASIIElem.</tt><tt class="descname">FixValence</tt><big>(</big><em>El</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#FixValence"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.FixValence" title="Permalink to this definition">¶</a></dt>
321<dd><p>Returns the element symbol, even when a valence is present</p>
322</dd></dl>
323
324<dl class="function">
325<dt id="GSASIIElem.GetAtomInfo">
326<tt class="descclassname">GSASIIElem.</tt><tt class="descname">GetAtomInfo</tt><big>(</big><em>El</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#GetAtomInfo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.GetAtomInfo" title="Permalink to this definition">¶</a></dt>
327<dd><p>reads element information from file atmdata.dat</p>
328</dd></dl>
329
330<dl class="function">
331<dt id="GSASIIElem.GetBLtable">
332<tt class="descclassname">GSASIIElem.</tt><tt class="descname">GetBLtable</tt><big>(</big><em>General</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#GetBLtable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.GetBLtable" title="Permalink to this definition">¶</a></dt>
333<dd><p>returns a dictionary of neutron scattering length data for atom types &amp; isotopes found in General</p>
334<table class="docutils field-list" frame="void" rules="none">
335<col class="field-name" />
336<col class="field-body" />
337<tbody valign="top">
338<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>General</strong> (<em>dict</em>) &#8211; dictionary of phase info.; includes AtomTypes &amp; Isotopes</td>
339</tr>
340<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">BLtable, dictionary of scattering length data; key is atom type</td>
341</tr>
342</tbody>
343</table>
344</dd></dl>
345
346<dl class="function">
347<dt id="GSASIIElem.GetFFC5">
348<tt class="descclassname">GSASIIElem.</tt><tt class="descname">GetFFC5</tt><big>(</big><em>ElSym</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#GetFFC5"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.GetFFC5" title="Permalink to this definition">¶</a></dt>
349<dd><p>Get 5 term form factor and Compton scattering data</p>
350<table class="docutils field-list" frame="void" rules="none">
351<col class="field-name" />
352<col class="field-body" />
353<tbody valign="top">
354<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ElSym</strong> &#8211; str(1-2 character element symbol with proper case);</td>
355</tr>
356<tr class="field-even field"><th class="field-name">Return El:</th><td class="field-body">dictionary with 5 term form factor &amp; compton coefficients</td>
357</tr>
358</tbody>
359</table>
360</dd></dl>
361
362<dl class="function">
363<dt id="GSASIIElem.GetFFtable">
364<tt class="descclassname">GSASIIElem.</tt><tt class="descname">GetFFtable</tt><big>(</big><em>atomTypes</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#GetFFtable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.GetFFtable" title="Permalink to this definition">¶</a></dt>
365<dd><p>returns a dictionary of form factor data for atom types found in atomTypes</p>
366<table class="docutils field-list" frame="void" rules="none">
367<col class="field-name" />
368<col class="field-body" />
369<tbody valign="top">
370<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>atomTypes</strong> (<em>list</em>) &#8211; list of atom types</td>
371</tr>
372<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">FFtable, dictionary of form factor data; key is atom type</td>
373</tr>
374</tbody>
375</table>
376</dd></dl>
377
378<dl class="function">
379<dt id="GSASIIElem.GetFormFactorCoeff">
380<tt class="descclassname">GSASIIElem.</tt><tt class="descname">GetFormFactorCoeff</tt><big>(</big><em>El</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#GetFormFactorCoeff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.GetFormFactorCoeff" title="Permalink to this definition">¶</a></dt>
381<dd><p>Read X-ray form factor coefficients from <cite>atomdata.asc</cite> file</p>
382<table class="docutils field-list" frame="void" rules="none">
383<col class="field-name" />
384<col class="field-body" />
385<tbody valign="top">
386<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>El</strong> (<em>str</em>) &#8211; element 1-2 character symbol, case irrevelant</td>
387</tr>
388<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><cite>FormFactors</cite>: list of form factor dictionaries</td>
389</tr>
390</tbody>
391</table>
392<p>Each X-ray form factor dictionary is:</p>
393<ul class="simple">
394<li><cite>Symbol</cite>: 4 character element symbol with valence (e.g. &#8216;NI+2&#8217;)</li>
395<li><cite>Z</cite>: atomic number</li>
396<li><cite>fa</cite>: 4 A coefficients</li>
397<li><cite>fb</cite>: 4 B coefficients</li>
398<li><cite>fc</cite>: C coefficient</li>
399</ul>
400</dd></dl>
401
402<dl class="function">
403<dt id="GSASIIElem.GetMagFormFacCoeff">
404<tt class="descclassname">GSASIIElem.</tt><tt class="descname">GetMagFormFacCoeff</tt><big>(</big><em>El</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#GetMagFormFacCoeff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.GetMagFormFacCoeff" title="Permalink to this definition">¶</a></dt>
405<dd><p>Read magnetic form factor data from atomdata.asc file</p>
406<table class="docutils field-list" frame="void" rules="none">
407<col class="field-name" />
408<col class="field-body" />
409<tbody valign="top">
410<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>El</strong> &#8211; 2 character element symbol</td>
411</tr>
412<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">MagFormFactors: list of all magnetic form factors dictionaries for element El.</td>
413</tr>
414</tbody>
415</table>
416<p>each dictionary contains:</p>
417<ul class="simple">
418<li>&#8216;Symbol&#8217;:Symbol</li>
419<li>&#8216;Z&#8217;:Z</li>
420<li>&#8216;mfa&#8217;: 4 MA coefficients</li>
421<li>&#8216;nfa&#8217;: 4 NA coefficients</li>
422<li>&#8216;mfb&#8217;: 4 MB coefficients</li>
423<li>&#8216;nfb&#8217;: 4 NB coefficients</li>
424<li>&#8216;mfc&#8217;: MC coefficient</li>
425<li>&#8216;nfc&#8217;: NC coefficient</li>
426</ul>
427</dd></dl>
428
429<dl class="function">
430<dt id="GSASIIElem.GetXsectionCoeff">
431<tt class="descclassname">GSASIIElem.</tt><tt class="descname">GetXsectionCoeff</tt><big>(</big><em>El</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#GetXsectionCoeff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.GetXsectionCoeff" title="Permalink to this definition">¶</a></dt>
432<dd><p>Read atom orbital scattering cross sections for fprime calculations via Cromer-Lieberman algorithm</p>
433<table class="docutils field-list" frame="void" rules="none">
434<col class="field-name" />
435<col class="field-body" />
436<tbody valign="top">
437<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>El</strong> &#8211; 2 character element symbol</td>
438</tr>
439<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Orbs: list of orbitals each a dictionary with detailed orbital information used by FPcalc</td>
440</tr>
441</tbody>
442</table>
443<p>each dictionary is:</p>
444<ul class="simple">
445<li>&#8216;OrbName&#8217;: Orbital name read from file</li>
446<li>&#8216;IfBe&#8217; 0/2 depending on orbital</li>
447<li>&#8216;BindEn&#8217;: binding energy</li>
448<li>&#8216;BB&#8217;: BindEn/0.02721</li>
449<li>&#8216;XSectIP&#8217;: 5 cross section inflection points</li>
450<li>&#8216;ElEterm&#8217;: energy correction term</li>
451<li>&#8216;SEdge&#8217;: absorption edge for orbital</li>
452<li>&#8216;Nval&#8217;: 10/11 depending on IfBe</li>
453<li>&#8216;LEner&#8217;: 10/11 values of log(energy)</li>
454<li>&#8216;LXSect&#8217;: 10/11 values of log(cross section)</li>
455</ul>
456</dd></dl>
457
458<dl class="function">
459<dt id="GSASIIElem.ScatFac">
460<tt class="descclassname">GSASIIElem.</tt><tt class="descname">ScatFac</tt><big>(</big><em>El</em>, <em>SQ</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#ScatFac"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.ScatFac" title="Permalink to this definition">¶</a></dt>
461<dd><p>compute value of form factor</p>
462<table class="docutils field-list" frame="void" rules="none">
463<col class="field-name" />
464<col class="field-body" />
465<tbody valign="top">
466<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
467<li><strong>El</strong> &#8211; element dictionary defined in GetFormFactorCoeff</li>
468<li><strong>SQ</strong> &#8211; (sin-theta/lambda)**2</li>
469</ul>
470</td>
471</tr>
472<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">real part of form factor</p>
473</td>
474</tr>
475</tbody>
476</table>
477</dd></dl>
478
479<dl class="function">
480<dt id="GSASIIElem.getBLvalues">
481<tt class="descclassname">GSASIIElem.</tt><tt class="descname">getBLvalues</tt><big>(</big><em>BLtables</em>, <em>ifList=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#getBLvalues"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.getBLvalues" title="Permalink to this definition">¶</a></dt>
482<dd><p>Needs a doc string</p>
483</dd></dl>
484
485<dl class="function">
486<dt id="GSASIIElem.getFFvalues">
487<tt class="descclassname">GSASIIElem.</tt><tt class="descname">getFFvalues</tt><big>(</big><em>FFtables</em>, <em>SQ</em>, <em>ifList=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIElem.html#getFFvalues"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIElem.getFFvalues" title="Permalink to this definition">¶</a></dt>
488<dd><p>Needs a doc string</p>
489</dd></dl>
490
491</div>
492<span class="target" id="module-GSASIIlattice"></span><div class="section" id="gsasiilattice-unit-cells">
493<h2><em>GSASIIlattice: Unit cells</em><a class="headerlink" href="#gsasiilattice-unit-cells" title="Permalink to this headline">¶</a></h2>
494<p>Perform lattice-related computations</p>
495<p>Note that <em>g</em> is the reciprocal lattice tensor, and <em>G</em> is its inverse,
496<span class="math">\(G = g^{-1}\)</span>, where</p>
497<blockquote>
498<div><div class="math">
499\[\begin{split}G = \left( \begin{matrix}
500a^2 &amp; a b\cos\gamma &amp; a c\cos\beta \\
501a b\cos\gamma &amp; b^2 &amp; b c \cos\alpha \\
502a c\cos\beta &amp;  b c \cos\alpha &amp; c^2
503\end{matrix}\right)\end{split}\]</div>
504</div></blockquote>
505<p>The &#8220;<em>A</em> tensor&#8221; terms are defined as
506<span class="math">\(A = (\begin{matrix} G_{11} &amp; G_{22} &amp; G_{33} &amp; 2G_{12} &amp; 2G_{13} &amp; 2G_{23}\end{matrix})\)</span> and <em>A</em> can be used in this fashion:
507<span class="math">\(d^* = \sqrt {A_1 h^2 + A_2 k^2 + A_3 l^2 + A_4 hk + A_5 hl + A_6 kl}\)</span>, where
508<em>d</em> is the d-spacing, and <span class="math">\(d^*\)</span> is the reciprocal lattice spacing,
509<span class="math">\(Q = 2 \pi d^* = 2 \pi / d\)</span></p>
510<dl class="function">
511<dt id="GSASIIlattice.A2Gmat">
512<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">A2Gmat</tt><big>(</big><em>A</em>, <em>inverse=True</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#A2Gmat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.A2Gmat" title="Permalink to this definition">¶</a></dt>
513<dd><p>Fill real &amp; reciprocal metric tensor (G) from A.</p>
514<table class="docutils field-list" frame="void" rules="none">
515<col class="field-name" />
516<col class="field-body" />
517<tbody valign="top">
518<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
519<li><strong>A</strong> &#8211; reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23]</li>
520<li><strong>inverse</strong> (<em>bool</em>) &#8211; if True return both G and g; else just G</li>
521</ul>
522</td>
523</tr>
524<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">reciprocal (G) &amp; real (g) metric tensors (list of two numpy 3x3 arrays)</p>
525</td>
526</tr>
527</tbody>
528</table>
529</dd></dl>
530
531<dl class="function">
532<dt id="GSASIIlattice.A2cell">
533<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">A2cell</tt><big>(</big><em>A</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#A2cell"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.A2cell" title="Permalink to this definition">¶</a></dt>
534<dd><p>Compute unit cell constants from A</p>
535<table class="docutils field-list" frame="void" rules="none">
536<col class="field-name" />
537<col class="field-body" />
538<tbody valign="top">
539<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>A</strong> &#8211; [G11,G22,G33,2*G12,2*G13,2*G23] G - reciprocal metric tensor</td>
540</tr>
541<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a,b,c,alpha, beta, gamma (degrees) - lattice parameters</td>
542</tr>
543</tbody>
544</table>
545</dd></dl>
546
547<dl class="function">
548<dt id="GSASIIlattice.A2invcell">
549<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">A2invcell</tt><big>(</big><em>A</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#A2invcell"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.A2invcell" title="Permalink to this definition">¶</a></dt>
550<dd><p>Compute reciprocal unit cell constants from A
551returns tuple with a*,b*,c*,alpha*, beta*, gamma* (degrees)</p>
552</dd></dl>
553
554<dl class="function">
555<dt id="GSASIIlattice.CellAbsorption">
556<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">CellAbsorption</tt><big>(</big><em>ElList</em>, <em>Volume</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#CellAbsorption"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.CellAbsorption" title="Permalink to this definition">¶</a></dt>
557<dd><p>Compute unit cell absorption</p>
558<table class="docutils field-list" frame="void" rules="none">
559<col class="field-name" />
560<col class="field-body" />
561<tbody valign="top">
562<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
563<li><strong>ElList</strong> (<em>dict</em>) &#8211; dictionary of element contents including mu and
564number of atoms be cell</li>
565<li><strong>Volume</strong> (<em>float</em>) &#8211; unit cell volume</li>
566</ul>
567</td>
568</tr>
569<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">mu-total/Volume</p>
570</td>
571</tr>
572</tbody>
573</table>
574</dd></dl>
575
576<dl class="function">
577<dt id="GSASIIlattice.CellBlock">
578<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">CellBlock</tt><big>(</big><em>nCells</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#CellBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.CellBlock" title="Permalink to this definition">¶</a></dt>
579<dd><p>Generate block of unit cells n*n*n on a side; [0,0,0] centered, n = 2*nCells+1
580currently only works for nCells = 0 or 1 (not &gt;1)</p>
581</dd></dl>
582
583<dl class="function">
584<dt id="GSASIIlattice.CentCheck">
585<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">CentCheck</tt><big>(</big><em>Cent</em>, <em>H</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#CentCheck"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.CentCheck" title="Permalink to this definition">¶</a></dt>
586<dd><p>needs doc string</p>
587</dd></dl>
588
589<dl class="function">
590<dt id="GSASIIlattice.CosAngle">
591<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">CosAngle</tt><big>(</big><em>U</em>, <em>V</em>, <em>G</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#CosAngle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.CosAngle" title="Permalink to this definition">¶</a></dt>
592<dd><p>calculate cos of angle between U &amp; V in generalized coordinates
593defined by metric tensor G</p>
594<table class="docutils field-list" frame="void" rules="none">
595<col class="field-name" />
596<col class="field-body" />
597<tbody valign="top">
598<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
599<li><strong>U</strong> &#8211; 3-vectors assume numpy arrays, can be multiple reflections as (N,3) array</li>
600<li><strong>V</strong> &#8211; 3-vectors assume numpy arrays, only as (3) vector</li>
601<li><strong>G</strong> &#8211; metric tensor for U &amp; V defined space assume numpy array</li>
602</ul>
603</td>
604</tr>
605<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">cos(phi)</p>
606</td>
607</tr>
608</tbody>
609</table>
610</dd></dl>
611
612<dl class="function">
613<dt id="GSASIIlattice.CosSinAngle">
614<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">CosSinAngle</tt><big>(</big><em>U</em>, <em>V</em>, <em>G</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#CosSinAngle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.CosSinAngle" title="Permalink to this definition">¶</a></dt>
615<dd><p>calculate sin &amp; cos of angle between U &amp; V in generalized coordinates
616defined by metric tensor G</p>
617<table class="docutils field-list" frame="void" rules="none">
618<col class="field-name" />
619<col class="field-body" />
620<tbody valign="top">
621<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
622<li><strong>U</strong> &#8211; 3-vectors assume numpy arrays</li>
623<li><strong>V</strong> &#8211; 3-vectors assume numpy arrays</li>
624<li><strong>G</strong> &#8211; metric tensor for U &amp; V defined space assume numpy array</li>
625</ul>
626</td>
627</tr>
628<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">cos(phi) &amp; sin(phi)</p>
629</td>
630</tr>
631</tbody>
632</table>
633</dd></dl>
634
635<dl class="function">
636<dt id="GSASIIlattice.CrsAng">
637<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">CrsAng</tt><big>(</big><em>H</em>, <em>cell</em>, <em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#CrsAng"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.CrsAng" title="Permalink to this definition">¶</a></dt>
638<dd><p>needs doc string</p>
639</dd></dl>
640
641<dl class="function">
642<dt id="GSASIIlattice.Flnh">
643<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">Flnh</tt><big>(</big><em>Start</em>, <em>SHCoef</em>, <em>phi</em>, <em>beta</em>, <em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#Flnh"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.Flnh" title="Permalink to this definition">¶</a></dt>
644<dd><p>needs doc string</p>
645</dd></dl>
646
647<dl class="function">
648<dt id="GSASIIlattice.GenHBravais">
649<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">GenHBravais</tt><big>(</big><em>dmin</em>, <em>Bravais</em>, <em>A</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#GenHBravais"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.GenHBravais" title="Permalink to this definition">¶</a></dt>
650<dd><p>Generate the positionally unique powder diffraction reflections</p>
651<table class="docutils field-list" frame="void" rules="none">
652<col class="field-name" />
653<col class="field-body" />
654<tbody valign="top">
655<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
656<li><strong>dmin</strong> &#8211; minimum d-spacing in A</li>
657<li><strong>Bravais</strong> &#8211; lattice type (see GetBraviasNum). Bravais is one of::
6580 F cubic
6591 I cubic
6602 P cubic
6613 R hexagonal (trigonal not rhombohedral)
6624 P hexagonal
6635 I tetragonal
6646 P tetragonal
6657 F orthorhombic
6668 I orthorhombic
6679 C orthorhombic
66810 P orthorhombic
66911 C monoclinic
67012 P monoclinic
67113 P triclinic</li>
672<li><strong>A</strong> &#8211; reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23]</li>
673</ul>
674</td>
675</tr>
676<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">HKL unique d list of [h,k,l,d,-1] sorted with largest d first</p>
677</td>
678</tr>
679</tbody>
680</table>
681</dd></dl>
682
683<dl class="function">
684<dt id="GSASIIlattice.GenHLaue">
685<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">GenHLaue</tt><big>(</big><em>dmin</em>, <em>SGData</em>, <em>A</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#GenHLaue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.GenHLaue" title="Permalink to this definition">¶</a></dt>
686<dd><p>Generate the crystallographically unique powder diffraction reflections
687for a lattice and Bravais type</p>
688<table class="docutils field-list" frame="void" rules="none">
689<col class="field-name" />
690<col class="field-body" />
691<tbody valign="top">
692<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
693<li><strong>dmin</strong> &#8211; minimum d-spacing</li>
694<li><strong>SGData</strong> &#8211; <p>space group dictionary with at least</p>
695<ul>
696<li>&#8216;SGLaue&#8217;: Laue group symbol: one of &#8216;-1&#8217;,&#8216;2/m&#8217;,&#8217;mmm&#8217;,&#8216;4/m&#8217;,&#8216;6/m&#8217;,&#8216;4/mmm&#8217;,&#8216;6/mmm&#8217;, &#8216;3m1&#8217;, &#8216;31m&#8217;, &#8216;3&#8217;, &#8216;3R&#8217;, &#8216;3mR&#8217;, &#8216;m3&#8217;, &#8216;m3m&#8217;</li>
697<li>&#8216;SGLatt&#8217;: lattice centering: one of &#8216;P&#8217;,&#8217;A&#8217;,&#8217;B&#8217;,&#8217;C&#8217;,&#8217;I&#8217;,&#8217;F&#8217;</li>
698<li>&#8216;SGUniq&#8217;: code for unique monoclinic axis one of &#8216;a&#8217;,&#8217;b&#8217;,&#8217;c&#8217; (only if &#8216;SGLaue&#8217; is &#8216;2/m&#8217;) otherwise an empty string</li>
699</ul>
700</li>
701<li><strong>A</strong> &#8211; reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23]</li>
702</ul>
703</td>
704</tr>
705<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">HKL = list of [h,k,l,d] sorted with largest d first and is unique
706part of reciprocal space ignoring anomalous dispersion</p>
707</td>
708</tr>
709</tbody>
710</table>
711</dd></dl>
712
713<dl class="function">
714<dt id="GSASIIlattice.GenSHCoeff">
715<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">GenSHCoeff</tt><big>(</big><em>SGLaue</em>, <em>SamSym</em>, <em>L</em>, <em>IfLMN=True</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#GenSHCoeff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.GenSHCoeff" title="Permalink to this definition">¶</a></dt>
716<dd><p>needs doc string</p>
717</dd></dl>
718
719<dl class="function">
720<dt id="GSASIIlattice.GetBraviasNum">
721<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">GetBraviasNum</tt><big>(</big><em>center</em>, <em>system</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#GetBraviasNum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.GetBraviasNum" title="Permalink to this definition">¶</a></dt>
722<dd><p>Determine the Bravais lattice number, as used in GenHBravais</p>
723<table class="docutils field-list" frame="void" rules="none">
724<col class="field-name" />
725<col class="field-body" />
726<tbody valign="top">
727<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
728<li><strong>center</strong> &#8211; one of: &#8216;P&#8217;, &#8216;C&#8217;, &#8216;I&#8217;, &#8216;F&#8217;, &#8216;R&#8217; (see SGLatt from GSASIIspc.SpcGroup)</li>
729<li><strong>system</strong> &#8211; one of &#8216;cubic&#8217;, &#8216;hexagonal&#8217;, &#8216;tetragonal&#8217;, &#8216;orthorhombic&#8217;, &#8216;trigonal&#8217; (for R)
730&#8216;monoclinic&#8217;, &#8216;triclinic&#8217; (see SGSys from GSASIIspc.SpcGroup)</li>
731</ul>
732</td>
733</tr>
734<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a number between 0 and 13
735or throws a ValueError exception if the combination of center, system is not found (i.e. non-standard)</p>
736</td>
737</tr>
738</tbody>
739</table>
740</dd></dl>
741
742<dl class="function">
743<dt id="GSASIIlattice.GetKcl">
744<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">GetKcl</tt><big>(</big><em>L</em>, <em>N</em>, <em>SGLaue</em>, <em>phi</em>, <em>beta</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#GetKcl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.GetKcl" title="Permalink to this definition">¶</a></dt>
745<dd><p>needs doc string</p>
746</dd></dl>
747
748<dl class="function">
749<dt id="GSASIIlattice.GetKclKsl">
750<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">GetKclKsl</tt><big>(</big><em>L</em>, <em>N</em>, <em>SGLaue</em>, <em>psi</em>, <em>phi</em>, <em>beta</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#GetKclKsl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.GetKclKsl" title="Permalink to this definition">¶</a></dt>
751<dd><p>This is used for spherical harmonics description of preferred orientation;
752cylindrical symmetry only (M=0) and no sample angle derivatives returned</p>
753</dd></dl>
754
755<dl class="function">
756<dt id="GSASIIlattice.GetKsl">
757<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">GetKsl</tt><big>(</big><em>L</em>, <em>M</em>, <em>SamSym</em>, <em>psi</em>, <em>gam</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#GetKsl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.GetKsl" title="Permalink to this definition">¶</a></dt>
758<dd><p>needs doc string</p>
759</dd></dl>
760
761<dl class="function">
762<dt id="GSASIIlattice.Glnh">
763<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">Glnh</tt><big>(</big><em>Start</em>, <em>SHCoef</em>, <em>psi</em>, <em>gam</em>, <em>SamSym</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#Glnh"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.Glnh" title="Permalink to this definition">¶</a></dt>
764<dd><p>needs doc string</p>
765</dd></dl>
766
767<dl class="function">
768<dt id="GSASIIlattice.Gmat2A">
769<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">Gmat2A</tt><big>(</big><em>G</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#Gmat2A"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.Gmat2A" title="Permalink to this definition">¶</a></dt>
770<dd><p>Extract A from reciprocal metric tensor (G)</p>
771<table class="docutils field-list" frame="void" rules="none">
772<col class="field-name" />
773<col class="field-body" />
774<tbody valign="top">
775<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G</strong> &#8211; reciprocal maetric tensor (3x3 numpy array</td>
776</tr>
777<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A = [G11,G22,G33,2*G12,2*G13,2*G23]</td>
778</tr>
779</tbody>
780</table>
781</dd></dl>
782
783<dl class="function">
784<dt id="GSASIIlattice.Gmat2AB">
785<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">Gmat2AB</tt><big>(</big><em>G</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#Gmat2AB"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.Gmat2AB" title="Permalink to this definition">¶</a></dt>
786<dd><p>Computes orthogonalization matrix from reciprocal metric tensor G</p>
787<table class="docutils field-list" frame="void" rules="none">
788<col class="field-name" />
789<col class="field-body" />
790<tbody valign="top">
791<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">tuple of two 3x3 numpy arrays (A,B)<ul class="simple">
792<li>A for crystal to Cartesian transformations A*x = np.inner(A,x) = X</li>
793<li>B (= inverse of A) for Cartesian to crystal transformation B*X = np.inner(B,X) = x</li>
794</ul>
795</td>
796</tr>
797</tbody>
798</table>
799</dd></dl>
800
801<dl class="function">
802<dt id="GSASIIlattice.Gmat2cell">
803<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">Gmat2cell</tt><big>(</big><em>g</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#Gmat2cell"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.Gmat2cell" title="Permalink to this definition">¶</a></dt>
804<dd><p>Compute real/reciprocal lattice parameters from real/reciprocal metric tensor (g/G)
805The math works the same either way.</p>
806<table class="docutils field-list" frame="void" rules="none">
807<col class="field-name" />
808<col class="field-body" />
809<tbody valign="top">
810<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>(or G)</strong> (<em>g</em>) &#8211; real (or reciprocal) metric tensor 3x3 array</td>
811</tr>
812<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a,b,c,alpha, beta, gamma (degrees) (or a*,b*,c*,alpha*,beta*,gamma* degrees)</td>
813</tr>
814</tbody>
815</table>
816</dd></dl>
817
818<dl class="function">
819<dt id="GSASIIlattice.Hx2Rh">
820<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">Hx2Rh</tt><big>(</big><em>Hx</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#Hx2Rh"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.Hx2Rh" title="Permalink to this definition">¶</a></dt>
821<dd><p>needs doc string</p>
822</dd></dl>
823
824<dl class="function">
825<dt id="GSASIIlattice.MaxIndex">
826<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">MaxIndex</tt><big>(</big><em>dmin</em>, <em>A</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#MaxIndex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.MaxIndex" title="Permalink to this definition">¶</a></dt>
827<dd><p>needs doc string</p>
828</dd></dl>
829
830<dl class="function">
831<dt id="GSASIIlattice.OdfChk">
832<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">OdfChk</tt><big>(</big><em>SGLaue</em>, <em>L</em>, <em>M</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#OdfChk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.OdfChk" title="Permalink to this definition">¶</a></dt>
833<dd><p>needs doc string</p>
834</dd></dl>
835
836<dl class="function">
837<dt id="GSASIIlattice.Rh2Hx">
838<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">Rh2Hx</tt><big>(</big><em>Rh</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#Rh2Hx"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.Rh2Hx" title="Permalink to this definition">¶</a></dt>
839<dd><p>needs doc string</p>
840</dd></dl>
841
842<dl class="function">
843<dt id="GSASIIlattice.SamAng">
844<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">SamAng</tt><big>(</big><em>Tth</em>, <em>Gangls</em>, <em>Sangl</em>, <em>IFCoup</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#SamAng"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.SamAng" title="Permalink to this definition">¶</a></dt>
845<dd><p>Compute sample orientation angles vs laboratory coord. system</p>
846<table class="docutils field-list" frame="void" rules="none">
847<col class="field-name" />
848<col class="field-body" />
849<tbody valign="top">
850<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
851<li><strong>Tth</strong> &#8211; Signed theta</li>
852<li><strong>Gangls</strong> &#8211; Sample goniometer angles phi,chi,omega,azmuth</li>
853<li><strong>Sangl</strong> &#8211; Sample angle zeros om-0, chi-0, phi-0</li>
854<li><strong>IFCoup</strong> &#8211; True if omega &amp; 2-theta coupled in CW scan</li>
855</ul>
856</td>
857</tr>
858<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">psi,gam:    Sample odf angles                             
859dPSdA,dGMdA:    Angle zero derivatives</p>
860</td>
861</tr>
862</tbody>
863</table>
864</dd></dl>
865
866<dl class="function">
867<dt id="GSASIIlattice.SwapIndx">
868<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">SwapIndx</tt><big>(</big><em>Axis</em>, <em>H</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#SwapIndx"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.SwapIndx" title="Permalink to this definition">¶</a></dt>
869<dd><p>needs doc string</p>
870</dd></dl>
871
872<dl class="function">
873<dt id="GSASIIlattice.U6toUij">
874<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">U6toUij</tt><big>(</big><em>U6</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#U6toUij"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.U6toUij" title="Permalink to this definition">¶</a></dt>
875<dd><p>Fill matrix (Uij) from U6 = [U11,U22,U33,U12,U13,U23]
876NB: there is a non numpy version in GSASIIspc: U2Uij</p>
877<table class="docutils field-list" frame="void" rules="none">
878<col class="field-name" />
879<col class="field-body" />
880<tbody valign="top">
881<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>U6</strong> (<em>list</em>) &#8211; 6 terms of u11,u22,...</td>
882</tr>
883<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Uij - numpy [3][3] array of uij</td>
884</tr>
885</tbody>
886</table>
887</dd></dl>
888
889<dl class="function">
890<dt id="GSASIIlattice.Uij2Ueqv">
891<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">Uij2Ueqv</tt><big>(</big><em>Uij</em>, <em>GS</em>, <em>Amat</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#Uij2Ueqv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.Uij2Ueqv" title="Permalink to this definition">¶</a></dt>
892<dd><p>returns 1/3 trace of diagonalized U matrix</p>
893</dd></dl>
894
895<dl class="function">
896<dt id="GSASIIlattice.Uij2betaij">
897<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">Uij2betaij</tt><big>(</big><em>Uij</em>, <em>G</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#Uij2betaij"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.Uij2betaij" title="Permalink to this definition">¶</a></dt>
898<dd><p>Convert Uij to beta-ij tensors &#8211; stub for eventual completion</p>
899<table class="docutils field-list" frame="void" rules="none">
900<col class="field-name" />
901<col class="field-body" />
902<tbody valign="top">
903<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
904<li><strong>Uij</strong> &#8211; numpy array [Uij]</li>
905<li><strong>G</strong> &#8211; reciprocal metric tensor</li>
906</ul>
907</td>
908</tr>
909<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">beta-ij - numpy array [beta-ij]</p>
910</td>
911</tr>
912</tbody>
913</table>
914</dd></dl>
915
916<dl class="function">
917<dt id="GSASIIlattice.UijtoU6">
918<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">UijtoU6</tt><big>(</big><em>U</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#UijtoU6"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.UijtoU6" title="Permalink to this definition">¶</a></dt>
919<dd><p>Fill vector [U11,U22,U33,U12,U13,U23] from Uij
920NB: there is a non numpy version in GSASIIspc: Uij2U</p>
921</dd></dl>
922
923<dl class="function">
924<dt id="GSASIIlattice.calc_V">
925<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">calc_V</tt><big>(</big><em>A</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#calc_V"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.calc_V" title="Permalink to this definition">¶</a></dt>
926<dd><p>Compute the real lattice volume (V) from A</p>
927</dd></dl>
928
929<dl class="function">
930<dt id="GSASIIlattice.calc_rDsq">
931<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">calc_rDsq</tt><big>(</big><em>H</em>, <em>A</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#calc_rDsq"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.calc_rDsq" title="Permalink to this definition">¶</a></dt>
932<dd><p>needs doc string</p>
933</dd></dl>
934
935<dl class="function">
936<dt id="GSASIIlattice.calc_rDsq2">
937<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">calc_rDsq2</tt><big>(</big><em>H</em>, <em>G</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#calc_rDsq2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.calc_rDsq2" title="Permalink to this definition">¶</a></dt>
938<dd><p>needs doc string</p>
939</dd></dl>
940
941<dl class="function">
942<dt id="GSASIIlattice.calc_rDsqZ">
943<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">calc_rDsqZ</tt><big>(</big><em>H</em>, <em>A</em>, <em>Z</em>, <em>tth</em>, <em>lam</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#calc_rDsqZ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.calc_rDsqZ" title="Permalink to this definition">¶</a></dt>
944<dd><p>needs doc string</p>
945</dd></dl>
946
947<dl class="function">
948<dt id="GSASIIlattice.calc_rV">
949<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">calc_rV</tt><big>(</big><em>A</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#calc_rV"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.calc_rV" title="Permalink to this definition">¶</a></dt>
950<dd><p>Compute the reciprocal lattice volume (V*) from A</p>
951</dd></dl>
952
953<dl class="function">
954<dt id="GSASIIlattice.calc_rVsq">
955<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">calc_rVsq</tt><big>(</big><em>A</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#calc_rVsq"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.calc_rVsq" title="Permalink to this definition">¶</a></dt>
956<dd><p>Compute the square of the reciprocal lattice volume (1/V**2) from A&#8217;</p>
957</dd></dl>
958
959<dl class="function">
960<dt id="GSASIIlattice.cell2A">
961<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">cell2A</tt><big>(</big><em>cell</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#cell2A"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.cell2A" title="Permalink to this definition">¶</a></dt>
962<dd><p>Obtain A = [G11,G22,G33,2*G12,2*G13,2*G23] from lattice parameters</p>
963<table class="docutils field-list" frame="void" rules="none">
964<col class="field-name" />
965<col class="field-body" />
966<tbody valign="top">
967<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>cell</strong> &#8211; [a,b,c,alpha,beta,gamma] (degrees)</td>
968</tr>
969<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">G reciprocal metric tensor as 3x3 numpy array</td>
970</tr>
971</tbody>
972</table>
973</dd></dl>
974
975<dl class="function">
976<dt id="GSASIIlattice.cell2AB">
977<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">cell2AB</tt><big>(</big><em>cell</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#cell2AB"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.cell2AB" title="Permalink to this definition">¶</a></dt>
978<dd><p>Computes orthogonalization matrix from unit cell constants</p>
979<table class="docutils field-list" frame="void" rules="none">
980<col class="field-name" />
981<col class="field-body" />
982<tbody valign="top">
983<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>cell</strong> (<em>tuple</em>) &#8211; a,b,c, alpha, beta, gamma (degrees)</td>
984</tr>
985<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">tuple of two 3x3 numpy arrays (A,B)
986A for crystal to Cartesian transformations A*x = np.inner(A,x) = X
987B (= inverse of A) for Cartesian to crystal transformation B*X = np.inner(B,X) = x</td>
988</tr>
989</tbody>
990</table>
991</dd></dl>
992
993<dl class="function">
994<dt id="GSASIIlattice.cell2GS">
995<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">cell2GS</tt><big>(</big><em>cell</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#cell2GS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.cell2GS" title="Permalink to this definition">¶</a></dt>
996<dd><p>returns Uij to betaij conversion matrix</p>
997</dd></dl>
998
999<dl class="function">
1000<dt id="GSASIIlattice.cell2Gmat">
1001<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">cell2Gmat</tt><big>(</big><em>cell</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#cell2Gmat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.cell2Gmat" title="Permalink to this definition">¶</a></dt>
1002<dd><p>Compute real and reciprocal lattice metric tensor from unit cell constants</p>
1003<table class="docutils field-list" frame="void" rules="none">
1004<col class="field-name" />
1005<col class="field-body" />
1006<tbody valign="top">
1007<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>cell</strong> &#8211; tuple with a,b,c,alpha, beta, gamma (degrees)</td>
1008</tr>
1009<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">reciprocal (G) &amp; real (g) metric tensors (list of two numpy 3x3 arrays)</td>
1010</tr>
1011</tbody>
1012</table>
1013</dd></dl>
1014
1015<dl class="function">
1016<dt id="GSASIIlattice.combinations">
1017<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">combinations</tt><big>(</big><em>items</em>, <em>n</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#combinations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.combinations" title="Permalink to this definition">¶</a></dt>
1018<dd><p>take n distinct items, order matters</p>
1019</dd></dl>
1020
1021<dl class="function">
1022<dt id="GSASIIlattice.criticalEllipse">
1023<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">criticalEllipse</tt><big>(</big><em>prob</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#criticalEllipse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.criticalEllipse" title="Permalink to this definition">¶</a></dt>
1024<dd><p>Calculate critical values for probability ellipsoids from probability</p>
1025</dd></dl>
1026
1027<dl class="function">
1028<dt id="GSASIIlattice.fillgmat">
1029<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">fillgmat</tt><big>(</big><em>cell</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#fillgmat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.fillgmat" title="Permalink to this definition">¶</a></dt>
1030<dd><p>Compute lattice metric tensor from unit cell constants</p>
1031<table class="docutils field-list" frame="void" rules="none">
1032<col class="field-name" />
1033<col class="field-body" />
1034<tbody valign="top">
1035<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>cell</strong> &#8211; tuple with a,b,c,alpha, beta, gamma (degrees)</td>
1036</tr>
1037<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">3x3 numpy array</td>
1038</tr>
1039</tbody>
1040</table>
1041</dd></dl>
1042
1043<dl class="function">
1044<dt id="GSASIIlattice.getHKLmax">
1045<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">getHKLmax</tt><big>(</big><em>dmin</em>, <em>SGData</em>, <em>A</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#getHKLmax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.getHKLmax" title="Permalink to this definition">¶</a></dt>
1046<dd><p>finds maximum allowed hkl for given A within dmin</p>
1047</dd></dl>
1048
1049<dl class="function">
1050<dt id="GSASIIlattice.invcell2Gmat">
1051<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">invcell2Gmat</tt><big>(</big><em>invcell</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#invcell2Gmat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.invcell2Gmat" title="Permalink to this definition">¶</a></dt>
1052<dd><p>Compute real and reciprocal lattice metric tensor from reciprocal
1053unit cell constants</p>
1054<table class="docutils field-list" frame="void" rules="none">
1055<col class="field-name" />
1056<col class="field-body" />
1057<tbody valign="top">
1058<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>invcell</strong> &#8211; [a*,b*,c*,alpha*, beta*, gamma*] (degrees)</td>
1059</tr>
1060<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">reciprocal (G) &amp; real (g) metric tensors (list of two 3x3 arrays)</td>
1061</tr>
1062</tbody>
1063</table>
1064</dd></dl>
1065
1066<dl class="function">
1067<dt id="GSASIIlattice.invpolfcal">
1068<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">invpolfcal</tt><big>(</big><em>ODFln</em>, <em>SGData</em>, <em>phi</em>, <em>beta</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#invpolfcal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.invpolfcal" title="Permalink to this definition">¶</a></dt>
1069<dd><p>needs doc string</p>
1070</dd></dl>
1071
1072<dl class="function">
1073<dt id="GSASIIlattice.permutations">
1074<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">permutations</tt><big>(</big><em>items</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#permutations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.permutations" title="Permalink to this definition">¶</a></dt>
1075<dd><p>take all items, order matters</p>
1076</dd></dl>
1077
1078<dl class="function">
1079<dt id="GSASIIlattice.polfcal">
1080<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">polfcal</tt><big>(</big><em>ODFln</em>, <em>SamSym</em>, <em>psi</em>, <em>gam</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#polfcal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.polfcal" title="Permalink to this definition">¶</a></dt>
1081<dd><p>needs doc string</p>
1082</dd></dl>
1083
1084<dl class="function">
1085<dt id="GSASIIlattice.rotdMat">
1086<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">rotdMat</tt><big>(</big><em>angle</em>, <em>axis=0</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#rotdMat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.rotdMat" title="Permalink to this definition">¶</a></dt>
1087<dd><p>Prepare rotation matrix for angle in degrees about axis(=0,1,2)</p>
1088<table class="docutils field-list" frame="void" rules="none">
1089<col class="field-name" />
1090<col class="field-body" />
1091<tbody valign="top">
1092<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1093<li><strong>angle</strong> &#8211; angle in degrees</li>
1094<li><strong>axis</strong> &#8211; axis (0,1,2 = x,y,z) about which for the rotation</li>
1095</ul>
1096</td>
1097</tr>
1098<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">rotation matrix - 3x3 numpy array</p>
1099</td>
1100</tr>
1101</tbody>
1102</table>
1103</dd></dl>
1104
1105<dl class="function">
1106<dt id="GSASIIlattice.rotdMat4">
1107<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">rotdMat4</tt><big>(</big><em>angle</em>, <em>axis=0</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#rotdMat4"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.rotdMat4" title="Permalink to this definition">¶</a></dt>
1108<dd><p>Prepare rotation matrix for angle in degrees about axis(=0,1,2) with scaling for OpenGL</p>
1109<table class="docutils field-list" frame="void" rules="none">
1110<col class="field-name" />
1111<col class="field-body" />
1112<tbody valign="top">
1113<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1114<li><strong>angle</strong> &#8211; angle in degrees</li>
1115<li><strong>axis</strong> &#8211; axis (0,1,2 = x,y,z) about which for the rotation</li>
1116</ul>
1117</td>
1118</tr>
1119<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">rotation matrix - 4x4 numpy array (last row/column for openGL scaling)</p>
1120</td>
1121</tr>
1122</tbody>
1123</table>
1124</dd></dl>
1125
1126<dl class="function">
1127<dt id="GSASIIlattice.sec2HMS">
1128<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">sec2HMS</tt><big>(</big><em>sec</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#sec2HMS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.sec2HMS" title="Permalink to this definition">¶</a></dt>
1129<dd><p>Convert time in sec to H:M:S string</p>
1130<table class="docutils field-list" frame="void" rules="none">
1131<col class="field-name" />
1132<col class="field-body" />
1133<tbody valign="top">
1134<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sec</strong> &#8211; time in seconds</td>
1135</tr>
1136<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">H:M:S string (to nearest 100th second)</td>
1137</tr>
1138</tbody>
1139</table>
1140</dd></dl>
1141
1142<dl class="function">
1143<dt id="GSASIIlattice.selections">
1144<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">selections</tt><big>(</big><em>items</em>, <em>n</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#selections"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.selections" title="Permalink to this definition">¶</a></dt>
1145<dd><p>take n (not necessarily distinct) items, order matters</p>
1146</dd></dl>
1147
1148<dl class="data">
1149<dt id="GSASIIlattice.selftestlist">
1150<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">selftestlist</tt><em class="property"> = [&lt;function test0 at 0x5e34c30&gt;, &lt;function test1 at 0x5e34c70&gt;, &lt;function test2 at 0x5e34cb0&gt;, &lt;function test3 at 0x5e34cf0&gt;, &lt;function test4 at 0x5e34d30&gt;, &lt;function test5 at 0x5e34d70&gt;, &lt;function test6 at 0x5e34db0&gt;, &lt;function test7 at 0x5e34df0&gt;, &lt;function test8 at 0x5e34e30&gt;, &lt;function test9 at 0x5e34e70&gt;]</em><a class="headerlink" href="#GSASIIlattice.selftestlist" title="Permalink to this definition">¶</a></dt>
1151<dd><p>Defines a list of self-tests</p>
1152</dd></dl>
1153
1154<dl class="function">
1155<dt id="GSASIIlattice.sortHKLd">
1156<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">sortHKLd</tt><big>(</big><em>HKLd</em>, <em>ifreverse</em>, <em>ifdup</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#sortHKLd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.sortHKLd" title="Permalink to this definition">¶</a></dt>
1157<dd><p>needs doc string</p>
1158<table class="docutils field-list" frame="void" rules="none">
1159<col class="field-name" />
1160<col class="field-body" />
1161<tbody valign="top">
1162<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1163<li><strong>HKLd</strong> &#8211; a list of [h,k,l,d,...];</li>
1164<li><strong>ifreverse</strong> &#8211; True for largest d first</li>
1165<li><strong>ifdup</strong> &#8211; True if duplicate d-spacings allowed</li>
1166</ul>
1167</td>
1168</tr>
1169</tbody>
1170</table>
1171</dd></dl>
1172
1173<dl class="function">
1174<dt id="GSASIIlattice.test1">
1175<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">test1</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#test1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.test1" title="Permalink to this definition">¶</a></dt>
1176<dd><p>test cell2A and A2Gmat</p>
1177</dd></dl>
1178
1179<dl class="function">
1180<dt id="GSASIIlattice.test2">
1181<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">test2</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#test2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.test2" title="Permalink to this definition">¶</a></dt>
1182<dd><p>test Gmat2A, A2cell, A2Gmat, Gmat2cell</p>
1183</dd></dl>
1184
1185<dl class="function">
1186<dt id="GSASIIlattice.test3">
1187<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">test3</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#test3"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.test3" title="Permalink to this definition">¶</a></dt>
1188<dd><p>test invcell2Gmat</p>
1189</dd></dl>
1190
1191<dl class="function">
1192<dt id="GSASIIlattice.test4">
1193<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">test4</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#test4"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.test4" title="Permalink to this definition">¶</a></dt>
1194<dd><p>test calc_rVsq, calc_rV, calc_V</p>
1195</dd></dl>
1196
1197<dl class="function">
1198<dt id="GSASIIlattice.test5">
1199<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">test5</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#test5"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.test5" title="Permalink to this definition">¶</a></dt>
1200<dd><p>test A2invcell</p>
1201</dd></dl>
1202
1203<dl class="function">
1204<dt id="GSASIIlattice.test6">
1205<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">test6</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#test6"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.test6" title="Permalink to this definition">¶</a></dt>
1206<dd><p>test cell2AB</p>
1207</dd></dl>
1208
1209<dl class="function">
1210<dt id="GSASIIlattice.test7">
1211<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">test7</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#test7"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.test7" title="Permalink to this definition">¶</a></dt>
1212<dd><p>test GetBraviasNum(...) and GenHBravais(...)</p>
1213</dd></dl>
1214
1215<dl class="function">
1216<dt id="GSASIIlattice.test8">
1217<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">test8</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#test8"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.test8" title="Permalink to this definition">¶</a></dt>
1218<dd><p>test GenHLaue</p>
1219</dd></dl>
1220
1221<dl class="function">
1222<dt id="GSASIIlattice.test9">
1223<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">test9</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#test9"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.test9" title="Permalink to this definition">¶</a></dt>
1224<dd><p>test GenHLaue</p>
1225</dd></dl>
1226
1227<dl class="function">
1228<dt id="GSASIIlattice.textureIndex">
1229<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">textureIndex</tt><big>(</big><em>SHCoef</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#textureIndex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.textureIndex" title="Permalink to this definition">¶</a></dt>
1230<dd><p>needs doc string</p>
1231</dd></dl>
1232
1233<dl class="function">
1234<dt id="GSASIIlattice.uniqueCombinations">
1235<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">uniqueCombinations</tt><big>(</big><em>items</em>, <em>n</em><big>)</big><a class="reference internal" href="_modules/GSASIIlattice.html#uniqueCombinations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIlattice.uniqueCombinations" title="Permalink to this definition">¶</a></dt>
1236<dd><p>take n distinct items, order is irrelevant</p>
1237</dd></dl>
1238
1239</div>
1240<span class="target" id="module-GSASIIspc"></span><div class="section" id="gsasiispc-space-group-module">
1241<h2><em>GSASIIspc: Space group module</em><a class="headerlink" href="#gsasiispc-space-group-module" title="Permalink to this headline">¶</a></h2>
1242<p>Space group interpretation routines. Note that space group information is
1243stored in a <a class="reference internal" href="GSASIIobj.html#sgdata-table"><em>Space Group (SGData)</em></a> object.</p>
1244<dl class="function">
1245<dt id="GSASIIspc.AllOps">
1246<tt class="descclassname">GSASIIspc.</tt><tt class="descname">AllOps</tt><big>(</big><em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#AllOps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.AllOps" title="Permalink to this definition">¶</a></dt>
1247<dd><p>Returns a list of all operators for a space group, including those for
1248centering and a center of symmetry</p>
1249<table class="docutils field-list" frame="void" rules="none">
1250<col class="field-name" />
1251<col class="field-body" />
1252<tbody valign="top">
1253<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>SGData</strong> &#8211; from <a class="reference internal" href="#GSASIIspc.SpcGroup" title="GSASIIspc.SpcGroup"><tt class="xref py py-func docutils literal"><span class="pre">SpcGroup()</span></tt></a></td>
1254</tr>
1255<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">(SGTextList,offsetList,symOpList,G2oprList) where<ul class="simple">
1256<li>SGTextList: a list of strings with formatted and normalized
1257symmetry operators.</li>
1258<li>offsetList: a tuple of (dx,dy,dz) offsets that relate the GSAS-II
1259symmetry operation to the operator in SGTextList and symOpList.
1260these dx (etc.) values are added to the GSAS-II generated
1261positions to provide the positions that are generated
1262by the normalized symmetry operators.</li>
1263<li>symOpList: a list of tuples with the normalized symmetry
1264operations as (M,T) values
1265(see <tt class="docutils literal"><span class="pre">SGOps</span></tt> in the <a class="reference internal" href="GSASIIobj.html#sgdata-table"><em>Space Group object</em></a>)</li>
1266<li>G2oprList: The GSAS-II operations for each symmetry operation as
1267a tuple with (center,mult,opnum), where center is (0,0,0), (0.5,0,0),
1268(0.5,0.5,0.5),...; where mult is 1 or -1 for the center of symmetry
1269and opnum is the number for the symmetry operation, in <tt class="docutils literal"><span class="pre">SGOps</span></tt>
1270(starting with 0).</li>
1271</ul>
1272</td>
1273</tr>
1274</tbody>
1275</table>
1276</dd></dl>
1277
1278<dl class="function">
1279<dt id="GSASIIspc.ApplyStringOps">
1280<tt class="descclassname">GSASIIspc.</tt><tt class="descname">ApplyStringOps</tt><big>(</big><em>A</em>, <em>SGData</em>, <em>X</em>, <em>Uij=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#ApplyStringOps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.ApplyStringOps" title="Permalink to this definition">¶</a></dt>
1281<dd><p>Needs a doc string</p>
1282</dd></dl>
1283
1284<dl class="function">
1285<dt id="GSASIIspc.ElemPosition">
1286<tt class="descclassname">GSASIIspc.</tt><tt class="descname">ElemPosition</tt><big>(</big><em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#ElemPosition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.ElemPosition" title="Permalink to this definition">¶</a></dt>
1287<dd><p>Under development.
1288Object here is to return a list of symmetry element types and locations suitable
1289for say drawing them.
1290So far I have the element type... getting all possible locations without lookup may be impossible!</p>
1291</dd></dl>
1292
1293<dl class="function">
1294<dt id="GSASIIspc.GenAtom">
1295<tt class="descclassname">GSASIIspc.</tt><tt class="descname">GenAtom</tt><big>(</big><em>XYZ</em>, <em>SGData</em>, <em>All=False</em>, <em>Uij=</em><span class="optional">[</span><span class="optional">]</span>, <em>Move=True</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#GenAtom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.GenAtom" title="Permalink to this definition">¶</a></dt>
1296<dd><p>Generates the equivalent positions for a specified coordinate and space group</p>
1297<table class="docutils field-list" frame="void" rules="none">
1298<col class="field-name" />
1299<col class="field-body" />
1300<tbody valign="top">
1301<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1302<li><strong>XYZ</strong> &#8211; an array, tuple or list containing 3 elements: x, y &amp; z</li>
1303<li><strong>SGData</strong> &#8211; from <a class="reference internal" href="#GSASIIspc.SpcGroup" title="GSASIIspc.SpcGroup"><tt class="xref py py-func docutils literal"><span class="pre">SpcGroup()</span></tt></a></li>
1304<li><strong>All</strong> &#8211; True return all equivalent positions including duplicates;
1305False return only unique positions</li>
1306<li><strong>Uij</strong> &#8211; [U11,U22,U33,U12,U13,U23] or [] if no Uij</li>
1307<li><strong>Move</strong> &#8211; True move generated atom positions to be inside cell
1308False do not move atoms</li>
1309</ul>
1310</td>
1311</tr>
1312<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><p>[[XYZEquiv],Idup,[UijEquiv]]</p>
1313<ul class="simple">
1314<li>[XYZEquiv] is list of equivalent positions (XYZ is first entry)</li>
1315<li>Idup = [-][C]SS where SS is the symmetry operator number (1-24), C (if not 0,0,0)</li>
1316<li>is centering operator number (1-4) and - is for inversion
1317Cell = unit cell translations needed to put new positions inside cell
1318[UijEquiv] - equivalent Uij; absent if no Uij given</li>
1319</ul>
1320</p>
1321</td>
1322</tr>
1323</tbody>
1324</table>
1325</dd></dl>
1326
1327<dl class="function">
1328<dt id="GSASIIspc.GenHKLf">
1329<tt class="descclassname">GSASIIspc.</tt><tt class="descname">GenHKLf</tt><big>(</big><em>HKL</em>, <em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#GenHKLf"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.GenHKLf" title="Permalink to this definition">¶</a></dt>
1330<dd><p>Uses old GSAS Fortran routine genhkl.for</p>
1331<table class="docutils field-list" frame="void" rules="none">
1332<col class="field-name" />
1333<col class="field-body" />
1334<tbody valign="top">
1335<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1336<li><strong>HKL</strong> &#8211; [h,k,l]</li>
1337<li><strong>SGData</strong> &#8211; space group data obtained from SpcGroup</li>
1338</ul>
1339</td>
1340</tr>
1341<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><p>iabsnt,mulp,Uniq,phi</p>
1342<ul class="simple">
1343<li>iabsnt = True if reflection is forbidden by symmetry</li>
1344<li>mulp = reflection multiplicity including Friedel pairs</li>
1345<li>Uniq = numpy array of equivalent hkl in descending order of h,k,l</li>
1346</ul>
1347</p>
1348</td>
1349</tr>
1350</tbody>
1351</table>
1352</dd></dl>
1353
1354<dl class="function">
1355<dt id="GSASIIspc.GetCSuinel">
1356<tt class="descclassname">GSASIIspc.</tt><tt class="descname">GetCSuinel</tt><big>(</big><em>siteSym</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#GetCSuinel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.GetCSuinel" title="Permalink to this definition">¶</a></dt>
1357<dd><p>returns Uij terms, multipliers, GUI flags &amp; Uiso2Uij multipliers</p>
1358</dd></dl>
1359
1360<dl class="function">
1361<dt id="GSASIIspc.GetCSxinel">
1362<tt class="descclassname">GSASIIspc.</tt><tt class="descname">GetCSxinel</tt><big>(</big><em>siteSym</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#GetCSxinel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.GetCSxinel" title="Permalink to this definition">¶</a></dt>
1363<dd><p>Needs a doc string</p>
1364</dd></dl>
1365
1366<dl class="function">
1367<dt id="GSASIIspc.GetKNsym">
1368<tt class="descclassname">GSASIIspc.</tt><tt class="descname">GetKNsym</tt><big>(</big><em>key</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#GetKNsym"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.GetKNsym" title="Permalink to this definition">¶</a></dt>
1369<dd><p>Needs a doc string</p>
1370</dd></dl>
1371
1372<dl class="function">
1373<dt id="GSASIIspc.GetNXUPQsym">
1374<tt class="descclassname">GSASIIspc.</tt><tt class="descname">GetNXUPQsym</tt><big>(</big><em>siteSym</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#GetNXUPQsym"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.GetNXUPQsym" title="Permalink to this definition">¶</a></dt>
1375<dd><p>Needs a doc string</p>
1376</dd></dl>
1377
1378<dl class="function">
1379<dt id="GSASIIspc.GetOprPtrName">
1380<tt class="descclassname">GSASIIspc.</tt><tt class="descname">GetOprPtrName</tt><big>(</big><em>key</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#GetOprPtrName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.GetOprPtrName" title="Permalink to this definition">¶</a></dt>
1381<dd><p>Needs a doc string</p>
1382</dd></dl>
1383
1384<dl class="function">
1385<dt id="GSASIIspc.HStrainNames">
1386<tt class="descclassname">GSASIIspc.</tt><tt class="descname">HStrainNames</tt><big>(</big><em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#HStrainNames"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.HStrainNames" title="Permalink to this definition">¶</a></dt>
1387<dd><p>Needs a doc string</p>
1388</dd></dl>
1389
1390<dl class="function">
1391<dt id="GSASIIspc.Latt2text">
1392<tt class="descclassname">GSASIIspc.</tt><tt class="descname">Latt2text</tt><big>(</big><em>Latt</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#Latt2text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.Latt2text" title="Permalink to this definition">¶</a></dt>
1393<dd><p>From lattice type (&#8216;P&#8217;,A&#8217;, etc.) returns &#8216;;&#8217; delimited cell centering vectors</p>
1394</dd></dl>
1395
1396<dl class="function">
1397<dt id="GSASIIspc.MT2text">
1398<tt class="descclassname">GSASIIspc.</tt><tt class="descname">MT2text</tt><big>(</big><em>M</em>, <em>T</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#MT2text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.MT2text" title="Permalink to this definition">¶</a></dt>
1399<dd><p>From space group matrix/translation operator returns text version</p>
1400</dd></dl>
1401
1402<dl class="function">
1403<dt id="GSASIIspc.MoveToUnitCell">
1404<tt class="descclassname">GSASIIspc.</tt><tt class="descname">MoveToUnitCell</tt><big>(</big><em>xyz</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#MoveToUnitCell"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.MoveToUnitCell" title="Permalink to this definition">¶</a></dt>
1405<dd><p>Translates a set of coordinates so that all values are &gt;=0 and &lt; 1</p>
1406<table class="docutils field-list" frame="void" rules="none">
1407<col class="field-name" />
1408<col class="field-body" />
1409<tbody valign="top">
1410<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>xyz</strong> &#8211; a list or numpy array of fractional coordinates</td>
1411</tr>
1412<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">XYZ - numpy array of new coordinates now 0 or greater and less than 1</td>
1413</tr>
1414</tbody>
1415</table>
1416</dd></dl>
1417
1418<dl class="function">
1419<dt id="GSASIIspc.Muiso2Shkl">
1420<tt class="descclassname">GSASIIspc.</tt><tt class="descname">Muiso2Shkl</tt><big>(</big><em>muiso</em>, <em>SGData</em>, <em>cell</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#Muiso2Shkl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.Muiso2Shkl" title="Permalink to this definition">¶</a></dt>
1421<dd><p>this is to convert isotropic mustrain to generalized Shkls - doesn&#8217;t work just now</p>
1422</dd></dl>
1423
1424<dl class="function">
1425<dt id="GSASIIspc.MustrainCoeff">
1426<tt class="descclassname">GSASIIspc.</tt><tt class="descname">MustrainCoeff</tt><big>(</big><em>HKL</em>, <em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#MustrainCoeff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.MustrainCoeff" title="Permalink to this definition">¶</a></dt>
1427<dd><p>Needs a doc string</p>
1428</dd></dl>
1429
1430<dl class="function">
1431<dt id="GSASIIspc.MustrainNames">
1432<tt class="descclassname">GSASIIspc.</tt><tt class="descname">MustrainNames</tt><big>(</big><em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#MustrainNames"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.MustrainNames" title="Permalink to this definition">¶</a></dt>
1433<dd><p>Needs a doc string</p>
1434</dd></dl>
1435
1436<dl class="function">
1437<dt id="GSASIIspc.Opposite">
1438<tt class="descclassname">GSASIIspc.</tt><tt class="descname">Opposite</tt><big>(</big><em>XYZ</em>, <em>toler=0.0002</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#Opposite"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.Opposite" title="Permalink to this definition">¶</a></dt>
1439<dd><dl class="docutils">
1440<dt>Gives opposite corner, edge or face of unit cell for position within tolerance. </dt>
1441<dd>Result may be just outside the cell within tolerance</dd>
1442</dl>
1443<table class="docutils field-list" frame="void" rules="none">
1444<col class="field-name" />
1445<col class="field-body" />
1446<tbody valign="top">
1447<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1448<li><strong>XYZ</strong> &#8211; 0 &gt;= np.array[x,y,z] &gt; 1 as by MoveToUnitCell</li>
1449<li><strong>toler</strong> &#8211; unit cell fraction tolerance making opposite</li>
1450</ul>
1451</td>
1452</tr>
1453<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">XYZ: array of opposite positions; always contains XYZ</p>
1454</td>
1455</tr>
1456</tbody>
1457</table>
1458</dd></dl>
1459
1460<dl class="function">
1461<dt id="GSASIIspc.SGErrors">
1462<tt class="descclassname">GSASIIspc.</tt><tt class="descname">SGErrors</tt><big>(</big><em>IErr</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#SGErrors"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.SGErrors" title="Permalink to this definition">¶</a></dt>
1463<dd><p>Interprets the error message code from SpcGroup. Used in SpaceGroup.</p>
1464<table class="docutils field-list" frame="void" rules="none">
1465<col class="field-name" />
1466<col class="field-body" />
1467<tbody valign="top">
1468<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>IErr</strong> &#8211; see SGError in <a class="reference internal" href="#GSASIIspc.SpcGroup" title="GSASIIspc.SpcGroup"><tt class="xref py py-func docutils literal"><span class="pre">SpcGroup()</span></tt></a></td>
1469</tr>
1470<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">ErrString - a string with the error message or &#8220;Unknown error&#8221;</td>
1471</tr>
1472</tbody>
1473</table>
1474</dd></dl>
1475
1476<dl class="function">
1477<dt id="GSASIIspc.SGPrint">
1478<tt class="descclassname">GSASIIspc.</tt><tt class="descname">SGPrint</tt><big>(</big><em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#SGPrint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.SGPrint" title="Permalink to this definition">¶</a></dt>
1479<dd><p>Print the output of SpcGroup in a nicely formatted way. Used in SpaceGroup</p>
1480<table class="docutils field-list" frame="void" rules="none">
1481<col class="field-name" />
1482<col class="field-body" />
1483<tbody valign="top">
1484<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>SGData</strong> &#8211; from <a class="reference internal" href="#GSASIIspc.SpcGroup" title="GSASIIspc.SpcGroup"><tt class="xref py py-func docutils literal"><span class="pre">SpcGroup()</span></tt></a></td>
1485</tr>
1486<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">SGText - list of strings with the space group details</td>
1487</tr>
1488</tbody>
1489</table>
1490</dd></dl>
1491
1492<dl class="function">
1493<dt id="GSASIIspc.SGpolar">
1494<tt class="descclassname">GSASIIspc.</tt><tt class="descname">SGpolar</tt><big>(</big><em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#SGpolar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.SGpolar" title="Permalink to this definition">¶</a></dt>
1495<dd><p>Determine identity of polar axes if any</p>
1496</dd></dl>
1497
1498<dl class="function">
1499<dt id="GSASIIspc.SpaceGroup">
1500<tt class="descclassname">GSASIIspc.</tt><tt class="descname">SpaceGroup</tt><big>(</big><em>SGSymbol</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#SpaceGroup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.SpaceGroup" title="Permalink to this definition">¶</a></dt>
1501<dd><p>Print the output of SpcGroup in a nicely formatted way.</p>
1502<table class="docutils field-list" frame="void" rules="none">
1503<col class="field-name" />
1504<col class="field-body" />
1505<tbody valign="top">
1506<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>SGSymbol</strong> &#8211; space group symbol (string) with spaces between axial fields</td>
1507</tr>
1508<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">nothing</td>
1509</tr>
1510</tbody>
1511</table>
1512</dd></dl>
1513
1514<dl class="function">
1515<dt id="GSASIIspc.SpcGroup">
1516<tt class="descclassname">GSASIIspc.</tt><tt class="descname">SpcGroup</tt><big>(</big><em>SGSymbol</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#SpcGroup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.SpcGroup" title="Permalink to this definition">¶</a></dt>
1517<dd><p>Determines cell and symmetry information from a short H-M space group name</p>
1518<table class="docutils field-list" frame="void" rules="none">
1519<col class="field-name" />
1520<col class="field-body" />
1521<tbody valign="top">
1522<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>SGSymbol</strong> &#8211; space group symbol (string) with spaces between axial fields</td>
1523</tr>
1524<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">(SGError,SGData)
1525* SGError = 0 for no errors; &gt;0 for errors (see SGErrors below for details)
1526* SGData - is a dict (see <a class="reference internal" href="GSASIIobj.html#sgdata-table"><em>Space Group object</em></a>) with entries:<blockquote>
1527<div><ul class="simple">
1528<li>&#8216;SpGrp&#8217;: space group symbol, slightly cleaned up</li>
1529<li>&#8216;Laue&#8217;:  one of &#8216;-1&#8217;, &#8216;2/m&#8217;, &#8216;mmm&#8217;, &#8216;4/m&#8217;, &#8216;4/mmm&#8217;, &#8216;3R&#8217;,
1530&#8216;3mR&#8217;, &#8216;3&#8217;, &#8216;3m1&#8217;, &#8216;31m&#8217;, &#8216;6/m&#8217;, &#8216;6/mmm&#8217;, &#8216;m3&#8217;, &#8216;m3m&#8217;</li>
1531<li>&#8216;SGInv&#8217;: boolean; True if centrosymmetric, False if not</li>
1532<li>&#8216;SGLatt&#8217;: one of &#8216;P&#8217;, &#8216;A&#8217;, &#8216;B&#8217;, &#8216;C&#8217;, &#8216;I&#8217;, &#8216;F&#8217;, &#8216;R&#8217;</li>
1533<li>&#8216;SGUniq&#8217;: one of &#8216;a&#8217;, &#8216;b&#8217;, &#8216;c&#8217; if monoclinic, &#8216;&#8217; otherwise</li>
1534<li>&#8216;SGCen&#8217;: cell centering vectors [0,0,0] at least</li>
1535<li>&#8216;SGOps&#8217;: symmetry operations as [M,T] so that M*x+T = x&#8217;</li>
1536<li>&#8216;SGSys&#8217;: one of &#8216;triclinic&#8217;, &#8216;monoclinic&#8217;, &#8216;orthorhombic&#8217;,
1537&#8216;tetragonal&#8217;, &#8216;rhombohedral&#8217;, &#8216;trigonal&#8217;, &#8216;hexagonal&#8217;, &#8216;cubic&#8217;</li>
1538<li>&#8216;SGPolax&#8217;: one of &#8216;&#8217;, &#8216;x&#8217;, &#8216;y&#8217;, &#8216;x y&#8217;, &#8216;z&#8217;, &#8216;x z&#8217;, &#8216;y z&#8217;,
1539&#8216;xyz&#8217;, &#8216;111&#8217; for arbitrary axes</li>
1540</ul>
1541</div></blockquote>
1542</td>
1543</tr>
1544</tbody>
1545</table>
1546</dd></dl>
1547
1548<dl class="function">
1549<dt id="GSASIIspc.StandardizeSpcName">
1550<tt class="descclassname">GSASIIspc.</tt><tt class="descname">StandardizeSpcName</tt><big>(</big><em>spcgroup</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#StandardizeSpcName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.StandardizeSpcName" title="Permalink to this definition">¶</a></dt>
1551<dd><p>Accept a spacegroup name where spaces may have not been used
1552in the names according to the GSAS convention (spaces between symmetry
1553for each axis) and return the space group name as used in GSAS</p>
1554</dd></dl>
1555
1556<dl class="function">
1557<dt id="GSASIIspc.StringOpsProd">
1558<tt class="descclassname">GSASIIspc.</tt><tt class="descname">StringOpsProd</tt><big>(</big><em>A</em>, <em>B</em>, <em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#StringOpsProd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.StringOpsProd" title="Permalink to this definition">¶</a></dt>
1559<dd><p>Find A*B where A &amp; B are in strings &#8216;-&#8216; + &#8216;100*c+n&#8217; + &#8216;+ijk&#8217;
1560where &#8216;-&#8216; indicates inversion, c(&gt;0) is the cell centering operator,
1561n is operator number from SgOps and ijk are unit cell translations (each may be &lt;0).
1562Should return resultant string - C. SGData - dictionary using entries:</p>
1563<blockquote>
1564<div><ul class="simple">
1565<li>&#8216;SGCen&#8217;: cell centering vectors [0,0,0] at least</li>
1566<li>&#8216;SGOps&#8217;: symmetry operations as [M,T] so that M*x+T = x&#8217;</li>
1567</ul>
1568</div></blockquote>
1569</dd></dl>
1570
1571<dl class="function">
1572<dt id="GSASIIspc.SytSym">
1573<tt class="descclassname">GSASIIspc.</tt><tt class="descname">SytSym</tt><big>(</big><em>XYZ</em>, <em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#SytSym"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.SytSym" title="Permalink to this definition">¶</a></dt>
1574<dd><p>Generates the number of equivalent positions and a site symmetry code for a specified coordinate and space group</p>
1575<table class="docutils field-list" frame="void" rules="none">
1576<col class="field-name" />
1577<col class="field-body" />
1578<tbody valign="top">
1579<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1580<li><strong>XYZ</strong> &#8211; an array, tuple or list containing 3 elements: x, y &amp; z</li>
1581<li><strong>SGData</strong> &#8211; from SpcGroup</li>
1582</ul>
1583</td>
1584</tr>
1585<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first">a two element tuple:</p>
1586<ul class="last simple">
1587<li>The 1st element is a code for the site symmetry (see GetKNsym)</li>
1588<li>The 2nd element is the site multiplicity</li>
1589</ul>
1590</td>
1591</tr>
1592</tbody>
1593</table>
1594</dd></dl>
1595
1596<dl class="data">
1597<dt id="GSASIIspc.selftestlist">
1598<tt class="descclassname">GSASIIspc.</tt><tt class="descname">selftestlist</tt><em class="property"> = [&lt;function test0 at 0x5ac5830&gt;, &lt;function test1 at 0x5ac5870&gt;, &lt;function test2 at 0x5ac58b0&gt;, &lt;function test3 at 0x5ac58f0&gt;]</em><a class="headerlink" href="#GSASIIspc.selftestlist" title="Permalink to this definition">¶</a></dt>
1599<dd><p>Defines a list of self-tests</p>
1600</dd></dl>
1601
1602<dl class="function">
1603<dt id="GSASIIspc.test0">
1604<tt class="descclassname">GSASIIspc.</tt><tt class="descname">test0</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#test0"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.test0" title="Permalink to this definition">¶</a></dt>
1605<dd><p>self-test #0: exercise MoveToUnitCell</p>
1606</dd></dl>
1607
1608<dl class="function">
1609<dt id="GSASIIspc.test1">
1610<tt class="descclassname">GSASIIspc.</tt><tt class="descname">test1</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#test1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.test1" title="Permalink to this definition">¶</a></dt>
1611<dd><p>self-test #1: SpcGroup and SGPrint against previous results</p>
1612</dd></dl>
1613
1614<dl class="function">
1615<dt id="GSASIIspc.test2">
1616<tt class="descclassname">GSASIIspc.</tt><tt class="descname">test2</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#test2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.test2" title="Permalink to this definition">¶</a></dt>
1617<dd><p>self-test #2: SpcGroup against cctbx (sgtbx) computations</p>
1618</dd></dl>
1619
1620<dl class="function">
1621<dt id="GSASIIspc.test3">
1622<tt class="descclassname">GSASIIspc.</tt><tt class="descname">test3</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIspc.html#test3"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIspc.test3" title="Permalink to this definition">¶</a></dt>
1623<dd><p>self-test #3: exercise SytSym (includes GetOprPtrName, GenAtom, GetKNsym)
1624for selected space groups against info in IT Volume A</p>
1625</dd></dl>
1626
1627</div>
1628<span class="target" id="module-gltext"></span><div class="section" id="gltext-draw-opengl-text">
1629<h2><em>gltext: draw OpenGL text</em><a class="headerlink" href="#gltext-draw-opengl-text" title="Permalink to this headline">¶</a></h2>
1630<p>Routines that render text on OpenGL without use of GLUT.</p>
1631<p>Code written by Christian Brugger &amp; Stefan Hacker and
1632distributed under GNU General Public License.</p>
1633<dl class="class">
1634<dt id="gltext.Text">
1635<em class="property">class </em><tt class="descclassname">gltext.</tt><tt class="descname">Text</tt><big>(</big><em>text='Text'</em>, <em>font=None</em>, <em>font_size=8</em>, <em>foreground=wx.Colour()</em>, <em>centered=False</em><big>)</big><a class="reference internal" href="_modules/gltext.html#Text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.Text" title="Permalink to this definition">¶</a></dt>
1636<dd><p>A simple class for using System Fonts to display text in
1637an OpenGL scene. The Text adds a global Cache of already
1638created text elements to TextElement&#8217;s base functionality
1639so you can save some memory and increase speed</p>
1640<dl class="attribute">
1641<dt id="gltext.Text.centered">
1642<tt class="descname">centered</tt><a class="headerlink" href="#gltext.Text.centered" title="Permalink to this definition">¶</a></dt>
1643<dd><p>Display the text centered</p>
1644</dd></dl>
1645
1646<dl class="method">
1647<dt id="gltext.Text.draw_text">
1648<tt class="descname">draw_text</tt><big>(</big><em>position=wx.Point(0</em>, <em>0)</em>, <em>scale=1.0</em>, <em>rotation=0</em><big>)</big><a class="reference internal" href="_modules/gltext.html#Text.draw_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.Text.draw_text" title="Permalink to this definition">¶</a></dt>
1649<dd><p>position (wx.Point)    - x/y Position to draw in scene
1650scale    (float)       - Scale
1651rotation (int)         - Rotation in degree</p>
1652<p>Draws the text to the scene</p>
1653</dd></dl>
1654
1655<dl class="attribute">
1656<dt id="gltext.Text.font">
1657<tt class="descname">font</tt><a class="headerlink" href="#gltext.Text.font" title="Permalink to this definition">¶</a></dt>
1658<dd><p>Font of the object</p>
1659</dd></dl>
1660
1661<dl class="attribute">
1662<dt id="gltext.Text.font_size">
1663<tt class="descname">font_size</tt><a class="headerlink" href="#gltext.Text.font_size" title="Permalink to this definition">¶</a></dt>
1664<dd><p>Font size</p>
1665</dd></dl>
1666
1667<dl class="attribute">
1668<dt id="gltext.Text.foreground">
1669<tt class="descname">foreground</tt><a class="headerlink" href="#gltext.Text.foreground" title="Permalink to this definition">¶</a></dt>
1670<dd><p>Color/Overlay bitmap of the text</p>
1671</dd></dl>
1672
1673<dl class="method">
1674<dt id="gltext.Text.getTextElement">
1675<tt class="descname">getTextElement</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/gltext.html#Text.getTextElement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.Text.getTextElement" title="Permalink to this definition">¶</a></dt>
1676<dd><p>Returns the text element bound to the Text class</p>
1677</dd></dl>
1678
1679<dl class="method">
1680<dt id="gltext.Text.getTexture">
1681<tt class="descname">getTexture</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/gltext.html#Text.getTexture"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.Text.getTexture" title="Permalink to this definition">¶</a></dt>
1682<dd><p>Returns the texture of the bound TextElement</p>
1683</dd></dl>
1684
1685<dl class="method">
1686<dt id="gltext.Text.getTexture_size">
1687<tt class="descname">getTexture_size</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/gltext.html#Text.getTexture_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.Text.getTexture_size" title="Permalink to this definition">¶</a></dt>
1688<dd><p>Returns a texture size tuple</p>
1689</dd></dl>
1690
1691<dl class="method">
1692<dt id="gltext.Text.setCentered">
1693<tt class="descname">setCentered</tt><big>(</big><em>value</em>, <em>reinit=True</em><big>)</big><a class="reference internal" href="_modules/gltext.html#Text.setCentered"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.Text.setCentered" title="Permalink to this definition">¶</a></dt>
1694<dd><p>value (bool)    - New centered value
1695reinit (bool)   - Create a new texture</p>
1696<p>Sets a new value for &#8216;centered&#8217;</p>
1697</dd></dl>
1698
1699<dl class="method">
1700<dt id="gltext.Text.setFont">
1701<tt class="descname">setFont</tt><big>(</big><em>value</em>, <em>reinit=True</em><big>)</big><a class="reference internal" href="_modules/gltext.html#Text.setFont"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.Text.setFont" title="Permalink to this definition">¶</a></dt>
1702<dd><p>value (bool)    - New Font
1703reinit (bool)   - Create a new texture</p>
1704<p>Sets a new font</p>
1705</dd></dl>
1706
1707<dl class="method">
1708<dt id="gltext.Text.setFont_size">
1709<tt class="descname">setFont_size</tt><big>(</big><em>value</em>, <em>reinit=True</em><big>)</big><a class="reference internal" href="_modules/gltext.html#Text.setFont_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.Text.setFont_size" title="Permalink to this definition">¶</a></dt>
1710<dd><p>value (bool)    - New font size
1711reinit (bool)   - Create a new texture</p>
1712<p>Sets a new font size</p>
1713</dd></dl>
1714
1715<dl class="method">
1716<dt id="gltext.Text.setForeground">
1717<tt class="descname">setForeground</tt><big>(</big><em>value</em>, <em>reinit=True</em><big>)</big><a class="reference internal" href="_modules/gltext.html#Text.setForeground"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.Text.setForeground" title="Permalink to this definition">¶</a></dt>
1718<dd><p>value (bool)    - New centered value
1719reinit (bool)   - Create a new texture</p>
1720<p>Sets a new value for &#8216;centered&#8217;</p>
1721</dd></dl>
1722
1723<dl class="method">
1724<dt id="gltext.Text.setText">
1725<tt class="descname">setText</tt><big>(</big><em>value</em>, <em>reinit=True</em><big>)</big><a class="reference internal" href="_modules/gltext.html#Text.setText"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.Text.setText" title="Permalink to this definition">¶</a></dt>
1726<dd><p>value (bool)    - New Text
1727reinit (bool)   - Create a new texture</p>
1728<p>Sets a new text</p>
1729</dd></dl>
1730
1731<dl class="attribute">
1732<dt id="gltext.Text.text">
1733<tt class="descname">text</tt><a class="headerlink" href="#gltext.Text.text" title="Permalink to this definition">¶</a></dt>
1734<dd><p>Text of the object</p>
1735</dd></dl>
1736
1737<dl class="attribute">
1738<dt id="gltext.Text.text_element">
1739<tt class="descname">text_element</tt><a class="headerlink" href="#gltext.Text.text_element" title="Permalink to this definition">¶</a></dt>
1740<dd><p>TextElement bound to this class</p>
1741</dd></dl>
1742
1743<dl class="attribute">
1744<dt id="gltext.Text.texture">
1745<tt class="descname">texture</tt><a class="headerlink" href="#gltext.Text.texture" title="Permalink to this definition">¶</a></dt>
1746<dd><p>Texture of bound TextElement</p>
1747</dd></dl>
1748
1749<dl class="attribute">
1750<dt id="gltext.Text.texture_size">
1751<tt class="descname">texture_size</tt><a class="headerlink" href="#gltext.Text.texture_size" title="Permalink to this definition">¶</a></dt>
1752<dd><p>Size of the used texture</p>
1753</dd></dl>
1754
1755</dd></dl>
1756
1757<dl class="class">
1758<dt id="gltext.TextElement">
1759<em class="property">class </em><tt class="descclassname">gltext.</tt><tt class="descname">TextElement</tt><big>(</big><em>text=''</em>, <em>font=None</em>, <em>foreground=wx.Colour()</em>, <em>centered=False</em><big>)</big><a class="reference internal" href="_modules/gltext.html#TextElement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.TextElement" title="Permalink to this definition">¶</a></dt>
1760<dd><p>A simple class for using system Fonts to display
1761text in an OpenGL scene</p>
1762<dl class="method">
1763<dt id="gltext.TextElement.bind">
1764<tt class="descname">bind</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/gltext.html#TextElement.bind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.TextElement.bind" title="Permalink to this definition">¶</a></dt>
1765<dd><p>Increase refcount</p>
1766</dd></dl>
1767
1768<dl class="attribute">
1769<dt id="gltext.TextElement.centered">
1770<tt class="descname">centered</tt><a class="headerlink" href="#gltext.TextElement.centered" title="Permalink to this definition">¶</a></dt>
1771<dd><p>Is text centered</p>
1772</dd></dl>
1773
1774<dl class="method">
1775<dt id="gltext.TextElement.createTexture">
1776<tt class="descname">createTexture</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/gltext.html#TextElement.createTexture"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.TextElement.createTexture" title="Permalink to this definition">¶</a></dt>
1777<dd><p>Creates a texture from the settings saved in TextElement, to be able to use normal
1778system fonts conviently a wx.MemoryDC is used to draw on a wx.Bitmap. As wxwidgets
1779device contexts don&#8217;t support alpha at all it is necessary to apply a little hack
1780to preserve antialiasing without sticking to a fixed background color:</p>
1781<p>We draw the bmp in b/w mode so we can use its data as a alpha channel for a solid
1782color bitmap which after GL_ALPHA_TEST and GL_BLEND will show a nicely antialiased
1783text on any surface.</p>
1784<p>To access the raw pixel data the bmp gets converted to a wx.Image. Now we just have
1785to merge our foreground color with the alpha data we just created and push it all
1786into a OpenGL texture and we are DONE <em>inhalesdelpy</em></p>
1787<p>DRAWBACK of the whole conversion thing is a really long time for creating the
1788texture. If you see any optimizations that could save time PLEASE CREATE A PATCH!!!</p>
1789</dd></dl>
1790
1791<dl class="method">
1792<dt id="gltext.TextElement.deleteTexture">
1793<tt class="descname">deleteTexture</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/gltext.html#TextElement.deleteTexture"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.TextElement.deleteTexture" title="Permalink to this definition">¶</a></dt>
1794<dd><p>Deletes the OpenGL texture object</p>
1795</dd></dl>
1796
1797<dl class="method">
1798<dt id="gltext.TextElement.draw_text">
1799<tt class="descname">draw_text</tt><big>(</big><em>position=wx.Point(0</em>, <em>0)</em>, <em>scale=1.0</em>, <em>rotation=0</em><big>)</big><a class="reference internal" href="_modules/gltext.html#TextElement.draw_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.TextElement.draw_text" title="Permalink to this definition">¶</a></dt>
1800<dd><p>position (wx.Point)    - x/y Position to draw in scene
1801scale    (float)       - Scale
1802rotation (int)         - Rotation in degree</p>
1803<p>Draws the text to the scene</p>
1804</dd></dl>
1805
1806<dl class="attribute">
1807<dt id="gltext.TextElement.font">
1808<tt class="descname">font</tt><a class="headerlink" href="#gltext.TextElement.font" title="Permalink to this definition">¶</a></dt>
1809<dd><p>Font of the object</p>
1810</dd></dl>
1811
1812<dl class="attribute">
1813<dt id="gltext.TextElement.foreground">
1814<tt class="descname">foreground</tt><a class="headerlink" href="#gltext.TextElement.foreground" title="Permalink to this definition">¶</a></dt>
1815<dd><p>Color of the text</p>
1816</dd></dl>
1817
1818<dl class="method">
1819<dt id="gltext.TextElement.isBound">
1820<tt class="descname">isBound</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/gltext.html#TextElement.isBound"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.TextElement.isBound" title="Permalink to this definition">¶</a></dt>
1821<dd><p>Return refcount</p>
1822</dd></dl>
1823
1824<dl class="attribute">
1825<dt id="gltext.TextElement.owner_cnt">
1826<tt class="descname">owner_cnt</tt><a class="headerlink" href="#gltext.TextElement.owner_cnt" title="Permalink to this definition">¶</a></dt>
1827<dd><p>Owner count</p>
1828</dd></dl>
1829
1830<dl class="method">
1831<dt id="gltext.TextElement.release">
1832<tt class="descname">release</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/gltext.html#TextElement.release"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gltext.TextElement.release" title="Permalink to this definition">¶</a></dt>
1833<dd><p>Decrease refcount</p>
1834</dd></dl>
1835
1836<dl class="attribute">
1837<dt id="gltext.TextElement.text">
1838<tt class="descname">text</tt><a class="headerlink" href="#gltext.TextElement.text" title="Permalink to this definition">¶</a></dt>
1839<dd><p>Text of the object</p>
1840</dd></dl>
1841
1842<dl class="attribute">
1843<dt id="gltext.TextElement.texture">
1844<tt class="descname">texture</tt><a class="headerlink" href="#gltext.TextElement.texture" title="Permalink to this definition">¶</a></dt>
1845<dd><p>Used texture</p>
1846</dd></dl>
1847
1848<dl class="attribute">
1849<dt id="gltext.TextElement.texture_size">
1850<tt class="descname">texture_size</tt><a class="headerlink" href="#gltext.TextElement.texture_size" title="Permalink to this definition">¶</a></dt>
1851<dd><p>Size of the used texture</p>
1852</dd></dl>
1853
1854</dd></dl>
1855
1856</div>
1857</div>
1858
1859
1860          </div>
1861        </div>
1862      </div>
1863      <div class="sphinxsidebar">
1864        <div class="sphinxsidebarwrapper">
1865            <p class="logo"><a href="index.html">
1866              <img class="logo" src="_static/G2_html_logo.png" alt="Logo"/>
1867            </a></p>
1868  <h3><a href="index.html">Table Of Contents</a></h3>
1869  <ul>
1870<li><a class="reference internal" href="#"><em>GSAS-II Utility Modules</em></a><ul>
1871<li><a class="reference internal" href="#gsasiidata-data-for-computations"><em>GSASIIdata: Data for computations</em></a></li>
1872<li><a class="reference internal" href="#elementtable-periodic-table-data"><em>ElementTable: Periodic Table Data</em></a></li>
1873<li><a class="reference internal" href="#formfactors-scattering-data"><em>FormFactors: Scattering Data</em></a></li>
1874<li><a class="reference internal" href="#imagecalibrants-calibration-standards"><em>ImageCalibrants: Calibration Standards</em></a></li>
1875<li><a class="reference internal" href="#gsasiipath-locations-updates"><em>GSASIIpath: locations &amp; updates</em></a></li>
1876<li><a class="reference internal" href="#gsasiielem-functions-for-element-types"><em>GSASIIElem: functions for element types</em></a></li>
1877<li><a class="reference internal" href="#gsasiilattice-unit-cells"><em>GSASIIlattice: Unit cells</em></a></li>
1878<li><a class="reference internal" href="#gsasiispc-space-group-module"><em>GSASIIspc: Space group module</em></a></li>
1879<li><a class="reference internal" href="#gltext-draw-opengl-text"><em>gltext: draw OpenGL text</em></a></li>
1880</ul>
1881</li>
1882</ul>
1883
1884  <h4>Previous topic</h4>
1885  <p class="topless"><a href="GSASIIobj.html"
1886                        title="previous chapter"><em>GSASIIobj: Data objects</em></a></p>
1887  <h4>Next topic</h4>
1888  <p class="topless"><a href="GSASIIGUIr.html"
1889                        title="next chapter"><em>GSAS-II GUI Routines</em></a></p>
1890  <h3>This Page</h3>
1891  <ul class="this-page-menu">
1892    <li><a href="_sources/GSASIIutil.txt"
1893           rel="nofollow">Show Source</a></li>
1894  </ul>
1895<div id="searchbox" style="display: none">
1896  <h3>Quick search</h3>
1897    <form class="search" action="search.html" method="get">
1898      <input type="text" name="q" />
1899      <input type="submit" value="Go" />
1900      <input type="hidden" name="check_keywords" value="yes" />
1901      <input type="hidden" name="area" value="default" />
1902    </form>
1903    <p class="searchtip" style="font-size: 90%">
1904    Enter search terms or a module, class or function name.
1905    </p>
1906</div>
1907<script type="text/javascript">$('#searchbox').show(0);</script>
1908        </div>
1909      </div>
1910      <div class="clearer"></div>
1911    </div>
1912    <div class="related">
1913      <h3>Navigation</h3>
1914      <ul>
1915        <li class="right" style="margin-right: 10px">
1916          <a href="genindex.html" title="General Index"
1917             >index</a></li>
1918        <li class="right" >
1919          <a href="py-modindex.html" title="Python Module Index"
1920             >modules</a> |</li>
1921        <li class="right" >
1922          <a href="GSASIIGUIr.html" title="GSAS-II GUI Routines"
1923             >next</a> |</li>
1924        <li class="right" >
1925          <a href="GSASIIobj.html" title="GSASIIobj: Data objects"
1926             >previous</a> |</li>
1927        <li><a href="index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li> 
1928      </ul>
1929    </div>
1930    <div class="footer">
1931        &copy; Copyright 2013, Von Dreele and Toby for Argonne National Laboratory.
1932      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
1933    </div>
1934  </body>
1935</html>
Note: See TracBrowser for help on using the repository browser.