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

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

update and rebuild docs

  • Property svn:mime-type set to text/html
File size: 57.3 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 Export Modules &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 Import Modules" href="imports.html" />
29    <link rel="prev" title="GSAS-II Scripts" href="GSASIIscripts.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="imports.html" title="GSAS-II Import Modules"
43             accesskey="N">next</a> |</li>
44        <li class="right" >
45          <a href="GSASIIscripts.html" title="GSAS-II Scripts"
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="gsas-ii-export-modules">
57<h1><em>GSAS-II Export Modules</em><a class="headerlink" href="#gsas-ii-export-modules" title="Permalink to this headline">¶</a></h1>
58<p>Exports are implemented by deriving a class from
59<tt class="xref py py-class docutils literal"><span class="pre">GSASIIIO.ExportBaseClass</span></tt>. Initialization of
60<tt class="docutils literal"><span class="pre">self.exporttype</span></tt> determines the type of export that will be performed
61(&#8216;project&#8217;, &#8216;phase&#8217;, &#8216;single&#8217;, &#8216;powder&#8217;, &#8216;image&#8217;, &#8216;map&#8217; or (someday)
62&#8216;pdf&#8217;) and of <tt class="docutils literal"><span class="pre">self.multiple</span></tt>
63determines if only a single phase, data set, etc. can be exported at a time (when False) or more than one can be selected.</p>
64<span class="target" id="module-G2export_examples"></span><div class="section" id="module-g2export-examples-examples">
65<h2><em>Module G2export_examples: Examples</em><a class="headerlink" href="#module-g2export-examples-examples" title="Permalink to this headline">¶</a></h2>
66<p>Code to demonstrate how GSAS-II data export routines are created. The
67classes defined here, <a class="reference internal" href="#G2export_examples.ExportPhaseText" title="G2export_examples.ExportPhaseText"><tt class="xref py py-class docutils literal"><span class="pre">ExportPhaseText</span></tt></a>,
68<a class="reference internal" href="#G2export_examples.ExportSingleText" title="G2export_examples.ExportSingleText"><tt class="xref py py-class docutils literal"><span class="pre">ExportSingleText</span></tt></a>, <a class="reference internal" href="#G2export_examples.ExportPowderReflText" title="G2export_examples.ExportPowderReflText"><tt class="xref py py-class docutils literal"><span class="pre">ExportPowderReflText</span></tt></a>,
69and <a class="reference internal" href="#G2export_examples.ExportPowderText" title="G2export_examples.ExportPowderText"><tt class="xref py py-class docutils literal"><span class="pre">ExportPowderText</span></tt></a> each demonstrate a different type
70of export. Also see <a class="reference internal" href="#G2export_map.ExportMapASCII" title="G2export_map.ExportMapASCII"><tt class="xref py py-class docutils literal"><span class="pre">G2export_map.ExportMapASCII</span></tt></a> for an
71example of a map export.</p>
72<dl class="class">
73<dt id="G2export_examples.ExportPhaseText">
74<em class="property">class </em><tt class="descclassname">G2export_examples.</tt><tt class="descname">ExportPhaseText</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_examples.html#ExportPhaseText"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_examples.ExportPhaseText" title="Permalink to this definition">¶</a></dt>
75<dd><p>Used to create a text file for a phase</p>
76<table class="docutils field-list" frame="void" rules="none">
77<col class="field-name" />
78<col class="field-body" />
79<tbody valign="top">
80<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
81</tr>
82</tbody>
83</table>
84<dl class="method">
85<dt id="G2export_examples.ExportPhaseText.Exporter">
86<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_examples.html#ExportPhaseText.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_examples.ExportPhaseText.Exporter" title="Permalink to this definition">¶</a></dt>
87<dd><p>Export a phase as a text file</p>
88</dd></dl>
89
90</dd></dl>
91
92<dl class="class">
93<dt id="G2export_examples.ExportPowderReflText">
94<em class="property">class </em><tt class="descclassname">G2export_examples.</tt><tt class="descname">ExportPowderReflText</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_examples.html#ExportPowderReflText"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_examples.ExportPowderReflText" title="Permalink to this definition">¶</a></dt>
95<dd><p>Used to create a text file of reflections from a powder data set</p>
96<table class="docutils field-list" frame="void" rules="none">
97<col class="field-name" />
98<col class="field-body" />
99<tbody valign="top">
100<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
101</tr>
102</tbody>
103</table>
104<dl class="method">
105<dt id="G2export_examples.ExportPowderReflText.Exporter">
106<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_examples.html#ExportPowderReflText.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_examples.ExportPowderReflText.Exporter" title="Permalink to this definition">¶</a></dt>
107<dd><p>Export a set of powder reflections as a text file</p>
108</dd></dl>
109
110</dd></dl>
111
112<dl class="class">
113<dt id="G2export_examples.ExportPowderText">
114<em class="property">class </em><tt class="descclassname">G2export_examples.</tt><tt class="descname">ExportPowderText</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_examples.html#ExportPowderText"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_examples.ExportPowderText" title="Permalink to this definition">¶</a></dt>
115<dd><p>Used to create a text file for a powder data set</p>
116<table class="docutils field-list" frame="void" rules="none">
117<col class="field-name" />
118<col class="field-body" />
119<tbody valign="top">
120<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
121</tr>
122</tbody>
123</table>
124<dl class="method">
125<dt id="G2export_examples.ExportPowderText.Exporter">
126<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_examples.html#ExportPowderText.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_examples.ExportPowderText.Exporter" title="Permalink to this definition">¶</a></dt>
127<dd><p>Export a set of powder data as a text file</p>
128</dd></dl>
129
130</dd></dl>
131
132<dl class="class">
133<dt id="G2export_examples.ExportSingleText">
134<em class="property">class </em><tt class="descclassname">G2export_examples.</tt><tt class="descname">ExportSingleText</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_examples.html#ExportSingleText"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_examples.ExportSingleText" title="Permalink to this definition">¶</a></dt>
135<dd><p>Used to create a text file with single crystal reflection data</p>
136<table class="docutils field-list" frame="void" rules="none">
137<col class="field-name" />
138<col class="field-body" />
139<tbody valign="top">
140<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
141</tr>
142</tbody>
143</table>
144<dl class="method">
145<dt id="G2export_examples.ExportSingleText.Exporter">
146<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_examples.html#ExportSingleText.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_examples.ExportSingleText.Exporter" title="Permalink to this definition">¶</a></dt>
147<dd><p>Export a set of single crystal data as a text file</p>
148</dd></dl>
149
150</dd></dl>
151
152</div>
153<span class="target" id="module-G2export_csv"></span><div class="section" id="module-g2export-csv-spreadsheet-export">
154<h2><em>Module G2export_csv: Spreadsheet export</em><a class="headerlink" href="#module-g2export-csv-spreadsheet-export" title="Permalink to this headline">¶</a></h2>
155<p>Code to create .csv (comma-separated variable) files for
156GSAS-II data export to a spreadsheet program, etc.</p>
157<dl class="class">
158<dt id="G2export_csv.ExportPhaseCSV">
159<em class="property">class </em><tt class="descclassname">G2export_csv.</tt><tt class="descname">ExportPhaseCSV</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#ExportPhaseCSV"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.ExportPhaseCSV" title="Permalink to this definition">¶</a></dt>
160<dd><p>Used to create a csv file for a phase</p>
161<table class="docutils field-list" frame="void" rules="none">
162<col class="field-name" />
163<col class="field-body" />
164<tbody valign="top">
165<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
166</tr>
167</tbody>
168</table>
169<dl class="method">
170<dt id="G2export_csv.ExportPhaseCSV.Exporter">
171<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#ExportPhaseCSV.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.ExportPhaseCSV.Exporter" title="Permalink to this definition">¶</a></dt>
172<dd><p>Export a phase as a csv file</p>
173</dd></dl>
174
175</dd></dl>
176
177<dl class="class">
178<dt id="G2export_csv.ExportPowderCSV">
179<em class="property">class </em><tt class="descclassname">G2export_csv.</tt><tt class="descname">ExportPowderCSV</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#ExportPowderCSV"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.ExportPowderCSV" title="Permalink to this definition">¶</a></dt>
180<dd><p>Used to create a csv file for a powder data set</p>
181<table class="docutils field-list" frame="void" rules="none">
182<col class="field-name" />
183<col class="field-body" />
184<tbody valign="top">
185<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
186</tr>
187</tbody>
188</table>
189<dl class="method">
190<dt id="G2export_csv.ExportPowderCSV.Exporter">
191<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#ExportPowderCSV.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.ExportPowderCSV.Exporter" title="Permalink to this definition">¶</a></dt>
192<dd><p>Export a set of powder data as a csv file</p>
193</dd></dl>
194
195</dd></dl>
196
197<dl class="class">
198<dt id="G2export_csv.ExportPowderReflCSV">
199<em class="property">class </em><tt class="descclassname">G2export_csv.</tt><tt class="descname">ExportPowderReflCSV</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#ExportPowderReflCSV"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.ExportPowderReflCSV" title="Permalink to this definition">¶</a></dt>
200<dd><p>Used to create a csv file of reflections from a powder data set</p>
201<table class="docutils field-list" frame="void" rules="none">
202<col class="field-name" />
203<col class="field-body" />
204<tbody valign="top">
205<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
206</tr>
207</tbody>
208</table>
209<dl class="method">
210<dt id="G2export_csv.ExportPowderReflCSV.Exporter">
211<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#ExportPowderReflCSV.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.ExportPowderReflCSV.Exporter" title="Permalink to this definition">¶</a></dt>
212<dd><p>Export a set of powder reflections as a csv file</p>
213</dd></dl>
214
215</dd></dl>
216
217<dl class="class">
218<dt id="G2export_csv.ExportSingleCSV">
219<em class="property">class </em><tt class="descclassname">G2export_csv.</tt><tt class="descname">ExportSingleCSV</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#ExportSingleCSV"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.ExportSingleCSV" title="Permalink to this definition">¶</a></dt>
220<dd><p>Used to create a csv file with single crystal reflection data</p>
221<table class="docutils field-list" frame="void" rules="none">
222<col class="field-name" />
223<col class="field-body" />
224<tbody valign="top">
225<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
226</tr>
227</tbody>
228</table>
229<dl class="method">
230<dt id="G2export_csv.ExportSingleCSV.Exporter">
231<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#ExportSingleCSV.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.ExportSingleCSV.Exporter" title="Permalink to this definition">¶</a></dt>
232<dd><p>Export a set of single crystal data as a csv file</p>
233</dd></dl>
234
235</dd></dl>
236
237<dl class="class">
238<dt id="G2export_csv.ExportStrainCSV">
239<em class="property">class </em><tt class="descclassname">G2export_csv.</tt><tt class="descname">ExportStrainCSV</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#ExportStrainCSV"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.ExportStrainCSV" title="Permalink to this definition">¶</a></dt>
240<dd><p>Used to create a csv file with single crystal reflection data</p>
241<table class="docutils field-list" frame="void" rules="none">
242<col class="field-name" />
243<col class="field-body" />
244<tbody valign="top">
245<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
246</tr>
247</tbody>
248</table>
249<dl class="method">
250<dt id="G2export_csv.ExportStrainCSV.Exporter">
251<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#ExportStrainCSV.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.ExportStrainCSV.Exporter" title="Permalink to this definition">¶</a></dt>
252<dd><p>Export a set of single crystal data as a csv file</p>
253</dd></dl>
254
255</dd></dl>
256
257<dl class="function">
258<dt id="G2export_csv.WriteList">
259<tt class="descclassname">G2export_csv.</tt><tt class="descname">WriteList</tt><big>(</big><em>obj</em>, <em>headerItems</em><big>)</big><a class="reference internal" href="_modules/G2export_csv.html#WriteList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_csv.WriteList" title="Permalink to this definition">¶</a></dt>
260<dd><p>Write a CSV header</p>
261<table class="docutils field-list" frame="void" rules="none">
262<col class="field-name" />
263<col class="field-body" />
264<tbody valign="top">
265<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
266<li><strong>obj</strong> (<em>object</em>) &#8211; Exporter object</li>
267<li><strong>headerItems</strong> (<em>list</em>) &#8211; items to write as a header</li>
268</ul>
269</td>
270</tr>
271</tbody>
272</table>
273</dd></dl>
274
275</div>
276<span class="target" id="module-G2export_PDB"></span><div class="section" id="module-g2export-pdb-macromolecular-export">
277<h2><em>Module G2export_PDB: Macromolecular export</em><a class="headerlink" href="#module-g2export-pdb-macromolecular-export" title="Permalink to this headline">¶</a></h2>
278<p>Code to export a phase into the venerated/obsolete (pick one)
279ASCII PDB format. Also defines exporter <a class="reference internal" href="#G2export_PDB.ExportPhaseCartXYZ" title="G2export_PDB.ExportPhaseCartXYZ"><tt class="xref py py-class docutils literal"><span class="pre">ExportPhaseCartXYZ</span></tt></a>
280which writes atom positions in orthogonal coordinates for a phase.</p>
281<dl class="class">
282<dt id="G2export_PDB.ExportPhaseCartXYZ">
283<em class="property">class </em><tt class="descclassname">G2export_PDB.</tt><tt class="descname">ExportPhaseCartXYZ</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_PDB.html#ExportPhaseCartXYZ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_PDB.ExportPhaseCartXYZ" title="Permalink to this definition">¶</a></dt>
284<dd><p>Used to create a Cartesian XYZ file for a phase</p>
285<table class="docutils field-list" frame="void" rules="none">
286<col class="field-name" />
287<col class="field-body" />
288<tbody valign="top">
289<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
290</tr>
291</tbody>
292</table>
293<dl class="method">
294<dt id="G2export_PDB.ExportPhaseCartXYZ.Exporter">
295<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_PDB.html#ExportPhaseCartXYZ.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_PDB.ExportPhaseCartXYZ.Exporter" title="Permalink to this definition">¶</a></dt>
296<dd><p>Export as a XYZ file</p>
297</dd></dl>
298
299</dd></dl>
300
301<dl class="class">
302<dt id="G2export_PDB.ExportPhasePDB">
303<em class="property">class </em><tt class="descclassname">G2export_PDB.</tt><tt class="descname">ExportPhasePDB</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_PDB.html#ExportPhasePDB"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_PDB.ExportPhasePDB" title="Permalink to this definition">¶</a></dt>
304<dd><p>Used to create a PDB file for a phase</p>
305<table class="docutils field-list" frame="void" rules="none">
306<col class="field-name" />
307<col class="field-body" />
308<tbody valign="top">
309<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
310</tr>
311</tbody>
312</table>
313<dl class="method">
314<dt id="G2export_PDB.ExportPhasePDB.Exporter">
315<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_PDB.html#ExportPhasePDB.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_PDB.ExportPhasePDB.Exporter" title="Permalink to this definition">¶</a></dt>
316<dd><p>Export as a PDB file</p>
317</dd></dl>
318
319</dd></dl>
320
321</div>
322<span class="target" id="module-G2export_image"></span><div class="section" id="module-g2export-image-2d-image-data-export">
323<h2><em>Module G2export_image: 2D Image data export</em><a class="headerlink" href="#module-g2export-image-2d-image-data-export" title="Permalink to this headline">¶</a></h2>
324<p>Demonstrates how an image is retrieved and written. Uses
325a SciPy routine to write a PNG format file.</p>
326<dl class="class">
327<dt id="G2export_image.ExportImagePNG">
328<em class="property">class </em><tt class="descclassname">G2export_image.</tt><tt class="descname">ExportImagePNG</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_image.html#ExportImagePNG"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_image.ExportImagePNG" title="Permalink to this definition">¶</a></dt>
329<dd><p>Used to create a PNG file for a GSAS-II image</p>
330<table class="docutils field-list" frame="void" rules="none">
331<col class="field-name" />
332<col class="field-body" />
333<tbody valign="top">
334<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
335</tr>
336</tbody>
337</table>
338<dl class="method">
339<dt id="G2export_image.ExportImagePNG.Exporter">
340<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_image.html#ExportImagePNG.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_image.ExportImagePNG.Exporter" title="Permalink to this definition">¶</a></dt>
341<dd><p>Export an image</p>
342</dd></dl>
343
344</dd></dl>
345
346</div>
347<span class="target" id="module-G2export_map"></span><div class="section" id="module-g2export-map-map-export">
348<h2><em>Module G2export_map: Map export</em><a class="headerlink" href="#module-g2export-map-map-export" title="Permalink to this headline">¶</a></h2>
349<p>Code to write Fourier/Charge-Flip atomic density maps out in formats that
350can be read by external programs. At present a GSAS format
351that is supported by FOX and DrawXTL
352(<a class="reference internal" href="#G2export_map.ExportMapASCII" title="G2export_map.ExportMapASCII"><tt class="xref py py-class docutils literal"><span class="pre">ExportMapASCII</span></tt></a>) and the CCP4 format that
353is used by COOT (<a class="reference internal" href="#G2export_map.ExportMapCCP4" title="G2export_map.ExportMapCCP4"><tt class="xref py py-class docutils literal"><span class="pre">ExportMapCCP4</span></tt></a>) are implemented.</p>
354<dl class="class">
355<dt id="G2export_map.ExportMapASCII">
356<em class="property">class </em><tt class="descclassname">G2export_map.</tt><tt class="descname">ExportMapASCII</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_map.html#ExportMapASCII"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_map.ExportMapASCII" title="Permalink to this definition">¶</a></dt>
357<dd><p>Used to create a text file for a phase</p>
358<table class="docutils field-list" frame="void" rules="none">
359<col class="field-name" />
360<col class="field-body" />
361<tbody valign="top">
362<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
363</tr>
364</tbody>
365</table>
366<dl class="method">
367<dt id="G2export_map.ExportMapASCII.Exporter">
368<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_map.html#ExportMapASCII.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_map.ExportMapASCII.Exporter" title="Permalink to this definition">¶</a></dt>
369<dd><p>Export a map as a text file</p>
370</dd></dl>
371
372</dd></dl>
373
374<dl class="class">
375<dt id="G2export_map.ExportMapCCP4">
376<em class="property">class </em><tt class="descclassname">G2export_map.</tt><tt class="descname">ExportMapCCP4</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_map.html#ExportMapCCP4"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_map.ExportMapCCP4" title="Permalink to this definition">¶</a></dt>
377<dd><p>Used to create a text file for a phase</p>
378<table class="docutils field-list" frame="void" rules="none">
379<col class="field-name" />
380<col class="field-body" />
381<tbody valign="top">
382<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
383</tr>
384</tbody>
385</table>
386<dl class="method">
387<dt id="G2export_map.ExportMapCCP4.Exporter">
388<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_map.html#ExportMapCCP4.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_map.ExportMapCCP4.Exporter" title="Permalink to this definition">¶</a></dt>
389<dd><p>Export a map as a text file</p>
390</dd></dl>
391
392</dd></dl>
393
394</div>
395<span class="target" id="module-G2export_shelx"></span><div class="section" id="module-g2export-shelx-examples">
396<h2><em>Module G2export_shelx: Examples</em><a class="headerlink" href="#module-g2export-shelx-examples" title="Permalink to this headline">¶</a></h2>
397<p>Code to export coordinates in the SHELX .ins format
398(as best as I can makes sense of it).</p>
399<dl class="class">
400<dt id="G2export_shelx.ExportPhaseShelx">
401<em class="property">class </em><tt class="descclassname">G2export_shelx.</tt><tt class="descname">ExportPhaseShelx</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_shelx.html#ExportPhaseShelx"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_shelx.ExportPhaseShelx" title="Permalink to this definition">¶</a></dt>
402<dd><p>Used to create a SHELX .ins file for a phase</p>
403<table class="docutils field-list" frame="void" rules="none">
404<col class="field-name" />
405<col class="field-body" />
406<tbody valign="top">
407<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
408</tr>
409</tbody>
410</table>
411<dl class="method">
412<dt id="G2export_shelx.ExportPhaseShelx.Exporter">
413<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_shelx.html#ExportPhaseShelx.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_shelx.ExportPhaseShelx.Exporter" title="Permalink to this definition">¶</a></dt>
414<dd><p>Export as a SHELX .ins file</p>
415</dd></dl>
416
417</dd></dl>
418
419</div>
420<span class="target" id="module-G2export_CIF"></span><div class="section" id="module-g2export-cif-cif-exports">
421<h2><em>Module G2export_CIF: CIF Exports</em><a class="headerlink" href="#module-g2export-cif-cif-exports" title="Permalink to this headline">¶</a></h2>
422<p>This implements a complex exporter <a class="reference internal" href="#G2export_CIF.ExportCIF" title="G2export_CIF.ExportCIF"><tt class="xref py py-class docutils literal"><span class="pre">ExportCIF</span></tt></a> that can implement an
423entire project in a complete CIF intended for submission as a
424publication. In addition, there are two subclasses of <a class="reference internal" href="#G2export_CIF.ExportCIF" title="G2export_CIF.ExportCIF"><tt class="xref py py-class docutils literal"><span class="pre">ExportCIF</span></tt></a>:
425<a class="reference internal" href="#G2export_CIF.ExportPhaseCIF" title="G2export_CIF.ExportPhaseCIF"><tt class="xref py py-class docutils literal"><span class="pre">ExportPhaseCIF</span></tt></a> and <a class="reference internal" href="#G2export_CIF.ExportDataCIF" title="G2export_CIF.ExportDataCIF"><tt class="xref py py-class docutils literal"><span class="pre">ExportDataCIF</span></tt></a> that
426export a single phase or data set. Note that <tt class="docutils literal"><span class="pre">self.mode</span></tt> determines
427what is written:</p>
428<blockquote>
429<div><ul class="simple">
430<li><cite>self.mode=&#8221;simple&#8221;</cite> creates a simple CIF with only coordinates
431or data, while</li>
432<li><cite>self.mode=&#8221;full&#8221;</cite> creates a complete CIF of project.</li>
433</ul>
434</div></blockquote>
435<dl class="function">
436<dt id="G2export_CIF.CIF2dict">
437<tt class="descclassname">G2export_CIF.</tt><tt class="descname">CIF2dict</tt><big>(</big><em>cf</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#CIF2dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.CIF2dict" title="Permalink to this definition">¶</a></dt>
438<dd><p>copy the contents of a CIF out from a PyCifRW block object
439into a dict</p>
440<table class="docutils field-list" frame="void" rules="none">
441<col class="field-name" />
442<col class="field-body" />
443<tbody valign="top">
444<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">cifblk, loopstructure where cifblk is a dict with
445CIF items and loopstructure is a list of lists that defines
446which items are in which loops.</td>
447</tr>
448</tbody>
449</table>
450</dd></dl>
451
452<dl class="class">
453<dt id="G2export_CIF.CIFdefHelp">
454<em class="property">class </em><tt class="descclassname">G2export_CIF.</tt><tt class="descname">CIFdefHelp</tt><big>(</big><em>parent</em>, <em>msg</em>, <em>helpwin</em>, <em>helptxt</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#CIFdefHelp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.CIFdefHelp" title="Permalink to this definition">¶</a></dt>
455<dd><p>Create a help button that displays help information on
456the current data item</p>
457<table class="docutils field-list" frame="void" rules="none">
458<col class="field-name" />
459<col class="field-body" />
460<tbody valign="top">
461<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
462<li><strong>parent</strong> &#8211; the panel which will be the parent of the button</li>
463<li><strong>msg</strong> (<em>str</em>) &#8211; the help text to be displayed</li>
464<li><strong>helpwin</strong> (<em>wx.Dialog</em>) &#8211; Frame for CIF editing dialog</li>
465<li><strong>helptxt</strong> (<em>wx.TextCtrl</em>) &#8211; TextCtrl where help text is placed</li>
466</ul>
467</td>
468</tr>
469</tbody>
470</table>
471</dd></dl>
472
473<dl class="class">
474<dt id="G2export_CIF.CIFtemplateSelect">
475<em class="property">class </em><tt class="descclassname">G2export_CIF.</tt><tt class="descname">CIFtemplateSelect</tt><big>(</big><em>frame</em>, <em>panel</em>, <em>tmplate</em>, <em>G2dict</em>, <em>repaint</em>, <em>title</em>, <em>defaultname=''</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#CIFtemplateSelect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.CIFtemplateSelect" title="Permalink to this definition">¶</a></dt>
476<dd><p>Create a set of buttons to show, select and edit a CIF template</p>
477<table class="docutils field-list" frame="void" rules="none">
478<col class="field-name" />
479<col class="field-body" />
480<tbody valign="top">
481<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
482<li><strong>frame</strong> &#8211; wx.Frame object of parent</li>
483<li><strong>panel</strong> &#8211; wx.Panel object where widgets should be placed</li>
484<li><strong>tmplate</strong> (<em>str</em>) &#8211; one of &#8216;publ&#8217;, &#8216;phase&#8217;, or &#8216;instrument&#8217; to determine
485the type of template</li>
486<li><strong>G2dict</strong> (<em>dict</em>) &#8211; GSAS-II dict where CIF should be placed. The key
487&#8220;CIF_template&#8221; will be used to store either a list or a string.
488If a list, it will contain a dict and a list defining loops. If
489an str, it will contain a file name.</li>
490<li><strong>repaint</strong> (<em>function</em>) &#8211; reference to a routine to be called to repaint
491the frame after a change has been made</li>
492<li><strong>title</strong> (<em>str</em>) &#8211; A line of text to show at the top of the window</li>
493<li><strong>defaultname</strong> (<em>str</em>) &#8211; specifies the default file name to be used for
494saving the CIF.</li>
495</ul>
496</td>
497</tr>
498</tbody>
499</table>
500</dd></dl>
501
502<dl class="class">
503<dt id="G2export_CIF.EditCIFpanel">
504<em class="property">class </em><tt class="descclassname">G2export_CIF.</tt><tt class="descname">EditCIFpanel</tt><big>(</big><em>parent</em>, <em>cifblk</em>, <em>loopstructure</em>, <em>cifdic={}</em>, <em>OKbuttons=</em>, <span class="optional">[</span><span class="optional">]</span><em>**kw</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#EditCIFpanel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.EditCIFpanel" title="Permalink to this definition">¶</a></dt>
505<dd><p>Creates a scrolled panel for editing CIF template items</p>
506<table class="docutils field-list" frame="void" rules="none">
507<col class="field-name" />
508<col class="field-body" />
509<tbody valign="top">
510<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
511<li><strong>parent</strong> (<em>wx.Frame</em>) &#8211; parent frame where panel will be placed</li>
512<li><strong>cifblk</strong> &#8211; dict or PyCifRW block containing values for each CIF item</li>
513<li><strong>loopstructure</strong> (<em>list</em>) &#8211; <p>a list of lists containing the contents of
514each loop, as an example:</p>
515<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span> <span class="p">[</span><span class="s">&quot;_a&quot;</span><span class="p">,</span><span class="s">&quot;_b&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s">&quot;_c&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s">&quot;_d_1&quot;</span><span class="p">,</span><span class="s">&quot;_d_2&quot;</span><span class="p">,</span><span class="s">&quot;_d_3&quot;</span><span class="p">]]</span>
516</pre></div>
517</div>
518<p>this describes a CIF with this type of structure:</p>
519<div class="highlight-python"><div class="highlight"><pre>loop_ _a _b &lt;a1&gt; &lt;b1&gt; &lt;a2&gt; ...
520loop_ _c &lt;c1&gt; &lt;c2&gt;...
521loop _d_1 _d_2 _d_3 ...
522</pre></div>
523</div>
524<p>Note that the values for each looped CIF item, such as _a,
525are contained in a list, for example as cifblk[&#8220;_a&#8221;]</p>
526</li>
527<li><strong>cifdic</strong> (<em>dict</em>) &#8211; optional CIF dictionary definitions</li>
528<li><strong>OKbuttons</strong> (<em>list</em>) &#8211; A list of wx.Button objects that should
529be disabled when information in the CIF is invalid</li>
530<li><strong>(other)</strong> &#8211; optional keyword parameters for wx.ScrolledPanel</li>
531</ul>
532</td>
533</tr>
534</tbody>
535</table>
536<dl class="method">
537<dt id="G2export_CIF.EditCIFpanel.CIFEntryWidget">
538<tt class="descname">CIFEntryWidget</tt><big>(</big><em>dct</em>, <em>item</em>, <em>dataname</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#EditCIFpanel.CIFEntryWidget"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.EditCIFpanel.CIFEntryWidget" title="Permalink to this definition">¶</a></dt>
539<dd><p>Create an entry widget for a CIF item. Use a validated entry for numb values
540where int is required when limits are integers and floats otherwise.
541At present this does not allow entry of the special CIF values of &#8221;.&#8221; and &#8221;?&#8221; for
542numerical values and highlights them as invalid.
543Use a selection widget when there are specific enumerated values for a string.</p>
544</dd></dl>
545
546<dl class="method">
547<dt id="G2export_CIF.EditCIFpanel.ControlOKButton">
548<tt class="descname">ControlOKButton</tt><big>(</big><em>setvalue</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#EditCIFpanel.ControlOKButton"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.EditCIFpanel.ControlOKButton" title="Permalink to this definition">¶</a></dt>
549<dd><p>Enable or Disable the OK button(s) for the dialog. Note that this is
550passed into the ValidatedTxtCtrl for use by validators.</p>
551<table class="docutils field-list" frame="void" rules="none">
552<col class="field-name" />
553<col class="field-body" />
554<tbody valign="top">
555<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>setvalue</strong> (<em>bool</em>) &#8211; if True, all entries in the dialog are
556checked for validity. The first invalid control triggers
557disabling of buttons.
558If False then the OK button(s) are disabled with no checking
559of the invalid flag for each control.</td>
560</tr>
561</tbody>
562</table>
563</dd></dl>
564
565<dl class="method">
566<dt id="G2export_CIF.EditCIFpanel.DoLayout">
567<tt class="descname">DoLayout</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#EditCIFpanel.DoLayout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.EditCIFpanel.DoLayout" title="Permalink to this definition">¶</a></dt>
568<dd><p>Update the Layout and scroll bars for the Panel. Clears
569self.LayoutCalled so that next change to panel can
570request a new update</p>
571</dd></dl>
572
573<dl class="method">
574<dt id="G2export_CIF.EditCIFpanel.OnAddRow">
575<tt class="descname">OnAddRow</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#EditCIFpanel.OnAddRow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.EditCIFpanel.OnAddRow" title="Permalink to this definition">¶</a></dt>
576<dd><p>add a row to a loop</p>
577</dd></dl>
578
579<dl class="method">
580<dt id="G2export_CIF.EditCIFpanel.OnLayoutNeeded">
581<tt class="descname">OnLayoutNeeded</tt><big>(</big><em>event</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#EditCIFpanel.OnLayoutNeeded"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.EditCIFpanel.OnLayoutNeeded" title="Permalink to this definition">¶</a></dt>
582<dd><p>Called when an update of the panel layout is needed. Calls
583self.DoLayout after the current operations are complete using
584CallAfter. This is called only once, according to flag
585self.LayoutCalled, which is cleared in self.DoLayout.</p>
586</dd></dl>
587
588</dd></dl>
589
590<dl class="class">
591<dt id="G2export_CIF.EditCIFtemplate">
592<em class="property">class </em><tt class="descclassname">G2export_CIF.</tt><tt class="descname">EditCIFtemplate</tt><big>(</big><em>parent</em>, <em>cifblk</em>, <em>loopstructure</em>, <em>defaultname</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#EditCIFtemplate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.EditCIFtemplate" title="Permalink to this definition">¶</a></dt>
593<dd><p>Create a dialog for editing a CIF template. The edited information is
594placed in cifblk. If the CIF is saved as a file, the name of that file
595is saved as <tt class="docutils literal"><span class="pre">self.newfile</span></tt>.</p>
596<table class="docutils field-list" frame="void" rules="none">
597<col class="field-name" />
598<col class="field-body" />
599<tbody valign="top">
600<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
601<li><strong>parent</strong> (<em>wx.Frame</em>) &#8211; parent frame or None</li>
602<li><strong>cifblk</strong> &#8211; dict or PyCifRW block containing values for each CIF item</li>
603<li><strong>loopstructure</strong> (<em>list</em>) &#8211; <p>a list of lists containing the contents of
604each loop, as an example:</p>
605<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span> <span class="p">[</span><span class="s">&quot;_a&quot;</span><span class="p">,</span><span class="s">&quot;_b&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s">&quot;_c&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s">&quot;_d_1&quot;</span><span class="p">,</span><span class="s">&quot;_d_2&quot;</span><span class="p">,</span><span class="s">&quot;_d_3&quot;</span><span class="p">]]</span>
606</pre></div>
607</div>
608<p>this describes a CIF with this type of structure:</p>
609<div class="highlight-python"><div class="highlight"><pre>loop_ _a _b &lt;a1&gt; &lt;b1&gt; &lt;a2&gt; ...
610loop_ _c &lt;c1&gt; &lt;c2&gt;...
611loop _d_1 _d_2 _d_3 ...
612</pre></div>
613</div>
614<p>Note that the values for each looped CIF item, such as _a,
615are contained in a list, for example as cifblk[&#8220;_a&#8221;]</p>
616</li>
617<li><strong>defaultname</strong> (<em>str</em>) &#8211; specifies the default file name to be used for
618saving the CIF.</li>
619</ul>
620</td>
621</tr>
622</tbody>
623</table>
624<dl class="method">
625<dt id="G2export_CIF.EditCIFtemplate.Post">
626<tt class="descname">Post</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#EditCIFtemplate.Post"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.EditCIFtemplate.Post" title="Permalink to this definition">¶</a></dt>
627<dd><p>Display the dialog</p>
628<table class="docutils field-list" frame="void" rules="none">
629<col class="field-name" />
630<col class="field-body" />
631<tbody valign="top">
632<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True unless Cancel has been pressed.</td>
633</tr>
634</tbody>
635</table>
636</dd></dl>
637
638</dd></dl>
639
640<dl class="class">
641<dt id="G2export_CIF.ExportCIF">
642<em class="property">class </em><tt class="descclassname">G2export_CIF.</tt><tt class="descname">ExportCIF</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#ExportCIF"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.ExportCIF" title="Permalink to this definition">¶</a></dt>
643<dd><p>Used to create a CIF of an entire project</p>
644<table class="docutils field-list" frame="void" rules="none">
645<col class="field-name" />
646<col class="field-body" />
647<tbody valign="top">
648<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
649</tr>
650</tbody>
651</table>
652<dl class="method">
653<dt id="G2export_CIF.ExportCIF.Exporter">
654<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#ExportCIF.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.ExportCIF.Exporter" title="Permalink to this definition">¶</a></dt>
655<dd><p>Export a CIF. Export can be full or simple (as set by self.mode).
656&#8220;simple&#8221; skips data, distances &amp; angles, etc. and can only include
657a single phase while &#8220;full&#8221; is intended for for publication submission.</p>
658</dd></dl>
659
660</dd></dl>
661
662<dl class="class">
663<dt id="G2export_CIF.ExportDataCIF">
664<em class="property">class </em><tt class="descclassname">G2export_CIF.</tt><tt class="descname">ExportDataCIF</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#ExportDataCIF"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.ExportDataCIF" title="Permalink to this definition">¶</a></dt>
665<dd><p>Used to create a simple CIF containing diffraction data only. Uses exact same code as
666<a class="reference internal" href="#G2export_CIF.ExportCIF" title="G2export_CIF.ExportCIF"><tt class="xref py py-class docutils literal"><span class="pre">ExportCIF</span></tt></a> except that <cite>self.mode</cite> is set to &#8220;simple&#8221; and <cite>self.currentExportType</cite>
667is set to &#8220;single&#8221; or &#8220;powder&#8221; in <cite>self.InitExport</cite>. Shows up in menus as Data-only CIF.</p>
668<table class="docutils field-list" frame="void" rules="none">
669<col class="field-name" />
670<col class="field-body" />
671<tbody valign="top">
672<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
673</tr>
674</tbody>
675</table>
676</dd></dl>
677
678<dl class="class">
679<dt id="G2export_CIF.ExportPhaseCIF">
680<em class="property">class </em><tt class="descclassname">G2export_CIF.</tt><tt class="descname">ExportPhaseCIF</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#ExportPhaseCIF"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.ExportPhaseCIF" title="Permalink to this definition">¶</a></dt>
681<dd><p>Used to create a simple CIF of at most one phase. Uses exact same code as
682<a class="reference internal" href="#G2export_CIF.ExportCIF" title="G2export_CIF.ExportCIF"><tt class="xref py py-class docutils literal"><span class="pre">ExportCIF</span></tt></a> except that <cite>self.mode</cite> is set to &#8220;simple&#8221; in <cite>self.InitExport</cite>.
683Shows up in menu as Quick CIF.</p>
684<table class="docutils field-list" frame="void" rules="none">
685<col class="field-name" />
686<col class="field-body" />
687<tbody valign="top">
688<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
689</tr>
690</tbody>
691</table>
692</dd></dl>
693
694<dl class="function">
695<dt id="G2export_CIF.LoadCIFdic">
696<tt class="descclassname">G2export_CIF.</tt><tt class="descname">LoadCIFdic</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#LoadCIFdic"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.LoadCIFdic" title="Permalink to this definition">¶</a></dt>
697<dd><p>Create a composite core+powder CIF lookup dict containing
698information about all items in the CIF dictionaries, loading
699pickled files if possible. The routine looks for files
700named cif_core.cpickle and cif_pd.cpickle in every
701directory in the path and if they are not found, files
702cif_core.dic and/or cif_pd.dic are read.</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">Returns:</th><td class="field-body">the dict with the definitions</td>
708</tr>
709</tbody>
710</table>
711</dd></dl>
712
713<dl class="function">
714<dt id="G2export_CIF.PickleCIFdict">
715<tt class="descclassname">G2export_CIF.</tt><tt class="descname">PickleCIFdict</tt><big>(</big><em>fil</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#PickleCIFdict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.PickleCIFdict" title="Permalink to this definition">¶</a></dt>
716<dd><p>Loads a CIF dictionary, cherry picks out the items needed
717by local code and sticks them into a python dict and writes
718that dict out as a cPickle file for later reuse.
719If the write fails a warning message is printed,
720but no exception occurs.</p>
721<table class="docutils field-list" frame="void" rules="none">
722<col class="field-name" />
723<col class="field-body" />
724<tbody valign="top">
725<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>fil</strong> (<em>str</em>) &#8211; file name of CIF dictionary, will usually end
726in .dic</td>
727</tr>
728<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the dict with the definitions</td>
729</tr>
730</tbody>
731</table>
732</dd></dl>
733
734<dl class="function">
735<dt id="G2export_CIF.dict2CIF">
736<tt class="descclassname">G2export_CIF.</tt><tt class="descname">dict2CIF</tt><big>(</big><em>dblk</em>, <em>loopstructure</em>, <em>blockname='Template'</em><big>)</big><a class="reference internal" href="_modules/G2export_CIF.html#dict2CIF"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_CIF.dict2CIF" title="Permalink to this definition">¶</a></dt>
737<dd><p>Create a PyCifRW CIF object containing a single CIF
738block object from a dict and loop structure list.</p>
739<table class="docutils field-list" frame="void" rules="none">
740<col class="field-name" />
741<col class="field-body" />
742<tbody valign="top">
743<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
744<li><strong>dblk</strong> &#8211; a dict containing values for each CIF item</li>
745<li><strong>loopstructure</strong> (<em>list</em>) &#8211; <p>a list of lists containing the contents of
746each loop, as an example:</p>
747<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span> <span class="p">[</span><span class="s">&quot;_a&quot;</span><span class="p">,</span><span class="s">&quot;_b&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s">&quot;_c&quot;</span><span class="p">],</span> <span class="p">[</span><span class="s">&quot;_d_1&quot;</span><span class="p">,</span><span class="s">&quot;_d_2&quot;</span><span class="p">,</span><span class="s">&quot;_d_3&quot;</span><span class="p">]]</span>
748</pre></div>
749</div>
750<p>this describes a CIF with this type of structure:</p>
751<div class="highlight-python"><div class="highlight"><pre>loop_ _a _b &lt;a1&gt; &lt;b1&gt; &lt;a2&gt; ...
752loop_ _c &lt;c1&gt; &lt;c2&gt;...
753loop _d_1 _d_2 _d_3 ...
754</pre></div>
755</div>
756<p>Note that the values for each looped CIF item, such as _a,
757are contained in a list, for example as cifblk[&#8220;_a&#8221;]</p>
758</li>
759<li><strong>blockname</strong> (<em>str</em>) &#8211; an optional name for the CIF block.
760Defaults to &#8216;Template&#8217;</li>
761</ul>
762</td>
763</tr>
764<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the newly created PyCifRW CIF object</p>
765</td>
766</tr>
767</tbody>
768</table>
769</dd></dl>
770
771</div>
772<span class="target" id="module-G2export_pwdr"></span><div class="section" id="module-g2export-pwdr-export-powder-input-files">
773<h2><em>Module G2export_pwdr: Export powder input files</em><a class="headerlink" href="#module-g2export-pwdr-export-powder-input-files" title="Permalink to this headline">¶</a></h2>
774<p>Creates files used by GSAS (FXYE) &amp; TOPAS (XYE) as input</p>
775<dl class="class">
776<dt id="G2export_pwdr.ExportPowderFXYE">
777<em class="property">class </em><tt class="descclassname">G2export_pwdr.</tt><tt class="descname">ExportPowderFXYE</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_pwdr.html#ExportPowderFXYE"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_pwdr.ExportPowderFXYE" title="Permalink to this definition">¶</a></dt>
778<dd><p>Used to create a FXYE file for a powder data set</p>
779<table class="docutils field-list" frame="void" rules="none">
780<col class="field-name" />
781<col class="field-body" />
782<tbody valign="top">
783<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
784</tr>
785</tbody>
786</table>
787<dl class="method">
788<dt id="G2export_pwdr.ExportPowderFXYE.Exporter">
789<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_pwdr.html#ExportPowderFXYE.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_pwdr.ExportPowderFXYE.Exporter" title="Permalink to this definition">¶</a></dt>
790<dd><p>Export one or more sets of powder data as FXYE file(s)</p>
791</dd></dl>
792
793<dl class="method">
794<dt id="G2export_pwdr.ExportPowderFXYE.WriteInstFile">
795<tt class="descname">WriteInstFile</tt><big>(</big><em>hist</em>, <em>Inst</em><big>)</big><a class="reference internal" href="_modules/G2export_pwdr.html#ExportPowderFXYE.WriteInstFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_pwdr.ExportPowderFXYE.WriteInstFile" title="Permalink to this definition">¶</a></dt>
796<dd><p>Write an instrument parameter file</p>
797</dd></dl>
798
799</dd></dl>
800
801<dl class="class">
802<dt id="G2export_pwdr.ExportPowderXYE">
803<em class="property">class </em><tt class="descclassname">G2export_pwdr.</tt><tt class="descname">ExportPowderXYE</tt><big>(</big><em>G2frame</em><big>)</big><a class="reference internal" href="_modules/G2export_pwdr.html#ExportPowderXYE"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_pwdr.ExportPowderXYE" title="Permalink to this definition">¶</a></dt>
804<dd><p>Used to create a Topas XYE file for a powder data set</p>
805<table class="docutils field-list" frame="void" rules="none">
806<col class="field-name" />
807<col class="field-body" />
808<tbody valign="top">
809<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>G2frame</strong> (<em>wx.Frame</em>) &#8211; reference to main GSAS-II frame</td>
810</tr>
811</tbody>
812</table>
813<dl class="method">
814<dt id="G2export_pwdr.ExportPowderXYE.Exporter">
815<tt class="descname">Exporter</tt><big>(</big><em>event=None</em><big>)</big><a class="reference internal" href="_modules/G2export_pwdr.html#ExportPowderXYE.Exporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#G2export_pwdr.ExportPowderXYE.Exporter" title="Permalink to this definition">¶</a></dt>
816<dd><p>Export one or more sets of powder data as XYE file(s)</p>
817</dd></dl>
818
819</dd></dl>
820
821</div>
822</div>
823
824
825          </div>
826        </div>
827      </div>
828      <div class="sphinxsidebar">
829        <div class="sphinxsidebarwrapper">
830            <p class="logo"><a href="index.html">
831              <img class="logo" src="_static/G2_html_logo.png" alt="Logo"/>
832            </a></p>
833  <h3><a href="index.html">Table Of Contents</a></h3>
834  <ul>
835<li><a class="reference internal" href="#"><em>GSAS-II Export Modules</em></a><ul>
836<li><a class="reference internal" href="#module-g2export-examples-examples"><em>Module G2export_examples: Examples</em></a></li>
837<li><a class="reference internal" href="#module-g2export-csv-spreadsheet-export"><em>Module G2export_csv: Spreadsheet export</em></a></li>
838<li><a class="reference internal" href="#module-g2export-pdb-macromolecular-export"><em>Module G2export_PDB: Macromolecular export</em></a></li>
839<li><a class="reference internal" href="#module-g2export-image-2d-image-data-export"><em>Module G2export_image: 2D Image data export</em></a></li>
840<li><a class="reference internal" href="#module-g2export-map-map-export"><em>Module G2export_map: Map export</em></a></li>
841<li><a class="reference internal" href="#module-g2export-shelx-examples"><em>Module G2export_shelx: Examples</em></a></li>
842<li><a class="reference internal" href="#module-g2export-cif-cif-exports"><em>Module G2export_CIF: CIF Exports</em></a></li>
843<li><a class="reference internal" href="#module-g2export-pwdr-export-powder-input-files"><em>Module G2export_pwdr: Export powder input files</em></a></li>
844</ul>
845</li>
846</ul>
847
848  <h4>Previous topic</h4>
849  <p class="topless"><a href="GSASIIscripts.html"
850                        title="previous chapter"><em>GSAS-II Scripts</em></a></p>
851  <h4>Next topic</h4>
852  <p class="topless"><a href="imports.html"
853                        title="next chapter"><em>GSAS-II Import Modules</em></a></p>
854  <h3>This Page</h3>
855  <ul class="this-page-menu">
856    <li><a href="_sources/exports.txt"
857           rel="nofollow">Show Source</a></li>
858  </ul>
859<div id="searchbox" style="display: none">
860  <h3>Quick search</h3>
861    <form class="search" action="search.html" method="get">
862      <input type="text" name="q" />
863      <input type="submit" value="Go" />
864      <input type="hidden" name="check_keywords" value="yes" />
865      <input type="hidden" name="area" value="default" />
866    </form>
867    <p class="searchtip" style="font-size: 90%">
868    Enter search terms or a module, class or function name.
869    </p>
870</div>
871<script type="text/javascript">$('#searchbox').show(0);</script>
872        </div>
873      </div>
874      <div class="clearer"></div>
875    </div>
876    <div class="related">
877      <h3>Navigation</h3>
878      <ul>
879        <li class="right" style="margin-right: 10px">
880          <a href="genindex.html" title="General Index"
881             >index</a></li>
882        <li class="right" >
883          <a href="py-modindex.html" title="Python Module Index"
884             >modules</a> |</li>
885        <li class="right" >
886          <a href="imports.html" title="GSAS-II Import Modules"
887             >next</a> |</li>
888        <li class="right" >
889          <a href="GSASIIscripts.html" title="GSAS-II Scripts"
890             >previous</a> |</li>
891        <li><a href="index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li> 
892      </ul>
893    </div>
894    <div class="footer">
895        &copy; Copyright 2013, Von Dreele and Toby for Argonne National Laboratory.
896      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
897    </div>
898  </body>
899</html>
Note: See TracBrowser for help on using the repository browser.