source: sphinxdocs/build/html/GSASIIGUIr.html @ 2010

Last change on this file since 2010 was 2010, checked in by toby, 7 years ago

update docs

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