source: trunk/sphinxdocs/build/html/GSASIIGUIr.html @ 1514

Last change on this file since 1514 was 1513, checked in by toby, 11 years ago

update and rebuild docs

  • Property svn:mime-type set to text/html
File size: 145.2 KB
Line 
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>GSAS-II GUI Routines &mdash; 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 GUI Submodules" href="GSASIIGUI.html" />
29    <link rel="prev" title="GSAS-II Utility Modules" href="GSASIIutil.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="GSASIIGUI.html" title="GSAS-II GUI Submodules"
43             accesskey="N">next</a> |</li>
44        <li class="right" >
45          <a href="GSASIIutil.html" title="GSAS-II Utility Modules"
46             accesskey="P">previous</a> |</li>
47        <li><a href="index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li> 
48      </ul>
49    </div> 
50
51    <div class="document">
52      <div class="documentwrapper">
53        <div class="bodywrapper">
54          <div class="body">
55           
56  <div class="section" id="module-GSASIIgrid">
57<span id="gsas-ii-gui-routines"></span><h1><em>GSAS-II GUI Routines</em><a class="headerlink" href="#module-GSASIIgrid" title="Permalink to this headline">¶</a></h1>
58<div class="section" id="gsasiigrid-basic-gui-routines">
59<h2><em>GSASIIgrid: Basic GUI routines</em><a class="headerlink" href="#gsasiigrid-basic-gui-routines" title="Permalink to this headline">¶</a></h2>
60<dl class="class">
61<dt id="GSASIIgrid.ASCIIValidator">
62<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">ASCIIValidator</tt><big>(</big><em>result=None</em>, <em>key=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ASCIIValidator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ASCIIValidator" title="Permalink to this definition">¶</a></dt>
63<dd><p>A validator to be used with a TextCtrl to prevent
64entering characters other than ASCII characters.</p>
65<dl class="docutils">
66<dt>The value is checked for validity after every keystroke</dt>
67<dd>If an invalid number is entered, the box is highlighted.
68If the number is valid, it is saved in result[key]</dd>
69</dl>
70<table class="docutils field-list" frame="void" rules="none">
71<col class="field-name" />
72<col class="field-body" />
73<tbody valign="top">
74<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
75<li><strong>result</strong> (<em>dict/list</em>) &#8211; List or dict where value should be placed when valid</li>
76<li><strong>key</strong> (<em>any</em>) &#8211; key to use for result (int for list)</li>
77</ul>
78</td>
79</tr>
80</tbody>
81</table>
82<dl class="method">
83<dt id="GSASIIgrid.ASCIIValidator.Clone">
84<tt class="descname">Clone</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ASCIIValidator.Clone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ASCIIValidator.Clone" title="Permalink to this definition">¶</a></dt>
85<dd><p>Create a copy of the validator, a strange, but required component</p>
86</dd></dl>
87
88<dl class="method">
89<dt id="GSASIIgrid.ASCIIValidator.OnChar">
90<tt class="descname">OnChar</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ASCIIValidator.OnChar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ASCIIValidator.OnChar" title="Permalink to this definition">¶</a></dt>
91<dd><p>Called each type a key is pressed
92ignores keys that are not allowed for int and float types</p>
93</dd></dl>
94
95<dl class="method">
96<dt id="GSASIIgrid.ASCIIValidator.TestValid">
97<tt class="descname">TestValid</tt><big>(</big><em>tc</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ASCIIValidator.TestValid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ASCIIValidator.TestValid" title="Permalink to this definition">¶</a></dt>
98<dd><p>Check if the value is valid by casting the input string
99into ASCII.</p>
100<p>Save it in the dict/list where the initial value was stored</p>
101<table class="docutils field-list" frame="void" rules="none">
102<col class="field-name" />
103<col class="field-body" />
104<tbody valign="top">
105<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>tc</strong> (<em>wx.TextCtrl</em>) &#8211; A reference to the TextCtrl that the validator
106is associated with.</td>
107</tr>
108</tbody>
109</table>
110</dd></dl>
111
112<dl class="method">
113<dt id="GSASIIgrid.ASCIIValidator.TransferFromWindow">
114<tt class="descname">TransferFromWindow</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ASCIIValidator.TransferFromWindow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ASCIIValidator.TransferFromWindow" title="Permalink to this definition">¶</a></dt>
115<dd><p>Needed by validator, strange, but required component</p>
116</dd></dl>
117
118<dl class="method">
119<dt id="GSASIIgrid.ASCIIValidator.TransferToWindow">
120<tt class="descname">TransferToWindow</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ASCIIValidator.TransferToWindow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ASCIIValidator.TransferToWindow" title="Permalink to this definition">¶</a></dt>
121<dd><p>Needed by validator, strange, but required component</p>
122</dd></dl>
123
124</dd></dl>
125
126<dl class="class">
127<dt id="GSASIIgrid.AddHelp">
128<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">AddHelp</tt><big>(</big><em>frame</em>, <em>helpType</em>, <em>helpLbl=None</em>, <em>title=''</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#AddHelp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.AddHelp" title="Permalink to this definition">¶</a></dt>
129<dd><p>For the Mac: creates an entry to the help menu of type
130&#8216;Help on &lt;helpType&gt;&#8217;: where helpType is a reference to an HTML page to
131be opened.</p>
132<p>NOTE: when appending this menu (menu.Append) be sure to set the title to
133&#8216;&amp;Help&#8217; so that wx handles it correctly.</p>
134<dl class="method">
135<dt id="GSASIIgrid.AddHelp.OnHelpById">
136<tt class="descname">OnHelpById</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#AddHelp.OnHelpById"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.AddHelp.OnHelpById" title="Permalink to this definition">¶</a></dt>
137<dd><p>Called when Help on... is pressed in a menu. Brings up
138a web page for documentation.</p>
139</dd></dl>
140
141</dd></dl>
142
143<dl class="function">
144<dt id="GSASIIgrid.CallScrolledMultiEditor">
145<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">CallScrolledMultiEditor</tt><big>(</big><em>parent</em>, <em>dictlst</em>, <em>elemlst</em>, <em>prelbl=</em>, <span class="optional">[</span><span class="optional">]</span><em>postlbl=</em>, <span class="optional">[</span><span class="optional">]</span><em>title='Edit items'</em>, <em>header=''</em>, <em>size=(300</em>, <em>250)</em>, <em>CopyButton=False</em>, <em>**kw</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#CallScrolledMultiEditor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.CallScrolledMultiEditor" title="Permalink to this definition">¶</a></dt>
146<dd><p>Shell routine to call a ScrolledMultiEditor dialog. See
147<a class="reference internal" href="#GSASIIgrid.ScrolledMultiEditor" title="GSASIIgrid.ScrolledMultiEditor"><tt class="xref py py-class docutils literal"><span class="pre">ScrolledMultiEditor</span></tt></a> for parameter definitions.</p>
148<table class="docutils field-list" frame="void" rules="none">
149<col class="field-name" />
150<col class="field-body" />
151<tbody valign="top">
152<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the OK button is pressed; False if the window is closed
153with the system menu or the Cancel button.</td>
154</tr>
155</tbody>
156</table>
157</dd></dl>
158
159<dl class="class">
160<dt id="GSASIIgrid.DataFrame">
161<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">DataFrame</tt><big>(</big><em>parent</em>, <em>frame</em>, <em>data=None</em>, <em>name=None</em>, <em>size=None</em>, <em>pos=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#DataFrame"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.DataFrame" title="Permalink to this definition">¶</a></dt>
162<dd><p>Create the data item window and all the entries in menus used in
163that window. For Linux and windows, the menu entries are created for the
164current data item window, but in the Mac the menu is accessed from all
165windows. This means that a different menu is posted depending on which
166data item is posted. On the Mac, all the menus contain the data tree menu
167items, but additional menus are added specific to the data item.</p>
168<p>Note that while the menus are created here,
169the binding for the menus is done later in various GSASII*GUI modules,
170where the functions to be called are defined.</p>
171<dl class="method">
172<dt id="GSASIIgrid.DataFrame.Bind">
173<tt class="descname">Bind</tt><big>(</big><em>eventtype</em>, <em>handler</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#DataFrame.Bind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.DataFrame.Bind" title="Permalink to this definition">¶</a></dt>
174<dd><p>Override the Bind() function: on the Mac the binding is to
175the main window, so that menus operate with any window on top.
176For other platforms, either wrap calls that will be logged
177or call the default wx.Frame Bind() to bind to the menu item directly.</p>
178<p>Note that bindings can be made to objects by Id or by direct reference to the
179object. As a convention, when bindings are to objects, they are not logged
180but when bindings are by Id, they are logged.</p>
181</dd></dl>
182
183<dl class="method">
184<dt id="GSASIIgrid.DataFrame.PostfillDataMenu">
185<tt class="descname">PostfillDataMenu</tt><big>(</big><em>empty=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#DataFrame.PostfillDataMenu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.DataFrame.PostfillDataMenu" title="Permalink to this definition">¶</a></dt>
186<dd><p>Create the &#8220;standard&#8221; part of data frame menus. Note that on Linux and
187Windows, this is the standard help Menu. On Mac, this menu duplicates the
188tree menu, but adds an extra help command for the data item and a separator.</p>
189</dd></dl>
190
191<dl class="method">
192<dt id="GSASIIgrid.DataFrame.PrefillDataMenu">
193<tt class="descname">PrefillDataMenu</tt><big>(</big><em>menu</em>, <em>helpType</em>, <em>helpLbl=None</em>, <em>empty=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#DataFrame.PrefillDataMenu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.DataFrame.PrefillDataMenu" title="Permalink to this definition">¶</a></dt>
194<dd><p>Create the &#8220;standard&#8221; part of data frame menus. Note that on Linux and
195Windows nothing happens here. On Mac, this menu duplicates the
196tree menu, but adds an extra help command for the data item and a separator.</p>
197</dd></dl>
198
199</dd></dl>
200
201<dl class="class">
202<dt id="GSASIIgrid.DisAglDialog">
203<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">DisAglDialog</tt><big>(</big><em>parent</em>, <em>data</em>, <em>default</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#DisAglDialog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.DisAglDialog" title="Permalink to this definition">¶</a></dt>
204<dd><p>Distance/Angle Controls input dialog. After
205<tt class="xref py py-meth docutils literal"><span class="pre">ShowModal()</span></tt> returns, the results are found in
206dict <tt class="xref py py-attr docutils literal"><span class="pre">self.data</span></tt>, which is accessed using <a class="reference internal" href="#GSASIIgrid.DisAglDialog.GetData" title="GSASIIgrid.DisAglDialog.GetData"><tt class="xref py py-meth docutils literal"><span class="pre">GetData()</span></tt></a>.</p>
207<table class="docutils field-list" frame="void" rules="none">
208<col class="field-name" />
209<col class="field-body" />
210<tbody valign="top">
211<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
212<li><strong>parent</strong> (<em>wx.Frame</em>) &#8211; reference to parent frame (or None)</li>
213<li><strong>data</strong> (<em>dict</em>) &#8211; a dict containing the current
214search ranges or an empty dict, which causes default values
215to be used.
216Will be used to set element <cite>DisAglCtls</cite> in
217<a class="reference internal" href="GSASIIobj.html#phase-table"><em>Phase Tree Item</em></a></li>
218<li><strong>default</strong> (<em>dict</em>) &#8211; A dict containing the default
219search ranges for each element.</li>
220</ul>
221</td>
222</tr>
223</tbody>
224</table>
225<dl class="method">
226<dt id="GSASIIgrid.DisAglDialog.Draw">
227<tt class="descname">Draw</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#DisAglDialog.Draw"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.DisAglDialog.Draw" title="Permalink to this definition">¶</a></dt>
228<dd><p>Creates the contents of the dialog. Normally called
229by <tt class="xref py py-meth docutils literal"><span class="pre">__init__()</span></tt>.</p>
230</dd></dl>
231
232<dl class="method">
233<dt id="GSASIIgrid.DisAglDialog.GetData">
234<tt class="descname">GetData</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#DisAglDialog.GetData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.DisAglDialog.GetData" title="Permalink to this definition">¶</a></dt>
235<dd><p>Returns the values from the dialog</p>
236</dd></dl>
237
238<dl class="method">
239<dt id="GSASIIgrid.DisAglDialog.OnOk">
240<tt class="descname">OnOk</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#DisAglDialog.OnOk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.DisAglDialog.OnOk" title="Permalink to this definition">¶</a></dt>
241<dd><p>Called when the OK button is pressed</p>
242</dd></dl>
243
244<dl class="method">
245<dt id="GSASIIgrid.DisAglDialog.OnReset">
246<tt class="descname">OnReset</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#DisAglDialog.OnReset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.DisAglDialog.OnReset" title="Permalink to this definition">¶</a></dt>
247<dd><p>Called when the Reset button is pressed</p>
248</dd></dl>
249
250</dd></dl>
251
252<dl class="class">
253<dt id="GSASIIgrid.EnumSelector">
254<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">EnumSelector</tt><big>(</big><em>parent</em>, <em>dct</em>, <em>item</em>, <em>choices</em>, <em>values=None</em>, <em>**kw</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#EnumSelector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.EnumSelector" title="Permalink to this definition">¶</a></dt>
255<dd><p>A customized <tt class="xref py py-class docutils literal"><span class="pre">wxpython.ComboBox</span></tt> that selects items from a list
256of choices, but sets a dict (list) entry to the corresponding
257entry from the input list of values.</p>
258<table class="docutils field-list" frame="void" rules="none">
259<col class="field-name" />
260<col class="field-body" />
261<tbody valign="top">
262<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
263<li><strong>parent</strong> (<em>wx.Panel</em>) &#8211; the parent to the <tt class="xref py py-class docutils literal"><span class="pre">ComboBox</span></tt> (usually a
264frame or panel)</li>
265<li><strong>dct</strong> (<em>dict</em>) &#8211; a dict (or list) to contain the value set
266for the <tt class="xref py py-class docutils literal"><span class="pre">ComboBox</span></tt>.</li>
267<li><strong>item</strong> &#8211; the dict key (or list index) where <tt class="docutils literal"><span class="pre">dct[item]</span></tt> will
268be set to the value selected in the <tt class="xref py py-class docutils literal"><span class="pre">ComboBox</span></tt>. Also, dct[item]
269contains the starting value shown in the widget. If the value
270does not match an entry in <tt class="xref py py-data docutils literal"><span class="pre">values</span></tt>, the first value
271in <tt class="xref py py-data docutils literal"><span class="pre">choices</span></tt> is used as the default, but <tt class="docutils literal"><span class="pre">dct[item]</span></tt> is
272not changed.</li>
273<li><strong>choices</strong> (<em>list</em>) &#8211; <p>a list of choices to be displayed to the
274user such as</p>
275<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="s">&quot;default&quot;</span><span class="p">,</span><span class="s">&quot;option 1&quot;</span><span class="p">,</span><span class="s">&quot;option 2&quot;</span><span class="p">,]</span>
276</pre></div>
277</div>
278<p>Note that these options will correspond to the entries in
279<tt class="xref py py-data docutils literal"><span class="pre">values</span></tt> (if specified) item by item.</p>
280</li>
281<li><strong>values</strong> (<em>list</em>) &#8211; <p>a list of values that correspond to
282the options in <tt class="xref py py-data docutils literal"><span class="pre">choices</span></tt>, such as</p>
283<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">]</span>
284</pre></div>
285</div>
286<p>The default for <tt class="xref py py-data docutils literal"><span class="pre">values</span></tt> is to use the same list as
287specified for <tt class="xref py py-data docutils literal"><span class="pre">choices</span></tt>.</p>
288</li>
289<li><strong>(other)</strong> &#8211; additional keyword arguments accepted by
290<tt class="xref py py-class docutils literal"><span class="pre">ComboBox</span></tt> can be specified.</li>
291</ul>
292</td>
293</tr>
294</tbody>
295</table>
296</dd></dl>
297
298<dl class="class">
299<dt id="GSASIIgrid.G2CheckBox">
300<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">G2CheckBox</tt><big>(</big><em>parent</em>, <em>label</em>, <em>loc</em>, <em>key</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2CheckBox"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2CheckBox" title="Permalink to this definition">¶</a></dt>
301<dd><p>A customized version of a CheckBox that automatically initializes
302the control to a supplied list or dict entry and updates that
303entry as the widget is used.</p>
304<table class="docutils field-list" frame="void" rules="none">
305<col class="field-name" />
306<col class="field-body" />
307<tbody valign="top">
308<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
309<li><strong>parent</strong> (<em>wx.Panel</em>) &#8211; name of panel or frame that will be
310the parent to the widget. Can be None.</li>
311<li><strong>label</strong> (<em>str</em>) &#8211; text to put on check button</li>
312<li><strong>loc</strong> (<em>dict/list</em>) &#8211; the dict or list with the initial value to be
313placed in the CheckBox.</li>
314<li><strong>key</strong> (<em>int/str</em>) &#8211; the dict key or the list index for the value to be
315edited by the CheckBox. The <tt class="docutils literal"><span class="pre">loc[key]</span></tt> element must exist.
316The CheckBox will be initialized from this value.
317If the value is anything other that True (or 1), it will be taken as
318False.</li>
319</ul>
320</td>
321</tr>
322</tbody>
323</table>
324</dd></dl>
325
326<dl class="class">
327<dt id="GSASIIgrid.G2ChoiceButton">
328<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">G2ChoiceButton</tt><big>(</big><em>parent</em>, <em>choiceList</em>, <em>indLoc=None</em>, <em>indKey=None</em>, <em>strLoc=None</em>, <em>strKey=None</em>, <em>onChoice=None</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2ChoiceButton"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2ChoiceButton" title="Permalink to this definition">¶</a></dt>
329<dd><p>A customized version of a wx.Choice that automatically initializes
330the control to match a supplied value and saves the choice directly
331into an array or list. Optionally a function can be called each time a
332choice is selected. The widget can be used with an array item that is set to
333to the choice by number (<tt class="docutils literal"><span class="pre">indLoc[indKey]</span></tt>) or by string value
334(<tt class="docutils literal"><span class="pre">strLoc[strKey]</span></tt>) or both. The initial value is taken from <tt class="docutils literal"><span class="pre">indLoc[indKey]</span></tt>
335if not None or <tt class="docutils literal"><span class="pre">strLoc[strKey]</span></tt> if not None.</p>
336<table class="docutils field-list" frame="void" rules="none">
337<col class="field-name" />
338<col class="field-body" />
339<tbody valign="top">
340<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
341<li><strong>parent</strong> (<em>wx.Panel</em>) &#8211; name of panel or frame that will be
342the parent to the widget. Can be None.</li>
343<li><strong>choiceList</strong> (<em>list</em>) &#8211; a list or tuple of choices to offer the user.</li>
344<li><strong>indLoc</strong> (<em>dict/list</em>) &#8211; a dict or list with the initial value to be
345placed in the Choice button. If this is None, this is ignored.</li>
346<li><strong>indKey</strong> (<em>int/str</em>) &#8211; the dict key or the list index for the value to be
347edited by the Choice button. If indLoc is not None then this
348must be specified and the <tt class="docutils literal"><span class="pre">indLoc[indKey]</span></tt> will be set. If the value
349for <tt class="docutils literal"><span class="pre">indLoc[indKey]</span></tt> is not None, it should be an integer in
350range(len(choiceList)). The Choice button will be initialized to the
351choice corresponding to the value in this element if not None.</li>
352<li><strong>strLoc</strong> (<em>dict/list</em>) &#8211; a dict or list with the string value corresponding to
353indLoc/indKey. Default (None) means that this is not used.</li>
354<li><strong>strKey</strong> (<em>int/str</em>) &#8211; the dict key or the list index for the string value
355The <tt class="docutils literal"><span class="pre">strLoc[strKey]</span></tt> element must exist or strLoc must be None (default).</li>
356<li><strong>onChoice</strong> (<em>function</em>) &#8211; name of a function to call when the choice is made.</li>
357</ul>
358</td>
359</tr>
360</tbody>
361</table>
362</dd></dl>
363
364<dl class="class">
365<dt id="GSASIIgrid.G2HtmlWindow">
366<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">G2HtmlWindow</tt><big>(</big><em>parent</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2HtmlWindow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2HtmlWindow" title="Permalink to this definition">¶</a></dt>
367<dd><p>Displays help information in a primitive HTML browser type window</p>
368</dd></dl>
369
370<dl class="class">
371<dt id="GSASIIgrid.G2LoggedButton">
372<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">G2LoggedButton</tt><big>(</big><em>parent</em>, <em>id</em>, <em>label</em>, <em>locationcode</em>, <em>handler</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2LoggedButton"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2LoggedButton" title="Permalink to this definition">¶</a></dt>
373<dd><p>A version of wx.Button that creates logging events. Bindings are saved
374in the object, and are looked up rather than directly set with a bind.
375An index to these buttons is saved as log.ButtonBindingLookup</p>
376<dl class="method">
377<dt id="GSASIIgrid.G2LoggedButton.onPress">
378<tt class="descname">onPress</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2LoggedButton.onPress"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2LoggedButton.onPress" title="Permalink to this definition">¶</a></dt>
379<dd><p>create log event and call handler</p>
380</dd></dl>
381
382</dd></dl>
383
384<dl class="class">
385<dt id="GSASIIgrid.G2MultiChoiceDialog">
386<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">G2MultiChoiceDialog</tt><big>(</big><em>parent</em>, <em>title</em>, <em>header</em>, <em>ChoiceList</em>, <em>toggle=True</em>, <em>monoFont=False</em>, <em>filterBox=True</em>, <em>**kw</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2MultiChoiceDialog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2MultiChoiceDialog" title="Permalink to this definition">¶</a></dt>
387<dd><p>A dialog similar to MultiChoiceDialog except that buttons are
388added to set all choices and to toggle all choices.</p>
389<table class="docutils field-list" frame="void" rules="none">
390<col class="field-name" />
391<col class="field-body" />
392<tbody valign="top">
393<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
394<li><strong>ParentFrame</strong> (<em>wx.Frame</em>) &#8211; reference to parent frame</li>
395<li><strong>title</strong> (<em>str</em>) &#8211; heading above list of choices</li>
396<li><strong>header</strong> (<em>str</em>) &#8211; Title to place on window frame</li>
397<li><strong>ChoiceList</strong> (<em>list</em>) &#8211; a list of choices where one will be selected</li>
398<li><strong>toggle</strong> (<em>bool</em>) &#8211; If True (default) the toggle and select all buttons
399are displayed</li>
400<li><strong>monoFont</strong> (<em>bool</em>) &#8211; If False (default), use a variable-spaced font;
401if True use a equally-spaced font.</li>
402<li><strong>filterBox</strong> (<em>bool</em>) &#8211; If True (default) an input widget is placed on
403the window and only entries matching the entered text are shown.</li>
404<li><strong>kw</strong> &#8211; optional keyword parameters for the wx.Dialog may
405be included such as size [which defaults to <cite>(320,310)</cite>] and
406style (which defaults to <cite>wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.CENTRE| wx.OK | wx.CANCEL</cite>);
407note that <cite>wx.OK</cite> and <cite>wx.CANCEL</cite> controls
408the presence of the eponymous buttons in the dialog.</li>
409</ul>
410</td>
411</tr>
412<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the name of the created dialog</p>
413</td>
414</tr>
415</tbody>
416</table>
417<dl class="method">
418<dt id="GSASIIgrid.G2MultiChoiceDialog.GetSelections">
419<tt class="descname">GetSelections</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2MultiChoiceDialog.GetSelections"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2MultiChoiceDialog.GetSelections" title="Permalink to this definition">¶</a></dt>
420<dd><p>Returns a list of the indices for the selected choices</p>
421</dd></dl>
422
423<dl class="method">
424<dt id="GSASIIgrid.G2MultiChoiceDialog.SetSelections">
425<tt class="descname">SetSelections</tt><big>(</big><em>selList</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2MultiChoiceDialog.SetSelections"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2MultiChoiceDialog.SetSelections" title="Permalink to this definition">¶</a></dt>
426<dd><p>Sets the selection indices in selList as selected. Resets any previous
427selections for compatibility with wx.MultiChoiceDialog. Note that
428the state for only the filtered items is shown.</p>
429<table class="docutils field-list" frame="void" rules="none">
430<col class="field-name" />
431<col class="field-body" />
432<tbody valign="top">
433<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>selList</strong> (<em>list</em>) &#8211; indices of items to be selected. These indices
434are referenced to the order in self.ChoiceList</td>
435</tr>
436</tbody>
437</table>
438</dd></dl>
439
440</dd></dl>
441
442<dl class="class">
443<dt id="GSASIIgrid.G2SingleChoiceDialog">
444<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">G2SingleChoiceDialog</tt><big>(</big><em>parent</em>, <em>title</em>, <em>header</em>, <em>ChoiceList</em>, <em>monoFont=False</em>, <em>filterBox=True</em>, <em>**kw</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2SingleChoiceDialog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2SingleChoiceDialog" title="Permalink to this definition">¶</a></dt>
445<dd><p>A dialog similar to wx.SingleChoiceDialog except that a filter can be
446added.</p>
447<table class="docutils field-list" frame="void" rules="none">
448<col class="field-name" />
449<col class="field-body" />
450<tbody valign="top">
451<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
452<li><strong>ParentFrame</strong> (<em>wx.Frame</em>) &#8211; reference to parent frame</li>
453<li><strong>title</strong> (<em>str</em>) &#8211; heading above list of choices</li>
454<li><strong>header</strong> (<em>str</em>) &#8211; Title to place on window frame</li>
455<li><strong>ChoiceList</strong> (<em>list</em>) &#8211; a list of choices where one will be selected</li>
456<li><strong>monoFont</strong> (<em>bool</em>) &#8211; If False (default), use a variable-spaced font;
457if True use a equally-spaced font.</li>
458<li><strong>filterBox</strong> (<em>bool</em>) &#8211; If True (default) an input widget is placed on
459the window and only entries matching the entered text are shown.</li>
460<li><strong>kw</strong> &#8211; optional keyword parameters for the wx.Dialog may
461be included such as size [which defaults to <cite>(320,310)</cite>] and
462style (which defaults to <tt class="docutils literal"><span class="pre">wx.DEFAULT_DIALOG_STYLE</span> <span class="pre">|</span> <span class="pre">wx.RESIZE_BORDER</span> <span class="pre">|</span> <span class="pre">wx.CENTRE</span> <span class="pre">|</span> <span class="pre">wx.OK</span> <span class="pre">|</span> <span class="pre">wx.CANCEL</span></tt>);
463note that <tt class="docutils literal"><span class="pre">wx.OK</span></tt> and <tt class="docutils literal"><span class="pre">wx.CANCEL</span></tt> controls
464the presence of the eponymous buttons in the dialog.</li>
465</ul>
466</td>
467</tr>
468<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the name of the created dialog</p>
469</td>
470</tr>
471</tbody>
472</table>
473<dl class="method">
474<dt id="GSASIIgrid.G2SingleChoiceDialog.GetSelection">
475<tt class="descname">GetSelection</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2SingleChoiceDialog.GetSelection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2SingleChoiceDialog.GetSelection" title="Permalink to this definition">¶</a></dt>
476<dd><p>Returns the index of the selected choice</p>
477</dd></dl>
478
479</dd></dl>
480
481<dl class="class">
482<dt id="GSASIIgrid.G2TreeCtrl">
483<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">G2TreeCtrl</tt><big>(</big><em>parent=None</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2TreeCtrl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2TreeCtrl" title="Permalink to this definition">¶</a></dt>
484<dd><p>Create a wrapper around the standard TreeCtrl so we can &#8220;wrap&#8221;
485various events.</p>
486<p>This logs when a tree item is selected (in <a class="reference internal" href="#GSASIIgrid.G2TreeCtrl.onSelectionChanged" title="GSASIIgrid.G2TreeCtrl.onSelectionChanged"><tt class="xref py py-meth docutils literal"><span class="pre">onSelectionChanged()</span></tt></a>)</p>
487<p>This also wraps lists and dicts pulled out of the tree to track where
488they were retrieved from.</p>
489<dl class="method">
490<dt id="GSASIIgrid.G2TreeCtrl.Bind">
491<tt class="descname">Bind</tt><big>(</big><em>eventtype</em>, <em>handler</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2TreeCtrl.Bind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2TreeCtrl.Bind" title="Permalink to this definition">¶</a></dt>
492<dd><p>Override the Bind() function so that page change events can be trapped</p>
493</dd></dl>
494
495<dl class="method">
496<dt id="GSASIIgrid.G2TreeCtrl.ConvertRelativeHistNum">
497<tt class="descname">ConvertRelativeHistNum</tt><big>(</big><em>histtype</em>, <em>histnum</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2TreeCtrl.ConvertRelativeHistNum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2TreeCtrl.ConvertRelativeHistNum" title="Permalink to this definition">¶</a></dt>
498<dd><p>Converts a histogram type and relative histogram number to a
499histogram name in the current project</p>
500</dd></dl>
501
502<dl class="method">
503<dt id="GSASIIgrid.G2TreeCtrl.ConvertRelativePhaseNum">
504<tt class="descname">ConvertRelativePhaseNum</tt><big>(</big><em>phasenum</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2TreeCtrl.ConvertRelativePhaseNum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2TreeCtrl.ConvertRelativePhaseNum" title="Permalink to this definition">¶</a></dt>
505<dd><p>Converts relative phase number to a phase name in
506the current project</p>
507</dd></dl>
508
509<dl class="method">
510<dt id="GSASIIgrid.G2TreeCtrl.GetItemPyData">
511<tt class="descname">GetItemPyData</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2TreeCtrl.GetItemPyData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2TreeCtrl.GetItemPyData" title="Permalink to this definition">¶</a></dt>
512<dd><p>Override the standard method to wrap the contents
513so that the source can be tracked</p>
514</dd></dl>
515
516<dl class="method">
517<dt id="GSASIIgrid.G2TreeCtrl.GetRelativeHistNum">
518<tt class="descname">GetRelativeHistNum</tt><big>(</big><em>histname</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2TreeCtrl.GetRelativeHistNum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2TreeCtrl.GetRelativeHistNum" title="Permalink to this definition">¶</a></dt>
519<dd><p>Returns list with a histogram type and a relative number for that
520histogram, or the original string if not a histogram</p>
521</dd></dl>
522
523<dl class="method">
524<dt id="GSASIIgrid.G2TreeCtrl.GetRelativePhaseNum">
525<tt class="descname">GetRelativePhaseNum</tt><big>(</big><em>phasename</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2TreeCtrl.GetRelativePhaseNum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2TreeCtrl.GetRelativePhaseNum" title="Permalink to this definition">¶</a></dt>
526<dd><p>Returns a phase number if the string matches a phase name
527or else returns the original string</p>
528</dd></dl>
529
530<dl class="method">
531<dt id="GSASIIgrid.G2TreeCtrl.onSelectionChanged">
532<tt class="descname">onSelectionChanged</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#G2TreeCtrl.onSelectionChanged"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.G2TreeCtrl.onSelectionChanged" title="Permalink to this definition">¶</a></dt>
533<dd><p>Log each press on a tree item here.</p>
534</dd></dl>
535
536</dd></dl>
537
538<dl class="class">
539<dt id="GSASIIgrid.GSGrid">
540<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">GSGrid</tt><big>(</big><em>parent</em>, <em>name=''</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#GSGrid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.GSGrid" title="Permalink to this definition">¶</a></dt>
541<dd><p>Basic wx.Grid implementation</p>
542<dl class="method">
543<dt id="GSASIIgrid.GSGrid.InstallGridToolTip">
544<tt class="descname">InstallGridToolTip</tt><big>(</big><em>rowcolhintcallback</em>, <em>colLblCallback=None</em>, <em>rowLblCallback=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#GSGrid.InstallGridToolTip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.GSGrid.InstallGridToolTip" title="Permalink to this definition">¶</a></dt>
545<dd><p>code to display a tooltip for each item on a grid
546from <a class="reference external" href="http://wiki.wxpython.org/wxGrid%20ToolTips">http://wiki.wxpython.org/wxGrid%20ToolTips</a> (buggy!), expanded to
547column and row labels using hints from
548<a class="reference external" href="https://groups.google.com/forum/#!topic/wxPython-users/bm8OARRVDCs">https://groups.google.com/forum/#!topic/wxPython-users/bm8OARRVDCs</a></p>
549<table class="docutils field-list" frame="void" rules="none">
550<col class="field-name" />
551<col class="field-body" />
552<tbody valign="top">
553<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
554<li><strong>rowcolhintcallback</strong> (<em>function</em>) &#8211; a routine that returns a text
555string depending on the selected row and column, to be used in
556explaining grid entries.</li>
557<li><strong>colLblCallback</strong> (<em>function</em>) &#8211; a routine that returns a text
558string depending on the selected column, to be used in
559explaining grid columns (if None, the default), column labels
560do not get a tooltip.</li>
561<li><strong>rowLblCallback</strong> (<em>function</em>) &#8211; a routine that returns a text
562string depending on the selected row, to be used in
563explaining grid rows (if None, the default), row labels
564do not get a tooltip.</li>
565</ul>
566</td>
567</tr>
568</tbody>
569</table>
570</dd></dl>
571
572</dd></dl>
573
574<dl class="class">
575<dt id="GSASIIgrid.GSNoteBook">
576<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">GSNoteBook</tt><big>(</big><em>parent</em>, <em>name=''</em>, <em>size=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#GSNoteBook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.GSNoteBook" title="Permalink to this definition">¶</a></dt>
577<dd><p>Notebook used in various locations; implemented with wx.aui extension</p>
578<dl class="method">
579<dt id="GSASIIgrid.GSNoteBook.Bind">
580<tt class="descname">Bind</tt><big>(</big><em>eventtype</em>, <em>handler</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#GSNoteBook.Bind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.GSNoteBook.Bind" title="Permalink to this definition">¶</a></dt>
581<dd><p>Override the Bind() function so that page change events can be trapped</p>
582</dd></dl>
583
584</dd></dl>
585
586<dl class="function">
587<dt id="GSASIIgrid.GetPatternTreeDataNames">
588<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">GetPatternTreeDataNames</tt><big>(</big><em>G2frame</em>, <em>dataTypes</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#GetPatternTreeDataNames"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.GetPatternTreeDataNames" title="Permalink to this definition">¶</a></dt>
589<dd><p>Needs a doc string</p>
590</dd></dl>
591
592<dl class="function">
593<dt id="GSASIIgrid.GetPatternTreeItemId">
594<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">GetPatternTreeItemId</tt><big>(</big><em>G2frame</em>, <em>parentId</em>, <em>itemText</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#GetPatternTreeItemId"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.GetPatternTreeItemId" title="Permalink to this definition">¶</a></dt>
595<dd><p>Needs a doc string</p>
596</dd></dl>
597
598<dl class="class">
599<dt id="GSASIIgrid.GridFractionEditor">
600<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">GridFractionEditor</tt><big>(</big><em>grid</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#GridFractionEditor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.GridFractionEditor" title="Permalink to this definition">¶</a></dt>
601<dd><p>A grid cell editor class that allows entry of values as fractions as well
602as sine and cosine values [as s() and c()]</p>
603</dd></dl>
604
605<dl class="class">
606<dt id="GSASIIgrid.HelpButton">
607<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">HelpButton</tt><big>(</big><em>parent</em>, <em>msg</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#HelpButton"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.HelpButton" title="Permalink to this definition">¶</a></dt>
608<dd><p>Create a help button that displays help information.
609The text is displayed in a modal message window.</p>
610<p>TODO: it might be nice if it were non-modal: e.g. it stays around until
611the parent is deleted or the user closes it, but this did not work for
612me.</p>
613<table class="docutils field-list" frame="void" rules="none">
614<col class="field-name" />
615<col class="field-body" />
616<tbody valign="top">
617<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
618<li><strong>parent</strong> &#8211; the panel which will be the parent of the button</li>
619<li><strong>msg</strong> (<em>str</em>) &#8211; the help text to be displayed</li>
620</ul>
621</td>
622</tr>
623</tbody>
624</table>
625</dd></dl>
626
627<dl class="function">
628<dt id="GSASIIgrid.HorizontalLine">
629<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">HorizontalLine</tt><big>(</big><em>sizer</em>, <em>parent</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#HorizontalLine"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.HorizontalLine" title="Permalink to this definition">¶</a></dt>
630<dd><p>Draws a horizontal line as wide as the window.
631This shows up on the Mac as a very thin line, no matter what I do</p>
632</dd></dl>
633
634<dl class="function">
635<dt id="GSASIIgrid.HowDidIgetHere">
636<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">HowDidIgetHere</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#HowDidIgetHere"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.HowDidIgetHere" title="Permalink to this definition">¶</a></dt>
637<dd><p>Show a traceback with calls that brought us to the current location.
638Used for debugging.</p>
639</dd></dl>
640
641<dl class="function">
642<dt id="GSASIIgrid.ItemSelector">
643<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">ItemSelector</tt><big>(</big><em>ChoiceList</em>, <em>ParentFrame=None</em>, <em>title='Select an item'</em>, <em>size=None</em>, <em>header='Item Selector'</em>, <em>useCancel=True</em>, <em>multiple=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ItemSelector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ItemSelector" title="Permalink to this definition">¶</a></dt>
644<dd><p>Provide a wx dialog to select a single item or multiple items from list of choices</p>
645<table class="docutils field-list" frame="void" rules="none">
646<col class="field-name" />
647<col class="field-body" />
648<tbody valign="top">
649<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
650<li><strong>ChoiceList</strong> (<em>list</em>) &#8211; a list of choices where one will be selected</li>
651<li><strong>ParentFrame</strong> (<em>wx.Frame</em>) &#8211; Name of parent frame (default None)</li>
652<li><strong>title</strong> (<em>str</em>) &#8211; heading above list of choices (default &#8216;Select an item&#8217;)</li>
653<li><strong>size</strong> (<em>wx.Size</em>) &#8211; Size for dialog to be created (default None &#8211; size as needed)</li>
654<li><strong>header</strong> (<em>str</em>) &#8211; Title to place on window frame (default &#8216;Item Selector&#8217;)</li>
655<li><strong>useCancel</strong> (<em>bool</em>) &#8211; If True (default) both the OK and Cancel buttons are offered</li>
656<li><strong>multiple</strong> (<em>bool</em>) &#8211; If True then multiple items can be selected (default False)</li>
657</ul>
658</td>
659</tr>
660<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the selection index or None or a selection list if multiple is true</p>
661</td>
662</tr>
663</tbody>
664</table>
665</dd></dl>
666
667<dl class="function">
668<dt id="GSASIIgrid.MovePatternTreeToGrid">
669<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">MovePatternTreeToGrid</tt><big>(</big><em>G2frame</em>, <em>item</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#MovePatternTreeToGrid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.MovePatternTreeToGrid" title="Permalink to this definition">¶</a></dt>
670<dd><p>Called from GSASII.OnPatternTreeSelChanged when a item is selected on the tree</p>
671</dd></dl>
672
673<dl class="class">
674<dt id="GSASIIgrid.MultiStringDialog">
675<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">MultiStringDialog</tt><big>(</big><em>parent</em>, <em>title</em>, <em>prompts</em>, <em>values=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#MultiStringDialog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.MultiStringDialog" title="Permalink to this definition">¶</a></dt>
676<dd><p>Dialog to obtain a multi string values from user</p>
677<table class="docutils field-list" frame="void" rules="none">
678<col class="field-name" />
679<col class="field-body" />
680<tbody valign="top">
681<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
682<li><strong>parent</strong> (<em>wx.Frame</em>) &#8211; name of parent frame</li>
683<li><strong>title</strong> (<em>str</em>) &#8211; title string for dialog</li>
684<li><strong>prompts</strong> (<em>str</em>) &#8211; strings to tell use what they are inputting</li>
685<li><strong>values</strong> (<em>str</em>) &#8211; default input values, if any</li>
686</ul>
687</td>
688</tr>
689</tbody>
690</table>
691<dl class="method">
692<dt id="GSASIIgrid.MultiStringDialog.GetValues">
693<tt class="descname">GetValues</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#MultiStringDialog.GetValues"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.MultiStringDialog.GetValues" title="Permalink to this definition">¶</a></dt>
694<dd><p>Use this method to get the value entered by the user
695:returns: string entered by user</p>
696</dd></dl>
697
698<dl class="method">
699<dt id="GSASIIgrid.MultiStringDialog.Show">
700<tt class="descname">Show</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#MultiStringDialog.Show"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.MultiStringDialog.Show" title="Permalink to this definition">¶</a></dt>
701<dd><p>Use this method after creating the dialog to post it
702:returns: True if the user pressed OK; False if the User pressed Cancel</p>
703</dd></dl>
704
705</dd></dl>
706
707<dl class="class">
708<dt id="GSASIIgrid.MyHelp">
709<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">MyHelp</tt><big>(</big><em>frame</em>, <em>helpType=None</em>, <em>helpLbl=None</em>, <em>morehelpitems=</em>, <span class="optional">[</span><span class="optional">]</span><em>title=''</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#MyHelp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.MyHelp" title="Permalink to this definition">¶</a></dt>
710<dd><p>A class that creates the contents of a help menu.
711The menu will start with two entries:</p>
712<ul class="simple">
713<li>&#8216;Help on &lt;helpType&gt;&#8217;: where helpType is a reference to an HTML page to
714be opened</li>
715<li>About: opens an About dialog using OnHelpAbout. N.B. on the Mac this
716gets moved to the App menu to be consistent with Apple style.</li>
717</ul>
718<p>NOTE: for this to work properly with respect to system menus, the title
719for the menu must be &amp;Help, or it will not be processed properly:</p>
720<div class="highlight-python"><div class="highlight"><pre><span class="n">menu</span><span class="o">.</span><span class="n">Append</span><span class="p">(</span><span class="n">menu</span><span class="o">=</span><span class="n">MyHelp</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="o">...</span><span class="p">),</span><span class="n">title</span><span class="o">=</span><span class="s">&quot;&amp;Help&quot;</span><span class="p">)</span>
721</pre></div>
722</div>
723<dl class="method">
724<dt id="GSASIIgrid.MyHelp.OnCheckUpdates">
725<tt class="descname">OnCheckUpdates</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#MyHelp.OnCheckUpdates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.MyHelp.OnCheckUpdates" title="Permalink to this definition">¶</a></dt>
726<dd><p>Check if the GSAS-II repository has an update for the current source files
727and perform that update if requested.</p>
728</dd></dl>
729
730<dl class="method">
731<dt id="GSASIIgrid.MyHelp.OnHelpAbout">
732<tt class="descname">OnHelpAbout</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#MyHelp.OnHelpAbout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.MyHelp.OnHelpAbout" title="Permalink to this definition">¶</a></dt>
733<dd><p>Display an &#8216;About GSAS-II&#8217; box</p>
734</dd></dl>
735
736<dl class="method">
737<dt id="GSASIIgrid.MyHelp.OnHelpById">
738<tt class="descname">OnHelpById</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#MyHelp.OnHelpById"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.MyHelp.OnHelpById" title="Permalink to this definition">¶</a></dt>
739<dd><p>Called when Help on... is pressed in a menu. Brings up
740a web page for documentation.</p>
741</dd></dl>
742
743<dl class="method">
744<dt id="GSASIIgrid.MyHelp.OnSelectVersion">
745<tt class="descname">OnSelectVersion</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#MyHelp.OnSelectVersion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.MyHelp.OnSelectVersion" title="Permalink to this definition">¶</a></dt>
746<dd><p>Allow the user to select a specific version of GSAS-II</p>
747</dd></dl>
748
749</dd></dl>
750
751<dl class="class">
752<dt id="GSASIIgrid.MyHtmlPanel">
753<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">MyHtmlPanel</tt><big>(</big><em>frame</em>, <em>id</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#MyHtmlPanel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.MyHtmlPanel" title="Permalink to this definition">¶</a></dt>
754<dd><p>Defines a panel to display HTML help information, as an alternative to
755displaying help information in a web browser.</p>
756</dd></dl>
757
758<dl class="class">
759<dt id="GSASIIgrid.NumberValidator">
760<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">NumberValidator</tt><big>(</big><em>typ</em>, <em>positiveonly=False</em>, <em>min=None</em>, <em>max=None</em>, <em>result=None</em>, <em>key=None</em>, <em>OKcontrol=None</em>, <em>CIFinput=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#NumberValidator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.NumberValidator" title="Permalink to this definition">¶</a></dt>
761<dd><p>A validator to be used with a TextCtrl to prevent
762entering characters other than digits, signs, and for float
763input, a period and exponents.</p>
764<dl class="docutils">
765<dt>The value is checked for validity after every keystroke</dt>
766<dd>If an invalid number is entered, the box is highlighted.
767If the number is valid, it is saved in result[key]</dd>
768</dl>
769<table class="docutils field-list" frame="void" rules="none">
770<col class="field-name" />
771<col class="field-body" />
772<tbody valign="top">
773<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
774<li><strong>typ</strong> (<em>type</em>) &#8211; the base data type. Must be int or float.</li>
775<li><strong>positiveonly</strong> (<em>bool</em>) &#8211; If True, negative integers are not allowed
776(default False). This prevents the + or - keys from being pressed.
777Used with typ=int; ignored for typ=float.</li>
778<li><strong>min</strong> (<em>number</em>) &#8211; Minimum allowed value. If None (default) the
779lower limit is unbounded</li>
780<li><strong>max</strong> (<em>number</em>) &#8211; Maximum allowed value. If None (default) the
781upper limit is unbounded</li>
782<li><strong>result</strong> (<em>dict/list</em>) &#8211; List or dict where value should be placed when valid</li>
783<li><strong>key</strong> (<em>any</em>) &#8211; key to use for result (int for list)</li>
784<li><strong>OKcontrol</strong> (<em>function</em>) &#8211; function or class method to control
785an OK button for a window.
786Ignored if None (default)</li>
787<li><strong>CIFinput</strong> (<em>bool</em>) &#8211; allows use of a single &#8216;?&#8217; or &#8216;.&#8217; character
788as valid input.</li>
789</ul>
790</td>
791</tr>
792</tbody>
793</table>
794<dl class="method">
795<dt id="GSASIIgrid.NumberValidator.CheckInput">
796<tt class="descname">CheckInput</tt><big>(</big><em>previousInvalid</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#NumberValidator.CheckInput"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.NumberValidator.CheckInput" title="Permalink to this definition">¶</a></dt>
797<dd><p>called to test every change to the TextCtrl for validity and
798to change the appearance of the TextCtrl</p>
799<p>Anytime the input is invalid, call self.OKcontrol
800(if defined) because it is fast.
801If valid, check for any other invalid entries only when
802changing from invalid to valid, since that is slower.</p>
803<table class="docutils field-list" frame="void" rules="none">
804<col class="field-name" />
805<col class="field-body" />
806<tbody valign="top">
807<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>previousInvalid</strong> (<em>bool</em>) &#8211; True if the TextCtrl contents were
808invalid prior to the current change.</td>
809</tr>
810</tbody>
811</table>
812</dd></dl>
813
814<dl class="method">
815<dt id="GSASIIgrid.NumberValidator.Clone">
816<tt class="descname">Clone</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#NumberValidator.Clone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.NumberValidator.Clone" title="Permalink to this definition">¶</a></dt>
817<dd><p>Create a copy of the validator, a strange, but required component</p>
818</dd></dl>
819
820<dl class="method">
821<dt id="GSASIIgrid.NumberValidator.OnChar">
822<tt class="descname">OnChar</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#NumberValidator.OnChar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.NumberValidator.OnChar" title="Permalink to this definition">¶</a></dt>
823<dd><p>Called each type a key is pressed
824ignores keys that are not allowed for int and float types</p>
825</dd></dl>
826
827<dl class="method">
828<dt id="GSASIIgrid.NumberValidator.ShowValidity">
829<tt class="descname">ShowValidity</tt><big>(</big><em>tc</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#NumberValidator.ShowValidity"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.NumberValidator.ShowValidity" title="Permalink to this definition">¶</a></dt>
830<dd><p>Set the control colors to show invalid input</p>
831<table class="docutils field-list" frame="void" rules="none">
832<col class="field-name" />
833<col class="field-body" />
834<tbody valign="top">
835<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>tc</strong> (<em>wx.TextCtrl</em>) &#8211; A reference to the TextCtrl that the validator
836is associated with.</td>
837</tr>
838</tbody>
839</table>
840</dd></dl>
841
842<dl class="method">
843<dt id="GSASIIgrid.NumberValidator.TestValid">
844<tt class="descname">TestValid</tt><big>(</big><em>tc</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#NumberValidator.TestValid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.NumberValidator.TestValid" title="Permalink to this definition">¶</a></dt>
845<dd><p>Check if the value is valid by casting the input string
846into the current type.</p>
847<p>Set the invalid variable in the TextCtrl object accordingly.</p>
848<p>If the value is valid, save it in the dict/list where
849the initial value was stored, if appropriate.</p>
850<table class="docutils field-list" frame="void" rules="none">
851<col class="field-name" />
852<col class="field-body" />
853<tbody valign="top">
854<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>tc</strong> (<em>wx.TextCtrl</em>) &#8211; A reference to the TextCtrl that the validator
855is associated with.</td>
856</tr>
857</tbody>
858</table>
859</dd></dl>
860
861<dl class="method">
862<dt id="GSASIIgrid.NumberValidator.TransferFromWindow">
863<tt class="descname">TransferFromWindow</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#NumberValidator.TransferFromWindow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.NumberValidator.TransferFromWindow" title="Permalink to this definition">¶</a></dt>
864<dd><p>Needed by validator, strange, but required component</p>
865</dd></dl>
866
867<dl class="method">
868<dt id="GSASIIgrid.NumberValidator.TransferToWindow">
869<tt class="descname">TransferToWindow</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#NumberValidator.TransferToWindow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.NumberValidator.TransferToWindow" title="Permalink to this definition">¶</a></dt>
870<dd><p>Needed by validator, strange, but required component</p>
871</dd></dl>
872
873</dd></dl>
874
875<dl class="class">
876<dt id="GSASIIgrid.PickTwoDialog">
877<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">PickTwoDialog</tt><big>(</big><em>parent</em>, <em>title</em>, <em>prompt</em>, <em>names</em>, <em>choices</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#PickTwoDialog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.PickTwoDialog" title="Permalink to this definition">¶</a></dt>
878<dd><p>This does not seem to be in use</p>
879</dd></dl>
880
881<dl class="class">
882<dt id="GSASIIgrid.ScrolledMultiEditor">
883<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">ScrolledMultiEditor</tt><big>(</big><em>parent</em>, <em>dictlst</em>, <em>elemlst</em>, <em>prelbl=</em>, <span class="optional">[</span><span class="optional">]</span><em>postlbl=</em>, <span class="optional">[</span><span class="optional">]</span><em>title='Edit items'</em>, <em>header=''</em>, <em>size=(300</em>, <em>250)</em>, <em>CopyButton=False</em>, <em>minvals=</em>, <span class="optional">[</span><span class="optional">]</span><em>maxvals=</em>, <span class="optional">[</span><span class="optional">]</span><em>sizevals=</em>, <span class="optional">[</span><span class="optional">]</span><em>checkdictlst=</em>, <span class="optional">[</span><span class="optional">]</span><em>checkelemlst=</em>, <span class="optional">[</span><span class="optional">]</span><em>checklabel=''</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ScrolledMultiEditor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ScrolledMultiEditor" title="Permalink to this definition">¶</a></dt>
884<dd><p>Define a window for editing a potentially large number of dict- or
885list-contained values with validation for each item. Edited values are
886automatically placed in their source location. If invalid entries
887are provided, the TextCtrl is turned yellow and the OK button is disabled.</p>
888<p>The type for each TextCtrl validation is determined by the
889initial value of the entry (int, float or string).
890Float values can be entered in the TextCtrl as numbers or also
891as algebraic expressions using operators + - / * () and **,
892in addition pi, sind(), cosd(), tand(), and sqrt() can be used,
893as well as appreviations s(), sin(), c(), cos(), t(), tan() and sq().</p>
894<table class="docutils field-list" frame="void" rules="none">
895<col class="field-name" />
896<col class="field-body" />
897<tbody valign="top">
898<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
899<li><strong>parent</strong> (<em>wx.Frame</em>) &#8211; name of parent window, or may be None</li>
900<li><strong>dictlst</strong> (<em>tuple</em>) &#8211; a list of dicts or lists containing values to edit</li>
901<li><strong>elemlst</strong> (<em>tuple</em>) &#8211; a list of keys for each item in a dictlst. Must have the
902same length as dictlst.</li>
903<li><strong>parent</strong> &#8211; name of parent window, or may be None</li>
904<li><strong>prelbl</strong> (<em>tuple</em>) &#8211; a list of labels placed before the TextCtrl for each
905item (optional)</li>
906<li><strong>postlbl</strong> (<em>tuple</em>) &#8211; a list of labels placed after the TextCtrl for each
907item (optional)</li>
908<li><strong>title</strong> (<em>str</em>) &#8211; a title to place in the frame of the dialog</li>
909<li><strong>header</strong> (<em>str</em>) &#8211; text to place at the top of the window. May contain
910new line characters.</li>
911<li><strong>size</strong> (<em>wx.Size</em>) &#8211; a size parameter that dictates the
912size for the scrolled region of the dialog. The default is
913(300,250).</li>
914<li><strong>CopyButton</strong> (<em>bool</em>) &#8211; if True adds a small button that copies the
915value for the current row to all fields below (default is False)</li>
916<li><strong>minvals</strong> (<em>list</em>) &#8211; optional list of minimum values for validation
917of float or int values. Ignored if value is None.</li>
918<li><strong>maxvals</strong> (<em>list</em>) &#8211; optional list of maximum values for validation
919of float or int values. Ignored if value is None.</li>
920<li><strong>sizevals</strong> (<em>list</em>) &#8211; optional list of wx.Size values for each input
921widget. Ignored if value is None.</li>
922<li><strong>checkdictlst</strong> (<em>tuple</em>) &#8211; an optional list of dicts or lists containing bool
923values (similar to dictlst).</li>
924<li><strong>checkelemlst</strong> (<em>tuple</em>) &#8211; an optional list of dicts or lists containing bool
925key values (similar to elemlst). Must be used with checkdictlst.</li>
926<li><strong>checklabel</strong> (<em>string</em>) &#8211; a string to use for each checkbutton</li>
927</ul>
928</td>
929</tr>
930<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the wx.Dialog created here. Use method .ShowModal() to display it.</p>
931</td>
932</tr>
933</tbody>
934</table>
935<p><em>Example for use of ScrolledMultiEditor:</em></p>
936<div class="highlight-python"><div class="highlight"><pre>dlg = &lt;pkg&gt;.ScrolledMultiEditor(frame,dictlst,elemlst,prelbl,postlbl,
937                                header=header)
938if dlg.ShowModal() == wx.ID_OK:
939     for d,k in zip(dictlst,elemlst):
940         print d[k]
941</pre></div>
942</div>
943<p><em>Example definitions for dictlst and elemlst:</em></p>
944<div class="highlight-python"><div class="highlight"><pre>    dictlst = (dict1,list1,dict1,list1)
945    elemlst = (&#39;a&#39;, 1, 2, 3)
946
947This causes items dict1[&#39;a&#39;], list1[1], dict1[2] and list1[3] to be edited.
948</pre></div>
949</div>
950<p>Note that these items must have int, float or str values assigned to
951them. The dialog will force these types to be retained. String values
952that are blank are marked as invalid.</p>
953<dl class="method">
954<dt id="GSASIIgrid.ScrolledMultiEditor.ControlOKButton">
955<tt class="descname">ControlOKButton</tt><big>(</big><em>setvalue</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ScrolledMultiEditor.ControlOKButton"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ScrolledMultiEditor.ControlOKButton" title="Permalink to this definition">¶</a></dt>
956<dd><p>Enable or Disable the OK button for the dialog. Note that this is
957passed into the ValidatedTxtCtrl for use by validators.</p>
958<table class="docutils field-list" frame="void" rules="none">
959<col class="field-name" />
960<col class="field-body" />
961<tbody valign="top">
962<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>setvalue</strong> (<em>bool</em>) &#8211; if True, all entries in the dialog are
963checked for validity. if False then the OK button is disabled.</td>
964</tr>
965</tbody>
966</table>
967</dd></dl>
968
969</dd></dl>
970
971<dl class="function">
972<dt id="GSASIIgrid.SelectEdit1Var">
973<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">SelectEdit1Var</tt><big>(</big><em>G2frame</em>, <em>array</em>, <em>labelLst</em>, <em>elemKeysLst</em>, <em>dspLst</em>, <em>refFlgElem</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#SelectEdit1Var"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.SelectEdit1Var" title="Permalink to this definition">¶</a></dt>
974<dd><p>Select a variable from a list, then edit it and select histograms
975to copy it to.</p>
976<table class="docutils field-list" frame="void" rules="none">
977<col class="field-name" />
978<col class="field-body" />
979<tbody valign="top">
980<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
981<li><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; main GSAS-II frame</li>
982<li><strong>array</strong> (<em>dict</em>) &#8211; the array (dict or list) where values to be edited are kept</li>
983<li><strong>labelLst</strong> (<em>list</em>) &#8211; labels for each data item</li>
984<li><strong>elemKeysLst</strong> (<em>list</em>) &#8211; a list of lists of keys needed to be applied (see below)
985to obtain the value of each parameter</li>
986<li><strong>dspLst</strong> (<em>list</em>) &#8211; list list of digits to be displayed (10,4) is 10 digits
987with 4 decimal places. Can be None.</li>
988<li><strong>refFlgElem</strong> (<em>list</em>) &#8211; a list of lists of keys needed to be applied (see below)
989to obtain the refine flag for each parameter or None if the parameter
990does not have refine flag.</li>
991</ul>
992</td>
993</tr>
994</tbody>
995</table>
996<dl class="docutils">
997<dt>Example::</dt>
998<dd><blockquote class="first">
999<div>array = data
1000labelLst = [&#8216;v1&#8217;,&#8217;v2&#8217;]
1001elemKeysLst = [[&#8216;v1&#8217;], [&#8216;v2&#8217;,0]]
1002refFlgElem = [None, [&#8216;v2&#8217;,1]]</div></blockquote>
1003<ul class="last simple">
1004<li>The value for v1 will be in data[&#8216;v1&#8217;] and this cannot be refined while,</li>
1005<li>The value for v2 will be in data[&#8216;v2&#8217;][0] and its refinement flag is data[&#8216;v2&#8217;][1]</li>
1006</ul>
1007</dd>
1008</dl>
1009</dd></dl>
1010
1011<dl class="function">
1012<dt id="GSASIIgrid.SetDataMenuBar">
1013<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">SetDataMenuBar</tt><big>(</big><em>G2frame</em>, <em>menu=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#SetDataMenuBar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.SetDataMenuBar" title="Permalink to this definition">¶</a></dt>
1014<dd><p>Set the menu for the data frame. On the Mac put this
1015menu for the data tree window instead.</p>
1016<p>Note that data frame items do not have menus, for these (menu=None)
1017display a blank menu or on the Mac display the standard menu for
1018the data tree window.</p>
1019</dd></dl>
1020
1021<dl class="function">
1022<dt id="GSASIIgrid.ShowHelp">
1023<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">ShowHelp</tt><big>(</big><em>helpType</em>, <em>frame</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ShowHelp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ShowHelp" title="Permalink to this definition">¶</a></dt>
1024<dd><p>Called to bring up a web page for documentation.</p>
1025</dd></dl>
1026
1027<dl class="class">
1028<dt id="GSASIIgrid.ShowLSParms">
1029<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">ShowLSParms</tt><big>(</big><em>parent</em>, <em>title</em>, <em>parmDict</em>, <em>varyList</em>, <em>fullVaryList</em>, <em>size=(300</em>, <em>430)</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ShowLSParms"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ShowLSParms" title="Permalink to this definition">¶</a></dt>
1030<dd><p>Create frame to show least-squares parameters</p>
1031</dd></dl>
1032
1033<dl class="class">
1034<dt id="GSASIIgrid.SingleFloatDialog">
1035<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">SingleFloatDialog</tt><big>(</big><em>parent, title, prompt, value, limits=[0.0, 1.0], format='%.5g'</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#SingleFloatDialog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.SingleFloatDialog" title="Permalink to this definition">¶</a></dt>
1036<dd><p>Dialog to obtain a single float value from user</p>
1037</dd></dl>
1038
1039<dl class="class">
1040<dt id="GSASIIgrid.SingleStringDialog">
1041<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">SingleStringDialog</tt><big>(</big><em>parent</em>, <em>title</em>, <em>prompt</em>, <em>value=''</em>, <em>size=(200</em>, <em>-1)</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#SingleStringDialog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.SingleStringDialog" title="Permalink to this definition">¶</a></dt>
1042<dd><p>Dialog to obtain a single string value from user</p>
1043<table class="docutils field-list" frame="void" rules="none">
1044<col class="field-name" />
1045<col class="field-body" />
1046<tbody valign="top">
1047<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1048<li><strong>parent</strong> (<em>wx.Frame</em>) &#8211; name of parent frame</li>
1049<li><strong>title</strong> (<em>str</em>) &#8211; title string for dialog</li>
1050<li><strong>prompt</strong> (<em>str</em>) &#8211; string to tell use what they are inputting</li>
1051<li><strong>value</strong> (<em>str</em>) &#8211; default input value, if any</li>
1052</ul>
1053</td>
1054</tr>
1055</tbody>
1056</table>
1057<dl class="method">
1058<dt id="GSASIIgrid.SingleStringDialog.GetValue">
1059<tt class="descname">GetValue</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#SingleStringDialog.GetValue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.SingleStringDialog.GetValue" title="Permalink to this definition">¶</a></dt>
1060<dd><p>Use this method to get the value entered by the user
1061:returns: string entered by user</p>
1062</dd></dl>
1063
1064<dl class="method">
1065<dt id="GSASIIgrid.SingleStringDialog.Show">
1066<tt class="descname">Show</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#SingleStringDialog.Show"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.SingleStringDialog.Show" title="Permalink to this definition">¶</a></dt>
1067<dd><p>Use this method after creating the dialog to post it
1068:returns: True if the user pressed OK; False if the User pressed Cancel</p>
1069</dd></dl>
1070
1071</dd></dl>
1072
1073<dl class="class">
1074<dt id="GSASIIgrid.SymOpDialog">
1075<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">SymOpDialog</tt><big>(</big><em>parent</em>, <em>SGData</em>, <em>New=True</em>, <em>ForceUnit=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#SymOpDialog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.SymOpDialog" title="Permalink to this definition">¶</a></dt>
1076<dd><p>Class to select a symmetry operator</p>
1077</dd></dl>
1078
1079<dl class="class">
1080<dt id="GSASIIgrid.Table">
1081<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">Table</tt><big>(</big><em>data=</em>, <span class="optional">[</span><span class="optional">]</span><em>rowLabels=None</em>, <em>colLabels=None</em>, <em>types=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#Table"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.Table" title="Permalink to this definition">¶</a></dt>
1082<dd><p>Basic data table for use with GSgrid</p>
1083</dd></dl>
1084
1085<dl class="function">
1086<dt id="GSASIIgrid.UpdateControls">
1087<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">UpdateControls</tt><big>(</big><em>G2frame</em>, <em>data</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#UpdateControls"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.UpdateControls" title="Permalink to this definition">¶</a></dt>
1088<dd><p>Edit overall GSAS-II controls in main Controls data tree entry</p>
1089</dd></dl>
1090
1091<dl class="function">
1092<dt id="GSASIIgrid.UpdateNotebook">
1093<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">UpdateNotebook</tt><big>(</big><em>G2frame</em>, <em>data</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#UpdateNotebook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.UpdateNotebook" title="Permalink to this definition">¶</a></dt>
1094<dd><p>Called when the data tree notebook entry is selected. Allows for
1095editing of the text in that tree entry</p>
1096</dd></dl>
1097
1098<dl class="function">
1099<dt id="GSASIIgrid.UpdatePWHKPlot">
1100<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">UpdatePWHKPlot</tt><big>(</big><em>G2frame</em>, <em>kind</em>, <em>item</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#UpdatePWHKPlot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.UpdatePWHKPlot" title="Permalink to this definition">¶</a></dt>
1101<dd><p>Called when the histogram main tree entry is called. Displays the
1102histogram weight factor, refinement statistics for the histogram
1103and the range of data for a simulation.</p>
1104<p>Also invokes a plot of the histogram.</p>
1105</dd></dl>
1106
1107<dl class="function">
1108<dt id="GSASIIgrid.UpdateSeqResults">
1109<tt class="descclassname">GSASIIgrid.</tt><tt class="descname">UpdateSeqResults</tt><big>(</big><em>G2frame</em>, <em>data</em>, <em>prevSize=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#UpdateSeqResults"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.UpdateSeqResults" title="Permalink to this definition">¶</a></dt>
1110<dd><p>Called when the Sequential Results data tree entry is selected
1111to show results from a sequential refinement.</p>
1112<table class="docutils field-list" frame="void" rules="none">
1113<col class="field-name" />
1114<col class="field-body" />
1115<tbody valign="top">
1116<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1117<li><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; main GSAS-II data tree windows</li>
1118<li><strong>data</strong> (<em>dict</em>) &#8211; <p>a dictionary containing the following items:</p>
1119<ul>
1120<li>&#8216;histNames&#8217; - list of histogram names in order as processed by Sequential Refinement</li>
1121<li>&#8216;varyList&#8217; - list of variables - identical over all refinements in sequence
1122note that this is the original list of variables, prior to processing
1123constraints.</li>
1124<li>&#8216;variableLabels&#8217; &#8211; a dict of labels to be applied to each parameter
1125(this is created as an empty dict if not present in data).</li>
1126<li>keyed by histName - dictionaries for all data sets processed, which contains:<ul>
1127<li>&#8216;variables&#8217;- result[0] from leastsq call</li>
1128<li>&#8216;varyList&#8217; - list of variables passed to leastsq call (not same as above)</li>
1129<li>&#8216;sig&#8217; - esds for variables</li>
1130<li>&#8216;covMatrix&#8217; - covariance matrix from individual refinement</li>
1131<li>&#8216;title&#8217; - histogram name; same as dict item name</li>
1132<li>&#8216;newAtomDict&#8217; - new atom parameters after shifts applied</li>
1133<li>&#8216;newCellDict&#8217; - refined cell parameters after shifts to A0-A5 from Dij terms applied&#8217;</li>
1134</ul>
1135</li>
1136</ul>
1137</li>
1138</ul>
1139</td>
1140</tr>
1141</tbody>
1142</table>
1143</dd></dl>
1144
1145<dl class="class">
1146<dt id="GSASIIgrid.ValidatedTxtCtrl">
1147<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">ValidatedTxtCtrl</tt><big>(</big><em>parent</em>, <em>loc</em>, <em>key</em>, <em>nDig=None</em>, <em>notBlank=True</em>, <em>min=None</em>, <em>max=None</em>, <em>OKcontrol=None</em>, <em>OnLeave=None</em>, <em>typeHint=None</em>, <em>CIFinput=False</em>, <em>OnLeaveArgs={}</em>, <em>**kw</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ValidatedTxtCtrl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ValidatedTxtCtrl" title="Permalink to this definition">¶</a></dt>
1148<dd><p>Create a TextCtrl widget that uses a validator to prevent the
1149entry of inappropriate characters and changes color to highlight
1150when invalid input is supplied. As valid values are typed,
1151they are placed into the dict or list where the initial value
1152came from. The type of the initial value must be int,
1153float or str or None (see <tt class="xref py py-obj docutils literal"><span class="pre">key</span></tt> and <tt class="xref py py-obj docutils literal"><span class="pre">typeHint</span></tt>);
1154this type (or the one in <tt class="xref py py-obj docutils literal"><span class="pre">typeHint</span></tt>) is preserved.</p>
1155<p>Float values can be entered in the TextCtrl as numbers or also
1156as algebraic expressions using operators + - / * () and **,
1157in addition pi, sind(), cosd(), tand(), and sqrt() can be used,
1158as well as appreviations s, sin, c, cos, t, tan and sq.</p>
1159<table class="docutils field-list" frame="void" rules="none">
1160<col class="field-name" />
1161<col class="field-body" />
1162<tbody valign="top">
1163<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1164<li><strong>parent</strong> (<em>wx.Panel</em>) &#8211; name of panel or frame that will be
1165the parent to the TextCtrl. Can be None.</li>
1166<li><strong>loc</strong> (<em>dict/list</em>) &#8211; the dict or list with the initial value to be
1167placed in the TextCtrl.</li>
1168<li><strong>key</strong> (<em>int/str</em>) &#8211; the dict key or the list index for the value to be
1169edited by the TextCtrl. The <tt class="docutils literal"><span class="pre">loc[key]</span></tt> element must exist, but may
1170have value None. If None, the type for the element is taken from
1171<tt class="xref py py-obj docutils literal"><span class="pre">typeHint</span></tt> and the value for the control is set initially
1172blank (and thus invalid.) This is a way to specify a field without a
1173default value: a user must set a valid value.
1174If the value is not None, it must have a base
1175type of int, float, str or unicode; the TextCrtl will be initialized
1176from this value.</li>
1177<li><strong>nDig</strong> (<em>list</em>) &#8211; number of digits &amp; places ([nDig,nPlc]) after decimal to use
1178for display of float. Alternately, None can be specified which causes
1179numbers to be displayed with approximately 5 significant figures
1180(Default=None).</li>
1181<li><strong>notBlank</strong> (<em>bool</em>) &#8211; if True (default) blank values are invalid
1182for str inputs.</li>
1183<li><strong>min</strong> (<em>number</em>) &#8211; minimum allowed valid value. If None (default) the
1184lower limit is unbounded.</li>
1185<li><strong>max</strong> (<em>number</em>) &#8211; maximum allowed valid value. If None (default) the
1186upper limit is unbounded</li>
1187<li><strong>OKcontrol</strong> (<em>function</em>) &#8211; specifies a function or method that will be
1188called when the input is validated. The called function is supplied
1189with one argument which is False if the TextCtrl contains an invalid
1190value and True if the value is valid.
1191Note that this function should check all values
1192in the dialog when True, since other entries might be invalid.
1193The default for this is None, which indicates no function should
1194be called.</li>
1195<li><strong>OnLeave</strong> (<em>function</em>) &#8211; <p>specifies a function or method that will be
1196called when the focus for the control is lost.
1197The called function is supplied with (at present) three keyword arguments:</p>
1198<blockquote>
1199<div><ul>
1200<li>invalid: (<em>bool</em>) True if the value for the TextCtrl is invalid</li>
1201<li>value:   (<em>int/float/str</em>)  the value contained in the TextCtrl</li>
1202<li>tc:      (<em>wx.TextCtrl</em>)  the TextCtrl name</li>
1203</ul>
1204</div></blockquote>
1205<p>The number of keyword arguments may be increased in the future should needs arise,
1206so it is best to code these functions with a **kwargs argument so they will
1207continue to run without errors</p>
1208<p>The default for OnLeave is None, which indicates no function should
1209be called.</p>
1210</li>
1211<li><strong>typeHint</strong> (<em>type</em>) &#8211; the value of typeHint is overrides the initial value
1212for the dict/list element <tt class="docutils literal"><span class="pre">loc[key]</span></tt>, if set to
1213int or float, which specifies the type for input to the TextCtrl.
1214Defaults as None, which is ignored.</li>
1215<li><strong>CIFinput</strong> (<em>bool</em>) &#8211; for str input, indicates that only printable
1216ASCII characters may be entered into the TextCtrl. Forces output
1217to be ASCII rather than Unicode. For float and int input, allows
1218use of a single &#8216;?&#8217; or &#8216;.&#8217; character as valid input.</li>
1219<li><strong>OnLeaveArgs</strong> (<em>dict</em>) &#8211; a dict with keyword args that are passed to
1220the <tt class="xref py py-attr docutils literal"><span class="pre">OnLeave</span></tt> function. Defaults to <tt class="docutils literal"><span class="pre">{}</span></tt></li>
1221<li><strong>(other)</strong> &#8211; other optional keyword parameters for the
1222wx.TextCtrl widget such as size or style may be specified.</li>
1223</ul>
1224</td>
1225</tr>
1226</tbody>
1227</table>
1228<dl class="method">
1229<dt id="GSASIIgrid.ValidatedTxtCtrl.EvaluateExpression">
1230<tt class="descname">EvaluateExpression</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ValidatedTxtCtrl.EvaluateExpression"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ValidatedTxtCtrl.EvaluateExpression" title="Permalink to this definition">¶</a></dt>
1231<dd><p>Show the computed value when an expression is entered to the TextCtrl
1232Make sure that the number fits by truncating decimal places and switching
1233to scientific notation, as needed.
1234Called on loss of focus, enter, etc..</p>
1235</dd></dl>
1236
1237<dl class="method">
1238<dt id="GSASIIgrid.ValidatedTxtCtrl.OnKeyDown">
1239<tt class="descname">OnKeyDown</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ValidatedTxtCtrl.OnKeyDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ValidatedTxtCtrl.OnKeyDown" title="Permalink to this definition">¶</a></dt>
1240<dd><p>Special callback for wx 2.9+ on Mac where backspace is not processed by validator</p>
1241</dd></dl>
1242
1243<dl class="method">
1244<dt id="GSASIIgrid.ValidatedTxtCtrl.ShowStringValidity">
1245<tt class="descname">ShowStringValidity</tt><big>(</big><em>previousInvalid=True</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#ValidatedTxtCtrl.ShowStringValidity"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.ValidatedTxtCtrl.ShowStringValidity" title="Permalink to this definition">¶</a></dt>
1246<dd><p>Check if input is valid. Anytime the input is
1247invalid, call self.OKcontrol (if defined) because it is fast.
1248If valid, check for any other invalid entries only when
1249changing from invalid to valid, since that is slower.</p>
1250<table class="docutils field-list" frame="void" rules="none">
1251<col class="field-name" />
1252<col class="field-body" />
1253<tbody valign="top">
1254<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>previousInvalid</strong> (<em>bool</em>) &#8211; True if the TextCtrl contents were
1255invalid prior to the current change.</td>
1256</tr>
1257</tbody>
1258</table>
1259</dd></dl>
1260
1261</dd></dl>
1262
1263<dl class="class">
1264<dt id="GSASIIgrid.downdate">
1265<em class="property">class </em><tt class="descclassname">GSASIIgrid.</tt><tt class="descname">downdate</tt><big>(</big><em>parent=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#downdate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.downdate" title="Permalink to this definition">¶</a></dt>
1266<dd><p>Dialog to allow a user to select a version of GSAS-II to install</p>
1267<dl class="method">
1268<dt id="GSASIIgrid.downdate.getVersion">
1269<tt class="descname">getVersion</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIgrid.html#downdate.getVersion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIgrid.downdate.getVersion" title="Permalink to this definition">¶</a></dt>
1270<dd><p>Get the version number in the dialog</p>
1271</dd></dl>
1272
1273</dd></dl>
1274
1275</div>
1276<span class="target" id="module-GSASIIIO"></span><div class="section" id="gsasiiio-misc-i-o-routines">
1277<h2><em>GSASIIIO: Misc I/O routines</em><a class="headerlink" href="#gsasiiio-misc-i-o-routines" title="Permalink to this headline">¶</a></h2>
1278<p>Module with miscellaneous routines for input and output. Many
1279are GUI routines to interact with user.</p>
1280<p>Includes support for image reading.</p>
1281<p>Also includes base classes for data import routines.</p>
1282<dl class="function">
1283<dt id="GSASIIIO.CheckImageFile">
1284<tt class="descclassname">GSASIIIO.</tt><tt class="descname">CheckImageFile</tt><big>(</big><em>G2frame</em>, <em>imagefile</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#CheckImageFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.CheckImageFile" title="Permalink to this definition">¶</a></dt>
1285<dd><p>Get an new image file name if the specified one does not
1286exist</p>
1287<table class="docutils field-list" frame="void" rules="none">
1288<col class="field-name" />
1289<col class="field-body" />
1290<tbody valign="top">
1291<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1292<li><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; main GSAS-II Frame and data object</li>
1293<li><strong>imagefile</strong> (<em>str</em>) &#8211; name of image file</li>
1294</ul>
1295</td>
1296</tr>
1297<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">imagefile, if it exists, or the name of a file
1298that does exist or False if the user presses Cancel</p>
1299</td>
1300</tr>
1301</tbody>
1302</table>
1303</dd></dl>
1304
1305<dl class="class">
1306<dt id="GSASIIIO.ExportBaseclass">
1307<em class="property">class </em><tt class="descclassname">GSASIIIO.</tt><tt class="descname">ExportBaseclass</tt><big>(</big><em>G2frame</em>, <em>formatName</em>, <em>extension</em>, <em>longFormatName=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass" title="Permalink to this definition">¶</a></dt>
1308<dd><p>Defines a base class for the exporting of GSAS-II results.</p>
1309<p>This class is subclassed in the various exports/G2export_*.py files. Those files
1310are imported in <tt class="xref py py-meth docutils literal"><span class="pre">GSASII.GSASII._init_Exports()</span></tt> which defines the
1311appropriate menu items for each one and the .Exporter method is called
1312directly from the menu item.</p>
1313<dl class="method">
1314<dt id="GSASIIIO.ExportBaseclass.CloseFile">
1315<tt class="descname">CloseFile</tt><big>(</big><em>fp=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.CloseFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.CloseFile" title="Permalink to this definition">¶</a></dt>
1316<dd><p>Close a file opened in OpenFile</p>
1317<table class="docutils field-list" frame="void" rules="none">
1318<col class="field-name" />
1319<col class="field-body" />
1320<tbody valign="top">
1321<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fp</strong> (<em>file</em>) &#8211; the file object to be closed. If None (default)
1322file object self.fp is closed.</td>
1323</tr>
1324</tbody>
1325</table>
1326</dd></dl>
1327
1328<dl class="method">
1329<dt id="GSASIIIO.ExportBaseclass.ExportSelect">
1330<tt class="descname">ExportSelect</tt><big>(</big><em>AskFile='ask'</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.ExportSelect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.ExportSelect" title="Permalink to this definition">¶</a></dt>
1331<dd><p>Selects histograms or phases when needed. Sets a default file name when
1332requested in self.filename; always sets a default directory in self.dirname.</p>
1333<table class="docutils field-list" frame="void" rules="none">
1334<col class="field-name" />
1335<col class="field-body" />
1336<tbody valign="top">
1337<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>AskFile</strong> (<em>bool</em>) &#8211; <p>Determines how this routine processes getting a
1338location to store the current export(s).</p>
1339<ul class="simple">
1340<li>if AskFile is &#8216;ask&#8217; (default option), get the name of the file to be written;
1341self.filename and self.dirname are always set. In the case where
1342multiple files must be generated, the export routine should do this
1343based on self.filename as a template.</li>
1344<li>if AskFile is &#8216;dir&#8217;, get the name of the directory to be used;
1345self.filename is not used, but self.dirname is always set. The export routine
1346will always generate the file name.</li>
1347<li>if AskFile is &#8216;single&#8217;, get only the name of the directory to be used when
1348multiple items will be written (as multiple files) are used
1349<em>or</em> a complete file name is requested when a single file
1350name is selected. self.dirname is always set and self.filename used
1351only when a single file is selected.</li>
1352<li>if AskFile is &#8216;default&#8217;, creates a name of the file to be used from
1353the name of the project (.gpx) file. If the project has not been saved,
1354then the name of file is requested.
1355self.filename and self.dirname are always set. In the case where
1356multiple file names must be generated, the export routine should do this
1357based on self.filename.</li>
1358<li>if AskFile is &#8216;default-dir&#8217;, sets self.dirname from the project (.gpx)
1359file. If the project has not been saved, then a directory is requested.
1360self.filename is not used.</li>
1361</ul>
1362</td>
1363</tr>
1364<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True in case of an error</td>
1365</tr>
1366</tbody>
1367</table>
1368</dd></dl>
1369
1370<dl class="method">
1371<dt id="GSASIIIO.ExportBaseclass.GetAtoms">
1372<tt class="descname">GetAtoms</tt><big>(</big><em>phasenam</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.GetAtoms"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.GetAtoms" title="Permalink to this definition">¶</a></dt>
1373<dd><p>Gets the atoms associated with a phase. Can be used with standard
1374or macromolecular phases</p>
1375<table class="docutils field-list" frame="void" rules="none">
1376<col class="field-name" />
1377<col class="field-body" />
1378<tbody valign="top">
1379<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>phasenam</strong> (<em>str</em>) &#8211; the name for the selected phase</td>
1380</tr>
1381<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a list of items for eac atom where each item is a list containing:
1382label, typ, mult, xyz, and td, where<ul class="simple">
1383<li>label and typ are the atom label and the scattering factor type (str)</li>
1384<li>mult is the site multiplicity (int)</li>
1385<li>xyz is contains a list with four pairs of numbers:
1386x, y, z and fractional occupancy and
1387their standard uncertainty (or a negative value)</li>
1388<li>td is contains a list with either one or six pairs of numbers:
1389if one number it is U<sub>iso</sub> and with six numbers it is
1390U<sub>11</sub>, U<sub>22</sub>, U<sub>33</sub>, U<sub>12</sub>, U<sub>13</sub> &amp; U<sub>23</sub>
1391paired with their standard uncertainty (or a negative value)</li>
1392</ul>
1393</td>
1394</tr>
1395</tbody>
1396</table>
1397</dd></dl>
1398
1399<dl class="method">
1400<dt id="GSASIIIO.ExportBaseclass.GetCell">
1401<tt class="descname">GetCell</tt><big>(</big><em>phasenam</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.GetCell"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.GetCell" title="Permalink to this definition">¶</a></dt>
1402<dd><p>Gets the unit cell parameters and their s.u.&#8217;s for a selected phase</p>
1403<table class="docutils field-list" frame="void" rules="none">
1404<col class="field-name" />
1405<col class="field-body" />
1406<tbody valign="top">
1407<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>phasenam</strong> (<em>str</em>) &#8211; the name for the selected phase</td>
1408</tr>
1409<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><cite>cellList,cellSig</cite> where each is a 7 element list corresponding
1410to a, b, c, alpha, beta, gamma, volume where <cite>cellList</cite> has the
1411cell values and <cite>cellSig</cite> has their uncertainties.</td>
1412</tr>
1413</tbody>
1414</table>
1415</dd></dl>
1416
1417<dl class="method">
1418<dt id="GSASIIIO.ExportBaseclass.InitExport">
1419<tt class="descname">InitExport</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.InitExport"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.InitExport" title="Permalink to this definition">¶</a></dt>
1420<dd><p>Determines the type of menu that called the Exporter and
1421misc initialization.</p>
1422</dd></dl>
1423
1424<dl class="method">
1425<dt id="GSASIIIO.ExportBaseclass.MakePWDRfilename">
1426<tt class="descname">MakePWDRfilename</tt><big>(</big><em>hist</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.MakePWDRfilename"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.MakePWDRfilename" title="Permalink to this definition">¶</a></dt>
1427<dd><p>Make a filename root (no extension) from a PWDR histogram name</p>
1428<table class="docutils field-list" frame="void" rules="none">
1429<col class="field-name" />
1430<col class="field-body" />
1431<tbody valign="top">
1432<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>hist</strong> (<em>str</em>) &#8211; the histogram name in data tree (starts with &#8220;PWDR &#8221;)</td>
1433</tr>
1434</tbody>
1435</table>
1436</dd></dl>
1437
1438<dl class="method">
1439<dt id="GSASIIIO.ExportBaseclass.OpenFile">
1440<tt class="descname">OpenFile</tt><big>(</big><em>fil=None</em>, <em>mode='w'</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.OpenFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.OpenFile" title="Permalink to this definition">¶</a></dt>
1441<dd><p>Open the output file</p>
1442<table class="docutils field-list" frame="void" rules="none">
1443<col class="field-name" />
1444<col class="field-body" />
1445<tbody valign="top">
1446<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fil</strong> (<em>str</em>) &#8211; The name of the file to open. If None (default)
1447the name defaults to self.dirname + self.filename.
1448If an extension is supplied, it is not overridded,
1449but if not, the default extension is used.</td>
1450</tr>
1451<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the file object opened by the routine which is also
1452saved as self.fp</td>
1453</tr>
1454</tbody>
1455</table>
1456</dd></dl>
1457
1458<dl class="method">
1459<dt id="GSASIIIO.ExportBaseclass.Write">
1460<tt class="descname">Write</tt><big>(</big><em>line</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.Write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.Write" title="Permalink to this definition">¶</a></dt>
1461<dd><p>write a line of output, attaching a line-end character</p>
1462<table class="docutils field-list" frame="void" rules="none">
1463<col class="field-name" />
1464<col class="field-body" />
1465<tbody valign="top">
1466<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>line</strong> (<em>str</em>) &#8211; the text to be written.</td>
1467</tr>
1468</tbody>
1469</table>
1470</dd></dl>
1471
1472<dl class="method">
1473<dt id="GSASIIIO.ExportBaseclass.askSaveDirectory">
1474<tt class="descname">askSaveDirectory</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.askSaveDirectory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.askSaveDirectory" title="Permalink to this definition">¶</a></dt>
1475<dd><p>Ask the user to supply a directory name. Path name is used as the
1476starting point for the next export path search.</p>
1477<table class="docutils field-list" frame="void" rules="none">
1478<col class="field-name" />
1479<col class="field-body" />
1480<tbody valign="top">
1481<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a directory name (str) or None if Cancel is pressed</td>
1482</tr>
1483</tbody>
1484</table>
1485</dd></dl>
1486
1487<dl class="method">
1488<dt id="GSASIIIO.ExportBaseclass.askSaveFile">
1489<tt class="descname">askSaveFile</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.askSaveFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.askSaveFile" title="Permalink to this definition">¶</a></dt>
1490<dd><p>Ask the user to supply a file name</p>
1491<table class="docutils field-list" frame="void" rules="none">
1492<col class="field-name" />
1493<col class="field-body" />
1494<tbody valign="top">
1495<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a file name (str) or None if Cancel is pressed</td>
1496</tr>
1497</tbody>
1498</table>
1499</dd></dl>
1500
1501<dl class="method">
1502<dt id="GSASIIIO.ExportBaseclass.dumpTree">
1503<tt class="descname">dumpTree</tt><big>(</big><em>mode='type'</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.dumpTree"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.dumpTree" title="Permalink to this definition">¶</a></dt>
1504<dd><p>Print out information on the data tree dicts loaded in loadTree</p>
1505</dd></dl>
1506
1507<dl class="method">
1508<dt id="GSASIIIO.ExportBaseclass.loadParmDict">
1509<tt class="descname">loadParmDict</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.loadParmDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.loadParmDict" title="Permalink to this definition">¶</a></dt>
1510<dd><p>Load the GSAS-II refinable parameters from the tree into a dict (self.parmDict). Update
1511refined values to those from the last cycle and set the uncertainties for the
1512refined parameters in another dict (self.sigDict).</p>
1513<p>Expands the parm &amp; sig dicts to include values derived from constraints.</p>
1514</dd></dl>
1515
1516<dl class="method">
1517<dt id="GSASIIIO.ExportBaseclass.loadTree">
1518<tt class="descname">loadTree</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExportBaseclass.loadTree"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExportBaseclass.loadTree" title="Permalink to this definition">¶</a></dt>
1519<dd><p>Load the contents of the data tree into a set of dicts
1520(self.OverallParms, self.Phases and self.Histogram as well as self.powderDict
1521&amp; self.xtalDict)</p>
1522<ul class="simple">
1523<li>The childrenless data tree items are overall parameters/controls for the
1524entire project and are placed in self.OverallParms</li>
1525<li>Phase items are placed in self.Phases</li>
1526<li>Data items are placed in self.Histogram. The key for these data items
1527begin with a keyword, such as PWDR, IMG, HKLF,... that identifies the data type.</li>
1528</ul>
1529</dd></dl>
1530
1531</dd></dl>
1532
1533<dl class="function">
1534<dt id="GSASIIIO.ExtractFileFromZip">
1535<tt class="descclassname">GSASIIIO.</tt><tt class="descname">ExtractFileFromZip</tt><big>(</big><em>filename</em>, <em>selection=None</em>, <em>confirmread=True</em>, <em>confirmoverwrite=True</em>, <em>parent=None</em>, <em>multipleselect=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ExtractFileFromZip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ExtractFileFromZip" title="Permalink to this definition">¶</a></dt>
1536<dd><p>If the filename is a zip file, extract a file from that
1537archive.</p>
1538<table class="docutils field-list" frame="void" rules="none">
1539<col class="field-name" />
1540<col class="field-body" />
1541<tbody valign="top">
1542<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1543<li><strong>Selection</strong> (<em>list</em>) &#8211; used to predefine the name of the file
1544to be extracted. Filename case and zip directory name are
1545ignored in selection; the first matching file is used.</li>
1546<li><strong>confirmread</strong> (<em>bool</em>) &#8211; if True asks the user to confirm before expanding
1547the only file in a zip</li>
1548<li><strong>confirmoverwrite</strong> (<em>bool</em>) &#8211; if True asks the user to confirm
1549before overwriting if the extracted file already exists</li>
1550<li><strong>multipleselect</strong> (<em>bool</em>) &#8211; if True allows more than one zip
1551file to be extracted, a list of file(s) is returned.
1552If only one file is present, do not ask which one, otherwise
1553offer a list of choices (unless selection is used).</li>
1554</ul>
1555</td>
1556</tr>
1557<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the name of the file that has been created or a
1558list of files (see multipleselect)</p>
1559</td>
1560</tr>
1561</tbody>
1562</table>
1563<p>If the file is not a zipfile, return the name of the input file.
1564If the zipfile is empty or no file has been selected, return None</p>
1565</dd></dl>
1566
1567<dl class="function">
1568<dt id="GSASIIIO.FileDlgFixExt">
1569<tt class="descclassname">GSASIIIO.</tt><tt class="descname">FileDlgFixExt</tt><big>(</big><em>dlg</em>, <em>file</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#FileDlgFixExt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.FileDlgFixExt" title="Permalink to this definition">¶</a></dt>
1570<dd><p>this is needed to fix a problem in linux wx.FileDialog</p>
1571</dd></dl>
1572
1573<dl class="function">
1574<dt id="GSASIIIO.GetEdfData">
1575<tt class="descclassname">GSASIIIO.</tt><tt class="descname">GetEdfData</tt><big>(</big><em>filename</em>, <em>imageOnly=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#GetEdfData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.GetEdfData" title="Permalink to this definition">¶</a></dt>
1576<dd><p>Read European detector data edf file</p>
1577</dd></dl>
1578
1579<dl class="function">
1580<dt id="GSASIIIO.GetG2Image">
1581<tt class="descclassname">GSASIIIO.</tt><tt class="descname">GetG2Image</tt><big>(</big><em>filename</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#GetG2Image"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.GetG2Image" title="Permalink to this definition">¶</a></dt>
1582<dd><p>Read an image as a python pickle</p>
1583</dd></dl>
1584
1585<dl class="function">
1586<dt id="GSASIIIO.GetGEsumData">
1587<tt class="descclassname">GSASIIIO.</tt><tt class="descname">GetGEsumData</tt><big>(</big><em>filename</em>, <em>imageOnly=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#GetGEsumData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.GetGEsumData" title="Permalink to this definition">¶</a></dt>
1588<dd><p>Read SUM file as produced at 1-ID from G.E. images</p>
1589</dd></dl>
1590
1591<dl class="function">
1592<dt id="GSASIIIO.GetImageData">
1593<tt class="descclassname">GSASIIIO.</tt><tt class="descname">GetImageData</tt><big>(</big><em>G2frame</em>, <em>imagefile</em>, <em>imageOnly=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#GetImageData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.GetImageData" title="Permalink to this definition">¶</a></dt>
1594<dd><p>Read an image with the file reader keyed by the
1595file extension</p>
1596<table class="docutils field-list" frame="void" rules="none">
1597<col class="field-name" />
1598<col class="field-body" />
1599<tbody valign="top">
1600<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1601<li><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; main GSAS-II Frame and data object.</li>
1602<li><strong>imagefile</strong> (<em>str</em>) &#8211; name of image file</li>
1603<li><strong>imageOnly</strong> (<em>bool</em>) &#8211; If True return only the image,
1604otherwise  (default) return more (see below)</li>
1605</ul>
1606</td>
1607</tr>
1608<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">an image as a numpy array or a list of four items:
1609Comments, Data, Npix and the Image, as selected by imageOnly</p>
1610</td>
1611</tr>
1612</tbody>
1613</table>
1614</dd></dl>
1615
1616<dl class="function">
1617<dt id="GSASIIIO.GetImgData">
1618<tt class="descclassname">GSASIIIO.</tt><tt class="descname">GetImgData</tt><big>(</big><em>filename</em>, <em>imageOnly=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#GetImgData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.GetImgData" title="Permalink to this definition">¶</a></dt>
1619<dd><p>Read an ADSC image file</p>
1620</dd></dl>
1621
1622<dl class="function">
1623<dt id="GSASIIIO.GetMAR345Data">
1624<tt class="descclassname">GSASIIIO.</tt><tt class="descname">GetMAR345Data</tt><big>(</big><em>filename</em>, <em>imageOnly=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#GetMAR345Data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.GetMAR345Data" title="Permalink to this definition">¶</a></dt>
1625<dd><p>Read a MAR-345 image plate image</p>
1626</dd></dl>
1627
1628<dl class="function">
1629<dt id="GSASIIIO.GetPNGData">
1630<tt class="descclassname">GSASIIIO.</tt><tt class="descname">GetPNGData</tt><big>(</big><em>filename</em>, <em>imageOnly=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#GetPNGData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.GetPNGData" title="Permalink to this definition">¶</a></dt>
1631<dd><p>Read an image in a png format, assumes image is converted from CheMin tif file
1632so default parameters are that machine.</p>
1633</dd></dl>
1634
1635<dl class="function">
1636<dt id="GSASIIIO.GetPowderPeaks">
1637<tt class="descclassname">GSASIIIO.</tt><tt class="descname">GetPowderPeaks</tt><big>(</big><em>fileName</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#GetPowderPeaks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.GetPowderPeaks" title="Permalink to this definition">¶</a></dt>
1638<dd><p>Read powder peaks from a file</p>
1639</dd></dl>
1640
1641<dl class="function">
1642<dt id="GSASIIIO.GetTifData">
1643<tt class="descclassname">GSASIIIO.</tt><tt class="descname">GetTifData</tt><big>(</big><em>filename</em>, <em>imageOnly=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#GetTifData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.GetTifData" title="Permalink to this definition">¶</a></dt>
1644<dd><p>Read an image in a pseudo-tif format,
1645as produced by a wide variety of software, almost always
1646incorrectly in some way.</p>
1647</dd></dl>
1648
1649<dl class="class">
1650<dt id="GSASIIIO.ImportBaseclass">
1651<em class="property">class </em><tt class="descclassname">GSASIIIO.</tt><tt class="descname">ImportBaseclass</tt><big>(</big><em>formatName</em>, <em>longFormatName=None</em>, <em>extensionlist=</em>, <span class="optional">[</span><span class="optional">]</span><em>strictExtension=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportBaseclass"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportBaseclass" title="Permalink to this definition">¶</a></dt>
1652<dd><p>Defines a base class for the reading of input files (diffraction
1653data, coordinates,...). See <a class="reference internal" href="imports.html#import-routines"><em>Writing a Import Routine</em></a>
1654for an explanation on how to use a subclass of this class.</p>
1655<dl class="method">
1656<dt id="GSASIIIO.ImportBaseclass.BlockSelector">
1657<tt class="descname">BlockSelector</tt><big>(</big><em>ChoiceList</em>, <em>ParentFrame=None</em>, <em>title='Select a block'</em>, <em>size=None</em>, <em>header='Block Selector'</em>, <em>useCancel=True</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportBaseclass.BlockSelector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportBaseclass.BlockSelector" title="Permalink to this definition">¶</a></dt>
1658<dd><p>Provide a wx dialog to select a block if the file contains more
1659than one set of data and one must be selected</p>
1660</dd></dl>
1661
1662<dl class="method">
1663<dt id="GSASIIIO.ImportBaseclass.CIFValidator">
1664<tt class="descname">CIFValidator</tt><big>(</big><em>filepointer</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportBaseclass.CIFValidator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportBaseclass.CIFValidator" title="Permalink to this definition">¶</a></dt>
1665<dd><p>A <a class="reference internal" href="#GSASIIIO.ImportBaseclass.ContentsValidator" title="GSASIIIO.ImportBaseclass.ContentsValidator"><tt class="xref py py-meth docutils literal"><span class="pre">ContentsValidator()</span></tt></a> for use to validate CIF files.</p>
1666</dd></dl>
1667
1668<dl class="method">
1669<dt id="GSASIIIO.ImportBaseclass.ContentsValidator">
1670<tt class="descname">ContentsValidator</tt><big>(</big><em>filepointer</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportBaseclass.ContentsValidator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportBaseclass.ContentsValidator" title="Permalink to this definition">¶</a></dt>
1671<dd><p>This routine will attempt to determine if the file can be read
1672with the current format.
1673This will typically be overridden with a method that
1674takes a quick scan of [some of]
1675the file contents to do a &#8220;sanity&#8221; check if the file
1676appears to match the selected format.
1677Expected to be called via self.Validator()</p>
1678</dd></dl>
1679
1680<dl class="method">
1681<dt id="GSASIIIO.ImportBaseclass.ExtensionValidator">
1682<tt class="descname">ExtensionValidator</tt><big>(</big><em>filename</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportBaseclass.ExtensionValidator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportBaseclass.ExtensionValidator" title="Permalink to this definition">¶</a></dt>
1683<dd><p>This methods checks if the file has the correct extension
1684Return False if this filename will not be supported by this reader
1685Return True if the extension matches the list supplied by the reader
1686Return None if the reader allows un-registered extensions</p>
1687</dd></dl>
1688
1689<dl class="exception">
1690<dt id="GSASIIIO.ImportBaseclass.ImportException">
1691<em class="property">exception </em><tt class="descname">ImportException</tt><a class="reference internal" href="_modules/GSASIIIO.html#ImportBaseclass.ImportException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportBaseclass.ImportException" title="Permalink to this definition">¶</a></dt>
1692<dd><p>Defines an Exception that is used when an import routine hits an expected error,
1693usually in .Reader.</p>
1694<p>Good practice is that the Reader should define a value in self.errors that
1695tells the user some information about what is wrong with their file.</p>
1696</dd></dl>
1697
1698<dl class="method">
1699<dt id="GSASIIIO.ImportBaseclass.MultipleBlockSelector">
1700<tt class="descclassname">ImportBaseclass.</tt><tt class="descname">MultipleBlockSelector</tt><big>(</big><em>ChoiceList</em>, <em>ParentFrame=None</em>, <em>title='Select a block'</em>, <em>size=None</em>, <em>header='Block Selector'</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportBaseclass.MultipleBlockSelector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportBaseclass.MultipleBlockSelector" title="Permalink to this definition">¶</a></dt>
1701<dd><p>Provide a wx dialog to select a block of data if the
1702file contains more than one set of data and one must be
1703selected.</p>
1704<table class="docutils field-list" frame="void" rules="none">
1705<col class="field-name" />
1706<col class="field-body" />
1707<tbody valign="top">
1708<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a list of the selected blocks</td>
1709</tr>
1710</tbody>
1711</table>
1712</dd></dl>
1713
1714<dl class="method">
1715<dt id="GSASIIIO.ImportBaseclass.MultipleChoicesDialog">
1716<tt class="descclassname">ImportBaseclass.</tt><tt class="descname">MultipleChoicesDialog</tt><big>(</big><em>choicelist</em>, <em>headinglist</em>, <em>ParentFrame=None</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportBaseclass.MultipleChoicesDialog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportBaseclass.MultipleChoicesDialog" title="Permalink to this definition">¶</a></dt>
1717<dd><p>A modal dialog that offers a series of choices, each with a title and a wx.Choice
1718widget. Typical input:</p>
1719<blockquote>
1720<div><ul class="simple">
1721<li>choicelist=[ (&#8216;a&#8217;,&#8217;b&#8217;,&#8217;c&#8217;), (&#8216;test1&#8217;,&#8217;test2&#8217;),(&#8216;no choice&#8217;,)]</li>
1722<li>headinglist = [ &#8216;select a, b or c&#8217;, &#8216;select 1 of 2&#8217;, &#8216;No option here&#8217;]</li>
1723</ul>
1724</div></blockquote>
1725<p>optional keyword parameters are: head (window title) and title
1726returns a list of selected indicies for each choice (or None)</p>
1727</dd></dl>
1728
1729<dl class="method">
1730<dt id="GSASIIIO.ImportBaseclass.ReInitialize">
1731<tt class="descclassname">ImportBaseclass.</tt><tt class="descname">ReInitialize</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportBaseclass.ReInitialize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportBaseclass.ReInitialize" title="Permalink to this definition">¶</a></dt>
1732<dd><p>Reinitialize the Reader to initial settings</p>
1733</dd></dl>
1734
1735</dd></dl>
1736
1737<dl class="class">
1738<dt id="GSASIIIO.ImportPhase">
1739<em class="property">class </em><tt class="descclassname">GSASIIIO.</tt><tt class="descname">ImportPhase</tt><big>(</big><em>formatName</em>, <em>longFormatName=None</em>, <em>extensionlist=</em>, <span class="optional">[</span><span class="optional">]</span><em>strictExtension=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportPhase"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportPhase" title="Permalink to this definition">¶</a></dt>
1740<dd><p>Defines a base class for the reading of files with coordinates</p>
1741<p>Objects constructed that subclass this (in import/G2phase_*.py etc.) will be used
1742in <a class="reference internal" href="GSASII.html#GSASII.GSASII.OnImportPhase" title="GSASII.GSASII.OnImportPhase"><tt class="xref py py-meth docutils literal"><span class="pre">GSASII.GSASII.OnImportPhase()</span></tt></a>.
1743See <a class="reference internal" href="imports.html#import-routines"><em>Writing a Import Routine</em></a>
1744for an explanation on how to use this class.</p>
1745<dl class="method">
1746<dt id="GSASIIIO.ImportPhase.PhaseSelector">
1747<tt class="descname">PhaseSelector</tt><big>(</big><em>ChoiceList</em>, <em>ParentFrame=None</em>, <em>title='Select a phase'</em>, <em>size=None</em>, <em>header='Phase Selector'</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportPhase.PhaseSelector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportPhase.PhaseSelector" title="Permalink to this definition">¶</a></dt>
1748<dd><p>Provide a wx dialog to select a phase if the file contains more
1749than one phase</p>
1750</dd></dl>
1751
1752</dd></dl>
1753
1754<dl class="class">
1755<dt id="GSASIIIO.ImportPowderData">
1756<em class="property">class </em><tt class="descclassname">GSASIIIO.</tt><tt class="descname">ImportPowderData</tt><big>(</big><em>formatName</em>, <em>longFormatName=None</em>, <em>extensionlist=</em>, <span class="optional">[</span><span class="optional">]</span><em>strictExtension=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportPowderData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportPowderData" title="Permalink to this definition">¶</a></dt>
1757<dd><p>Defines a base class for the reading of files with powder data.</p>
1758<p>Objects constructed that subclass this (in import/G2pwd_*.py etc.) will be used
1759in <a class="reference internal" href="GSASII.html#GSASII.GSASII.OnImportPowder" title="GSASII.GSASII.OnImportPowder"><tt class="xref py py-meth docutils literal"><span class="pre">GSASII.GSASII.OnImportPowder()</span></tt></a>.
1760See <a class="reference internal" href="imports.html#import-routines"><em>Writing a Import Routine</em></a>
1761for an explanation on how to use this class.</p>
1762<dl class="method">
1763<dt id="GSASIIIO.ImportPowderData.ReInitialize">
1764<tt class="descname">ReInitialize</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportPowderData.ReInitialize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportPowderData.ReInitialize" title="Permalink to this definition">¶</a></dt>
1765<dd><p>Reinitialize the Reader to initial settings</p>
1766</dd></dl>
1767
1768</dd></dl>
1769
1770<dl class="class">
1771<dt id="GSASIIIO.ImportSmallAngleData">
1772<em class="property">class </em><tt class="descclassname">GSASIIIO.</tt><tt class="descname">ImportSmallAngleData</tt><big>(</big><em>formatName</em>, <em>longFormatName=None</em>, <em>extensionlist=</em>, <span class="optional">[</span><span class="optional">]</span><em>strictExtension=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportSmallAngleData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportSmallAngleData" title="Permalink to this definition">¶</a></dt>
1773<dd><p>Defines a base class for the reading of files with small angle data.
1774See <a class="reference internal" href="imports.html#import-routines"><em>Writing a Import Routine</em></a>
1775for an explanation on how to use this class.</p>
1776<dl class="method">
1777<dt id="GSASIIIO.ImportSmallAngleData.ReInitialize">
1778<tt class="descname">ReInitialize</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportSmallAngleData.ReInitialize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportSmallAngleData.ReInitialize" title="Permalink to this definition">¶</a></dt>
1779<dd><p>Reinitialize the Reader to initial settings</p>
1780</dd></dl>
1781
1782</dd></dl>
1783
1784<dl class="class">
1785<dt id="GSASIIIO.ImportStructFactor">
1786<em class="property">class </em><tt class="descclassname">GSASIIIO.</tt><tt class="descname">ImportStructFactor</tt><big>(</big><em>formatName</em>, <em>longFormatName=None</em>, <em>extensionlist=</em>, <span class="optional">[</span><span class="optional">]</span><em>strictExtension=False</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportStructFactor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportStructFactor" title="Permalink to this definition">¶</a></dt>
1787<dd><p>Defines a base class for the reading of files with tables
1788of structure factors.</p>
1789<p>Structure factors are read with a call to <a class="reference internal" href="GSASII.html#GSASII.GSASII.OnImportSfact" title="GSASII.GSASII.OnImportSfact"><tt class="xref py py-meth docutils literal"><span class="pre">GSASII.GSASII.OnImportSfact()</span></tt></a>
1790which in turn calls <a class="reference internal" href="GSASII.html#GSASII.GSASII.OnImportGeneric" title="GSASII.GSASII.OnImportGeneric"><tt class="xref py py-meth docutils literal"><span class="pre">GSASII.GSASII.OnImportGeneric()</span></tt></a>, which calls
1791methods <tt class="xref py py-meth docutils literal"><span class="pre">ExtensionValidator()</span></tt>, <tt class="xref py py-meth docutils literal"><span class="pre">ContentsValidator()</span></tt> and
1792<tt class="xref py py-meth docutils literal"><span class="pre">Reader()</span></tt>.</p>
1793<p>See <a class="reference internal" href="imports.html#import-routines"><em>Writing a Import Routine</em></a>
1794for an explanation on how to use import classes in general. The specifics
1795for reading a structure factor histogram require that
1796the <tt class="docutils literal"><span class="pre">Reader()</span></tt> routine in the import
1797class need to do only a few things: It
1798should load <tt class="xref py py-attr docutils literal"><span class="pre">RefDict</span></tt> item <tt class="docutils literal"><span class="pre">'RefList'</span></tt> with the reflection list,
1799and set <a class="reference internal" href="#GSASIIIO.ImportStructFactor.Parameters" title="GSASIIIO.ImportStructFactor.Parameters"><tt class="xref py py-attr docutils literal"><span class="pre">Parameters</span></tt></a> with the instrument parameters
1800(initialized with <a class="reference internal" href="#GSASIIIO.ImportStructFactor.InitParameters" title="GSASIIIO.ImportStructFactor.InitParameters"><tt class="xref py py-meth docutils literal"><span class="pre">InitParameters()</span></tt></a> and set with <a class="reference internal" href="#GSASIIIO.ImportStructFactor.UpdateParameters" title="GSASIIIO.ImportStructFactor.UpdateParameters"><tt class="xref py py-meth docutils literal"><span class="pre">UpdateParameters()</span></tt></a>).</p>
1801<dl class="attribute">
1802<dt id="GSASIIIO.ImportStructFactor.Banks">
1803<tt class="descname">Banks</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIIO.ImportStructFactor.Banks" title="Permalink to this definition">¶</a></dt>
1804<dd><p>self.RefDict is a dict containing the reflection information, as read from the file.
1805Item &#8216;RefList&#8217; contains the reflection information. See the
1806<a class="reference internal" href="GSASIIobj.html#xtalrefl-table"><em>Single Crystal Reflection Data Structure</em></a>
1807for the contents of each row. Dict element &#8216;FF&#8217;
1808contains the form factor values for each element type; if this entry
1809is left as initialized (an empty list) it will be initialized as needed later.</p>
1810</dd></dl>
1811
1812<dl class="method">
1813<dt id="GSASIIIO.ImportStructFactor.InitParameters">
1814<tt class="descname">InitParameters</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportStructFactor.InitParameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportStructFactor.InitParameters" title="Permalink to this definition">¶</a></dt>
1815<dd><p>initialize the instrument parameters structure</p>
1816</dd></dl>
1817
1818<dl class="attribute">
1819<dt id="GSASIIIO.ImportStructFactor.Parameters">
1820<tt class="descname">Parameters</tt><em class="property"> = None</em><a class="headerlink" href="#GSASIIIO.ImportStructFactor.Parameters" title="Permalink to this definition">¶</a></dt>
1821<dd><p>self.Parameters is a list with two dicts for data parameter settings</p>
1822</dd></dl>
1823
1824<dl class="method">
1825<dt id="GSASIIIO.ImportStructFactor.ReInitialize">
1826<tt class="descname">ReInitialize</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportStructFactor.ReInitialize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportStructFactor.ReInitialize" title="Permalink to this definition">¶</a></dt>
1827<dd><p>Reinitialize the Reader to initial settings</p>
1828</dd></dl>
1829
1830<dl class="method">
1831<dt id="GSASIIIO.ImportStructFactor.UpdateParameters">
1832<tt class="descname">UpdateParameters</tt><big>(</big><em>Type=None</em>, <em>Wave=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ImportStructFactor.UpdateParameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ImportStructFactor.UpdateParameters" title="Permalink to this definition">¶</a></dt>
1833<dd><p>Revise the instrument parameters</p>
1834</dd></dl>
1835
1836</dd></dl>
1837
1838<dl class="function">
1839<dt id="GSASIIIO.IndexPeakListSave">
1840<tt class="descclassname">GSASIIIO.</tt><tt class="descname">IndexPeakListSave</tt><big>(</big><em>G2frame</em>, <em>peaks</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#IndexPeakListSave"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.IndexPeakListSave" title="Permalink to this definition">¶</a></dt>
1841<dd><p>Save powder peaks from the indexing list</p>
1842</dd></dl>
1843
1844<dl class="class">
1845<dt id="GSASIIIO.MultipleChoicesDialog">
1846<em class="property">class </em><tt class="descclassname">GSASIIIO.</tt><tt class="descname">MultipleChoicesDialog</tt><big>(</big><em>choicelist</em>, <em>headinglist</em>, <em>head='Select options'</em>, <em>title='Please select from options below'</em>, <em>parent=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#MultipleChoicesDialog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.MultipleChoicesDialog" title="Permalink to this definition">¶</a></dt>
1847<dd><p>A dialog that offers a series of choices, each with a
1848title and a wx.Choice widget. Intended to be used Modally.
1849typical input:</p>
1850<blockquote>
1851<div><ul class="simple">
1852<li>choicelist=[ (&#8216;a&#8217;,&#8217;b&#8217;,&#8217;c&#8217;), (&#8216;test1&#8217;,&#8217;test2&#8217;),(&#8216;no choice&#8217;,)]</li>
1853<li>headinglist = [ &#8216;select a, b or c&#8217;, &#8216;select 1 of 2&#8217;, &#8216;No option here&#8217;]</li>
1854</ul>
1855</div></blockquote>
1856<p>selections are placed in self.chosen when OK is pressed</p>
1857</dd></dl>
1858
1859<dl class="function">
1860<dt id="GSASIIIO.PDFSave">
1861<tt class="descclassname">GSASIIIO.</tt><tt class="descname">PDFSave</tt><big>(</big><em>G2frame</em>, <em>exports</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#PDFSave"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.PDFSave" title="Permalink to this definition">¶</a></dt>
1862<dd><p>Save a PDF G(r) and S(Q) in column formats</p>
1863</dd></dl>
1864
1865<dl class="function">
1866<dt id="GSASIIIO.PeakListSave">
1867<tt class="descclassname">GSASIIIO.</tt><tt class="descname">PeakListSave</tt><big>(</big><em>G2frame</em>, <em>file</em>, <em>peaks</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#PeakListSave"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.PeakListSave" title="Permalink to this definition">¶</a></dt>
1868<dd><p>Save powder peaks to a data file</p>
1869</dd></dl>
1870
1871<dl class="function">
1872<dt id="GSASIIIO.ProjFileOpen">
1873<tt class="descclassname">GSASIIIO.</tt><tt class="descname">ProjFileOpen</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ProjFileOpen"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ProjFileOpen" title="Permalink to this definition">¶</a></dt>
1874<dd><p>Read a GSAS-II project file and load into the G2 data tree</p>
1875</dd></dl>
1876
1877<dl class="function">
1878<dt id="GSASIIIO.ProjFileSave">
1879<tt class="descclassname">GSASIIIO.</tt><tt class="descname">ProjFileSave</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ProjFileSave"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ProjFileSave" title="Permalink to this definition">¶</a></dt>
1880<dd><p>Save a GSAS-II project file</p>
1881</dd></dl>
1882
1883<dl class="function">
1884<dt id="GSASIIIO.PutG2Image">
1885<tt class="descclassname">GSASIIIO.</tt><tt class="descname">PutG2Image</tt><big>(</big><em>filename</em>, <em>Comments</em>, <em>Data</em>, <em>Npix</em>, <em>image</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#PutG2Image"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.PutG2Image" title="Permalink to this definition">¶</a></dt>
1886<dd><p>Write an image as a python pickle - might be better as an .edf file?</p>
1887</dd></dl>
1888
1889<dl class="function">
1890<dt id="GSASIIIO.ReadCIF">
1891<tt class="descclassname">GSASIIIO.</tt><tt class="descname">ReadCIF</tt><big>(</big><em>URLorFile</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#ReadCIF"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.ReadCIF" title="Permalink to this definition">¶</a></dt>
1892<dd><p>Open a CIF, which may be specified as a file name or as a URL using PyCifRW
1893(from James Hester).
1894The open routine gets confused with DOS names that begin with a letter and colon
1895&#8220;C:dir&#8221; so this routine will try to open the passed name as a file and if that
1896fails, try it as a URL</p>
1897<table class="docutils field-list" frame="void" rules="none">
1898<col class="field-name" />
1899<col class="field-body" />
1900<tbody valign="top">
1901<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>URLorFile</strong> (<em>str</em>) &#8211; string containing a URL or a file name. Code will try first
1902to open it as a file and then as a URL.</td>
1903</tr>
1904<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a PyCifRW CIF object.</td>
1905</tr>
1906</tbody>
1907</table>
1908</dd></dl>
1909
1910<dl class="function">
1911<dt id="GSASIIIO.SaveIntegration">
1912<tt class="descclassname">GSASIIIO.</tt><tt class="descname">SaveIntegration</tt><big>(</big><em>G2frame</em>, <em>PickId</em>, <em>data</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#SaveIntegration"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.SaveIntegration" title="Permalink to this definition">¶</a></dt>
1913<dd><p>Save image integration results as powder pattern(s)</p>
1914</dd></dl>
1915
1916<dl class="function">
1917<dt id="GSASIIIO.SetNewPhase">
1918<tt class="descclassname">GSASIIIO.</tt><tt class="descname">SetNewPhase</tt><big>(</big><em>Name='New Phase'</em>, <em>SGData=None</em>, <em>cell=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#SetNewPhase"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.SetNewPhase" title="Permalink to this definition">¶</a></dt>
1919<dd><p>Create a new phase dict with default values for various parameters</p>
1920<table class="docutils field-list" frame="void" rules="none">
1921<col class="field-name" />
1922<col class="field-body" />
1923<tbody valign="top">
1924<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1925<li><strong>Name</strong> (<em>str</em>) &#8211; Name for new Phase</li>
1926<li><strong>SGData</strong> (<em>dict</em>) &#8211; space group data from <tt class="xref py py-func docutils literal"><span class="pre">GSASIIspc:SpcGroup()</span></tt>;
1927defaults to data for P 1</li>
1928<li><strong>cell</strong> (<em>list</em>) &#8211; unit cell parameter list; defaults to
1929[1.0,1.0,1.0,90.,90,90.,1.]</li>
1930</ul>
1931</td>
1932</tr>
1933</tbody>
1934</table>
1935</dd></dl>
1936
1937<dl class="function">
1938<dt id="GSASIIIO.sfloat">
1939<tt class="descclassname">GSASIIIO.</tt><tt class="descname">sfloat</tt><big>(</big><em>S</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#sfloat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.sfloat" title="Permalink to this definition">¶</a></dt>
1940<dd><p>Convert a string to float. An empty field is treated as zero</p>
1941</dd></dl>
1942
1943<dl class="function">
1944<dt id="GSASIIIO.sint">
1945<tt class="descclassname">GSASIIIO.</tt><tt class="descname">sint</tt><big>(</big><em>S</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#sint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.sint" title="Permalink to this definition">¶</a></dt>
1946<dd><p>Convert a string to int. An empty field is treated as zero</p>
1947</dd></dl>
1948
1949<dl class="function">
1950<dt id="GSASIIIO.trim">
1951<tt class="descclassname">GSASIIIO.</tt><tt class="descname">trim</tt><big>(</big><em>val</em><big>)</big><a class="reference internal" href="_modules/GSASIIIO.html#trim"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIIO.trim" title="Permalink to this definition">¶</a></dt>
1952<dd><p>Simplify a string containing leading and trailing spaces
1953as well as newlines, tabs, repeated spaces etc. into a shorter and
1954more simple string, by replacing all ranges of whitespace
1955characters with a single space.</p>
1956<table class="docutils field-list" frame="void" rules="none">
1957<col class="field-name" />
1958<col class="field-body" />
1959<tbody valign="top">
1960<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>val</strong> (<em>str</em>) &#8211; the string to be simplified</td>
1961</tr>
1962<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the (usually) shortened version of the string</td>
1963</tr>
1964</tbody>
1965</table>
1966</dd></dl>
1967
1968</div>
1969<span class="target" id="module-ReadMarCCDFrame"></span><div class="section" id="readmarccdframe-read-mar-files">
1970<h2><em>ReadMarCCDFrame: Read Mar Files</em><a class="headerlink" href="#readmarccdframe-read-mar-files" title="Permalink to this headline">¶</a></h2>
1971<dl class="class">
1972<dt id="ReadMarCCDFrame.marFrame">
1973<em class="property">class </em><tt class="descclassname">ReadMarCCDFrame.</tt><tt class="descname">marFrame</tt><big>(</big><em>File</em>, <em>byteOrd='&lt;'</em>, <em>IFD={}</em><big>)</big><a class="reference internal" href="_modules/ReadMarCCDFrame.html#marFrame"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ReadMarCCDFrame.marFrame" title="Permalink to this definition">¶</a></dt>
1974<dd><p>A class to extract correct mar header and image info from a MarCCD file</p>
1975<table class="docutils field-list" frame="void" rules="none">
1976<col class="field-name" />
1977<col class="field-body" />
1978<tbody valign="top">
1979<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1980<li><strong>File</strong> (<em>str</em>) &#8211; file object [from open()]</li>
1981<li><strong>byteOrd</strong> &#8211; &#8216;&lt;&#8217; (default) or &#8216;&gt;&#8217;</li>
1982<li><strong>IFD</strong> (<em>dict</em>) &#8211; <p>?</p>
1983</li>
1984</ul>
1985</td>
1986</tr>
1987</tbody>
1988</table>
1989</dd></dl>
1990
1991</div>
1992<span class="target" id="module-GSASIIpy3"></span><div class="section" id="gsasiipy3-python-3-x-routines">
1993<h2><em>GSASIIpy3: Python 3.x Routines</em><a class="headerlink" href="#gsasiipy3-python-3-x-routines" title="Permalink to this headline">¶</a></h2>
1994<p>Module to hold python 3-compatible code, to keep it separate from
1995code that will break with __future__ options.</p>
1996<dl class="function">
1997<dt id="GSASIIpy3.FormatPadValue">
1998<tt class="descclassname">GSASIIpy3.</tt><tt class="descname">FormatPadValue</tt><big>(</big><em>val</em>, <em>maxdigits=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIpy3.html#FormatPadValue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpy3.FormatPadValue" title="Permalink to this definition">¶</a></dt>
1999<dd><p>Format a float to fit in <tt class="docutils literal"><span class="pre">maxdigits[0]</span></tt> spaces with maxdigits[1] after decimal.</p>
2000<table class="docutils field-list" frame="void" rules="none">
2001<col class="field-name" />
2002<col class="field-body" />
2003<tbody valign="top">
2004<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2005<li><strong>val</strong> (<em>float</em>) &#8211; number to be formatted.</li>
2006<li><strong>maxdigits</strong> (<em>list</em>) &#8211; the number of digits &amp; places after decimal to be used for display of the
2007number (defaults to [10,2]).</li>
2008</ul>
2009</td>
2010</tr>
2011<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a string with exactly maxdigits[0] characters (except under error conditions),
2012but last character will always be a space</p>
2013</td>
2014</tr>
2015</tbody>
2016</table>
2017</dd></dl>
2018
2019<dl class="function">
2020<dt id="GSASIIpy3.FormatSigFigs">
2021<tt class="descclassname">GSASIIpy3.</tt><tt class="descname">FormatSigFigs</tt><big>(</big><em>val</em>, <em>maxdigits=10</em>, <em>sigfigs=5</em>, <em>treatAsZero=1e-20</em><big>)</big><a class="reference internal" href="_modules/GSASIIpy3.html#FormatSigFigs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpy3.FormatSigFigs" title="Permalink to this definition">¶</a></dt>
2022<dd><p>Format a float to use <tt class="docutils literal"><span class="pre">maxdigits</span></tt> or fewer digits with <tt class="docutils literal"><span class="pre">sigfigs</span></tt>
2023significant digits showing (if room allows).</p>
2024<table class="docutils field-list" frame="void" rules="none">
2025<col class="field-name" />
2026<col class="field-body" />
2027<tbody valign="top">
2028<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2029<li><strong>val</strong> (<em>float</em>) &#8211; number to be formatted.</li>
2030<li><strong>maxdigits</strong> (<em>int</em>) &#8211; the number of digits to be used for display of the
2031number (defaults to 10).</li>
2032<li><strong>sigfigs</strong> (<em>int</em>) &#8211; the number of significant figures to use, if room allows</li>
2033<li><strong>treatAsZero</strong> (<em>float</em>) &#8211; numbers that are less than this in magnitude
2034are treated as zero. Defaults to 1.0e-20, but this can be disabled
2035if set to None.</li>
2036</ul>
2037</td>
2038</tr>
2039<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a string with &lt;= maxdigits characters (I hope).</p>
2040</td>
2041</tr>
2042</tbody>
2043</table>
2044</dd></dl>
2045
2046<dl class="function">
2047<dt id="GSASIIpy3.FormatValue">
2048<tt class="descclassname">GSASIIpy3.</tt><tt class="descname">FormatValue</tt><big>(</big><em>val</em>, <em>maxdigits=None</em><big>)</big><a class="reference internal" href="_modules/GSASIIpy3.html#FormatValue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpy3.FormatValue" title="Permalink to this definition">¶</a></dt>
2049<dd><p>Format a float to fit in at most <tt class="docutils literal"><span class="pre">maxdigits[0]</span></tt> spaces with maxdigits[1] after decimal.
2050Note that this code has been hacked from FormatSigFigs and may have unused sections.</p>
2051<table class="docutils field-list" frame="void" rules="none">
2052<col class="field-name" />
2053<col class="field-body" />
2054<tbody valign="top">
2055<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2056<li><strong>val</strong> (<em>float</em>) &#8211; number to be formatted.</li>
2057<li><strong>maxdigits</strong> (<em>list</em>) &#8211; the number of digits &amp; places after decimal to be used for display of the
2058number (defaults to [10,2]).</li>
2059</ul>
2060</td>
2061</tr>
2062<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a string with &lt;= maxdigits characters (usually).</p>
2063</td>
2064</tr>
2065</tbody>
2066</table>
2067</dd></dl>
2068
2069<dl class="function">
2070<dt id="GSASIIpy3.FormulaEval">
2071<tt class="descclassname">GSASIIpy3.</tt><tt class="descname">FormulaEval</tt><big>(</big><em>string</em><big>)</big><a class="reference internal" href="_modules/GSASIIpy3.html#FormulaEval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#GSASIIpy3.FormulaEval" title="Permalink to this definition">¶</a></dt>
2072<dd><p>Evaluates a algebraic formula into a float, if possible. Works
2073properly on fractions e.g. 2/3 only with python 3.0+ division.</p>
2074<p>Expressions such as 2/3, 3*pi, sin(45)/2, 2*sqrt(2), 2**10 can all
2075be evaluated.</p>
2076<table class="docutils field-list" frame="void" rules="none">
2077<col class="field-name" />
2078<col class="field-body" />
2079<tbody valign="top">
2080<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>string</strong> (<em>str</em>) &#8211; Character string containing a Python expression
2081to be evaluated.</td>
2082</tr>
2083<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the value for the expression as a float or None if the expression does not
2084evaluate to a valid number.</td>
2085</tr>
2086</tbody>
2087</table>
2088</dd></dl>
2089
2090</div>
2091</div>
2092
2093
2094          </div>
2095        </div>
2096      </div>
2097      <div class="sphinxsidebar">
2098        <div class="sphinxsidebarwrapper">
2099            <p class="logo"><a href="index.html">
2100              <img class="logo" src="_static/G2_html_logo.png" alt="Logo"/>
2101            </a></p>
2102  <h3><a href="index.html">Table Of Contents</a></h3>
2103  <ul>
2104<li><a class="reference internal" href="#"><em>GSAS-II GUI Routines</em></a><ul>
2105<li><a class="reference internal" href="#gsasiigrid-basic-gui-routines"><em>GSASIIgrid: Basic GUI routines</em></a></li>
2106<li><a class="reference internal" href="#gsasiiio-misc-i-o-routines"><em>GSASIIIO: Misc I/O routines</em></a></li>
2107<li><a class="reference internal" href="#readmarccdframe-read-mar-files"><em>ReadMarCCDFrame: Read Mar Files</em></a></li>
2108<li><a class="reference internal" href="#gsasiipy3-python-3-x-routines"><em>GSASIIpy3: Python 3.x Routines</em></a></li>
2109</ul>
2110</li>
2111</ul>
2112
2113  <h4>Previous topic</h4>
2114  <p class="topless"><a href="GSASIIutil.html"
2115                        title="previous chapter"><em>GSAS-II Utility Modules</em></a></p>
2116  <h4>Next topic</h4>
2117  <p class="topless"><a href="GSASIIGUI.html"
2118                        title="next chapter"><em>GSAS-II GUI Submodules</em></a></p>
2119  <h3>This Page</h3>
2120  <ul class="this-page-menu">
2121    <li><a href="_sources/GSASIIGUIr.txt"
2122           rel="nofollow">Show Source</a></li>
2123  </ul>
2124<div id="searchbox" style="display: none">
2125  <h3>Quick search</h3>
2126    <form class="search" action="search.html" method="get">
2127      <input type="text" name="q" />
2128      <input type="submit" value="Go" />
2129      <input type="hidden" name="check_keywords" value="yes" />
2130      <input type="hidden" name="area" value="default" />
2131    </form>
2132    <p class="searchtip" style="font-size: 90%">
2133    Enter search terms or a module, class or function name.
2134    </p>
2135</div>
2136<script type="text/javascript">$('#searchbox').show(0);</script>
2137        </div>
2138      </div>
2139      <div class="clearer"></div>
2140    </div>
2141    <div class="related">
2142      <h3>Navigation</h3>
2143      <ul>
2144        <li class="right" style="margin-right: 10px">
2145          <a href="genindex.html" title="General Index"
2146             >index</a></li>
2147        <li class="right" >
2148          <a href="py-modindex.html" title="Python Module Index"
2149             >modules</a> |</li>
2150        <li class="right" >
2151          <a href="GSASIIGUI.html" title="GSAS-II GUI Submodules"
2152             >next</a> |</li>
2153        <li class="right" >
2154          <a href="GSASIIutil.html" title="GSAS-II Utility Modules"
2155             >previous</a> |</li>
2156        <li><a href="index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li> 
2157      </ul>
2158    </div>
2159    <div class="footer">
2160        &copy; Copyright 2013, Von Dreele and Toby for Argonne National Laboratory.
2161      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
2162    </div>
2163  </body>
2164</html>
Note: See TracBrowser for help on using the repository browser.