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

Last change on this file since 990 was 990, checked in by toby, 9 years ago

mac fix for gltext; update docs

  • Property svn:mime-type set to text/html
File size: 101.9 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 of substances commonly used for powder
87calibrations for image data.</p>
88</div>
89<span class="target" id="module-GSASIIpath"></span><div class="section" id="gsasiipath-locations-updates">
90<h2><em>GSASIIpath: locations &amp; updates</em><a class="headerlink" href="#gsasiipath-locations-updates" title="Permalink to this headline">¶</a></h2>
91<p>Routines for dealing with file locations, etc.</p>
92<p>Determines the location of the compiled (.pyd or .so) libraries.</p>
93<p>Interfaces with subversion (svn):
94Determine the subversion release number by determining the highest version number
95where <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).
96Other routines will update GSASII from the subversion server if svn can be
97found.</p>
98<dl class="function">
99<dt id="GSASIIpath.GetVersionNumber">
100<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>
101<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>
102</dd></dl>
103
104<dl class="function">
105<dt id="GSASIIpath.SetVersionNumber">
106<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>
107<dd><p>Set the subversion version number</p>
108<table class="docutils field-list" frame="void" rules="none">
109<col class="field-name" />
110<col class="field-body" />
111<tbody valign="top">
112<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: 989 $&#8221;
113that is set by subversion when the file is retrieved from subversion.</td>
114</tr>
115</tbody>
116</table>
117<p>Place <tt class="docutils literal"><span class="pre">GSASIIpath.SetVersionNumber(&quot;$Revision:</span> <span class="pre">989</span> <span class="pre">$&quot;)</span></tt> in every python
118file.</p>
119</dd></dl>
120
121<dl class="function">
122<dt id="GSASIIpath.svnFindLocalChanges">
123<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>
124<dd><p>Returns a list of files that were changed locally. If no files are changed,
125the list has length 0</p>
126<table class="docutils field-list" frame="void" rules="none">
127<col class="field-name" />
128<col class="field-body" />
129<tbody valign="top">
130<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
131the current file is located</td>
132</tr>
133<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
134not a repository or svn is not found)</td>
135</tr>
136</tbody>
137</table>
138</dd></dl>
139
140<dl class="function">
141<dt id="GSASIIpath.svnGetLog">
142<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="headerlink" href="#GSASIIpath.svnGetLog" title="Permalink to this definition">¶</a></dt>
143<dd><p>Get the revision log information for a specific version of the</p>
144<table class="docutils field-list" frame="void" rules="none">
145<col class="field-name" />
146<col class="field-body" />
147<tbody valign="top">
148<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
149<li><strong>fpath</strong> (<em>str</em>) &#8211; path to repository dictionary, defaults to directory where
150the current file is located.</li>
151<li><strong>version</strong> (<em>int</em>) &#8211; the version number to be looked up or None (default)
152for the latest version.</li>
153</ul>
154</td>
155</tr>
156<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>
157</td>
158</tr>
159</tbody>
160</table>
161</dd></dl>
162
163<dl class="function">
164<dt id="GSASIIpath.svnGetRev">
165<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>
166<dd><p>Obtain the version number for the either the last update of the local version
167or contacts the subversion server to get the latest update version (# of Head).</p>
168<table class="docutils field-list" frame="void" rules="none">
169<col class="field-name" />
170<col class="field-body" />
171<tbody valign="top">
172<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
173<li><strong>fpath</strong> (<em>str</em>) &#8211; path to repository dictionary, defaults to directory where
174the current file is located</li>
175<li><strong>local</strong> (<em>bool</em>) &#8211; determines the type of version number, where
176True (default): returns the latest installed update
177False: returns the version number of Head on the server</li>
178</ul>
179</td>
180</tr>
181<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
182None if there is a subversion error (likely because the path is
183not a repository or svn is not found)</p>
184</td>
185</tr>
186</tbody>
187</table>
188</dd></dl>
189
190<dl class="function">
191<dt id="GSASIIpath.svnUpdateDir">
192<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>
193<dd><p>This performs an update of the files in a local directory from a server.</p>
194<table class="docutils field-list" frame="void" rules="none">
195<col class="field-name" />
196<col class="field-body" />
197<tbody valign="top">
198<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
199<li><strong>fpath</strong> (<em>str</em>) &#8211; path to repository dictionary, defaults to directory where
200the current file is located</li>
201<li><strong>version</strong> &#8211; the number of the version to be loaded. Used only
202cast as a string, but should be an integer or something that corresponds to a
203string representation of an integer value when cast. A value of None (default)
204causes the latest version on the server to be used.</li>
205</ul>
206</td>
207</tr>
208<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A dictionary with the files that have been changed/added and
209a code describing how they have been updated (see changetype) or
210None if there is a subversion error (likely because the path is
211not a repository or svn is not found)</p>
212</td>
213</tr>
214</tbody>
215</table>
216</dd></dl>
217
218<dl class="function">
219<dt id="GSASIIpath.whichsvn">
220<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>
221<dd><p>Returns a path to the subversion exe file, if any is found.
222Searches the current path as well as subdirectory &#8220;svn&#8221; and
223&#8220;svn/bin&#8221; in the location of the GSASII source files.</p>
224<table class="docutils field-list" frame="void" rules="none">
225<col class="field-name" />
226<col class="field-body" />
227<tbody valign="top">
228<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
229executable file.</td>
230</tr>
231</tbody>
232</table>
233</dd></dl>
234
235</div>
236<span class="target" id="module-GSASIIElem"></span><div class="section" id="gsasiielem-functions-for-element-types">
237<h2><em>GSASIIElem: functions for element types</em><a class="headerlink" href="#gsasiielem-functions-for-element-types" title="Permalink to this headline">¶</a></h2>
238<dl class="function">
239<dt id="GSASIIElem.CheckElement">
240<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>
241<dd><p>Check if element El is in the periodic table</p>
242<table class="docutils field-list" frame="void" rules="none">
243<col class="field-name" />
244<col class="field-body" />
245<tbody valign="top">
246<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>
247</tr>
248<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True if the element is found</td>
249</tr>
250</tbody>
251</table>
252</dd></dl>
253
254<dl class="function">
255<dt id="GSASIIElem.ComptonFac">
256<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>
257<dd><p>compute Compton scattering factor</p>
258<table class="docutils field-list" frame="void" rules="none">
259<col class="field-name" />
260<col class="field-body" />
261<tbody valign="top">
262<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
263<li><strong>El</strong> &#8211; element dictionary</li>
264<li><strong>SQ</strong> &#8211; (sin-theta/lambda)**2</li>
265</ul>
266</td>
267</tr>
268<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">compton scattering factor</p>
269</td>
270</tr>
271</tbody>
272</table>
273</dd></dl>
274
275<dl class="function">
276<dt id="GSASIIElem.FPcalc">
277<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>
278<dd><p>Compute real &amp; imaginary resonant X-ray scattering factors</p>
279<table class="docutils field-list" frame="void" rules="none">
280<col class="field-name" />
281<col class="field-body" />
282<tbody valign="top">
283<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
284<li><strong>Orbs</strong> &#8211; list of orbital dictionaries as defined in GetXsectionCoeff</li>
285<li><strong>KEv</strong> &#8211; x-ray energy in keV</li>
286</ul>
287</td>
288</tr>
289<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>
290</td>
291</tr>
292</tbody>
293</table>
294</dd></dl>
295
296<dl class="function">
297<dt id="GSASIIElem.FixValence">
298<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>
299<dd><p>Returns the element symbol, even when a valence is present</p>
300</dd></dl>
301
302<dl class="function">
303<dt id="GSASIIElem.GetAtomInfo">
304<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>
305<dd><p>reads element information from file atmdata.dat</p>
306</dd></dl>
307
308<dl class="function">
309<dt id="GSASIIElem.GetBLtable">
310<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>
311<dd><p>returns a dictionary of neutron scattering length data for atom types &amp; isotopes found in General</p>
312<table class="docutils field-list" frame="void" rules="none">
313<col class="field-name" />
314<col class="field-body" />
315<tbody valign="top">
316<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>
317</tr>
318<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>
319</tr>
320</tbody>
321</table>
322</dd></dl>
323
324<dl class="function">
325<dt id="GSASIIElem.GetFFC5">
326<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>
327<dd><p>Get 5 term form factor and Compton scattering data</p>
328<table class="docutils field-list" frame="void" rules="none">
329<col class="field-name" />
330<col class="field-body" />
331<tbody valign="top">
332<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>
333</tr>
334<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>
335</tr>
336</tbody>
337</table>
338</dd></dl>
339
340<dl class="function">
341<dt id="GSASIIElem.GetFFtable">
342<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>
343<dd><p>returns a dictionary of form factor data for atom types found in atomTypes</p>
344<table class="docutils field-list" frame="void" rules="none">
345<col class="field-name" />
346<col class="field-body" />
347<tbody valign="top">
348<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>
349</tr>
350<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>
351</tr>
352</tbody>
353</table>
354</dd></dl>
355
356<dl class="function">
357<dt id="GSASIIElem.GetFormFactorCoeff">
358<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>
359<dd><p>Read X-ray form factor coefficients from <cite>atomdata.asc</cite> file</p>
360<table class="docutils field-list" frame="void" rules="none">
361<col class="field-name" />
362<col class="field-body" />
363<tbody valign="top">
364<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>
365</tr>
366<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><cite>FormFactors</cite>: list of form factor dictionaries</td>
367</tr>
368</tbody>
369</table>
370<p>Each X-ray form factor dictionary is:</p>
371<ul class="simple">
372<li><cite>Symbol</cite>: 4 character element symbol with valence (e.g. &#8216;NI+2&#8217;)</li>
373<li><cite>Z</cite>: atomic number</li>
374<li><cite>fa</cite>: 4 A coefficients</li>
375<li><cite>fb</cite>: 4 B coefficients</li>
376<li><cite>fc</cite>: C coefficient</li>
377</ul>
378</dd></dl>
379
380<dl class="function">
381<dt id="GSASIIElem.GetMagFormFacCoeff">
382<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>
383<dd><p>Read magnetic form factor data from atomdata.asc file</p>
384<table class="docutils field-list" frame="void" rules="none">
385<col class="field-name" />
386<col class="field-body" />
387<tbody valign="top">
388<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>El</strong> &#8211; 2 character element symbol</td>
389</tr>
390<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>
391</tr>
392</tbody>
393</table>
394<p>each dictionary contains:</p>
395<ul class="simple">
396<li>&#8216;Symbol&#8217;:Symbol</li>
397<li>&#8216;Z&#8217;:Z</li>
398<li>&#8216;mfa&#8217;: 4 MA coefficients</li>
399<li>&#8216;nfa&#8217;: 4 NA coefficients</li>
400<li>&#8216;mfb&#8217;: 4 MB coefficients</li>
401<li>&#8216;nfb&#8217;: 4 NB coefficients</li>
402<li>&#8216;mfc&#8217;: MC coefficient</li>
403<li>&#8216;nfc&#8217;: NC coefficient</li>
404</ul>
405</dd></dl>
406
407<dl class="function">
408<dt id="GSASIIElem.GetXsectionCoeff">
409<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>
410<dd><p>Read atom orbital scattering cross sections for fprime calculations via Cromer-Lieberman algorithm</p>
411<table class="docutils field-list" frame="void" rules="none">
412<col class="field-name" />
413<col class="field-body" />
414<tbody valign="top">
415<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>El</strong> &#8211; 2 character element symbol</td>
416</tr>
417<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>
418</tr>
419</tbody>
420</table>
421<p>each dictionary is:</p>
422<ul class="simple">
423<li>&#8216;OrbName&#8217;: Orbital name read from file</li>
424<li>&#8216;IfBe&#8217; 0/2 depending on orbital</li>
425<li>&#8216;BindEn&#8217;: binding energy</li>
426<li>&#8216;BB&#8217;: BindEn/0.02721</li>
427<li>&#8216;XSectIP&#8217;: 5 cross section inflection points</li>
428<li>&#8216;ElEterm&#8217;: energy correction term</li>
429<li>&#8216;SEdge&#8217;: absorption edge for orbital</li>
430<li>&#8216;Nval&#8217;: 10/11 depending on IfBe</li>
431<li>&#8216;LEner&#8217;: 10/11 values of log(energy)</li>
432<li>&#8216;LXSect&#8217;: 10/11 values of log(cross section)</li>
433</ul>
434</dd></dl>
435
436<dl class="function">
437<dt id="GSASIIElem.ScatFac">
438<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>
439<dd><p>compute value of form factor</p>
440<table class="docutils field-list" frame="void" rules="none">
441<col class="field-name" />
442<col class="field-body" />
443<tbody valign="top">
444<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
445<li><strong>El</strong> &#8211; element dictionary defined in GetFormFactorCoeff</li>
446<li><strong>SQ</strong> &#8211; (sin-theta/lambda)**2</li>
447</ul>
448</td>
449</tr>
450<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>
451</td>
452</tr>
453</tbody>
454</table>
455</dd></dl>
456
457<dl class="function">
458<dt id="GSASIIElem.getBLvalues">
459<tt class="descclassname">GSASIIElem.</tt><tt class="descname">getBLvalues</tt><big>(</big><em>BLtables</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>
460<dd><p>Needs a doc string</p>
461</dd></dl>
462
463<dl class="function">
464<dt id="GSASIIElem.getFFvalues">
465<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>
466<dd><p>Needs a doc string</p>
467</dd></dl>
468
469</div>
470<span class="target" id="module-GSASIIlattice"></span><div class="section" id="gsasiilattice-unit-cells">
471<h2><em>GSASIIlattice: Unit cells</em><a class="headerlink" href="#gsasiilattice-unit-cells" title="Permalink to this headline">¶</a></h2>
472<p>Perform lattice-related computations</p>
473<p>Note that <em>g</em> is the reciprocal lattice tensor, and <em>G</em> is its inverse,
474<span class="math">\(G = g^{-1}\)</span>, where</p>
475<blockquote>
476<div><div class="math">
477\[\begin{split}G = \left( \begin{matrix}
478a^2 &amp; a b\cos\gamma &amp; a c\cos\beta \\
479a b\cos\gamma &amp; b^2 &amp; b c \cos\alpha \\
480a c\cos\beta &amp;  b c \cos\alpha &amp; c^2
481\end{matrix}\right)\end{split}\]</div>
482</div></blockquote>
483<p>The &#8220;<em>A</em> tensor&#8221; terms are defined as
484<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:
485<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
486<em>d</em> is the d-spacing, and <span class="math">\(d^*\)</span> is the reciprocal lattice spacing,
487<span class="math">\(Q = 2 \pi d^* = 2 \pi / d\)</span></p>
488<dl class="function">
489<dt id="GSASIIlattice.A2Gmat">
490<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>
491<dd><p>Fill real &amp; reciprocal metric tensor (G) from A.</p>
492<table class="docutils field-list" frame="void" rules="none">
493<col class="field-name" />
494<col class="field-body" />
495<tbody valign="top">
496<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
497<li><strong>A</strong> &#8211; reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23]</li>
498<li><strong>inverse</strong> (<em>bool</em>) &#8211; if True return both G and g; else just G</li>
499</ul>
500</td>
501</tr>
502<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>
503</td>
504</tr>
505</tbody>
506</table>
507</dd></dl>
508
509<dl class="function">
510<dt id="GSASIIlattice.A2cell">
511<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>
512<dd><p>Compute unit cell constants from A</p>
513<table class="docutils field-list" frame="void" rules="none">
514<col class="field-name" />
515<col class="field-body" />
516<tbody valign="top">
517<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>
518</tr>
519<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>
520</tr>
521</tbody>
522</table>
523</dd></dl>
524
525<dl class="function">
526<dt id="GSASIIlattice.A2invcell">
527<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>
528<dd><p>Compute reciprocal unit cell constants from A
529returns tuple with a*,b*,c*,alpha*, beta*, gamma* (degrees)</p>
530</dd></dl>
531
532<dl class="function">
533<dt id="GSASIIlattice.CellAbsorption">
534<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>
535<dd><p>Compute unit cell absorption</p>
536<table class="docutils field-list" frame="void" rules="none">
537<col class="field-name" />
538<col class="field-body" />
539<tbody valign="top">
540<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
541<li><strong>ElList</strong> (<em>dict</em>) &#8211; dictionary of element contents including mu and
542number of atoms be cell</li>
543<li><strong>Volume</strong> (<em>float</em>) &#8211; unit cell volume</li>
544</ul>
545</td>
546</tr>
547<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">mu-total/Volume</p>
548</td>
549</tr>
550</tbody>
551</table>
552</dd></dl>
553
554<dl class="function">
555<dt id="GSASIIlattice.CellBlock">
556<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>
557<dd><p>Generate block of unit cells n*n*n on a side; [0,0,0] centered, n = 2*nCells+1
558currently only works for nCells = 0 or 1 (not &gt;1)</p>
559</dd></dl>
560
561<dl class="function">
562<dt id="GSASIIlattice.CentCheck">
563<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>
564<dd><p>needs doc string</p>
565</dd></dl>
566
567<dl class="function">
568<dt id="GSASIIlattice.CosSinAngle">
569<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>
570<dd><p>calculate sin &amp; cos of angle between U &amp; V in generalized coordinates
571defined by metric tensor G</p>
572<table class="docutils field-list" frame="void" rules="none">
573<col class="field-name" />
574<col class="field-body" />
575<tbody valign="top">
576<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
577<li><strong>U</strong> &#8211; 3-vectors assume numpy arrays</li>
578<li><strong>V</strong> &#8211; 3-vectors assume numpy arrays</li>
579<li><strong>G</strong> &#8211; metric tensor for U &amp; V defined space assume numpy array</li>
580</ul>
581</td>
582</tr>
583<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>
584</td>
585</tr>
586</tbody>
587</table>
588</dd></dl>
589
590<dl class="function">
591<dt id="GSASIIlattice.CrsAng">
592<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>
593<dd><p>needs doc string</p>
594</dd></dl>
595
596<dl class="function">
597<dt id="GSASIIlattice.Flnh">
598<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>
599<dd><p>needs doc string</p>
600</dd></dl>
601
602<dl class="function">
603<dt id="GSASIIlattice.GenHBravais">
604<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>
605<dd><p>Generate the positionally unique powder diffraction reflections</p>
606<table class="docutils field-list" frame="void" rules="none">
607<col class="field-name" />
608<col class="field-body" />
609<tbody valign="top">
610<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
611<li><strong>dmin</strong> &#8211; minimum d-spacing in A</li>
612<li><strong>Bravais</strong> &#8211; lattice type (see GetBraviasNum). Bravais is one of::
6130 F cubic
6141 I cubic
6152 P cubic
6163 R hexagonal (trigonal not rhombohedral)
6174 P hexagonal
6185 I tetragonal
6196 P tetragonal
6207 F orthorhombic
6218 I orthorhombic
6229 C orthorhombic
62310 P orthorhombic
62411 C monoclinic
62512 P monoclinic
62613 P triclinic</li>
627<li><strong>A</strong> &#8211; reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23]</li>
628</ul>
629</td>
630</tr>
631<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>
632</td>
633</tr>
634</tbody>
635</table>
636</dd></dl>
637
638<dl class="function">
639<dt id="GSASIIlattice.GenHLaue">
640<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>
641<dd><p>Generate the crystallographically unique powder diffraction reflections
642for a lattice and Bravais type</p>
643<table class="docutils field-list" frame="void" rules="none">
644<col class="field-name" />
645<col class="field-body" />
646<tbody valign="top">
647<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
648<li><strong>dmin</strong> &#8211; minimum d-spacing</li>
649<li><strong>SGData</strong> &#8211; <p>space group dictionary with at least</p>
650<ul>
651<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>
652<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>
653<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>
654</ul>
655</li>
656<li><strong>A</strong> &#8211; reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23]</li>
657</ul>
658</td>
659</tr>
660<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
661part of reciprocal space ignoring anomalous dispersion</p>
662</td>
663</tr>
664</tbody>
665</table>
666</dd></dl>
667
668<dl class="function">
669<dt id="GSASIIlattice.GenSHCoeff">
670<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>
671<dd><p>needs doc string</p>
672</dd></dl>
673
674<dl class="function">
675<dt id="GSASIIlattice.GetBraviasNum">
676<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>
677<dd><p>Determine the Bravais lattice number, as used in GenHBravais</p>
678<table class="docutils field-list" frame="void" rules="none">
679<col class="field-name" />
680<col class="field-body" />
681<tbody valign="top">
682<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
683<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>
684<li><strong>system</strong> &#8211; one of &#8216;cubic&#8217;, &#8216;hexagonal&#8217;, &#8216;tetragonal&#8217;, &#8216;orthorhombic&#8217;, &#8216;trigonal&#8217; (for R)
685&#8216;monoclinic&#8217;, &#8216;triclinic&#8217; (see SGSys from GSASIIspc.SpcGroup)</li>
686</ul>
687</td>
688</tr>
689<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
690or throws a ValueError exception if the combination of center, system is not found (i.e. non-standard)</p>
691</td>
692</tr>
693</tbody>
694</table>
695</dd></dl>
696
697<dl class="function">
698<dt id="GSASIIlattice.GetKcl">
699<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>
700<dd><p>needs doc string</p>
701</dd></dl>
702
703<dl class="function">
704<dt id="GSASIIlattice.GetKclKsl">
705<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>
706<dd><p>This is used for spherical harmonics description of preferred orientation;
707cylindrical symmetry only (M=0) and no sample angle derivatives returned</p>
708</dd></dl>
709
710<dl class="function">
711<dt id="GSASIIlattice.GetKsl">
712<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>
713<dd><p>needs doc string</p>
714</dd></dl>
715
716<dl class="function">
717<dt id="GSASIIlattice.Glnh">
718<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>
719<dd><p>needs doc string</p>
720</dd></dl>
721
722<dl class="function">
723<dt id="GSASIIlattice.Gmat2A">
724<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>
725<dd><p>Extract A from reciprocal metric tensor (G)</p>
726<table class="docutils field-list" frame="void" rules="none">
727<col class="field-name" />
728<col class="field-body" />
729<tbody valign="top">
730<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>
731</tr>
732<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>
733</tr>
734</tbody>
735</table>
736</dd></dl>
737
738<dl class="function">
739<dt id="GSASIIlattice.Gmat2AB">
740<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>
741<dd><p>Computes orthogonalization matrix from reciprocal metric tensor G</p>
742<table class="docutils field-list" frame="void" rules="none">
743<col class="field-name" />
744<col class="field-body" />
745<tbody valign="top">
746<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">
747<li>A for crystal to Cartesian transformations A*x = np.inner(A,x) = X</li>
748<li>B (= inverse of A) for Cartesian to crystal transformation B*X = np.inner(B,X) = x</li>
749</ul>
750</td>
751</tr>
752</tbody>
753</table>
754</dd></dl>
755
756<dl class="function">
757<dt id="GSASIIlattice.Gmat2cell">
758<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>
759<dd><p>Compute real/reciprocal lattice parameters from real/reciprocal metric tensor (g/G)
760The math works the same either way.</p>
761<table class="docutils field-list" frame="void" rules="none">
762<col class="field-name" />
763<col class="field-body" />
764<tbody valign="top">
765<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>
766</tr>
767<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>
768</tr>
769</tbody>
770</table>
771</dd></dl>
772
773<dl class="function">
774<dt id="GSASIIlattice.Hx2Rh">
775<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>
776<dd><p>needs doc string</p>
777</dd></dl>
778
779<dl class="function">
780<dt id="GSASIIlattice.MaxIndex">
781<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>
782<dd><p>needs doc string</p>
783</dd></dl>
784
785<dl class="function">
786<dt id="GSASIIlattice.OdfChk">
787<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>
788<dd><p>needs doc string</p>
789</dd></dl>
790
791<dl class="function">
792<dt id="GSASIIlattice.Rh2Hx">
793<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>
794<dd><p>needs doc string</p>
795</dd></dl>
796
797<dl class="function">
798<dt id="GSASIIlattice.SamAng">
799<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>
800<dd><p>Compute sample orientation angles vs laboratory coord. system</p>
801<table class="docutils field-list" frame="void" rules="none">
802<col class="field-name" />
803<col class="field-body" />
804<tbody valign="top">
805<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
806<li><strong>Tth</strong> &#8211; Signed theta</li>
807<li><strong>Gangls</strong> &#8211; Sample goniometer angles phi,chi,omega,azmuth</li>
808<li><strong>Sangl</strong> &#8211; Sample angle zeros om-0, chi-0, phi-0</li>
809<li><strong>IFCoup</strong> &#8211; True if omega &amp; 2-theta coupled in CW scan</li>
810</ul>
811</td>
812</tr>
813<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">psi,gam:    Sample odf angles                             
814dPSdA,dGMdA:    Angle zero derivatives</p>
815</td>
816</tr>
817</tbody>
818</table>
819</dd></dl>
820
821<dl class="function">
822<dt id="GSASIIlattice.SwapIndx">
823<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>
824<dd><p>needs doc string</p>
825</dd></dl>
826
827<dl class="function">
828<dt id="GSASIIlattice.U6toUij">
829<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>
830<dd><p>Fill matrix (Uij) from U6 = [U11,U22,U33,U12,U13,U23]
831NB: there is a non numpy version in GSASIIspc: U2Uij</p>
832<table class="docutils field-list" frame="void" rules="none">
833<col class="field-name" />
834<col class="field-body" />
835<tbody valign="top">
836<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>
837</tr>
838<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Uij - numpy [3][3] array of uij</td>
839</tr>
840</tbody>
841</table>
842</dd></dl>
843
844<dl class="function">
845<dt id="GSASIIlattice.Uij2Ueqv">
846<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="headerlink" href="#GSASIIlattice.Uij2Ueqv" title="Permalink to this definition">¶</a></dt>
847<dd><p>returns 1/3 trace of diagonalized U matrix</p>
848</dd></dl>
849
850<dl class="function">
851<dt id="GSASIIlattice.Uij2betaij">
852<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>
853<dd><p>Convert Uij to beta-ij tensors &#8211; stub for eventual completion</p>
854<table class="docutils field-list" frame="void" rules="none">
855<col class="field-name" />
856<col class="field-body" />
857<tbody valign="top">
858<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
859<li><strong>Uij</strong> &#8211; numpy array [Uij]</li>
860<li><strong>G</strong> &#8211; reciprocal metric tensor</li>
861</ul>
862</td>
863</tr>
864<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>
865</td>
866</tr>
867</tbody>
868</table>
869</dd></dl>
870
871<dl class="function">
872<dt id="GSASIIlattice.UijtoU6">
873<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>
874<dd><p>Fill vector [U11,U22,U33,U12,U13,U23] from Uij
875NB: there is a non numpy version in GSASIIspc: Uij2U</p>
876</dd></dl>
877
878<dl class="function">
879<dt id="GSASIIlattice.calc_V">
880<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>
881<dd><p>Compute the real lattice volume (V) from A</p>
882</dd></dl>
883
884<dl class="function">
885<dt id="GSASIIlattice.calc_rDsq">
886<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>
887<dd><p>needs doc string</p>
888</dd></dl>
889
890<dl class="function">
891<dt id="GSASIIlattice.calc_rDsq2">
892<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>
893<dd><p>needs doc string</p>
894</dd></dl>
895
896<dl class="function">
897<dt id="GSASIIlattice.calc_rDsqZ">
898<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>
899<dd><p>needs doc string</p>
900</dd></dl>
901
902<dl class="function">
903<dt id="GSASIIlattice.calc_rV">
904<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>
905<dd><p>Compute the reciprocal lattice volume (V*) from A</p>
906</dd></dl>
907
908<dl class="function">
909<dt id="GSASIIlattice.calc_rVsq">
910<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>
911<dd><p>Compute the square of the reciprocal lattice volume (1/V**2) from A&#8217;</p>
912</dd></dl>
913
914<dl class="function">
915<dt id="GSASIIlattice.cell2A">
916<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>
917<dd><p>Obtain A = [G11,G22,G33,2*G12,2*G13,2*G23] from lattice parameters</p>
918<table class="docutils field-list" frame="void" rules="none">
919<col class="field-name" />
920<col class="field-body" />
921<tbody valign="top">
922<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>
923</tr>
924<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">G reciprocal metric tensor as 3x3 numpy array</td>
925</tr>
926</tbody>
927</table>
928</dd></dl>
929
930<dl class="function">
931<dt id="GSASIIlattice.cell2AB">
932<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>
933<dd><p>Computes orthogonalization matrix from unit cell constants</p>
934<table class="docutils field-list" frame="void" rules="none">
935<col class="field-name" />
936<col class="field-body" />
937<tbody valign="top">
938<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>
939</tr>
940<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">tuple of two 3x3 numpy arrays (A,B)
941A for crystal to Cartesian transformations A*x = np.inner(A,x) = X
942B (= inverse of A) for Cartesian to crystal transformation B*X = np.inner(B,X) = x</td>
943</tr>
944</tbody>
945</table>
946</dd></dl>
947
948<dl class="function">
949<dt id="GSASIIlattice.cell2GS">
950<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">cell2GS</tt><big>(</big><em>cell</em><big>)</big><a class="headerlink" href="#GSASIIlattice.cell2GS" title="Permalink to this definition">¶</a></dt>
951<dd><p>returns Uij to betaij conversion matrix</p>
952</dd></dl>
953
954<dl class="function">
955<dt id="GSASIIlattice.cell2Gmat">
956<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>
957<dd><p>Compute real and reciprocal lattice metric tensor from unit cell constants</p>
958<table class="docutils field-list" frame="void" rules="none">
959<col class="field-name" />
960<col class="field-body" />
961<tbody valign="top">
962<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>
963</tr>
964<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>
965</tr>
966</tbody>
967</table>
968</dd></dl>
969
970<dl class="function">
971<dt id="GSASIIlattice.combinations">
972<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>
973<dd><p>take n distinct items, order matters</p>
974</dd></dl>
975
976<dl class="function">
977<dt id="GSASIIlattice.criticalEllipse">
978<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>
979<dd><p>Calculate critical values for probability ellipsoids from probability</p>
980</dd></dl>
981
982<dl class="function">
983<dt id="GSASIIlattice.fillgmat">
984<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>
985<dd><p>Compute lattice metric tensor from unit cell constants</p>
986<table class="docutils field-list" frame="void" rules="none">
987<col class="field-name" />
988<col class="field-body" />
989<tbody valign="top">
990<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>
991</tr>
992<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">3x3 numpy array</td>
993</tr>
994</tbody>
995</table>
996</dd></dl>
997
998<dl class="function">
999<dt id="GSASIIlattice.getHKLmax">
1000<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>
1001<dd><p>finds maximum allowed hkl for given A within dmin</p>
1002</dd></dl>
1003
1004<dl class="function">
1005<dt id="GSASIIlattice.invcell2Gmat">
1006<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>
1007<dd><p>Compute real and reciprocal lattice metric tensor from reciprocal
1008unit cell constants</p>
1009<table class="docutils field-list" frame="void" rules="none">
1010<col class="field-name" />
1011<col class="field-body" />
1012<tbody valign="top">
1013<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>
1014</tr>
1015<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>
1016</tr>
1017</tbody>
1018</table>
1019</dd></dl>
1020
1021<dl class="function">
1022<dt id="GSASIIlattice.invpolfcal">
1023<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>
1024<dd><p>needs doc string</p>
1025</dd></dl>
1026
1027<dl class="function">
1028<dt id="GSASIIlattice.permutations">
1029<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>
1030<dd><p>take all items, order matters</p>
1031</dd></dl>
1032
1033<dl class="function">
1034<dt id="GSASIIlattice.polfcal">
1035<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>
1036<dd><p>needs doc string</p>
1037</dd></dl>
1038
1039<dl class="function">
1040<dt id="GSASIIlattice.rotdMat">
1041<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>
1042<dd><p>Prepare rotation matrix for angle in degrees about axis(=0,1,2)</p>
1043<table class="docutils field-list" frame="void" rules="none">
1044<col class="field-name" />
1045<col class="field-body" />
1046<tbody valign="top">
1047<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1048<li><strong>angle</strong> &#8211; angle in degrees</li>
1049<li><strong>axis</strong> &#8211; axis (0,1,2 = x,y,z) about which for the rotation</li>
1050</ul>
1051</td>
1052</tr>
1053<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>
1054</td>
1055</tr>
1056</tbody>
1057</table>
1058</dd></dl>
1059
1060<dl class="function">
1061<dt id="GSASIIlattice.rotdMat4">
1062<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>
1063<dd><p>Prepare rotation matrix for angle in degrees about axis(=0,1,2) with scaling for OpenGL</p>
1064<table class="docutils field-list" frame="void" rules="none">
1065<col class="field-name" />
1066<col class="field-body" />
1067<tbody valign="top">
1068<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1069<li><strong>angle</strong> &#8211; angle in degrees</li>
1070<li><strong>axis</strong> &#8211; axis (0,1,2 = x,y,z) about which for the rotation</li>
1071</ul>
1072</td>
1073</tr>
1074<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>
1075</td>
1076</tr>
1077</tbody>
1078</table>
1079</dd></dl>
1080
1081<dl class="function">
1082<dt id="GSASIIlattice.sec2HMS">
1083<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>
1084<dd><p>Convert time in sec to H:M:S string</p>
1085<table class="docutils field-list" frame="void" rules="none">
1086<col class="field-name" />
1087<col class="field-body" />
1088<tbody valign="top">
1089<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sec</strong> &#8211; time in seconds</td>
1090</tr>
1091<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">H:M:S string (to nearest 100th second)</td>
1092</tr>
1093</tbody>
1094</table>
1095</dd></dl>
1096
1097<dl class="function">
1098<dt id="GSASIIlattice.selections">
1099<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>
1100<dd><p>take n (not necessarily distinct) items, order matters</p>
1101</dd></dl>
1102
1103<dl class="data">
1104<dt id="GSASIIlattice.selftestlist">
1105<tt class="descclassname">GSASIIlattice.</tt><tt class="descname">selftestlist</tt><em class="property"> = [&lt;function test0 at 0x279ea70&gt;, &lt;function test1 at 0x279eab0&gt;, &lt;function test2 at 0x279eaf0&gt;, &lt;function test3 at 0x279eb30&gt;, &lt;function test4 at 0x279eb70&gt;, &lt;function test5 at 0x279ebb0&gt;, &lt;function test6 at 0x279ebf0&gt;, &lt;function test7 at 0x279ec30&gt;, &lt;function test8 at 0x279ec70&gt;, &lt;function test9 at 0x279ecb0&gt;]</em><a class="headerlink" href="#GSASIIlattice.selftestlist" title="Permalink to this definition">¶</a></dt>
1106<dd><p>Defines a list of self-tests</p>
1107</dd></dl>
1108
1109<dl class="function">
1110<dt id="GSASIIlattice.sortHKLd">
1111<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>
1112<dd><p>needs doc string</p>
1113<table class="docutils field-list" frame="void" rules="none">
1114<col class="field-name" />
1115<col class="field-body" />
1116<tbody valign="top">
1117<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1118<li><strong>HKLd</strong> &#8211; a list of [h,k,l,d,...];</li>
1119<li><strong>ifreverse</strong> &#8211; True for largest d first</li>
1120<li><strong>ifdup</strong> &#8211; True if duplicate d-spacings allowed</li>
1121</ul>
1122</td>
1123</tr>
1124</tbody>
1125</table>
1126</dd></dl>
1127
1128<dl class="function">
1129<dt id="GSASIIlattice.test1">
1130<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>
1131<dd><p>test cell2A and A2Gmat</p>
1132</dd></dl>
1133
1134<dl class="function">
1135<dt id="GSASIIlattice.test2">
1136<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>
1137<dd><p>test Gmat2A, A2cell, A2Gmat, Gmat2cell</p>
1138</dd></dl>
1139
1140<dl class="function">
1141<dt id="GSASIIlattice.test3">
1142<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>
1143<dd><p>test invcell2Gmat</p>
1144</dd></dl>
1145
1146<dl class="function">
1147<dt id="GSASIIlattice.test4">
1148<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>
1149<dd><p>test calc_rVsq, calc_rV, calc_V</p>
1150</dd></dl>
1151
1152<dl class="function">
1153<dt id="GSASIIlattice.test5">
1154<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>
1155<dd><p>test A2invcell</p>
1156</dd></dl>
1157
1158<dl class="function">
1159<dt id="GSASIIlattice.test6">
1160<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>
1161<dd><p>test cell2AB</p>
1162</dd></dl>
1163
1164<dl class="function">
1165<dt id="GSASIIlattice.test7">
1166<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>
1167<dd><p>test GetBraviasNum(...) and GenHBravais(...)</p>
1168</dd></dl>
1169
1170<dl class="function">
1171<dt id="GSASIIlattice.test8">
1172<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>
1173<dd><p>test GenHLaue</p>
1174</dd></dl>
1175
1176<dl class="function">
1177<dt id="GSASIIlattice.test9">
1178<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>
1179<dd><p>test GenHLaue</p>
1180</dd></dl>
1181
1182<dl class="function">
1183<dt id="GSASIIlattice.textureIndex">
1184<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>
1185<dd><p>needs doc string</p>
1186</dd></dl>
1187
1188<dl class="function">
1189<dt id="GSASIIlattice.uniqueCombinations">
1190<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>
1191<dd><p>take n distinct items, order is irrelevant</p>
1192</dd></dl>
1193
1194</div>
1195<span class="target" id="module-GSASIIspc"></span><div class="section" id="gsasiispc-space-group-module">
1196<h2><em>GSASIIspc: Space group module</em><a class="headerlink" href="#gsasiispc-space-group-module" title="Permalink to this headline">¶</a></h2>
1197<p>Space group interpretation routines. Note that space group information is
1198stored in a <a class="reference internal" href="GSASIIobj.html#sgdata-table"><em>Space Group (SGData)</em></a> object.</p>
1199<dl class="function">
1200<dt id="GSASIIspc.AllOps">
1201<tt class="descclassname">GSASIIspc.</tt><tt class="descname">AllOps</tt><big>(</big><em>SGData</em><big>)</big><a class="headerlink" href="#GSASIIspc.AllOps" title="Permalink to this definition">¶</a></dt>
1202<dd><p>Returns a list of all operators for a space group, including those for
1203centering and a center of symmetry</p>
1204<table class="docutils field-list" frame="void" rules="none">
1205<col class="field-name" />
1206<col class="field-body" />
1207<tbody valign="top">
1208<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>
1209</tr>
1210<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">(SGTextList,offsetList,symOpList,G2oprList) where<ul class="simple">
1211<li>SGTextList: a list of strings with formatted and normalized
1212symmetry operators.</li>
1213<li>offsetList: a tuple of (dx,dy,dz) offsets that relate the GSAS-II
1214symmetry operation to the operator in SGTextList and symOpList.
1215these dx (etc.) values are added to the GSAS-II generated
1216positions to provide the positions that are generated
1217by the normalized symmetry operators.</li>
1218<li>symOpList: a list of tuples with the normalized symmetry
1219operations as (M,T) values
1220(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>
1221<li>G2oprList: The GSAS-II operations for each symmetry operation as
1222a tuple with (center,mult,opnum), where center is (0,0,0), (0.5,0,0),
1223(0.5,0.5,0.5),...; where mult is 1 or -1 for the center of symmetry
1224and opnum is the number for the symmetry operation, in <tt class="docutils literal"><span class="pre">SGOps</span></tt>
1225(starting with 0).</li>
1226</ul>
1227</td>
1228</tr>
1229</tbody>
1230</table>
1231</dd></dl>
1232
1233<dl class="function">
1234<dt id="GSASIIspc.ApplyStringOps">
1235<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>
1236<dd><p>Needs a doc string</p>
1237</dd></dl>
1238
1239<dl class="function">
1240<dt id="GSASIIspc.ElemPosition">
1241<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>
1242<dd><p>Under development.
1243Object here is to return a list of symmetry element types and locations suitable
1244for say drawing them.
1245So far I have the element type... getting all possible locations without lookup may be impossible!</p>
1246</dd></dl>
1247
1248<dl class="function">
1249<dt id="GSASIIspc.GenAtom">
1250<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>
1251<dd><p>Generates the equivalent positions for a specified coordinate and space group</p>
1252<table class="docutils field-list" frame="void" rules="none">
1253<col class="field-name" />
1254<col class="field-body" />
1255<tbody valign="top">
1256<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1257<li><strong>XYZ</strong> &#8211; an array, tuple or list containing 3 elements: x, y &amp; z</li>
1258<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>
1259<li><strong>All</strong> &#8211; True return all equivalent positions including duplicates;
1260False return only unique positions</li>
1261<li><strong>Uij</strong> &#8211; [U11,U22,U33,U12,U13,U23] or [] if no Uij</li>
1262<li><strong>Move</strong> &#8211; True move generated atom positions to be inside cell
1263False do not move atoms</li>
1264</ul>
1265</td>
1266</tr>
1267<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><p>[[XYZEquiv],Idup,[UijEquiv]]</p>
1268<ul class="simple">
1269<li>[XYZEquiv] is list of equivalent positions (XYZ is first entry)</li>
1270<li>Idup = [-][C]SS where SS is the symmetry operator number (1-24), C (if not 0,0,0)</li>
1271<li>is centering operator number (1-4) and - is for inversion
1272Cell = unit cell translations needed to put new positions inside cell
1273[UijEquiv] - equivalent Uij; absent if no Uij given</li>
1274</ul>
1275</p>
1276</td>
1277</tr>
1278</tbody>
1279</table>
1280</dd></dl>
1281
1282<dl class="function">
1283<dt id="GSASIIspc.GenHKLf">
1284<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>
1285<dd><p>Uses old GSAS Fortran routine genhkl.for</p>
1286<table class="docutils field-list" frame="void" rules="none">
1287<col class="field-name" />
1288<col class="field-body" />
1289<tbody valign="top">
1290<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1291<li><strong>HKL</strong> &#8211; [h,k,l]</li>
1292<li><strong>SGData</strong> &#8211; space group data obtained from SpcGroup</li>
1293</ul>
1294</td>
1295</tr>
1296<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>
1297<ul class="simple">
1298<li>iabsnt = True if reflection is forbidden by symmetry</li>
1299<li>mulp = reflection multiplicity including Friedel pairs</li>
1300<li>Uniq = numpy array of equivalent hkl in descending order of h,k,l</li>
1301</ul>
1302</p>
1303</td>
1304</tr>
1305</tbody>
1306</table>
1307</dd></dl>
1308
1309<dl class="function">
1310<dt id="GSASIIspc.GetCSuinel">
1311<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>
1312<dd><p>returns Uij terms, multipliers, GUI flags &amp; Uiso2Uij multipliers</p>
1313</dd></dl>
1314
1315<dl class="function">
1316<dt id="GSASIIspc.GetCSxinel">
1317<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>
1318<dd><p>Needs a doc string</p>
1319</dd></dl>
1320
1321<dl class="function">
1322<dt id="GSASIIspc.GetKNsym">
1323<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>
1324<dd><p>Needs a doc string</p>
1325</dd></dl>
1326
1327<dl class="function">
1328<dt id="GSASIIspc.GetNXUPQsym">
1329<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>
1330<dd><p>Needs a doc string</p>
1331</dd></dl>
1332
1333<dl class="function">
1334<dt id="GSASIIspc.GetOprPtrName">
1335<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>
1336<dd><p>Needs a doc string</p>
1337</dd></dl>
1338
1339<dl class="function">
1340<dt id="GSASIIspc.HStrainNames">
1341<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>
1342<dd><p>Needs a doc string</p>
1343</dd></dl>
1344
1345<dl class="function">
1346<dt id="GSASIIspc.Latt2text">
1347<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>
1348<dd><p>From lattice type (&#8216;P&#8217;,A&#8217;, etc.) returns &#8216;;&#8217; delimited cell centering vectors</p>
1349</dd></dl>
1350
1351<dl class="function">
1352<dt id="GSASIIspc.MT2text">
1353<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>
1354<dd><p>From space group matrix/translation operator returns text version</p>
1355</dd></dl>
1356
1357<dl class="function">
1358<dt id="GSASIIspc.MoveToUnitCell">
1359<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>
1360<dd><p>Translates a set of coordinates so that all values are &gt;=0 and &lt; 1</p>
1361<table class="docutils field-list" frame="void" rules="none">
1362<col class="field-name" />
1363<col class="field-body" />
1364<tbody valign="top">
1365<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>
1366</tr>
1367<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>
1368</tr>
1369</tbody>
1370</table>
1371</dd></dl>
1372
1373<dl class="function">
1374<dt id="GSASIIspc.Muiso2Shkl">
1375<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>
1376<dd><p>this is to convert isotropic mustrain to generalized Shkls - doesn&#8217;t work just now</p>
1377</dd></dl>
1378
1379<dl class="function">
1380<dt id="GSASIIspc.MustrainCoeff">
1381<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>
1382<dd><p>Needs a doc string</p>
1383</dd></dl>
1384
1385<dl class="function">
1386<dt id="GSASIIspc.MustrainNames">
1387<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>
1388<dd><p>Needs a doc string</p>
1389</dd></dl>
1390
1391<dl class="function">
1392<dt id="GSASIIspc.Opposite">
1393<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>
1394<dd><dl class="docutils">
1395<dt>Gives opposite corner, edge or face of unit cell for position within tolerance. </dt>
1396<dd>Result may be just outside the cell within tolerance</dd>
1397</dl>
1398<table class="docutils field-list" frame="void" rules="none">
1399<col class="field-name" />
1400<col class="field-body" />
1401<tbody valign="top">
1402<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1403<li><strong>XYZ</strong> &#8211; 0 &gt;= np.array[x,y,z] &gt; 1 as by MoveToUnitCell</li>
1404<li><strong>toler</strong> &#8211; unit cell fraction tolerance making opposite</li>
1405</ul>
1406</td>
1407</tr>
1408<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>
1409</td>
1410</tr>
1411</tbody>
1412</table>
1413</dd></dl>
1414
1415<dl class="function">
1416<dt id="GSASIIspc.SGErrors">
1417<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>
1418<dd><p>Interprets the error message code from SpcGroup. Used in SpaceGroup.</p>
1419<table class="docutils field-list" frame="void" rules="none">
1420<col class="field-name" />
1421<col class="field-body" />
1422<tbody valign="top">
1423<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>
1424</tr>
1425<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>
1426</tr>
1427</tbody>
1428</table>
1429</dd></dl>
1430
1431<dl class="function">
1432<dt id="GSASIIspc.SGPrint">
1433<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>
1434<dd><p>Print the output of SpcGroup in a nicely formatted way. Used in SpaceGroup</p>
1435<table class="docutils field-list" frame="void" rules="none">
1436<col class="field-name" />
1437<col class="field-body" />
1438<tbody valign="top">
1439<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>
1440</tr>
1441<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>
1442</tr>
1443</tbody>
1444</table>
1445</dd></dl>
1446
1447<dl class="function">
1448<dt id="GSASIIspc.SGpolar">
1449<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>
1450<dd><p>Determine identity of polar axes if any</p>
1451</dd></dl>
1452
1453<dl class="function">
1454<dt id="GSASIIspc.SpaceGroup">
1455<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>
1456<dd><p>Print the output of SpcGroup in a nicely formatted way.</p>
1457<table class="docutils field-list" frame="void" rules="none">
1458<col class="field-name" />
1459<col class="field-body" />
1460<tbody valign="top">
1461<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>
1462</tr>
1463<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">nothing</td>
1464</tr>
1465</tbody>
1466</table>
1467</dd></dl>
1468
1469<dl class="function">
1470<dt id="GSASIIspc.SpcGroup">
1471<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>
1472<dd><p>Determines cell and symmetry information from a short H-M space group name</p>
1473<table class="docutils field-list" frame="void" rules="none">
1474<col class="field-name" />
1475<col class="field-body" />
1476<tbody valign="top">
1477<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>
1478</tr>
1479<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">(SGError,SGData)
1480* SGError = 0 for no errors; &gt;0 for errors (see SGErrors below for details)
1481* SGData - is a dict (see <a class="reference internal" href="GSASIIobj.html#sgdata-table"><em>Space Group object</em></a>) with entries:<blockquote>
1482<div><ul class="simple">
1483<li>&#8216;SpGrp&#8217;: space group symbol, slightly cleaned up</li>
1484<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;,
1485&#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>
1486<li>&#8216;SGInv&#8217;: boolean; True if centrosymmetric, False if not</li>
1487<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>
1488<li>&#8216;SGUniq&#8217;: one of &#8216;a&#8217;, &#8216;b&#8217;, &#8216;c&#8217; if monoclinic, &#8216;&#8217; otherwise</li>
1489<li>&#8216;SGCen&#8217;: cell centering vectors [0,0,0] at least</li>
1490<li>&#8216;SGOps&#8217;: symmetry operations as [M,T] so that M*x+T = x&#8217;</li>
1491<li>&#8216;SGSys&#8217;: one of &#8216;triclinic&#8217;, &#8216;monoclinic&#8217;, &#8216;orthorhombic&#8217;,
1492&#8216;tetragonal&#8217;, &#8216;rhombohedral&#8217;, &#8216;trigonal&#8217;, &#8216;hexagonal&#8217;, &#8216;cubic&#8217;</li>
1493<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;,
1494&#8216;xyz&#8217;, &#8216;111&#8217; for arbitrary axes</li>
1495</ul>
1496</div></blockquote>
1497</td>
1498</tr>
1499</tbody>
1500</table>
1501</dd></dl>
1502
1503<dl class="function">
1504<dt id="GSASIIspc.StandardizeSpcName">
1505<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>
1506<dd><p>Accept a spacegroup name where spaces may have not been used
1507in the names according to the GSAS convention (spaces between symmetry
1508for each axis) and return the space group name as used in GSAS</p>
1509</dd></dl>
1510
1511<dl class="function">
1512<dt id="GSASIIspc.StringOpsProd">
1513<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>
1514<dd><p>Find A*B where A &amp; B are in strings &#8216;-&#8216; + &#8216;100*c+n&#8217; + &#8216;+ijk&#8217;
1515where &#8216;-&#8216; indicates inversion, c(&gt;0) is the cell centering operator,
1516n is operator number from SgOps and ijk are unit cell translations (each may be &lt;0).
1517Should return resultant string - C. SGData - dictionary using entries:</p>
1518<blockquote>
1519<div><ul class="simple">
1520<li>&#8216;SGCen&#8217;: cell centering vectors [0,0,0] at least</li>
1521<li>&#8216;SGOps&#8217;: symmetry operations as [M,T] so that M*x+T = x&#8217;</li>
1522</ul>
1523</div></blockquote>
1524</dd></dl>
1525
1526<dl class="function">
1527<dt id="GSASIIspc.SytSym">
1528<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>
1529<dd><p>Generates the number of equivalent positions and a site symmetry code for a specified coordinate and space group</p>
1530<table class="docutils field-list" frame="void" rules="none">
1531<col class="field-name" />
1532<col class="field-body" />
1533<tbody valign="top">
1534<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1535<li><strong>XYZ</strong> &#8211; an array, tuple or list containing 3 elements: x, y &amp; z</li>
1536<li><strong>SGData</strong> &#8211; from SpcGroup</li>
1537</ul>
1538</td>
1539</tr>
1540<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first">a two element tuple:</p>
1541<ul class="last simple">
1542<li>The 1st element is a code for the site symmetry (see GetKNsym)</li>
1543<li>The 2nd element is the site multiplicity</li>
1544</ul>
1545</td>
1546</tr>
1547</tbody>
1548</table>
1549</dd></dl>
1550
1551<dl class="data">
1552<dt id="GSASIIspc.selftestlist">
1553<tt class="descclassname">GSASIIspc.</tt><tt class="descname">selftestlist</tt><em class="property"> = [&lt;function test0 at 0x27b6630&gt;, &lt;function test1 at 0x27b6670&gt;, &lt;function test2 at 0x27b66b0&gt;, &lt;function test3 at 0x27b66f0&gt;]</em><a class="headerlink" href="#GSASIIspc.selftestlist" title="Permalink to this definition">¶</a></dt>
1554<dd><p>Defines a list of self-tests</p>
1555</dd></dl>
1556
1557<dl class="function">
1558<dt id="GSASIIspc.test0">
1559<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>
1560<dd><p>self-test #0: exercise MoveToUnitCell</p>
1561</dd></dl>
1562
1563<dl class="function">
1564<dt id="GSASIIspc.test1">
1565<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>
1566<dd><p>self-test #1: SpcGroup and SGPrint against previous results</p>
1567</dd></dl>
1568
1569<dl class="function">
1570<dt id="GSASIIspc.test2">
1571<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>
1572<dd><p>self-test #2: SpcGroup against cctbx (sgtbx) computations</p>
1573</dd></dl>
1574
1575<dl class="function">
1576<dt id="GSASIIspc.test3">
1577<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>
1578<dd><p>self-test #3: exercise SytSym (includes GetOprPtrName, GenAtom, GetKNsym)
1579for selected space groups against info in IT Volume A</p>
1580</dd></dl>
1581
1582</div>
1583<span class="target" id="module-unit_tests"></span><div class="section" id="unit-tests-self-test-module">
1584<h2><em>unit_tests: Self-test Module</em><a class="headerlink" href="#unit-tests-self-test-module" title="Permalink to this headline">¶</a></h2>
1585<p>A script that can be run to test a series of self-tests in GSAS-II. At present,
1586only modules <tt class="docutils literal"><span class="pre">GSASIIspc</span></tt> and <tt class="docutils literal"><span class="pre">GSASIIlattice</span></tt> have self-tests.</p>
1587<dl class="function">
1588<dt id="unit_tests.test_GSASIIlattice">
1589<tt class="descclassname">unit_tests.</tt><tt class="descname">test_GSASIIlattice</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/unit_tests.html#test_GSASIIlattice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#unit_tests.test_GSASIIlattice" title="Permalink to this definition">¶</a></dt>
1590<dd><p>Test registered self-tests in <tt class="docutils literal"><span class="pre">GSASIIlattice</span></tt>.
1591Takes no input and returns nothing. Throws an Exception if a test fails.</p>
1592</dd></dl>
1593
1594<dl class="function">
1595<dt id="unit_tests.test_GSASIIspc">
1596<tt class="descclassname">unit_tests.</tt><tt class="descname">test_GSASIIspc</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/unit_tests.html#test_GSASIIspc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#unit_tests.test_GSASIIspc" title="Permalink to this definition">¶</a></dt>
1597<dd><p>Test registered self-tests in <tt class="docutils literal"><span class="pre">GSASIIspc</span></tt>.
1598Takes no input and returns nothing. Throws an Exception if a test fails.</p>
1599</dd></dl>
1600
1601</div>
1602</div>
1603
1604
1605          </div>
1606        </div>
1607      </div>
1608      <div class="sphinxsidebar">
1609        <div class="sphinxsidebarwrapper">
1610            <p class="logo"><a href="index.html">
1611              <img class="logo" src="_static/G2_html_logo.png" alt="Logo"/>
1612            </a></p>
1613  <h3><a href="index.html">Table Of Contents</a></h3>
1614  <ul>
1615<li><a class="reference internal" href="#"><em>GSAS-II Utility Modules</em></a><ul>
1616<li><a class="reference internal" href="#gsasiidata-data-for-computations"><em>GSASIIdata: Data for computations</em></a></li>
1617<li><a class="reference internal" href="#elementtable-periodic-table-data"><em>ElementTable: Periodic Table Data</em></a></li>
1618<li><a class="reference internal" href="#formfactors-scattering-data"><em>FormFactors: Scattering Data</em></a></li>
1619<li><a class="reference internal" href="#imagecalibrants-calibration-standards"><em>ImageCalibrants: Calibration Standards</em></a></li>
1620<li><a class="reference internal" href="#gsasiipath-locations-updates"><em>GSASIIpath: locations &amp; updates</em></a></li>
1621<li><a class="reference internal" href="#gsasiielem-functions-for-element-types"><em>GSASIIElem: functions for element types</em></a></li>
1622<li><a class="reference internal" href="#gsasiilattice-unit-cells"><em>GSASIIlattice: Unit cells</em></a></li>
1623<li><a class="reference internal" href="#gsasiispc-space-group-module"><em>GSASIIspc: Space group module</em></a></li>
1624<li><a class="reference internal" href="#unit-tests-self-test-module"><em>unit_tests: Self-test Module</em></a></li>
1625</ul>
1626</li>
1627</ul>
1628
1629  <h4>Previous topic</h4>
1630  <p class="topless"><a href="GSASIIobj.html"
1631                        title="previous chapter"><em>GSASIIobj: Data objects</em></a></p>
1632  <h4>Next topic</h4>
1633  <p class="topless"><a href="GSASIIGUIr.html"
1634                        title="next chapter"><em>GSAS-II GUI Routines</em></a></p>
1635  <h3>This Page</h3>
1636  <ul class="this-page-menu">
1637    <li><a href="_sources/GSASIIutil.txt"
1638           rel="nofollow">Show Source</a></li>
1639  </ul>
1640<div id="searchbox" style="display: none">
1641  <h3>Quick search</h3>
1642    <form class="search" action="search.html" method="get">
1643      <input type="text" name="q" />
1644      <input type="submit" value="Go" />
1645      <input type="hidden" name="check_keywords" value="yes" />
1646      <input type="hidden" name="area" value="default" />
1647    </form>
1648    <p class="searchtip" style="font-size: 90%">
1649    Enter search terms or a module, class or function name.
1650    </p>
1651</div>
1652<script type="text/javascript">$('#searchbox').show(0);</script>
1653        </div>
1654      </div>
1655      <div class="clearer"></div>
1656    </div>
1657    <div class="related">
1658      <h3>Navigation</h3>
1659      <ul>
1660        <li class="right" style="margin-right: 10px">
1661          <a href="genindex.html" title="General Index"
1662             >index</a></li>
1663        <li class="right" >
1664          <a href="py-modindex.html" title="Python Module Index"
1665             >modules</a> |</li>
1666        <li class="right" >
1667          <a href="GSASIIGUIr.html" title="GSAS-II GUI Routines"
1668             >next</a> |</li>
1669        <li class="right" >
1670          <a href="GSASIIobj.html" title="GSASIIobj: Data objects"
1671             >previous</a> |</li>
1672        <li><a href="index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li> 
1673      </ul>
1674    </div>
1675    <div class="footer">
1676        &copy; Copyright 2013, Von Dreele and Toby for Argonne National Laboratory.
1677      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
1678    </div>
1679  </body>
1680</html>
Note: See TracBrowser for help on using the repository browser.