1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
3 | |
---|
4 | |
---|
5 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
6 | <head> |
---|
7 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
8 | |
---|
9 | <title>GSASIImath: computation module — GSAS-II 0.2.0 documentation</title> |
---|
10 | |
---|
11 | <link rel="stylesheet" href="_static/default.css" type="text/css" /> |
---|
12 | <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
---|
13 | |
---|
14 | <script type="text/javascript"> |
---|
15 | var DOCUMENTATION_OPTIONS = { |
---|
16 | URL_ROOT: './', |
---|
17 | VERSION: '0.2.0', |
---|
18 | COLLAPSE_INDEX: false, |
---|
19 | FILE_SUFFIX: '.html', |
---|
20 | HAS_SOURCE: true |
---|
21 | }; |
---|
22 | </script> |
---|
23 | <script type="text/javascript" src="_static/jquery.js"></script> |
---|
24 | <script type="text/javascript" src="_static/underscore.js"></script> |
---|
25 | <script type="text/javascript" src="_static/doctools.js"></script> |
---|
26 | <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> |
---|
27 | <link rel="top" title="GSAS-II 0.2.0 documentation" href="index.html" /> |
---|
28 | <link rel="next" title="GSASIIindex: Cell Indexing Module" href="GSASIIindex.html" /> |
---|
29 | <link rel="prev" title="GSASIIimage: Image calc module" href="GSASIIimage.html" /> |
---|
30 | </head> |
---|
31 | <body> |
---|
32 | <div class="related"> |
---|
33 | <h3>Navigation</h3> |
---|
34 | <ul> |
---|
35 | <li class="right" style="margin-right: 10px"> |
---|
36 | <a href="genindex.html" title="General Index" |
---|
37 | accesskey="I">index</a></li> |
---|
38 | <li class="right" > |
---|
39 | <a href="py-modindex.html" title="Python Module Index" |
---|
40 | >modules</a> |</li> |
---|
41 | <li class="right" > |
---|
42 | <a href="GSASIIindex.html" title="GSASIIindex: Cell Indexing Module" |
---|
43 | accesskey="N">next</a> |</li> |
---|
44 | <li class="right" > |
---|
45 | <a href="GSASIIimage.html" title="GSASIIimage: Image calc module" |
---|
46 | accesskey="P">previous</a> |</li> |
---|
47 | <li><a href="index.html">GSAS-II 0.2.0 documentation</a> »</li> |
---|
48 | </ul> |
---|
49 | </div> |
---|
50 | |
---|
51 | <div class="document"> |
---|
52 | <div class="documentwrapper"> |
---|
53 | <div class="bodywrapper"> |
---|
54 | <div class="body"> |
---|
55 | |
---|
56 | <span class="target" id="module-GSASIImath"></span><div class="section" id="gsasiimath-computation-module"> |
---|
57 | <h1><em>GSASIImath: computation module</em><a class="headerlink" href="#gsasiimath-computation-module" title="Permalink to this headline">¶</a></h1> |
---|
58 | <p>Routines for least-squares minimization and other stuff</p> |
---|
59 | <dl class="function"> |
---|
60 | <dt id="GSASIImath.AV2Q"> |
---|
61 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">AV2Q</tt><big>(</big><em>A</em>, <em>V</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#AV2Q"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.AV2Q" title="Permalink to this definition">¶</a></dt> |
---|
62 | <dd><p>convert angle (radians) & vector to quaternion |
---|
63 | q=r+ai+bj+ck</p> |
---|
64 | </dd></dl> |
---|
65 | |
---|
66 | <dl class="function"> |
---|
67 | <dt id="GSASIImath.AVdeg2Q"> |
---|
68 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">AVdeg2Q</tt><big>(</big><em>A</em>, <em>V</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#AVdeg2Q"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.AVdeg2Q" title="Permalink to this definition">¶</a></dt> |
---|
69 | <dd><p>convert angle (degrees) & vector to quaternion |
---|
70 | q=r+ai+bj+ck</p> |
---|
71 | </dd></dl> |
---|
72 | |
---|
73 | <dl class="function"> |
---|
74 | <dt id="GSASIImath.AtomTLS2UIJ"> |
---|
75 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">AtomTLS2UIJ</tt><big>(</big><em>atomData</em>, <em>atPtrs</em>, <em>Amat</em>, <em>rbObj</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#AtomTLS2UIJ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.AtomTLS2UIJ" title="Permalink to this definition">¶</a></dt> |
---|
76 | <dd><p>default doc string</p> |
---|
77 | <table class="docutils field-list" frame="void" rules="none"> |
---|
78 | <col class="field-name" /> |
---|
79 | <col class="field-body" /> |
---|
80 | <tbody valign="top"> |
---|
81 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
82 | </tr> |
---|
83 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
84 | </tr> |
---|
85 | </tbody> |
---|
86 | </table> |
---|
87 | </dd></dl> |
---|
88 | |
---|
89 | <dl class="function"> |
---|
90 | <dt id="GSASIImath.AtomUij2TLS"> |
---|
91 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">AtomUij2TLS</tt><big>(</big><em>atomData</em>, <em>atPtrs</em>, <em>Amat</em>, <em>Bmat</em>, <em>rbObj</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#AtomUij2TLS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.AtomUij2TLS" title="Permalink to this definition">¶</a></dt> |
---|
92 | <dd><p>default doc string</p> |
---|
93 | <table class="docutils field-list" frame="void" rules="none"> |
---|
94 | <col class="field-name" /> |
---|
95 | <col class="field-body" /> |
---|
96 | <tbody valign="top"> |
---|
97 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
98 | </tr> |
---|
99 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
100 | </tr> |
---|
101 | </tbody> |
---|
102 | </table> |
---|
103 | </dd></dl> |
---|
104 | |
---|
105 | <dl class="function"> |
---|
106 | <dt id="GSASIImath.ChargeFlip"> |
---|
107 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">ChargeFlip</tt><big>(</big><em>data</em>, <em>reflDict</em>, <em>pgbar</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#ChargeFlip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.ChargeFlip" title="Permalink to this definition">¶</a></dt> |
---|
108 | <dd><p>default doc string</p> |
---|
109 | <table class="docutils field-list" frame="void" rules="none"> |
---|
110 | <col class="field-name" /> |
---|
111 | <col class="field-body" /> |
---|
112 | <tbody valign="top"> |
---|
113 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
114 | </tr> |
---|
115 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
116 | </tr> |
---|
117 | </tbody> |
---|
118 | </table> |
---|
119 | </dd></dl> |
---|
120 | |
---|
121 | <dl class="function"> |
---|
122 | <dt id="GSASIImath.Den2Vol"> |
---|
123 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">Den2Vol</tt><big>(</big><em>Elements</em>, <em>density</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#Den2Vol"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.Den2Vol" title="Permalink to this definition">¶</a></dt> |
---|
124 | <dd><p>converts density to molecular volume</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"><ul class="first simple"> |
---|
130 | <li><strong>Elements</strong> (<em>dict</em>) – elements in molecular formula; |
---|
131 | each must contain |
---|
132 | Num: number of atoms in formula |
---|
133 | Mass: at. wt.</li> |
---|
134 | <li><strong>density</strong> (<em>float</em>) – material density in gm/cm^3</li> |
---|
135 | </ul> |
---|
136 | </td> |
---|
137 | </tr> |
---|
138 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">float volume: molecular volume in A^3</p> |
---|
139 | </td> |
---|
140 | </tr> |
---|
141 | </tbody> |
---|
142 | </table> |
---|
143 | </dd></dl> |
---|
144 | |
---|
145 | <dl class="function"> |
---|
146 | <dt id="GSASIImath.El2EstVol"> |
---|
147 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">El2EstVol</tt><big>(</big><em>Elements</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#El2EstVol"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.El2EstVol" title="Permalink to this definition">¶</a></dt> |
---|
148 | <dd><p>Estimate volume from molecular formula; assumes atom volume = 10A^3</p> |
---|
149 | <table class="docutils field-list" frame="void" rules="none"> |
---|
150 | <col class="field-name" /> |
---|
151 | <col class="field-body" /> |
---|
152 | <tbody valign="top"> |
---|
153 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>Elements</strong> (<em>dict</em>) – elements in molecular formula; |
---|
154 | each must contain |
---|
155 | Num: number of atoms in formula</td> |
---|
156 | </tr> |
---|
157 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">float volume: estimate of molecular volume in A^3</td> |
---|
158 | </tr> |
---|
159 | </tbody> |
---|
160 | </table> |
---|
161 | </dd></dl> |
---|
162 | |
---|
163 | <dl class="function"> |
---|
164 | <dt id="GSASIImath.El2Mass"> |
---|
165 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">El2Mass</tt><big>(</big><em>Elements</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#El2Mass"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.El2Mass" title="Permalink to this definition">¶</a></dt> |
---|
166 | <dd><p>compute molecular weight from Elements</p> |
---|
167 | <table class="docutils field-list" frame="void" rules="none"> |
---|
168 | <col class="field-name" /> |
---|
169 | <col class="field-body" /> |
---|
170 | <tbody valign="top"> |
---|
171 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>Elements</strong> (<em>dict</em>) – elements in molecular formula; |
---|
172 | each must contain |
---|
173 | Num: number of atoms in formula |
---|
174 | Mass: at. wt.</td> |
---|
175 | </tr> |
---|
176 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">float mass: molecular weight.</td> |
---|
177 | </tr> |
---|
178 | </tbody> |
---|
179 | </table> |
---|
180 | </dd></dl> |
---|
181 | |
---|
182 | <dl class="function"> |
---|
183 | <dt id="GSASIImath.FillAtomLookUp"> |
---|
184 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">FillAtomLookUp</tt><big>(</big><em>atomData</em>, <em>indx</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#FillAtomLookUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.FillAtomLookUp" title="Permalink to this definition">¶</a></dt> |
---|
185 | <dd><p>create a dictionary of atom indexes with atom IDs as keys</p> |
---|
186 | <table class="docutils field-list" frame="void" rules="none"> |
---|
187 | <col class="field-name" /> |
---|
188 | <col class="field-body" /> |
---|
189 | <tbody valign="top"> |
---|
190 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>atomData</strong> (<em>list</em>) – Atom table to be used</td> |
---|
191 | </tr> |
---|
192 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">dict atomLookUp: dictionary of atom indexes with atom IDs as keys</td> |
---|
193 | </tr> |
---|
194 | </tbody> |
---|
195 | </table> |
---|
196 | </dd></dl> |
---|
197 | |
---|
198 | <dl class="function"> |
---|
199 | <dt id="GSASIImath.FindAtomIndexByIDs"> |
---|
200 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">FindAtomIndexByIDs</tt><big>(</big><em>atomData</em>, <em>IDs</em>, <em>Draw=True</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#FindAtomIndexByIDs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.FindAtomIndexByIDs" title="Permalink to this definition">¶</a></dt> |
---|
201 | <dd><p>finds the set of atom array indices for a list of atom IDs. Will search |
---|
202 | either the Atom table or the drawAtom table.</p> |
---|
203 | <table class="docutils field-list" frame="void" rules="none"> |
---|
204 | <col class="field-name" /> |
---|
205 | <col class="field-body" /> |
---|
206 | <tbody valign="top"> |
---|
207 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
208 | <li><strong>atomData</strong> (<em>list</em>) – Atom or drawAtom table containting coordinates, etc.</li> |
---|
209 | <li><strong>IDs</strong> (<em>list</em>) – atom IDs to be found</li> |
---|
210 | <li><strong>Draw</strong> (<em>bool</em>) – True if drawAtom table to be searched; False if Atom table |
---|
211 | is searched</li> |
---|
212 | </ul> |
---|
213 | </td> |
---|
214 | </tr> |
---|
215 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">list indx: atom (or drawAtom) indices</p> |
---|
216 | </td> |
---|
217 | </tr> |
---|
218 | </tbody> |
---|
219 | </table> |
---|
220 | </dd></dl> |
---|
221 | |
---|
222 | <dl class="function"> |
---|
223 | <dt id="GSASIImath.Fourier4DMap"> |
---|
224 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">Fourier4DMap</tt><big>(</big><em>data</em>, <em>reflDict</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#Fourier4DMap"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.Fourier4DMap" title="Permalink to this definition">¶</a></dt> |
---|
225 | <dd><p>default doc string</p> |
---|
226 | <table class="docutils field-list" frame="void" rules="none"> |
---|
227 | <col class="field-name" /> |
---|
228 | <col class="field-body" /> |
---|
229 | <tbody valign="top"> |
---|
230 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
231 | </tr> |
---|
232 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
233 | </tr> |
---|
234 | </tbody> |
---|
235 | </table> |
---|
236 | </dd></dl> |
---|
237 | |
---|
238 | <dl class="function"> |
---|
239 | <dt id="GSASIImath.FourierMap"> |
---|
240 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">FourierMap</tt><big>(</big><em>data</em>, <em>reflDict</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#FourierMap"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.FourierMap" title="Permalink to this definition">¶</a></dt> |
---|
241 | <dd><p>default doc string</p> |
---|
242 | <table class="docutils field-list" frame="void" rules="none"> |
---|
243 | <col class="field-name" /> |
---|
244 | <col class="field-body" /> |
---|
245 | <tbody valign="top"> |
---|
246 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
247 | </tr> |
---|
248 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
249 | </tr> |
---|
250 | </tbody> |
---|
251 | </table> |
---|
252 | </dd></dl> |
---|
253 | |
---|
254 | <dl class="function"> |
---|
255 | <dt id="GSASIImath.GetAngleSig"> |
---|
256 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">GetAngleSig</tt><big>(</big><em>Oatoms</em>, <em>Atoms</em>, <em>Amat</em>, <em>SGData</em>, <em>covData={}</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#GetAngleSig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.GetAngleSig" title="Permalink to this definition">¶</a></dt> |
---|
257 | <dd><p>default doc string</p> |
---|
258 | <table class="docutils field-list" frame="void" rules="none"> |
---|
259 | <col class="field-name" /> |
---|
260 | <col class="field-body" /> |
---|
261 | <tbody valign="top"> |
---|
262 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
263 | </tr> |
---|
264 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
265 | </tr> |
---|
266 | </tbody> |
---|
267 | </table> |
---|
268 | </dd></dl> |
---|
269 | |
---|
270 | <dl class="function"> |
---|
271 | <dt id="GSASIImath.GetAtomCoordsByID"> |
---|
272 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">GetAtomCoordsByID</tt><big>(</big><em>pId</em>, <em>parmDict</em>, <em>AtLookup</em>, <em>indx</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#GetAtomCoordsByID"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.GetAtomCoordsByID" title="Permalink to this definition">¶</a></dt> |
---|
273 | <dd><p>default doc string</p> |
---|
274 | <table class="docutils field-list" frame="void" rules="none"> |
---|
275 | <col class="field-name" /> |
---|
276 | <col class="field-body" /> |
---|
277 | <tbody valign="top"> |
---|
278 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
279 | </tr> |
---|
280 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
281 | </tr> |
---|
282 | </tbody> |
---|
283 | </table> |
---|
284 | </dd></dl> |
---|
285 | |
---|
286 | <dl class="function"> |
---|
287 | <dt id="GSASIImath.GetAtomItemsById"> |
---|
288 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">GetAtomItemsById</tt><big>(</big><em>atomData</em>, <em>atomLookUp</em>, <em>IdList</em>, <em>itemLoc</em>, <em>numItems=1</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#GetAtomItemsById"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.GetAtomItemsById" title="Permalink to this definition">¶</a></dt> |
---|
289 | <dd><p>gets atom parameters for atoms using atom IDs</p> |
---|
290 | <table class="docutils field-list" frame="void" rules="none"> |
---|
291 | <col class="field-name" /> |
---|
292 | <col class="field-body" /> |
---|
293 | <tbody valign="top"> |
---|
294 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
295 | <li><strong>atomData</strong> (<em>list</em>) – Atom table to be used</li> |
---|
296 | <li><strong>atomLookUp</strong> (<em>dict</em>) – dictionary of atom indexes with atom IDs as keys</li> |
---|
297 | <li><strong>IdList</strong> (<em>list</em>) – atom IDs to be found</li> |
---|
298 | <li><strong>itemLoc</strong> (<em>int</em>) – pointer to desired 1st item in an atom table entry</li> |
---|
299 | <li><strong>numItems</strong> (<em>int</em>) – number of items to be retrieved</li> |
---|
300 | </ul> |
---|
301 | </td> |
---|
302 | </tr> |
---|
303 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">type name: description</p> |
---|
304 | </td> |
---|
305 | </tr> |
---|
306 | </tbody> |
---|
307 | </table> |
---|
308 | </dd></dl> |
---|
309 | |
---|
310 | <dl class="function"> |
---|
311 | <dt id="GSASIImath.GetAtomsById"> |
---|
312 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">GetAtomsById</tt><big>(</big><em>atomData</em>, <em>atomLookUp</em>, <em>IdList</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#GetAtomsById"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.GetAtomsById" title="Permalink to this definition">¶</a></dt> |
---|
313 | <dd><p>gets a list of atoms from Atom table that match a set of atom IDs</p> |
---|
314 | <table class="docutils field-list" frame="void" rules="none"> |
---|
315 | <col class="field-name" /> |
---|
316 | <col class="field-body" /> |
---|
317 | <tbody valign="top"> |
---|
318 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
319 | <li><strong>atomData</strong> (<em>list</em>) – Atom table to be used</li> |
---|
320 | <li><strong>atomLookUp</strong> (<em>dict</em>) – dictionary of atom indexes with atom IDs as keys</li> |
---|
321 | <li><strong>IdList</strong> (<em>list</em>) – atom IDs to be found</li> |
---|
322 | </ul> |
---|
323 | </td> |
---|
324 | </tr> |
---|
325 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">list atoms: list of atoms found</p> |
---|
326 | </td> |
---|
327 | </tr> |
---|
328 | </tbody> |
---|
329 | </table> |
---|
330 | </dd></dl> |
---|
331 | |
---|
332 | <dl class="function"> |
---|
333 | <dt id="GSASIImath.GetDATSig"> |
---|
334 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">GetDATSig</tt><big>(</big><em>Oatoms</em>, <em>Atoms</em>, <em>Amat</em>, <em>SGData</em>, <em>covData={}</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#GetDATSig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.GetDATSig" title="Permalink to this definition">¶</a></dt> |
---|
335 | <dd><p>default doc string</p> |
---|
336 | <table class="docutils field-list" frame="void" rules="none"> |
---|
337 | <col class="field-name" /> |
---|
338 | <col class="field-body" /> |
---|
339 | <tbody valign="top"> |
---|
340 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
341 | </tr> |
---|
342 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
343 | </tr> |
---|
344 | </tbody> |
---|
345 | </table> |
---|
346 | </dd></dl> |
---|
347 | |
---|
348 | <dl class="function"> |
---|
349 | <dt id="GSASIImath.GetDistSig"> |
---|
350 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">GetDistSig</tt><big>(</big><em>Oatoms</em>, <em>Atoms</em>, <em>Amat</em>, <em>SGData</em>, <em>covData={}</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#GetDistSig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.GetDistSig" title="Permalink to this definition">¶</a></dt> |
---|
351 | <dd><p>default doc string</p> |
---|
352 | <table class="docutils field-list" frame="void" rules="none"> |
---|
353 | <col class="field-name" /> |
---|
354 | <col class="field-body" /> |
---|
355 | <tbody valign="top"> |
---|
356 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
357 | </tr> |
---|
358 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
359 | </tr> |
---|
360 | </tbody> |
---|
361 | </table> |
---|
362 | </dd></dl> |
---|
363 | |
---|
364 | <dl class="function"> |
---|
365 | <dt id="GSASIImath.GetSHCoeff"> |
---|
366 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">GetSHCoeff</tt><big>(</big><em>pId</em>, <em>parmDict</em>, <em>SHkeys</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#GetSHCoeff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.GetSHCoeff" title="Permalink to this definition">¶</a></dt> |
---|
367 | <dd><p>default doc string</p> |
---|
368 | <table class="docutils field-list" frame="void" rules="none"> |
---|
369 | <col class="field-name" /> |
---|
370 | <col class="field-body" /> |
---|
371 | <tbody valign="top"> |
---|
372 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
373 | </tr> |
---|
374 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
375 | </tr> |
---|
376 | </tbody> |
---|
377 | </table> |
---|
378 | </dd></dl> |
---|
379 | |
---|
380 | <dl class="function"> |
---|
381 | <dt id="GSASIImath.GetTorsionSig"> |
---|
382 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">GetTorsionSig</tt><big>(</big><em>Oatoms</em>, <em>Atoms</em>, <em>Amat</em>, <em>SGData</em>, <em>covData={}</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#GetTorsionSig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.GetTorsionSig" title="Permalink to this definition">¶</a></dt> |
---|
383 | <dd><p>default doc string</p> |
---|
384 | <table class="docutils field-list" frame="void" rules="none"> |
---|
385 | <col class="field-name" /> |
---|
386 | <col class="field-body" /> |
---|
387 | <tbody valign="top"> |
---|
388 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
389 | </tr> |
---|
390 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
391 | </tr> |
---|
392 | </tbody> |
---|
393 | </table> |
---|
394 | </dd></dl> |
---|
395 | |
---|
396 | <dl class="function"> |
---|
397 | <dt id="GSASIImath.GetXYZDist"> |
---|
398 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">GetXYZDist</tt><big>(</big><em>xyz</em>, <em>XYZ</em>, <em>Amat</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#GetXYZDist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.GetXYZDist" title="Permalink to this definition">¶</a></dt> |
---|
399 | <dd><dl class="docutils"> |
---|
400 | <dt>gets distance from position xyz to all XYZ, xyz & XYZ are np.array </dt> |
---|
401 | <dd>and are in crystal coordinates; Amat is crystal to Cart matrix</dd> |
---|
402 | </dl> |
---|
403 | <table class="docutils field-list" frame="void" rules="none"> |
---|
404 | <col class="field-name" /> |
---|
405 | <col class="field-body" /> |
---|
406 | <tbody valign="top"> |
---|
407 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
408 | </tr> |
---|
409 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
410 | </tr> |
---|
411 | </tbody> |
---|
412 | </table> |
---|
413 | </dd></dl> |
---|
414 | |
---|
415 | <dl class="function"> |
---|
416 | <dt id="GSASIImath.HessianLSQ"> |
---|
417 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">HessianLSQ</tt><big>(</big><em>func</em>, <em>x0</em>, <em>Hess</em>, <em>args=()</em>, <em>ftol=1.49012e-08</em>, <em>xtol=1.49012e-08</em>, <em>maxcyc=0</em>, <em>Print=False</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#HessianLSQ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.HessianLSQ" title="Permalink to this definition">¶</a></dt> |
---|
418 | <dd><p>Minimize the sum of squares of a function (<span class="math">\(f\)</span>) evaluated on a series of |
---|
419 | values (y): <span class="math">\(\sum_{y=0}^{N_{obs}} f(y,{args})\)</span></p> |
---|
420 | <div class="highlight-python"><div class="highlight"><pre> Nobs |
---|
421 | x = arg min(sum(func(y)**2,axis=0)) |
---|
422 | y=0 |
---|
423 | </pre></div> |
---|
424 | </div> |
---|
425 | <table class="docutils field-list" frame="void" rules="none"> |
---|
426 | <col class="field-name" /> |
---|
427 | <col class="field-body" /> |
---|
428 | <tbody valign="top"> |
---|
429 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
430 | <li><strong>func</strong> (<em>function</em>) – callable method or function |
---|
431 | should take at least one (possibly length N vector) argument and |
---|
432 | returns M floating point numbers.</li> |
---|
433 | <li><strong>x0</strong> (<em>np.ndarray</em>) – The starting estimate for the minimization of length N</li> |
---|
434 | <li><strong>Hess</strong> (<em>function</em>) – callable method or function |
---|
435 | A required function or method to compute the weighted vector and Hessian for func. |
---|
436 | It must be a symmetric NxN array</li> |
---|
437 | <li><strong>args</strong> (<em>tuple</em>) – Any extra arguments to func are placed in this tuple.</li> |
---|
438 | <li><strong>ftol</strong> (<em>float</em>) – Relative error desired in the sum of squares.</li> |
---|
439 | <li><strong>xtol</strong> (<em>float</em>) – Relative error desired in the approximate solution.</li> |
---|
440 | <li><strong>maxcyc</strong> (<em>int</em>) – The maximum number of cycles of refinement to execute, if -1 refine |
---|
441 | until other limits are met (ftol, xtol)</li> |
---|
442 | <li><strong>Print</strong> (<em>bool</em>) – True for printing results (residuals & times) by cycle</li> |
---|
443 | </ul> |
---|
444 | </td> |
---|
445 | </tr> |
---|
446 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><p>(x,cov_x,infodict) where</p> |
---|
447 | <ul> |
---|
448 | <li><p class="first">x : ndarray |
---|
449 | The solution (or the result of the last iteration for an unsuccessful |
---|
450 | call).</p> |
---|
451 | </li> |
---|
452 | <li><p class="first">cov_x : ndarray |
---|
453 | Uses the fjac and ipvt optional outputs to construct an |
---|
454 | estimate of the jacobian around the solution. <tt class="docutils literal"><span class="pre">None</span></tt> if a |
---|
455 | singular matrix encountered (indicates very flat curvature in |
---|
456 | some direction). This matrix must be multiplied by the |
---|
457 | residual standard deviation to get the covariance of the |
---|
458 | parameter estimates – see curve_fit.</p> |
---|
459 | </li> |
---|
460 | <li><p class="first">infodict : dict |
---|
461 | a dictionary of optional outputs with the keys:</p> |
---|
462 | <blockquote> |
---|
463 | <div><ul class="simple"> |
---|
464 | <li>‘fvec’ : the function evaluated at the output</li> |
---|
465 | <li>‘num cyc’:</li> |
---|
466 | <li>‘nfev’:</li> |
---|
467 | <li>‘lamMax’:</li> |
---|
468 | <li>‘psing’:</li> |
---|
469 | </ul> |
---|
470 | </div></blockquote> |
---|
471 | </li> |
---|
472 | </ul> |
---|
473 | </p> |
---|
474 | </td> |
---|
475 | </tr> |
---|
476 | </tbody> |
---|
477 | </table> |
---|
478 | </dd></dl> |
---|
479 | |
---|
480 | <dl class="function"> |
---|
481 | <dt id="GSASIImath.OmitMap"> |
---|
482 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">OmitMap</tt><big>(</big><em>data</em>, <em>reflDict</em>, <em>pgbar=None</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#OmitMap"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.OmitMap" title="Permalink to this definition">¶</a></dt> |
---|
483 | <dd><p>default doc string</p> |
---|
484 | <table class="docutils field-list" frame="void" rules="none"> |
---|
485 | <col class="field-name" /> |
---|
486 | <col class="field-body" /> |
---|
487 | <tbody valign="top"> |
---|
488 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
489 | </tr> |
---|
490 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
491 | </tr> |
---|
492 | </tbody> |
---|
493 | </table> |
---|
494 | </dd></dl> |
---|
495 | |
---|
496 | <dl class="function"> |
---|
497 | <dt id="GSASIImath.PeaksEquiv"> |
---|
498 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">PeaksEquiv</tt><big>(</big><em>data</em>, <em>Ind</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#PeaksEquiv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.PeaksEquiv" title="Permalink to this definition">¶</a></dt> |
---|
499 | <dd><p>Find the equivalent map peaks for those selected. Works on the |
---|
500 | contents of data[‘Map Peaks’].</p> |
---|
501 | <table class="docutils field-list" frame="void" rules="none"> |
---|
502 | <col class="field-name" /> |
---|
503 | <col class="field-body" /> |
---|
504 | <tbody valign="top"> |
---|
505 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
506 | <li><strong>data</strong> – the phase data structure</li> |
---|
507 | <li><strong>Ind</strong> (<em>list</em>) – list of selected peak indices</li> |
---|
508 | </ul> |
---|
509 | </td> |
---|
510 | </tr> |
---|
511 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">augmented list of peaks including those related by symmetry to the |
---|
512 | ones in Ind</p> |
---|
513 | </td> |
---|
514 | </tr> |
---|
515 | </tbody> |
---|
516 | </table> |
---|
517 | </dd></dl> |
---|
518 | |
---|
519 | <dl class="function"> |
---|
520 | <dt id="GSASIImath.PeaksUnique"> |
---|
521 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">PeaksUnique</tt><big>(</big><em>data</em>, <em>Ind</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#PeaksUnique"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.PeaksUnique" title="Permalink to this definition">¶</a></dt> |
---|
522 | <dd><p>Finds the symmetry unique set of peaks from those selected. Works on the |
---|
523 | contents of data[‘Map Peaks’].</p> |
---|
524 | <table class="docutils field-list" frame="void" rules="none"> |
---|
525 | <col class="field-name" /> |
---|
526 | <col class="field-body" /> |
---|
527 | <tbody valign="top"> |
---|
528 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
529 | <li><strong>data</strong> – the phase data structure</li> |
---|
530 | <li><strong>Ind</strong> (<em>list</em>) – list of selected peak indices</li> |
---|
531 | </ul> |
---|
532 | </td> |
---|
533 | </tr> |
---|
534 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the list of symmetry unique peaks from among those given in Ind</p> |
---|
535 | </td> |
---|
536 | </tr> |
---|
537 | </tbody> |
---|
538 | </table> |
---|
539 | </dd></dl> |
---|
540 | |
---|
541 | <dl class="function"> |
---|
542 | <dt id="GSASIImath.Q2AV"> |
---|
543 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">Q2AV</tt><big>(</big><em>Q</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#Q2AV"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.Q2AV" title="Permalink to this definition">¶</a></dt> |
---|
544 | <dd><p>convert quaternion to angle (radians 0-2pi) & normalized vector |
---|
545 | q=r+ai+bj+ck</p> |
---|
546 | </dd></dl> |
---|
547 | |
---|
548 | <dl class="function"> |
---|
549 | <dt id="GSASIImath.Q2AVdeg"> |
---|
550 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">Q2AVdeg</tt><big>(</big><em>Q</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#Q2AVdeg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.Q2AVdeg" title="Permalink to this definition">¶</a></dt> |
---|
551 | <dd><p>convert quaternion to angle (degrees 0-360) & normalized vector |
---|
552 | q=r+ai+bj+ck</p> |
---|
553 | </dd></dl> |
---|
554 | |
---|
555 | <dl class="function"> |
---|
556 | <dt id="GSASIImath.Q2Mat"> |
---|
557 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">Q2Mat</tt><big>(</big><em>Q</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#Q2Mat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.Q2Mat" title="Permalink to this definition">¶</a></dt> |
---|
558 | <dd><p>make rotation matrix from quaternion |
---|
559 | q=r+ai+bj+ck</p> |
---|
560 | </dd></dl> |
---|
561 | |
---|
562 | <dl class="function"> |
---|
563 | <dt id="GSASIImath.RotateRBXYZ"> |
---|
564 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">RotateRBXYZ</tt><big>(</big><em>Bmat</em>, <em>Cart</em>, <em>oriQ</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#RotateRBXYZ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.RotateRBXYZ" title="Permalink to this definition">¶</a></dt> |
---|
565 | <dd><p>rotate & transform cartesian coordinates to crystallographic ones |
---|
566 | no translation applied. To be used for numerical derivatives</p> |
---|
567 | <table class="docutils field-list" frame="void" rules="none"> |
---|
568 | <col class="field-name" /> |
---|
569 | <col class="field-body" /> |
---|
570 | <tbody valign="top"> |
---|
571 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
572 | </tr> |
---|
573 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
574 | </tr> |
---|
575 | </tbody> |
---|
576 | </table> |
---|
577 | </dd></dl> |
---|
578 | |
---|
579 | <dl class="function"> |
---|
580 | <dt id="GSASIImath.SSChargeFlip"> |
---|
581 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">SSChargeFlip</tt><big>(</big><em>data</em>, <em>reflDict</em>, <em>pgbar</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#SSChargeFlip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.SSChargeFlip" title="Permalink to this definition">¶</a></dt> |
---|
582 | <dd><p>default doc string</p> |
---|
583 | <table class="docutils field-list" frame="void" rules="none"> |
---|
584 | <col class="field-name" /> |
---|
585 | <col class="field-body" /> |
---|
586 | <tbody valign="top"> |
---|
587 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
588 | </tr> |
---|
589 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
590 | </tr> |
---|
591 | </tbody> |
---|
592 | </table> |
---|
593 | </dd></dl> |
---|
594 | |
---|
595 | <dl class="function"> |
---|
596 | <dt id="GSASIImath.SearchMap"> |
---|
597 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">SearchMap</tt><big>(</big><em>generalData</em>, <em>drawingData</em>, <em>Neg=False</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#SearchMap"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.SearchMap" title="Permalink to this definition">¶</a></dt> |
---|
598 | <dd><p>Does a search of a density map for peaks meeting the criterion of peak |
---|
599 | height is greater than mapData[‘cutOff’]/100 of mapData[‘rhoMax’] where |
---|
600 | mapData is data[‘General’][‘mapData’]; the map is also in mapData.</p> |
---|
601 | <table class="docutils field-list" frame="void" rules="none"> |
---|
602 | <col class="field-name" /> |
---|
603 | <col class="field-body" /> |
---|
604 | <tbody valign="top"> |
---|
605 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
606 | <li><strong>generalData</strong> – the phase data structure; includes the map</li> |
---|
607 | <li><strong>drawingData</strong> – the drawing data structure</li> |
---|
608 | <li><strong>Neg</strong> – if True then search for negative peaks (i.e. H-atoms & neutron data)</li> |
---|
609 | </ul> |
---|
610 | </td> |
---|
611 | </tr> |
---|
612 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><p>(peaks,mags,dzeros) where</p> |
---|
613 | <ul class="simple"> |
---|
614 | <li>peaks : ndarray |
---|
615 | x,y,z positions of the peaks found in the map</li> |
---|
616 | <li>mags : ndarray |
---|
617 | the magnitudes of the peaks</li> |
---|
618 | <li>dzeros : ndarray |
---|
619 | the distance of the peaks from the unit cell origin</li> |
---|
620 | <li>dcent : ndarray |
---|
621 | the distance of the peaks from the unit cell center</li> |
---|
622 | </ul> |
---|
623 | </p> |
---|
624 | </td> |
---|
625 | </tr> |
---|
626 | </tbody> |
---|
627 | </table> |
---|
628 | </dd></dl> |
---|
629 | |
---|
630 | <dl class="function"> |
---|
631 | <dt id="GSASIImath.SetMolCent"> |
---|
632 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">SetMolCent</tt><big>(</big><em>model</em>, <em>RBData</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#SetMolCent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.SetMolCent" title="Permalink to this definition">¶</a></dt> |
---|
633 | <dd><p>default doc string</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>name</strong> (<em>type</em>) – description</td> |
---|
639 | </tr> |
---|
640 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
641 | </tr> |
---|
642 | </tbody> |
---|
643 | </table> |
---|
644 | </dd></dl> |
---|
645 | |
---|
646 | <dl class="function"> |
---|
647 | <dt id="GSASIImath.TLS2Uij"> |
---|
648 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">TLS2Uij</tt><big>(</big><em>xyz</em>, <em>g</em>, <em>Amat</em>, <em>rbObj</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#TLS2Uij"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.TLS2Uij" title="Permalink to this definition">¶</a></dt> |
---|
649 | <dd><p>default doc string</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">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
655 | </tr> |
---|
656 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
657 | </tr> |
---|
658 | </tbody> |
---|
659 | </table> |
---|
660 | </dd></dl> |
---|
661 | |
---|
662 | <dl class="function"> |
---|
663 | <dt id="GSASIImath.UpdateMCSAxyz"> |
---|
664 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">UpdateMCSAxyz</tt><big>(</big><em>Bmat</em>, <em>MCSA</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#UpdateMCSAxyz"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.UpdateMCSAxyz" title="Permalink to this definition">¶</a></dt> |
---|
665 | <dd><p>default doc string</p> |
---|
666 | <table class="docutils field-list" frame="void" rules="none"> |
---|
667 | <col class="field-name" /> |
---|
668 | <col class="field-body" /> |
---|
669 | <tbody valign="top"> |
---|
670 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
671 | </tr> |
---|
672 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
673 | </tr> |
---|
674 | </tbody> |
---|
675 | </table> |
---|
676 | </dd></dl> |
---|
677 | |
---|
678 | <dl class="function"> |
---|
679 | <dt id="GSASIImath.UpdateRBUIJ"> |
---|
680 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">UpdateRBUIJ</tt><big>(</big><em>Bmat</em>, <em>Cart</em>, <em>RBObj</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#UpdateRBUIJ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.UpdateRBUIJ" title="Permalink to this definition">¶</a></dt> |
---|
681 | <dd><p>default doc string</p> |
---|
682 | <table class="docutils field-list" frame="void" rules="none"> |
---|
683 | <col class="field-name" /> |
---|
684 | <col class="field-body" /> |
---|
685 | <tbody valign="top"> |
---|
686 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
687 | </tr> |
---|
688 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
689 | </tr> |
---|
690 | </tbody> |
---|
691 | </table> |
---|
692 | </dd></dl> |
---|
693 | |
---|
694 | <dl class="function"> |
---|
695 | <dt id="GSASIImath.UpdateRBXYZ"> |
---|
696 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">UpdateRBXYZ</tt><big>(</big><em>Bmat</em>, <em>RBObj</em>, <em>RBData</em>, <em>RBType</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#UpdateRBXYZ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.UpdateRBXYZ" title="Permalink to this definition">¶</a></dt> |
---|
697 | <dd><p>default doc string</p> |
---|
698 | <table class="docutils field-list" frame="void" rules="none"> |
---|
699 | <col class="field-name" /> |
---|
700 | <col class="field-body" /> |
---|
701 | <tbody valign="top"> |
---|
702 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
703 | </tr> |
---|
704 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
705 | </tr> |
---|
706 | </tbody> |
---|
707 | </table> |
---|
708 | </dd></dl> |
---|
709 | |
---|
710 | <dl class="function"> |
---|
711 | <dt id="GSASIImath.ValEsd"> |
---|
712 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">ValEsd</tt><big>(</big><em>value</em>, <em>esd=0</em>, <em>nTZ=False</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#ValEsd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.ValEsd" title="Permalink to this definition">¶</a></dt> |
---|
713 | <dd><p>Format a floating point number with a given level of precision or |
---|
714 | with in crystallographic format with a “esd”, as value(esd). If esd is |
---|
715 | negative the number is formatted with the level of significant figures |
---|
716 | appropriate if abs(esd) were the esd, but the esd is not included. |
---|
717 | if the esd is zero, approximately 6 significant figures are printed. |
---|
718 | nTZ=True causes “extra” zeros to be removed after the decimal place. |
---|
719 | for example:</p> |
---|
720 | <blockquote> |
---|
721 | <div><ul class="simple"> |
---|
722 | <li>“1.235(3)” for value=1.2346 & esd=0.003</li> |
---|
723 | <li>“1.235(3)e4” for value=12346. & esd=30</li> |
---|
724 | <li>“1.235(3)e6” for value=0.12346e7 & esd=3000</li> |
---|
725 | <li>“1.235” for value=1.2346 & esd=-0.003</li> |
---|
726 | <li>“1.240” for value=1.2395 & esd=-0.003</li> |
---|
727 | <li>“1.24” for value=1.2395 & esd=-0.003 with nTZ=True</li> |
---|
728 | <li>“1.23460” for value=1.2346 & esd=0.0</li> |
---|
729 | </ul> |
---|
730 | </div></blockquote> |
---|
731 | <table class="docutils field-list" frame="void" rules="none"> |
---|
732 | <col class="field-name" /> |
---|
733 | <col class="field-body" /> |
---|
734 | <tbody valign="top"> |
---|
735 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
736 | <li><strong>value</strong> (<em>float</em>) – number to be formatted</li> |
---|
737 | <li><strong>esd</strong> (<em>float</em>) – uncertainty or if esd < 0, specifies level of |
---|
738 | precision to be shown e.g. esd=-0.01 gives 2 places beyond decimal</li> |
---|
739 | <li><strong>nTZ</strong> (<em>bool</em>) – True to remove trailing zeros (default is False)</li> |
---|
740 | </ul> |
---|
741 | </td> |
---|
742 | </tr> |
---|
743 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">value(esd) or value as a string</p> |
---|
744 | </td> |
---|
745 | </tr> |
---|
746 | </tbody> |
---|
747 | </table> |
---|
748 | </dd></dl> |
---|
749 | |
---|
750 | <dl class="function"> |
---|
751 | <dt id="GSASIImath.Vol2Den"> |
---|
752 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">Vol2Den</tt><big>(</big><em>Elements</em>, <em>volume</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#Vol2Den"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.Vol2Den" title="Permalink to this definition">¶</a></dt> |
---|
753 | <dd><p>converts volume to density</p> |
---|
754 | <table class="docutils field-list" frame="void" rules="none"> |
---|
755 | <col class="field-name" /> |
---|
756 | <col class="field-body" /> |
---|
757 | <tbody valign="top"> |
---|
758 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
759 | <li><strong>Elements</strong> (<em>dict</em>) – elements in molecular formula; |
---|
760 | each must contain |
---|
761 | Num: number of atoms in formula |
---|
762 | Mass: at. wt.</li> |
---|
763 | <li><strong>volume</strong> (<em>float</em>) – molecular volume in A^3</li> |
---|
764 | </ul> |
---|
765 | </td> |
---|
766 | </tr> |
---|
767 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">float density: material density in gm/cm^3</p> |
---|
768 | </td> |
---|
769 | </tr> |
---|
770 | </tbody> |
---|
771 | </table> |
---|
772 | </dd></dl> |
---|
773 | |
---|
774 | <dl class="function"> |
---|
775 | <dt id="GSASIImath.XScattDen"> |
---|
776 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">XScattDen</tt><big>(</big><em>Elements</em>, <em>vol</em>, <em>wave=0.0</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#XScattDen"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.XScattDen" title="Permalink to this definition">¶</a></dt> |
---|
777 | <dd><p>Estimate X-ray scattering density from molecular formula & volume; |
---|
778 | ignores valence, but includes anomalous effects</p> |
---|
779 | <table class="docutils field-list" frame="void" rules="none"> |
---|
780 | <col class="field-name" /> |
---|
781 | <col class="field-body" /> |
---|
782 | <tbody valign="top"> |
---|
783 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
784 | <li><strong>Elements</strong> (<em>dict</em>) – elements in molecular formula; |
---|
785 | each element must contain |
---|
786 | Num: number of atoms in formula |
---|
787 | Z: atomic number</li> |
---|
788 | <li><strong>vol</strong> (<em>float</em>) – molecular volume in A^3</li> |
---|
789 | <li><strong>wave</strong> (<em>float</em>) – optional wavelength in A</li> |
---|
790 | </ul> |
---|
791 | </td> |
---|
792 | </tr> |
---|
793 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">float rho: scattering density in 10^10cm^-2; |
---|
794 | if wave > 0 the includes f’ contribution</p> |
---|
795 | </td> |
---|
796 | </tr> |
---|
797 | <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">float mu: if wave>0 absorption coeff in cm^-1 ; otherwise 0</p> |
---|
798 | </td> |
---|
799 | </tr> |
---|
800 | </tbody> |
---|
801 | </table> |
---|
802 | </dd></dl> |
---|
803 | |
---|
804 | <dl class="function"> |
---|
805 | <dt id="GSASIImath.adjHKLmax"> |
---|
806 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">adjHKLmax</tt><big>(</big><em>SGData</em>, <em>Hmax</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#adjHKLmax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.adjHKLmax" title="Permalink to this definition">¶</a></dt> |
---|
807 | <dd><p>default doc string</p> |
---|
808 | <table class="docutils field-list" frame="void" rules="none"> |
---|
809 | <col class="field-name" /> |
---|
810 | <col class="field-body" /> |
---|
811 | <tbody valign="top"> |
---|
812 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
813 | </tr> |
---|
814 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
815 | </tr> |
---|
816 | </tbody> |
---|
817 | </table> |
---|
818 | </dd></dl> |
---|
819 | |
---|
820 | <dl class="function"> |
---|
821 | <dt id="GSASIImath.anneal"> |
---|
822 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">anneal</tt><big>(</big><em>func</em>, <em>x0</em>, <em>args=()</em>, <em>schedule='fast'</em>, <em>full_output=0</em>, <em>T0=None</em>, <em>Tf=1e-12</em>, <em>maxeval=None</em>, <em>maxaccept=None</em>, <em>maxiter=400</em>, <em>boltzmann=1.0</em>, <em>learn_rate=0.5</em>, <em>feps=1e-06</em>, <em>quench=1.0</em>, <em>m=1.0</em>, <em>n=1.0</em>, <em>lower=-100</em>, <em>upper=100</em>, <em>dwell=50</em>, <em>slope=0.9</em>, <em>ranStart=False</em>, <em>ranRange=0.1</em>, <em>autoRan=False</em>, <em>dlg=None</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#anneal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.anneal" title="Permalink to this definition">¶</a></dt> |
---|
823 | <dd><p>Minimize a function using simulated annealing.</p> |
---|
824 | <p>Schedule is a schedule class implementing the annealing schedule. |
---|
825 | Available ones are ‘fast’, ‘cauchy’, ‘boltzmann’</p> |
---|
826 | <table class="docutils field-list" frame="void" rules="none"> |
---|
827 | <col class="field-name" /> |
---|
828 | <col class="field-body" /> |
---|
829 | <tbody valign="top"> |
---|
830 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
831 | <li><strong>func</strong> (<em>callable</em>) – f(x, *args) |
---|
832 | Function to be optimized.</li> |
---|
833 | <li><strong>x0</strong> (<em>ndarray</em>) – Initial guess.</li> |
---|
834 | <li><strong>args</strong> (<em>tuple</em>) – Extra parameters to <cite>func</cite>.</li> |
---|
835 | <li><strong>schedule</strong> (<em>base_schedule</em>) – Annealing schedule to use (a class).</li> |
---|
836 | <li><strong>full_output</strong> (<em>bool</em>) – Whether to return optional outputs.</li> |
---|
837 | <li><strong>T0</strong> (<em>float</em>) – Initial Temperature (estimated as 1.2 times the largest |
---|
838 | cost-function deviation over random points in the range).</li> |
---|
839 | <li><strong>Tf</strong> (<em>float</em>) – Final goal temperature.</li> |
---|
840 | <li><strong>maxeval</strong> (<em>int</em>) – Maximum function evaluations.</li> |
---|
841 | <li><strong>maxaccept</strong> (<em>int</em>) – Maximum changes to accept.</li> |
---|
842 | <li><strong>maxiter</strong> (<em>int</em>) – Maximum cooling iterations.</li> |
---|
843 | <li><strong>learn_rate</strong> (<em>float</em>) – Scale constant for adjusting guesses.</li> |
---|
844 | <li><strong>boltzmann</strong> (<em>float</em>) – Boltzmann constant in acceptance test |
---|
845 | (increase for less stringent test at each temperature).</li> |
---|
846 | <li><strong>feps</strong> (<em>float</em>) – Stopping relative error tolerance for the function value in |
---|
847 | last four coolings.</li> |
---|
848 | <li><strong>quench,m,n</strong> (<em>float</em>) – Parameters to alter fast_sa schedule.</li> |
---|
849 | <li><strong>lower,upper</strong> (<em>float/ndarray</em>) – Lower and upper bounds on <cite>x</cite>.</li> |
---|
850 | <li><strong>dwell</strong> (<em>int</em>) – The number of times to search the space at each temperature.</li> |
---|
851 | <li><strong>slope</strong> (<em>float</em>) – Parameter for log schedule</li> |
---|
852 | <li><strong>ranStart=False</strong> (<em>bool</em>) – True for set 10% of ranges about x</li> |
---|
853 | </ul> |
---|
854 | </td> |
---|
855 | </tr> |
---|
856 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><p>(xmin, Jmin, T, feval, iters, accept, retval) where</p> |
---|
857 | <ul> |
---|
858 | <li><p class="first">xmin (ndarray): Point giving smallest value found.</p> |
---|
859 | </li> |
---|
860 | <li><p class="first">Jmin (float): Minimum value of function found.</p> |
---|
861 | </li> |
---|
862 | <li><p class="first">T (float): Final temperature.</p> |
---|
863 | </li> |
---|
864 | <li><p class="first">feval (int): Number of function evaluations.</p> |
---|
865 | </li> |
---|
866 | <li><p class="first">iters (int): Number of cooling iterations.</p> |
---|
867 | </li> |
---|
868 | <li><p class="first">accept (int): Number of tests accepted.</p> |
---|
869 | </li> |
---|
870 | <li><p class="first">retval (int): Flag indicating stopping condition:</p> |
---|
871 | <blockquote> |
---|
872 | <div><ul class="simple"> |
---|
873 | <li>0: Points no longer changing</li> |
---|
874 | <li>1: Cooled to final temperature</li> |
---|
875 | <li>2: Maximum function evaluations</li> |
---|
876 | <li>3: Maximum cooling iterations reached</li> |
---|
877 | <li>4: Maximum accepted query locations reached</li> |
---|
878 | <li>5: Final point not the minimum amongst encountered points</li> |
---|
879 | </ul> |
---|
880 | </div></blockquote> |
---|
881 | </li> |
---|
882 | </ul> |
---|
883 | </p> |
---|
884 | </td> |
---|
885 | </tr> |
---|
886 | </tbody> |
---|
887 | </table> |
---|
888 | <p><em>Notes</em>: |
---|
889 | Simulated annealing is a random algorithm which uses no derivative |
---|
890 | information from the function being optimized. In practice it has |
---|
891 | been more useful in discrete optimization than continuous |
---|
892 | optimization, as there are usually better algorithms for continuous |
---|
893 | optimization problems.</p> |
---|
894 | <p>Some experimentation by trying the difference temperature |
---|
895 | schedules and altering their parameters is likely required to |
---|
896 | obtain good performance.</p> |
---|
897 | <p>The randomness in the algorithm comes from random sampling in numpy. |
---|
898 | To obtain the same results you can call numpy.random.seed with the |
---|
899 | same seed immediately before calling scipy.optimize.anneal.</p> |
---|
900 | <p>We give a brief description of how the three temperature schedules |
---|
901 | generate new points and vary their temperature. Temperatures are |
---|
902 | only updated with iterations in the outer loop. The inner loop is |
---|
903 | over xrange(dwell), and new points are generated for |
---|
904 | every iteration in the inner loop. (Though whether the proposed |
---|
905 | new points are accepted is probabilistic.)</p> |
---|
906 | <p>For readability, let d denote the dimension of the inputs to func. |
---|
907 | Also, let x_old denote the previous state, and k denote the |
---|
908 | iteration number of the outer loop. All other variables not |
---|
909 | defined below are input variables to scipy.optimize.anneal itself.</p> |
---|
910 | <p>In the ‘fast’ schedule the updates are</p> |
---|
911 | <div class="highlight-python"><div class="highlight"><pre>u ~ Uniform(0, 1, size=d) |
---|
912 | y = sgn(u - 0.5) * T * ((1+ 1/T)**abs(2u-1) -1.0) |
---|
913 | xc = y * (upper - lower) |
---|
914 | x_new = x_old + xc |
---|
915 | |
---|
916 | c = n * exp(-n * quench) |
---|
917 | T_new = T0 * exp(-c * k**quench) |
---|
918 | </pre></div> |
---|
919 | </div> |
---|
920 | <p>In the ‘cauchy’ schedule the updates are</p> |
---|
921 | <div class="highlight-python"><div class="highlight"><pre>u ~ Uniform(-pi/2, pi/2, size=d) |
---|
922 | xc = learn_rate * T * tan(u) |
---|
923 | x_new = x_old + xc |
---|
924 | |
---|
925 | T_new = T0 / (1+k) |
---|
926 | </pre></div> |
---|
927 | </div> |
---|
928 | <p>In the ‘boltzmann’ schedule the updates are</p> |
---|
929 | <div class="highlight-python"><div class="highlight"><pre>std = minimum( sqrt(T) * ones(d), (upper-lower) / (3*learn_rate) ) |
---|
930 | y ~ Normal(0, std, size=d) |
---|
931 | x_new = x_old + learn_rate * y |
---|
932 | |
---|
933 | T_new = T0 / log(1+k) |
---|
934 | </pre></div> |
---|
935 | </div> |
---|
936 | </dd></dl> |
---|
937 | |
---|
938 | <dl class="function"> |
---|
939 | <dt id="GSASIImath.calcRamaEnergy"> |
---|
940 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">calcRamaEnergy</tt><big>(</big><em>phi</em>, <em>psi</em>, <em>Coeff=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#calcRamaEnergy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.calcRamaEnergy" title="Permalink to this definition">¶</a></dt> |
---|
941 | <dd><p>Computes pseudo potential energy from a pair of torsion angles and a |
---|
942 | numerical description of the potential energy surface. Used to create |
---|
943 | penalty function in LS refinement: |
---|
944 | <span class="math">\(Eval(\phi,\psi) = C[0]*exp(-V/1000)\)</span></p> |
---|
945 | <p>where <span class="math">\(V = -C[3] * (\phi-C[1])^2 - C[4]*(\psi-C[2])^2 - 2*(\phi-C[1])*(\psi-C[2])\)</span></p> |
---|
946 | <table class="docutils field-list" frame="void" rules="none"> |
---|
947 | <col class="field-name" /> |
---|
948 | <col class="field-body" /> |
---|
949 | <tbody valign="top"> |
---|
950 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
951 | <li><strong>phi</strong> (<em>float</em>) – first torsion angle (<span class="math">\(\phi\)</span>)</li> |
---|
952 | <li><strong>psi</strong> (<em>float</em>) – second torsion angle (<span class="math">\(\psi\)</span>)</li> |
---|
953 | <li><strong>Coeff</strong> (<em>list</em>) – pseudo potential coefficients</li> |
---|
954 | </ul> |
---|
955 | </td> |
---|
956 | </tr> |
---|
957 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">list (sum,Eval): pseudo-potential difference from minimum & value; |
---|
958 | sum is used for penalty function.</p> |
---|
959 | </td> |
---|
960 | </tr> |
---|
961 | </tbody> |
---|
962 | </table> |
---|
963 | </dd></dl> |
---|
964 | |
---|
965 | <dl class="function"> |
---|
966 | <dt id="GSASIImath.calcTorsionEnergy"> |
---|
967 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">calcTorsionEnergy</tt><big>(</big><em>TOR</em>, <em>Coeff=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#calcTorsionEnergy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.calcTorsionEnergy" title="Permalink to this definition">¶</a></dt> |
---|
968 | <dd><p>default doc string</p> |
---|
969 | <table class="docutils field-list" frame="void" rules="none"> |
---|
970 | <col class="field-name" /> |
---|
971 | <col class="field-body" /> |
---|
972 | <tbody valign="top"> |
---|
973 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
974 | </tr> |
---|
975 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
976 | </tr> |
---|
977 | </tbody> |
---|
978 | </table> |
---|
979 | </dd></dl> |
---|
980 | |
---|
981 | <dl class="function"> |
---|
982 | <dt id="GSASIImath.findOffset"> |
---|
983 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">findOffset</tt><big>(</big><em>SGData</em>, <em>A</em>, <em>Fhkl</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#findOffset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.findOffset" title="Permalink to this definition">¶</a></dt> |
---|
984 | <dd><p>default doc string</p> |
---|
985 | <table class="docutils field-list" frame="void" rules="none"> |
---|
986 | <col class="field-name" /> |
---|
987 | <col class="field-body" /> |
---|
988 | <tbody valign="top"> |
---|
989 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
990 | </tr> |
---|
991 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
992 | </tr> |
---|
993 | </tbody> |
---|
994 | </table> |
---|
995 | </dd></dl> |
---|
996 | |
---|
997 | <dl class="function"> |
---|
998 | <dt id="GSASIImath.findSSOffset"> |
---|
999 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">findSSOffset</tt><big>(</big><em>SGData</em>, <em>SSGData</em>, <em>A</em>, <em>Fhklm</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#findSSOffset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.findSSOffset" title="Permalink to this definition">¶</a></dt> |
---|
1000 | <dd><p>default doc string</p> |
---|
1001 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1002 | <col class="field-name" /> |
---|
1003 | <col class="field-body" /> |
---|
1004 | <tbody valign="top"> |
---|
1005 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1006 | </tr> |
---|
1007 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1008 | </tr> |
---|
1009 | </tbody> |
---|
1010 | </table> |
---|
1011 | </dd></dl> |
---|
1012 | |
---|
1013 | <dl class="function"> |
---|
1014 | <dt id="GSASIImath.getAngSig"> |
---|
1015 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getAngSig</tt><big>(</big><em>VA</em>, <em>VB</em>, <em>Amat</em>, <em>SGData</em>, <em>covData={}</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getAngSig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getAngSig" title="Permalink to this definition">¶</a></dt> |
---|
1016 | <dd><p>default doc string</p> |
---|
1017 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1018 | <col class="field-name" /> |
---|
1019 | <col class="field-body" /> |
---|
1020 | <tbody valign="top"> |
---|
1021 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1022 | </tr> |
---|
1023 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1024 | </tr> |
---|
1025 | </tbody> |
---|
1026 | </table> |
---|
1027 | </dd></dl> |
---|
1028 | |
---|
1029 | <dl class="function"> |
---|
1030 | <dt id="GSASIImath.getAtomXYZ"> |
---|
1031 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getAtomXYZ</tt><big>(</big><em>atoms</em>, <em>cx</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getAtomXYZ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getAtomXYZ" title="Permalink to this definition">¶</a></dt> |
---|
1032 | <dd><p>default doc string</p> |
---|
1033 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1034 | <col class="field-name" /> |
---|
1035 | <col class="field-body" /> |
---|
1036 | <tbody valign="top"> |
---|
1037 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1038 | </tr> |
---|
1039 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1040 | </tr> |
---|
1041 | </tbody> |
---|
1042 | </table> |
---|
1043 | </dd></dl> |
---|
1044 | |
---|
1045 | <dl class="function"> |
---|
1046 | <dt id="GSASIImath.getCWgam"> |
---|
1047 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getCWgam</tt><big>(</big><em>ins</em>, <em>pos</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getCWgam"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getCWgam" title="Permalink to this definition">¶</a></dt> |
---|
1048 | <dd><p>get CW peak profile gamma</p> |
---|
1049 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1050 | <col class="field-name" /> |
---|
1051 | <col class="field-body" /> |
---|
1052 | <tbody valign="top"> |
---|
1053 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1054 | <li><strong>ins</strong> (<em>dict</em>) – instrument parameters with at least ‘X’ & ‘Y’ |
---|
1055 | as values only</li> |
---|
1056 | <li><strong>pos</strong> (<em>float</em>) – 2-theta of peak</li> |
---|
1057 | </ul> |
---|
1058 | </td> |
---|
1059 | </tr> |
---|
1060 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">float getCWgam: peak gamma</p> |
---|
1061 | </td> |
---|
1062 | </tr> |
---|
1063 | </tbody> |
---|
1064 | </table> |
---|
1065 | </dd></dl> |
---|
1066 | |
---|
1067 | <dl class="function"> |
---|
1068 | <dt id="GSASIImath.getCWgamDeriv"> |
---|
1069 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getCWgamDeriv</tt><big>(</big><em>pos</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getCWgamDeriv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getCWgamDeriv" title="Permalink to this definition">¶</a></dt> |
---|
1070 | <dd><p>get derivatives of CW peak profile gamma wrt X & Y</p> |
---|
1071 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1072 | <col class="field-name" /> |
---|
1073 | <col class="field-body" /> |
---|
1074 | <tbody valign="top"> |
---|
1075 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pos</strong> (<em>float</em>) – 2-theta of peak</td> |
---|
1076 | </tr> |
---|
1077 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list getCWgamDeriv: d(gam)/dX & d(gam)/dY</td> |
---|
1078 | </tr> |
---|
1079 | </tbody> |
---|
1080 | </table> |
---|
1081 | </dd></dl> |
---|
1082 | |
---|
1083 | <dl class="function"> |
---|
1084 | <dt id="GSASIImath.getCWsig"> |
---|
1085 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getCWsig</tt><big>(</big><em>ins</em>, <em>pos</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getCWsig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getCWsig" title="Permalink to this definition">¶</a></dt> |
---|
1086 | <dd><p>get CW peak profile sigma</p> |
---|
1087 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1088 | <col class="field-name" /> |
---|
1089 | <col class="field-body" /> |
---|
1090 | <tbody valign="top"> |
---|
1091 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1092 | <li><strong>ins</strong> (<em>dict</em>) – instrument parameters with at least ‘U’, ‘V’, & ‘W’ |
---|
1093 | as values only</li> |
---|
1094 | <li><strong>pos</strong> (<em>float</em>) – 2-theta of peak</li> |
---|
1095 | </ul> |
---|
1096 | </td> |
---|
1097 | </tr> |
---|
1098 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">float getCWsig: peak sigma</p> |
---|
1099 | </td> |
---|
1100 | </tr> |
---|
1101 | </tbody> |
---|
1102 | </table> |
---|
1103 | </dd></dl> |
---|
1104 | |
---|
1105 | <dl class="function"> |
---|
1106 | <dt id="GSASIImath.getCWsigDeriv"> |
---|
1107 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getCWsigDeriv</tt><big>(</big><em>pos</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getCWsigDeriv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getCWsigDeriv" title="Permalink to this definition">¶</a></dt> |
---|
1108 | <dd><p>get derivatives of CW peak profile sigma wrt U,V, & W</p> |
---|
1109 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1110 | <col class="field-name" /> |
---|
1111 | <col class="field-body" /> |
---|
1112 | <tbody valign="top"> |
---|
1113 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pos</strong> (<em>float</em>) – 2-theta of peak</td> |
---|
1114 | </tr> |
---|
1115 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list getCWsigDeriv: d(sig)/dU, d(sig)/dV & d(sig)/dW</td> |
---|
1116 | </tr> |
---|
1117 | </tbody> |
---|
1118 | </table> |
---|
1119 | </dd></dl> |
---|
1120 | |
---|
1121 | <dl class="function"> |
---|
1122 | <dt id="GSASIImath.getDensity"> |
---|
1123 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getDensity</tt><big>(</big><em>generalData</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getDensity"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getDensity" title="Permalink to this definition">¶</a></dt> |
---|
1124 | <dd><p>calculate crystal structure density</p> |
---|
1125 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1126 | <col class="field-name" /> |
---|
1127 | <col class="field-body" /> |
---|
1128 | <tbody valign="top"> |
---|
1129 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>generalData</strong> (<em>dict</em>) – The General dictionary in Phase</td> |
---|
1130 | </tr> |
---|
1131 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">float density: crystal density in gm/cm^3</td> |
---|
1132 | </tr> |
---|
1133 | </tbody> |
---|
1134 | </table> |
---|
1135 | </dd></dl> |
---|
1136 | |
---|
1137 | <dl class="function"> |
---|
1138 | <dt id="GSASIImath.getDistDerv"> |
---|
1139 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getDistDerv</tt><big>(</big><em>Oxyz</em>, <em>Txyz</em>, <em>Amat</em>, <em>Tunit</em>, <em>Top</em>, <em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getDistDerv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getDistDerv" title="Permalink to this definition">¶</a></dt> |
---|
1140 | <dd><p>default doc string</p> |
---|
1141 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1142 | <col class="field-name" /> |
---|
1143 | <col class="field-body" /> |
---|
1144 | <tbody valign="top"> |
---|
1145 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1146 | </tr> |
---|
1147 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1148 | </tr> |
---|
1149 | </tbody> |
---|
1150 | </table> |
---|
1151 | </dd></dl> |
---|
1152 | |
---|
1153 | <dl class="function"> |
---|
1154 | <dt id="GSASIImath.getMass"> |
---|
1155 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getMass</tt><big>(</big><em>generalData</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getMass"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getMass" title="Permalink to this definition">¶</a></dt> |
---|
1156 | <dd><p>Computes mass of unit cell contents</p> |
---|
1157 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1158 | <col class="field-name" /> |
---|
1159 | <col class="field-body" /> |
---|
1160 | <tbody valign="top"> |
---|
1161 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>generalData</strong> (<em>dict</em>) – The General dictionary in Phase</td> |
---|
1162 | </tr> |
---|
1163 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">float mass: Crystal unit cell mass in AMU.</td> |
---|
1164 | </tr> |
---|
1165 | </tbody> |
---|
1166 | </table> |
---|
1167 | </dd></dl> |
---|
1168 | |
---|
1169 | <dl class="function"> |
---|
1170 | <dt id="GSASIImath.getRamaDeriv"> |
---|
1171 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getRamaDeriv</tt><big>(</big><em>XYZ</em>, <em>Amat</em>, <em>Coeff</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getRamaDeriv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getRamaDeriv" title="Permalink to this definition">¶</a></dt> |
---|
1172 | <dd><p>Computes numerical derivatives of torsion angle pair pseudo potential |
---|
1173 | with respect of crystallographic atom coordinates of the 5 atom sequence</p> |
---|
1174 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1175 | <col class="field-name" /> |
---|
1176 | <col class="field-body" /> |
---|
1177 | <tbody valign="top"> |
---|
1178 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1179 | <li><strong>XYZ</strong> (<em>nparray</em>) – crystallographic coordinates of 5 atoms</li> |
---|
1180 | <li><strong>Amat</strong> (<em>nparray</em>) – crystal to cartesian transformation matrix</li> |
---|
1181 | <li><strong>Coeff</strong> (<em>list</em>) – pseudo potential coefficients</li> |
---|
1182 | </ul> |
---|
1183 | </td> |
---|
1184 | </tr> |
---|
1185 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">list (deriv) derivatives of pseudopotential with respect to 5 atom |
---|
1186 | crystallographic xyz coordinates.</p> |
---|
1187 | </td> |
---|
1188 | </tr> |
---|
1189 | </tbody> |
---|
1190 | </table> |
---|
1191 | </dd></dl> |
---|
1192 | |
---|
1193 | <dl class="function"> |
---|
1194 | <dt id="GSASIImath.getRestAngle"> |
---|
1195 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getRestAngle</tt><big>(</big><em>XYZ</em>, <em>Amat</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getRestAngle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getRestAngle" title="Permalink to this definition">¶</a></dt> |
---|
1196 | <dd><p>default doc string</p> |
---|
1197 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1198 | <col class="field-name" /> |
---|
1199 | <col class="field-body" /> |
---|
1200 | <tbody valign="top"> |
---|
1201 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1202 | </tr> |
---|
1203 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1204 | </tr> |
---|
1205 | </tbody> |
---|
1206 | </table> |
---|
1207 | </dd></dl> |
---|
1208 | |
---|
1209 | <dl class="function"> |
---|
1210 | <dt id="GSASIImath.getRestChiral"> |
---|
1211 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getRestChiral</tt><big>(</big><em>XYZ</em>, <em>Amat</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getRestChiral"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getRestChiral" title="Permalink to this definition">¶</a></dt> |
---|
1212 | <dd><p>default doc string</p> |
---|
1213 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1214 | <col class="field-name" /> |
---|
1215 | <col class="field-body" /> |
---|
1216 | <tbody valign="top"> |
---|
1217 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1218 | </tr> |
---|
1219 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1220 | </tr> |
---|
1221 | </tbody> |
---|
1222 | </table> |
---|
1223 | </dd></dl> |
---|
1224 | |
---|
1225 | <dl class="function"> |
---|
1226 | <dt id="GSASIImath.getRestDeriv"> |
---|
1227 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getRestDeriv</tt><big>(</big><em>Func</em>, <em>XYZ</em>, <em>Amat</em>, <em>ops</em>, <em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getRestDeriv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getRestDeriv" title="Permalink to this definition">¶</a></dt> |
---|
1228 | <dd><p>default doc string</p> |
---|
1229 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1230 | <col class="field-name" /> |
---|
1231 | <col class="field-body" /> |
---|
1232 | <tbody valign="top"> |
---|
1233 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1234 | </tr> |
---|
1235 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1236 | </tr> |
---|
1237 | </tbody> |
---|
1238 | </table> |
---|
1239 | </dd></dl> |
---|
1240 | |
---|
1241 | <dl class="function"> |
---|
1242 | <dt id="GSASIImath.getRestDist"> |
---|
1243 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getRestDist</tt><big>(</big><em>XYZ</em>, <em>Amat</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getRestDist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getRestDist" title="Permalink to this definition">¶</a></dt> |
---|
1244 | <dd><p>default doc string</p> |
---|
1245 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1246 | <col class="field-name" /> |
---|
1247 | <col class="field-body" /> |
---|
1248 | <tbody valign="top"> |
---|
1249 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1250 | </tr> |
---|
1251 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1252 | </tr> |
---|
1253 | </tbody> |
---|
1254 | </table> |
---|
1255 | </dd></dl> |
---|
1256 | |
---|
1257 | <dl class="function"> |
---|
1258 | <dt id="GSASIImath.getRestPlane"> |
---|
1259 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getRestPlane</tt><big>(</big><em>XYZ</em>, <em>Amat</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getRestPlane"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getRestPlane" title="Permalink to this definition">¶</a></dt> |
---|
1260 | <dd><p>default doc string</p> |
---|
1261 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1262 | <col class="field-name" /> |
---|
1263 | <col class="field-body" /> |
---|
1264 | <tbody valign="top"> |
---|
1265 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1266 | </tr> |
---|
1267 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1268 | </tr> |
---|
1269 | </tbody> |
---|
1270 | </table> |
---|
1271 | </dd></dl> |
---|
1272 | |
---|
1273 | <dl class="function"> |
---|
1274 | <dt id="GSASIImath.getRestPolefig"> |
---|
1275 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getRestPolefig</tt><big>(</big><em>ODFln</em>, <em>SamSym</em>, <em>Grid</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getRestPolefig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getRestPolefig" title="Permalink to this definition">¶</a></dt> |
---|
1276 | <dd><p>default doc string</p> |
---|
1277 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1278 | <col class="field-name" /> |
---|
1279 | <col class="field-body" /> |
---|
1280 | <tbody valign="top"> |
---|
1281 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1282 | </tr> |
---|
1283 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1284 | </tr> |
---|
1285 | </tbody> |
---|
1286 | </table> |
---|
1287 | </dd></dl> |
---|
1288 | |
---|
1289 | <dl class="function"> |
---|
1290 | <dt id="GSASIImath.getRestPolefigDerv"> |
---|
1291 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getRestPolefigDerv</tt><big>(</big><em>HKL</em>, <em>Grid</em>, <em>SHCoeff</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getRestPolefigDerv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getRestPolefigDerv" title="Permalink to this definition">¶</a></dt> |
---|
1292 | <dd><p>default doc string</p> |
---|
1293 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1294 | <col class="field-name" /> |
---|
1295 | <col class="field-body" /> |
---|
1296 | <tbody valign="top"> |
---|
1297 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1298 | </tr> |
---|
1299 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1300 | </tr> |
---|
1301 | </tbody> |
---|
1302 | </table> |
---|
1303 | </dd></dl> |
---|
1304 | |
---|
1305 | <dl class="function"> |
---|
1306 | <dt id="GSASIImath.getRestRama"> |
---|
1307 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getRestRama</tt><big>(</big><em>XYZ</em>, <em>Amat</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getRestRama"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getRestRama" title="Permalink to this definition">¶</a></dt> |
---|
1308 | <dd><p>Computes a pair of torsion angles in a 5 atom string</p> |
---|
1309 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1310 | <col class="field-name" /> |
---|
1311 | <col class="field-body" /> |
---|
1312 | <tbody valign="top"> |
---|
1313 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1314 | <li><strong>XYZ</strong> (<em>nparray</em>) – crystallographic coordinates of 5 atoms</li> |
---|
1315 | <li><strong>Amat</strong> (<em>nparray</em>) – crystal to cartesian transformation matrix</li> |
---|
1316 | </ul> |
---|
1317 | </td> |
---|
1318 | </tr> |
---|
1319 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">list (phi,psi) two torsion angles in degrees</p> |
---|
1320 | </td> |
---|
1321 | </tr> |
---|
1322 | </tbody> |
---|
1323 | </table> |
---|
1324 | </dd></dl> |
---|
1325 | |
---|
1326 | <dl class="function"> |
---|
1327 | <dt id="GSASIImath.getRestTorsion"> |
---|
1328 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getRestTorsion</tt><big>(</big><em>XYZ</em>, <em>Amat</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getRestTorsion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getRestTorsion" title="Permalink to this definition">¶</a></dt> |
---|
1329 | <dd><p>default doc string</p> |
---|
1330 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1331 | <col class="field-name" /> |
---|
1332 | <col class="field-body" /> |
---|
1333 | <tbody valign="top"> |
---|
1334 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1335 | </tr> |
---|
1336 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1337 | </tr> |
---|
1338 | </tbody> |
---|
1339 | </table> |
---|
1340 | </dd></dl> |
---|
1341 | |
---|
1342 | <dl class="function"> |
---|
1343 | <dt id="GSASIImath.getSyXYZ"> |
---|
1344 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getSyXYZ</tt><big>(</big><em>XYZ</em>, <em>ops</em>, <em>SGData</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getSyXYZ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getSyXYZ" title="Permalink to this definition">¶</a></dt> |
---|
1345 | <dd><p>default doc string</p> |
---|
1346 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1347 | <col class="field-name" /> |
---|
1348 | <col class="field-body" /> |
---|
1349 | <tbody valign="top"> |
---|
1350 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1351 | </tr> |
---|
1352 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1353 | </tr> |
---|
1354 | </tbody> |
---|
1355 | </table> |
---|
1356 | </dd></dl> |
---|
1357 | |
---|
1358 | <dl class="function"> |
---|
1359 | <dt id="GSASIImath.getTOFalpha"> |
---|
1360 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getTOFalpha</tt><big>(</big><em>ins</em>, <em>dsp</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getTOFalpha"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getTOFalpha" title="Permalink to this definition">¶</a></dt> |
---|
1361 | <dd><p>get TOF peak profile alpha</p> |
---|
1362 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1363 | <col class="field-name" /> |
---|
1364 | <col class="field-body" /> |
---|
1365 | <tbody valign="top"> |
---|
1366 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1367 | <li><strong>ins</strong> (<em>dict</em>) – instrument parameters with at least ‘alpha’ |
---|
1368 | as values only</li> |
---|
1369 | <li><strong>dsp</strong> (<em>float</em>) – d-spacing of peak</li> |
---|
1370 | </ul> |
---|
1371 | </td> |
---|
1372 | </tr> |
---|
1373 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">flaot getTOFalpha: peak alpha</p> |
---|
1374 | </td> |
---|
1375 | </tr> |
---|
1376 | </tbody> |
---|
1377 | </table> |
---|
1378 | </dd></dl> |
---|
1379 | |
---|
1380 | <dl class="function"> |
---|
1381 | <dt id="GSASIImath.getTOFalphaDeriv"> |
---|
1382 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getTOFalphaDeriv</tt><big>(</big><em>dsp</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getTOFalphaDeriv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getTOFalphaDeriv" title="Permalink to this definition">¶</a></dt> |
---|
1383 | <dd><p>get derivatives of TOF peak profile beta wrt alpha</p> |
---|
1384 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1385 | <col class="field-name" /> |
---|
1386 | <col class="field-body" /> |
---|
1387 | <tbody valign="top"> |
---|
1388 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>dsp</strong> (<em>float</em>) – d-spacing of peak</td> |
---|
1389 | </tr> |
---|
1390 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">float getTOFalphaDeriv: d(alp)/d(alpha)</td> |
---|
1391 | </tr> |
---|
1392 | </tbody> |
---|
1393 | </table> |
---|
1394 | </dd></dl> |
---|
1395 | |
---|
1396 | <dl class="function"> |
---|
1397 | <dt id="GSASIImath.getTOFbeta"> |
---|
1398 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getTOFbeta</tt><big>(</big><em>ins</em>, <em>dsp</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getTOFbeta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getTOFbeta" title="Permalink to this definition">¶</a></dt> |
---|
1399 | <dd><p>get TOF peak profile beta</p> |
---|
1400 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1401 | <col class="field-name" /> |
---|
1402 | <col class="field-body" /> |
---|
1403 | <tbody valign="top"> |
---|
1404 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1405 | <li><strong>ins</strong> (<em>dict</em>) – instrument parameters with at least ‘beat-0’, ‘beta-1’ & ‘beta-q’ |
---|
1406 | as values only</li> |
---|
1407 | <li><strong>dsp</strong> (<em>float</em>) – d-spacing of peak</li> |
---|
1408 | </ul> |
---|
1409 | </td> |
---|
1410 | </tr> |
---|
1411 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">float getTOFbeta: peak beat</p> |
---|
1412 | </td> |
---|
1413 | </tr> |
---|
1414 | </tbody> |
---|
1415 | </table> |
---|
1416 | </dd></dl> |
---|
1417 | |
---|
1418 | <dl class="function"> |
---|
1419 | <dt id="GSASIImath.getTOFbetaDeriv"> |
---|
1420 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getTOFbetaDeriv</tt><big>(</big><em>dsp</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getTOFbetaDeriv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getTOFbetaDeriv" title="Permalink to this definition">¶</a></dt> |
---|
1421 | <dd><p>get derivatives of TOF peak profile beta wrt beta-0, beta-1, & beat-q</p> |
---|
1422 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1423 | <col class="field-name" /> |
---|
1424 | <col class="field-body" /> |
---|
1425 | <tbody valign="top"> |
---|
1426 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>dsp</strong> (<em>float</em>) – d-spacing of peak</td> |
---|
1427 | </tr> |
---|
1428 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list getTOFbetaDeriv: d(beta)/d(beat-0), d(beta)/d(beta-1) & d(beta)/d(beta-q)</td> |
---|
1429 | </tr> |
---|
1430 | </tbody> |
---|
1431 | </table> |
---|
1432 | </dd></dl> |
---|
1433 | |
---|
1434 | <dl class="function"> |
---|
1435 | <dt id="GSASIImath.getTOFgamma"> |
---|
1436 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getTOFgamma</tt><big>(</big><em>ins</em>, <em>dsp</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getTOFgamma"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getTOFgamma" title="Permalink to this definition">¶</a></dt> |
---|
1437 | <dd><p>get TOF peak profile gamma</p> |
---|
1438 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1439 | <col class="field-name" /> |
---|
1440 | <col class="field-body" /> |
---|
1441 | <tbody valign="top"> |
---|
1442 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1443 | <li><strong>ins</strong> (<em>dict</em>) – instrument parameters with at least ‘X’ & ‘Y’ |
---|
1444 | as values only</li> |
---|
1445 | <li><strong>dsp</strong> (<em>float</em>) – d-spacing of peak</li> |
---|
1446 | </ul> |
---|
1447 | </td> |
---|
1448 | </tr> |
---|
1449 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">float getTOFgamma: peak gamma</p> |
---|
1450 | </td> |
---|
1451 | </tr> |
---|
1452 | </tbody> |
---|
1453 | </table> |
---|
1454 | </dd></dl> |
---|
1455 | |
---|
1456 | <dl class="function"> |
---|
1457 | <dt id="GSASIImath.getTOFgammaDeriv"> |
---|
1458 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getTOFgammaDeriv</tt><big>(</big><em>dsp</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getTOFgammaDeriv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getTOFgammaDeriv" title="Permalink to this definition">¶</a></dt> |
---|
1459 | <dd><p>get derivatives of TOF peak profile gamma wrt X & Y</p> |
---|
1460 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1461 | <col class="field-name" /> |
---|
1462 | <col class="field-body" /> |
---|
1463 | <tbody valign="top"> |
---|
1464 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>dsp</strong> (<em>float</em>) – d-spacing of peak</td> |
---|
1465 | </tr> |
---|
1466 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list getTOFgammaDeriv: d(gam)/dX & d(gam)/dY</td> |
---|
1467 | </tr> |
---|
1468 | </tbody> |
---|
1469 | </table> |
---|
1470 | </dd></dl> |
---|
1471 | |
---|
1472 | <dl class="function"> |
---|
1473 | <dt id="GSASIImath.getTOFsig"> |
---|
1474 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getTOFsig</tt><big>(</big><em>ins</em>, <em>dsp</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getTOFsig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getTOFsig" title="Permalink to this definition">¶</a></dt> |
---|
1475 | <dd><p>get TOF peak profile sigma</p> |
---|
1476 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1477 | <col class="field-name" /> |
---|
1478 | <col class="field-body" /> |
---|
1479 | <tbody valign="top"> |
---|
1480 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1481 | <li><strong>ins</strong> (<em>dict</em>) – instrument parameters with at least ‘sig-0’, ‘sig-1’ & ‘sig-q’ |
---|
1482 | as values only</li> |
---|
1483 | <li><strong>dsp</strong> (<em>float</em>) – d-spacing of peak</li> |
---|
1484 | </ul> |
---|
1485 | </td> |
---|
1486 | </tr> |
---|
1487 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">float getTOFsig: peak sigma</p> |
---|
1488 | </td> |
---|
1489 | </tr> |
---|
1490 | </tbody> |
---|
1491 | </table> |
---|
1492 | </dd></dl> |
---|
1493 | |
---|
1494 | <dl class="function"> |
---|
1495 | <dt id="GSASIImath.getTOFsigDeriv"> |
---|
1496 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getTOFsigDeriv</tt><big>(</big><em>dsp</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getTOFsigDeriv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getTOFsigDeriv" title="Permalink to this definition">¶</a></dt> |
---|
1497 | <dd><p>get derivatives of TOF peak profile gamma wrt sig-0, sig-1, & sig-q</p> |
---|
1498 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1499 | <col class="field-name" /> |
---|
1500 | <col class="field-body" /> |
---|
1501 | <tbody valign="top"> |
---|
1502 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>dsp</strong> (<em>float</em>) – d-spacing of peak</td> |
---|
1503 | </tr> |
---|
1504 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list getTOFsigDeriv: d(sig0/d(sig-0), d(sig)/d(sig-1) & d(sig)/d(sig-q)</td> |
---|
1505 | </tr> |
---|
1506 | </tbody> |
---|
1507 | </table> |
---|
1508 | </dd></dl> |
---|
1509 | |
---|
1510 | <dl class="function"> |
---|
1511 | <dt id="GSASIImath.getTorsionDeriv"> |
---|
1512 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getTorsionDeriv</tt><big>(</big><em>XYZ</em>, <em>Amat</em>, <em>Coeff</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getTorsionDeriv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getTorsionDeriv" title="Permalink to this definition">¶</a></dt> |
---|
1513 | <dd><p>default doc string</p> |
---|
1514 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1515 | <col class="field-name" /> |
---|
1516 | <col class="field-body" /> |
---|
1517 | <tbody valign="top"> |
---|
1518 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1519 | </tr> |
---|
1520 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1521 | </tr> |
---|
1522 | </tbody> |
---|
1523 | </table> |
---|
1524 | </dd></dl> |
---|
1525 | |
---|
1526 | <dl class="function"> |
---|
1527 | <dt id="GSASIImath.getVCov"> |
---|
1528 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getVCov</tt><big>(</big><em>varyNames</em>, <em>varyList</em>, <em>covMatrix</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getVCov"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getVCov" title="Permalink to this definition">¶</a></dt> |
---|
1529 | <dd><p>obtain variance-covariance terms for a set of variables. NB: the varyList |
---|
1530 | and covMatrix were saved by the last least squares refinement so they must match.</p> |
---|
1531 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1532 | <col class="field-name" /> |
---|
1533 | <col class="field-body" /> |
---|
1534 | <tbody valign="top"> |
---|
1535 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1536 | <li><strong>varyNames</strong> (<em>list</em>) – variable names to find v-cov matric for</li> |
---|
1537 | <li><strong>varyList</strong> (<em>list</em>) – full list of all variables in v-cov matrix</li> |
---|
1538 | <li><strong>covMatrix</strong> (<em>nparray</em>) – full variance-covariance matrix from the last |
---|
1539 | least squares refinement</li> |
---|
1540 | </ul> |
---|
1541 | </td> |
---|
1542 | </tr> |
---|
1543 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">nparray vcov: variance-covariance matrix for the variables given |
---|
1544 | in varyNames</p> |
---|
1545 | </td> |
---|
1546 | </tr> |
---|
1547 | </tbody> |
---|
1548 | </table> |
---|
1549 | </dd></dl> |
---|
1550 | |
---|
1551 | <dl class="function"> |
---|
1552 | <dt id="GSASIImath.getWave"> |
---|
1553 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">getWave</tt><big>(</big><em>Parms</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#getWave"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.getWave" title="Permalink to this definition">¶</a></dt> |
---|
1554 | <dd><p>returns wavelength from Instrument parameters dictionary</p> |
---|
1555 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1556 | <col class="field-name" /> |
---|
1557 | <col class="field-body" /> |
---|
1558 | <tbody valign="top"> |
---|
1559 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>Parms</strong> (<em>dict</em>) – Instrument parameters; |
---|
1560 | must contain: |
---|
1561 | Lam: single wavelength |
---|
1562 | or |
---|
1563 | Lam1: Ka1 radiation wavelength</td> |
---|
1564 | </tr> |
---|
1565 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">float wave: wavelength</td> |
---|
1566 | </tr> |
---|
1567 | </tbody> |
---|
1568 | </table> |
---|
1569 | </dd></dl> |
---|
1570 | |
---|
1571 | <dl class="function"> |
---|
1572 | <dt id="GSASIImath.invQ"> |
---|
1573 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">invQ</tt><big>(</big><em>Q</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#invQ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.invQ" title="Permalink to this definition">¶</a></dt> |
---|
1574 | <dd><p>get inverse of quaternion |
---|
1575 | q=r+ai+bj+ck; q* = r-ai-bj-ck</p> |
---|
1576 | </dd></dl> |
---|
1577 | |
---|
1578 | <dl class="function"> |
---|
1579 | <dt id="GSASIImath.makeQuat"> |
---|
1580 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">makeQuat</tt><big>(</big><em>A</em>, <em>B</em>, <em>C</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#makeQuat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.makeQuat" title="Permalink to this definition">¶</a></dt> |
---|
1581 | <dd><p>Make quaternion from rotation of A vector to B vector about C axis</p> |
---|
1582 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1583 | <col class="field-name" /> |
---|
1584 | <col class="field-body" /> |
---|
1585 | <tbody valign="top"> |
---|
1586 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>A,B,C</strong> (<em>np.array</em>) – Cartesian 3-vectors</td> |
---|
1587 | </tr> |
---|
1588 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">quaternion & rotation angle in radians q=r+ai+bj+ck</td> |
---|
1589 | </tr> |
---|
1590 | </tbody> |
---|
1591 | </table> |
---|
1592 | </dd></dl> |
---|
1593 | |
---|
1594 | <dl class="function"> |
---|
1595 | <dt id="GSASIImath.mcsaSearch"> |
---|
1596 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">mcsaSearch</tt><big>(</big><em>data</em>, <em>RBdata</em>, <em>reflType</em>, <em>reflData</em>, <em>covData</em>, <em>pgbar</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#mcsaSearch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.mcsaSearch" title="Permalink to this definition">¶</a></dt> |
---|
1597 | <dd><p>default doc string</p> |
---|
1598 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1599 | <col class="field-name" /> |
---|
1600 | <col class="field-body" /> |
---|
1601 | <tbody valign="top"> |
---|
1602 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1603 | </tr> |
---|
1604 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1605 | </tr> |
---|
1606 | </tbody> |
---|
1607 | </table> |
---|
1608 | </dd></dl> |
---|
1609 | |
---|
1610 | <dl class="function"> |
---|
1611 | <dt id="GSASIImath.normQ"> |
---|
1612 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">normQ</tt><big>(</big><em>QA</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#normQ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.normQ" title="Permalink to this definition">¶</a></dt> |
---|
1613 | <dd><p>get length of quaternion & normalize it |
---|
1614 | q=r+ai+bj+ck</p> |
---|
1615 | </dd></dl> |
---|
1616 | |
---|
1617 | <dl class="function"> |
---|
1618 | <dt id="GSASIImath.printRho"> |
---|
1619 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">printRho</tt><big>(</big><em>SGLaue</em>, <em>rho</em>, <em>rhoMax</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#printRho"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.printRho" title="Permalink to this definition">¶</a></dt> |
---|
1620 | <dd><p>default doc string</p> |
---|
1621 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1622 | <col class="field-name" /> |
---|
1623 | <col class="field-body" /> |
---|
1624 | <tbody valign="top"> |
---|
1625 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>type</em>) – description</td> |
---|
1626 | </tr> |
---|
1627 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">type name: description</td> |
---|
1628 | </tr> |
---|
1629 | </tbody> |
---|
1630 | </table> |
---|
1631 | </dd></dl> |
---|
1632 | |
---|
1633 | <dl class="function"> |
---|
1634 | <dt id="GSASIImath.prodQQ"> |
---|
1635 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">prodQQ</tt><big>(</big><em>QA</em>, <em>QB</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#prodQQ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.prodQQ" title="Permalink to this definition">¶</a></dt> |
---|
1636 | <dd><p>Grassman quaternion product |
---|
1637 | QA,QB quaternions; q=r+ai+bj+ck</p> |
---|
1638 | </dd></dl> |
---|
1639 | |
---|
1640 | <dl class="function"> |
---|
1641 | <dt id="GSASIImath.prodQVQ"> |
---|
1642 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">prodQVQ</tt><big>(</big><em>Q</em>, <em>V</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#prodQVQ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.prodQVQ" title="Permalink to this definition">¶</a></dt> |
---|
1643 | <dd><p>compute the quaternion vector rotation qvq-1 = v’ |
---|
1644 | q=r+ai+bj+ck</p> |
---|
1645 | </dd></dl> |
---|
1646 | |
---|
1647 | <dl class="function"> |
---|
1648 | <dt id="GSASIImath.randomAVdeg"> |
---|
1649 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">randomAVdeg</tt><big>(</big><em>r0</em>, <em>r1</em>, <em>r2</em>, <em>r3</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#randomAVdeg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.randomAVdeg" title="Permalink to this definition">¶</a></dt> |
---|
1650 | <dd><p>create random angle (deg),vector from 4 random number in range (-1,1)</p> |
---|
1651 | </dd></dl> |
---|
1652 | |
---|
1653 | <dl class="function"> |
---|
1654 | <dt id="GSASIImath.randomQ"> |
---|
1655 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">randomQ</tt><big>(</big><em>r0</em>, <em>r1</em>, <em>r2</em>, <em>r3</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#randomQ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.randomQ" title="Permalink to this definition">¶</a></dt> |
---|
1656 | <dd><p>create random quaternion from 4 random numbers in range (-1,1)</p> |
---|
1657 | </dd></dl> |
---|
1658 | |
---|
1659 | <dl class="function"> |
---|
1660 | <dt id="GSASIImath.setPeakparms"> |
---|
1661 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">setPeakparms</tt><big>(</big><em>Parms</em>, <em>Parms2</em>, <em>pos</em>, <em>mag</em>, <em>ifQ=False</em>, <em>useFit=False</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#setPeakparms"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.setPeakparms" title="Permalink to this definition">¶</a></dt> |
---|
1662 | <dd><p>set starting peak parameters for single peak fits from plot selection or auto selection</p> |
---|
1663 | <table class="docutils field-list" frame="void" rules="none"> |
---|
1664 | <col class="field-name" /> |
---|
1665 | <col class="field-body" /> |
---|
1666 | <tbody valign="top"> |
---|
1667 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
1668 | <li><strong>Parms</strong> (<em>dict</em>) – instrument parameters dictionary</li> |
---|
1669 | <li><strong>Parms2</strong> (<em>dict</em>) – table lookup for TOF profile coefficients</li> |
---|
1670 | <li><strong>pos</strong> (<em>float</em>) – peak position in 2-theta, TOF or Q (ifQ=True)</li> |
---|
1671 | <li><strong>mag</strong> (<em>float</em>) – peak top magnitude from pick</li> |
---|
1672 | <li><strong>ifQ</strong> (<em>bool</em>) – True if pos in Q</li> |
---|
1673 | <li><strong>useFit</strong> (<em>bool</em>) – True if use fitted CW Parms values (not defaults)</li> |
---|
1674 | </ul> |
---|
1675 | </td> |
---|
1676 | </tr> |
---|
1677 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">list XY: peak list entry: |
---|
1678 | for CW: [pos,0,mag,1,sig,0,gam,0] |
---|
1679 | for TOF: [pos,0,mag,1,alp,0,bet,0,sig,0,gam,0] |
---|
1680 | NB: mag refinement set by default, all others off</p> |
---|
1681 | </td> |
---|
1682 | </tr> |
---|
1683 | </tbody> |
---|
1684 | </table> |
---|
1685 | </dd></dl> |
---|
1686 | |
---|
1687 | <dl class="function"> |
---|
1688 | <dt id="GSASIImath.sortArray"> |
---|
1689 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">sortArray</tt><big>(</big><em>data</em>, <em>pos</em>, <em>reverse=False</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#sortArray"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.sortArray" title="Permalink to this definition">¶</a></dt> |
---|
1690 | <dd><p>data is a list of items |
---|
1691 | sort by pos in list; reverse if True</p> |
---|
1692 | </dd></dl> |
---|
1693 | |
---|
1694 | <dl class="function"> |
---|
1695 | <dt id="GSASIImath.wavekE"> |
---|
1696 | <tt class="descclassname">GSASIImath.</tt><tt class="descname">wavekE</tt><big>(</big><em>wavekE</em><big>)</big><a class="reference internal" href="_modules/GSASIImath.html#wavekE"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIImath.wavekE" title="Permalink to this definition">¶</a></dt> |
---|
1697 | <dd><p>Convert wavelength to energy & vise versa</p> |
---|
1698 | <p>:param float waveKe:wavelength in A or energy in kE</p> |
---|
1699 | <p>:returns float waveKe:the other one</p> |
---|
1700 | </dd></dl> |
---|
1701 | |
---|
1702 | </div> |
---|
1703 | |
---|
1704 | |
---|
1705 | </div> |
---|
1706 | </div> |
---|
1707 | </div> |
---|
1708 | <div class="sphinxsidebar"> |
---|
1709 | <div class="sphinxsidebarwrapper"> |
---|
1710 | <p class="logo"><a href="index.html"> |
---|
1711 | <img class="logo" src="_static/G2_html_logo.png" alt="Logo"/> |
---|
1712 | </a></p> |
---|
1713 | <h4>Previous topic</h4> |
---|
1714 | <p class="topless"><a href="GSASIIimage.html" |
---|
1715 | title="previous chapter"><em>GSASIIimage: Image calc module</em></a></p> |
---|
1716 | <h4>Next topic</h4> |
---|
1717 | <p class="topless"><a href="GSASIIindex.html" |
---|
1718 | title="next chapter"><em>GSASIIindex: Cell Indexing Module</em></a></p> |
---|
1719 | <h3>This Page</h3> |
---|
1720 | <ul class="this-page-menu"> |
---|
1721 | <li><a href="_sources/GSASIImath.txt" |
---|
1722 | rel="nofollow">Show Source</a></li> |
---|
1723 | </ul> |
---|
1724 | <div id="searchbox" style="display: none"> |
---|
1725 | <h3>Quick search</h3> |
---|
1726 | <form class="search" action="search.html" method="get"> |
---|
1727 | <input type="text" name="q" /> |
---|
1728 | <input type="submit" value="Go" /> |
---|
1729 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
1730 | <input type="hidden" name="area" value="default" /> |
---|
1731 | </form> |
---|
1732 | <p class="searchtip" style="font-size: 90%"> |
---|
1733 | Enter search terms or a module, class or function name. |
---|
1734 | </p> |
---|
1735 | </div> |
---|
1736 | <script type="text/javascript">$('#searchbox').show(0);</script> |
---|
1737 | </div> |
---|
1738 | </div> |
---|
1739 | <div class="clearer"></div> |
---|
1740 | </div> |
---|
1741 | <div class="related"> |
---|
1742 | <h3>Navigation</h3> |
---|
1743 | <ul> |
---|
1744 | <li class="right" style="margin-right: 10px"> |
---|
1745 | <a href="genindex.html" title="General Index" |
---|
1746 | >index</a></li> |
---|
1747 | <li class="right" > |
---|
1748 | <a href="py-modindex.html" title="Python Module Index" |
---|
1749 | >modules</a> |</li> |
---|
1750 | <li class="right" > |
---|
1751 | <a href="GSASIIindex.html" title="GSASIIindex: Cell Indexing Module" |
---|
1752 | >next</a> |</li> |
---|
1753 | <li class="right" > |
---|
1754 | <a href="GSASIIimage.html" title="GSASIIimage: Image calc module" |
---|
1755 | >previous</a> |</li> |
---|
1756 | <li><a href="index.html">GSAS-II 0.2.0 documentation</a> »</li> |
---|
1757 | </ul> |
---|
1758 | </div> |
---|
1759 | <div class="footer"> |
---|
1760 | © Copyright 2013, Von Dreele and Toby for Argonne National Laboratory. |
---|
1761 | Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2. |
---|
1762 | </div> |
---|
1763 | </body> |
---|
1764 | </html> |
---|