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

Last change on this file since 941 was 941, checked in by toby, 10 years ago

fix Matts mac bug on switching phase tabs; start doc of phase contents; get major CIF data names (but not yet values) into export

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