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