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