source: trunk/sphinxdocs/build/html/_modules/G2sfact.html @ 1183

Last change on this file since 1183 was 1183, checked in by toby, 8 years ago

fixup number formatting; update produced doc files

  • Property svn:mime-type set to text/html
File size: 27.4 KB
Line 
1
2
3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6
7<html xmlns="http://www.w3.org/1999/xhtml">
8  <head>
9    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10   
11    <title>G2sfact &mdash; GSAS-II 0.2.0 documentation</title>
12   
13    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
14    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
15   
16    <script type="text/javascript">
17      var DOCUMENTATION_OPTIONS = {
18        URL_ROOT:    '../',
19        VERSION:     '0.2.0',
20        COLLAPSE_INDEX: false,
21        FILE_SUFFIX: '.html',
22        HAS_SOURCE:  true
23      };
24    </script>
25    <script type="text/javascript" src="../_static/jquery.js"></script>
26    <script type="text/javascript" src="../_static/underscore.js"></script>
27    <script type="text/javascript" src="../_static/doctools.js"></script>
28    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
29    <link rel="top" title="GSAS-II 0.2.0 documentation" href="../index.html" />
30    <link rel="up" title="Module code" href="index.html" /> 
31  </head>
32  <body>
33    <div class="related">
34      <h3>Navigation</h3>
35      <ul>
36        <li class="right" style="margin-right: 10px">
37          <a href="../genindex.html" title="General Index"
38             accesskey="I">index</a></li>
39        <li class="right" >
40          <a href="../py-modindex.html" title="Python Module Index"
41             >modules</a> |</li>
42        <li><a href="../index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li>
43          <li><a href="index.html" accesskey="U">Module code</a> &raquo;</li> 
44      </ul>
45    </div> 
46
47    <div class="document">
48      <div class="documentwrapper">
49        <div class="bodywrapper">
50          <div class="body">
51           
52  <h1>Source code for G2sfact</h1><div class="highlight"><pre>
53<span class="c"># -*- coding: utf-8 -*-</span>
54<span class="c">########### SVN repository information ###################</span>
55<span class="c"># $Date: 2013-12-16 10:43:01 -0600 (Mon, 16 Dec 2013) $</span>
56<span class="c"># $Author: toby $</span>
57<span class="c"># $Revision: 1168 $</span>
58<span class="c"># $URL: https://subversion.xor.aps.anl.gov/pyGSAS/trunk/imports/G2sfact.py $</span>
59<span class="c"># $Id: G2sfact.py 1168 2013-12-16 16:43:01Z toby $</span>
60<span class="c">########### SVN repository information ###################</span>
61<span class="sd">&#39;&#39;&#39;</span>
62<span class="sd">*Module G2sfact: simple HKL import*</span>
63<span class="sd">-----------------------------------</span>
64<span class="sd">Read structure factors from a simple hkl file. Two routines are</span>
65<span class="sd">provided to read from files containing F or F\ :sup:`2` values.</span>
66
67<span class="sd">&#39;&#39;&#39;</span>
68<span class="kn">import</span> <span class="nn">sys</span>
69<span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
70<span class="kn">import</span> <span class="nn">GSASIIIO</span> <span class="kn">as</span> <span class="nn">G2IO</span>
71<span class="kn">import</span> <span class="nn">GSASIIpath</span>
72<span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 1168 $&quot;</span><span class="p">)</span>
73
74<div class="viewcode-block" id="ColumnValidator"><a class="viewcode-back" href="../imports.html#G2sfact.ColumnValidator">[docs]</a><span class="k">def</span> <span class="nf">ColumnValidator</span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> <span class="n">filepointer</span><span class="p">):</span>
75    <span class="s">&#39;Validate a file to check that it contains columns of numbers&#39;</span>
76    <span class="n">l</span> <span class="o">=</span> <span class="n">S</span> <span class="o">=</span> <span class="n">filepointer</span><span class="o">.</span><span class="n">readline</span><span class="p">()</span>
77    <span class="n">line</span> <span class="o">=</span> <span class="mi">1</span>
78    <span class="k">while</span> <span class="s">&#39;#&#39;</span> <span class="ow">in</span> <span class="n">S</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span>        <span class="c">#get past comments, if any</span>
79        <span class="n">l</span> <span class="o">=</span> <span class="n">filepointer</span><span class="o">.</span><span class="n">readline</span><span class="p">()</span>       
80        <span class="n">line</span> <span class="o">+=</span> <span class="mi">1</span>
81    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">):</span> <span class="c"># scan a few lines</span>
82        <span class="n">S</span> <span class="o">=</span> <span class="n">l</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
83        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">S</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">5</span><span class="p">:</span>
84            <span class="n">parent</span><span class="o">.</span><span class="n">errors</span> <span class="o">=</span> <span class="s">&#39;line &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">line</span><span class="p">)</span><span class="o">+</span><span class="s">&#39;: invalid input</span><span class="se">\n</span><span class="s">&#39;</span><span class="o">+</span><span class="n">l</span>
85            <span class="k">return</span> <span class="bp">False</span>
86        <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">S</span><span class="p">:</span>
87            <span class="k">try</span><span class="p">:</span>
88                <span class="nb">float</span><span class="p">(</span><span class="n">v</span><span class="p">)</span>
89            <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span>
90                <span class="n">parent</span><span class="o">.</span><span class="n">errors</span> <span class="o">=</span> <span class="s">&#39;line &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">line</span><span class="p">)</span><span class="o">+</span><span class="s">&#39;: string found where a number is expected</span><span class="se">\n</span><span class="s">&#39;</span><span class="o">+</span><span class="n">l</span>
91                <span class="k">return</span> <span class="bp">False</span>           
92        <span class="n">l</span> <span class="o">=</span> <span class="n">filepointer</span><span class="o">.</span><span class="n">readline</span><span class="p">()</span>
93        <span class="n">line</span> <span class="o">+=</span> <span class="mi">1</span>
94    <span class="k">return</span> <span class="bp">True</span>
95
96</div>
97<div class="viewcode-block" id="HKLF_ReaderClass"><a class="viewcode-back" href="../imports.html#G2sfact.HKLF_ReaderClass">[docs]</a><span class="k">class</span> <span class="nc">HKLF_ReaderClass</span><span class="p">(</span><span class="n">G2IO</span><span class="o">.</span><span class="n">ImportStructFactor</span><span class="p">):</span>
98    <span class="s">&#39;Routines to import F, sig(F) reflections from a HKLF file&#39;</span>
99    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
100        <span class="nb">super</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__class__</span><span class="p">,</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span> <span class="c"># fancy way to self-reference</span>
101            <span class="n">extensionlist</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;.hkl&#39;</span><span class="p">,</span><span class="s">&#39;.HKL&#39;</span><span class="p">),</span>
102            <span class="n">strictExtension</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
103            <span class="n">formatName</span> <span class="o">=</span> <span class="s">&#39;F containing HKL&#39;</span><span class="p">,</span>
104            <span class="n">longFormatName</span> <span class="o">=</span> <span class="s">&#39;Simple [hkl, Fo, sig(Fo)] Structure factor text file&#39;</span>
105            <span class="p">)</span>
106
107<div class="viewcode-block" id="HKLF_ReaderClass.ContentsValidator"><a class="viewcode-back" href="../imports.html#G2sfact.HKLF_ReaderClass.ContentsValidator">[docs]</a>    <span class="k">def</span> <span class="nf">ContentsValidator</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filepointer</span><span class="p">):</span>
108        <span class="s">&#39;Make sure file contains the expected columns on numbers&#39;</span>
109        <span class="k">return</span> <span class="n">ColumnValidator</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filepointer</span><span class="p">)</span>
110</div>
111<div class="viewcode-block" id="HKLF_ReaderClass.Reader"><a class="viewcode-back" href="../imports.html#G2sfact.HKLF_ReaderClass.Reader">[docs]</a>    <span class="k">def</span> <span class="nf">Reader</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">filename</span><span class="p">,</span><span class="n">filepointer</span><span class="p">,</span> <span class="n">ParentFrame</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="o">**</span><span class="n">unused</span><span class="p">):</span>
112        <span class="s">&#39;Read the file&#39;</span>
113        <span class="k">try</span><span class="p">:</span>
114            <span class="k">for</span> <span class="n">line</span><span class="p">,</span><span class="n">S</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">filepointer</span><span class="p">):</span>
115                <span class="bp">self</span><span class="o">.</span><span class="n">errors</span> <span class="o">=</span> <span class="s">&#39;  Error reading line &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">line</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
116                <span class="k">if</span> <span class="n">S</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;#&#39;</span><span class="p">:</span> <span class="k">continue</span>       <span class="c">#ignore comments, if any</span>
117                <span class="n">h</span><span class="p">,</span><span class="n">k</span><span class="p">,</span><span class="n">l</span><span class="p">,</span><span class="n">Fo</span><span class="p">,</span><span class="n">sigFo</span> <span class="o">=</span> <span class="n">S</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
118                <span class="n">h</span><span class="p">,</span><span class="n">k</span><span class="p">,</span><span class="n">l</span> <span class="o">=</span> <span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="n">h</span><span class="p">),</span><span class="nb">int</span><span class="p">(</span><span class="n">k</span><span class="p">),</span><span class="nb">int</span><span class="p">(</span><span class="n">l</span><span class="p">)]</span>
119                <span class="k">if</span> <span class="ow">not</span> <span class="nb">any</span><span class="p">([</span><span class="n">h</span><span class="p">,</span><span class="n">k</span><span class="p">,</span><span class="n">l</span><span class="p">]):</span>
120                    <span class="k">break</span>
121                <span class="n">Fo</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">Fo</span><span class="p">)</span>
122                <span class="n">sigFo</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">sigFo</span><span class="p">)</span>
123                <span class="c"># h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...</span>
124                <span class="bp">self</span><span class="o">.</span><span class="n">RefDict</span><span class="p">[</span><span class="s">&#39;RefList&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="n">h</span><span class="p">,</span><span class="n">k</span><span class="p">,</span><span class="n">l</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="n">Fo</span><span class="o">**</span><span class="mi">2</span><span class="p">,</span><span class="mf">2.</span><span class="o">*</span><span class="n">Fo</span><span class="o">*</span><span class="n">sigFo</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="n">Fo</span><span class="o">**</span><span class="mi">2</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">])</span>
125                <span class="c">#self.RefDict[&#39;FF&#39;].append({}) # now done in OnImportSfact</span>
126            <span class="bp">self</span><span class="o">.</span><span class="n">errors</span> <span class="o">=</span> <span class="s">&#39;Error after reading reflections (unexpected!)&#39;</span>
127            <span class="bp">self</span><span class="o">.</span><span class="n">RefDict</span><span class="p">[</span><span class="s">&#39;RefList&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">RefDict</span><span class="p">[</span><span class="s">&#39;RefList&#39;</span><span class="p">])</span>
128            <span class="bp">self</span><span class="o">.</span><span class="n">UpdateControls</span><span class="p">(</span><span class="n">Type</span><span class="o">=</span><span class="s">&#39;Fosq&#39;</span><span class="p">,</span><span class="n">FcalcPresent</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span> <span class="c"># set Fobs type &amp; if Fcalc values are loaded</span>
129            <span class="bp">self</span><span class="o">.</span><span class="n">UpdateParameters</span><span class="p">(</span><span class="n">Type</span><span class="o">=</span><span class="s">&#39;SXC&#39;</span><span class="p">,</span><span class="n">Wave</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="c"># histogram type</span>
130            <span class="k">return</span> <span class="bp">True</span>
131        <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">detail</span><span class="p">:</span>
132            <span class="bp">self</span><span class="o">.</span><span class="n">errors</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">  &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">detail</span><span class="p">)</span>
133            <span class="k">print</span> <span class="s">&#39;</span><span class="se">\n\n</span><span class="s">&#39;</span><span class="o">+</span><span class="bp">self</span><span class="o">.</span><span class="n">formatName</span><span class="o">+</span><span class="s">&#39; read error: &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">detail</span><span class="p">)</span> <span class="c"># for testing</span>
134            <span class="kn">import</span> <span class="nn">traceback</span>
135            <span class="n">traceback</span><span class="o">.</span><span class="n">print_exc</span><span class="p">(</span><span class="nb">file</span><span class="o">=</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">)</span>
136            <span class="k">return</span> <span class="bp">False</span>
137</div></div>
138<div class="viewcode-block" id="HKLF2_ReaderClass"><a class="viewcode-back" href="../imports.html#G2sfact.HKLF2_ReaderClass">[docs]</a><span class="k">class</span> <span class="nc">HKLF2_ReaderClass</span><span class="p">(</span><span class="n">G2IO</span><span class="o">.</span><span class="n">ImportStructFactor</span><span class="p">):</span>
139    <span class="s">&#39;Routines to import F**2, sig(F**2) reflections from a HKLF file&#39;</span>
140    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
141        <span class="nb">super</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__class__</span><span class="p">,</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span> <span class="c"># fancy way to self-reference</span>
142            <span class="n">extensionlist</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;.hkl&#39;</span><span class="p">,</span><span class="s">&#39;.HKL&#39;</span><span class="p">),</span>
143            <span class="n">strictExtension</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
144            <span class="n">formatName</span> <span class="o">=</span> <span class="s">u&#39;F</span><span class="se">\u00b2</span><span class="s"> containing HKL&#39;</span><span class="p">,</span>
145            <span class="n">longFormatName</span> <span class="o">=</span> <span class="s">u&#39;Simple [hkl, Fo</span><span class="se">\u00b2</span><span class="s">, sig(Fo</span><span class="se">\u00b2</span><span class="s">)] Structure factor text file&#39;</span>
146            <span class="p">)</span>
147
148<div class="viewcode-block" id="HKLF2_ReaderClass.ContentsValidator"><a class="viewcode-back" href="../imports.html#G2sfact.HKLF2_ReaderClass.ContentsValidator">[docs]</a>    <span class="k">def</span> <span class="nf">ContentsValidator</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filepointer</span><span class="p">):</span>
149        <span class="s">&#39;Make sure file contains the expected columns on numbers&#39;</span>
150        <span class="k">return</span> <span class="n">ColumnValidator</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filepointer</span><span class="p">)</span>
151</div>
152<div class="viewcode-block" id="HKLF2_ReaderClass.Reader"><a class="viewcode-back" href="../imports.html#G2sfact.HKLF2_ReaderClass.Reader">[docs]</a>    <span class="k">def</span> <span class="nf">Reader</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">filename</span><span class="p">,</span><span class="n">filepointer</span><span class="p">,</span> <span class="n">ParentFrame</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="o">**</span><span class="n">unused</span><span class="p">):</span>
153        <span class="s">&#39;Read the file&#39;</span>
154        <span class="k">try</span><span class="p">:</span>
155            <span class="k">for</span> <span class="n">line</span><span class="p">,</span><span class="n">S</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">filepointer</span><span class="p">):</span>
156                <span class="bp">self</span><span class="o">.</span><span class="n">errors</span> <span class="o">=</span> <span class="s">&#39;  Error reading line &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">line</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
157                <span class="k">if</span> <span class="n">S</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;#&#39;</span><span class="p">:</span> <span class="k">continue</span>       <span class="c">#ignore comments, if any</span>
158                <span class="n">h</span><span class="p">,</span><span class="n">k</span><span class="p">,</span><span class="n">l</span><span class="p">,</span><span class="n">Fo</span><span class="p">,</span><span class="n">sigFo</span> <span class="o">=</span> <span class="n">S</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
159                <span class="n">h</span><span class="p">,</span><span class="n">k</span><span class="p">,</span><span class="n">l</span> <span class="o">=</span> <span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="n">h</span><span class="p">),</span><span class="nb">int</span><span class="p">(</span><span class="n">k</span><span class="p">),</span><span class="nb">int</span><span class="p">(</span><span class="n">l</span><span class="p">)]</span>
160                <span class="k">if</span> <span class="ow">not</span> <span class="nb">any</span><span class="p">([</span><span class="n">h</span><span class="p">,</span><span class="n">k</span><span class="p">,</span><span class="n">l</span><span class="p">]):</span>
161                    <span class="k">break</span>
162                <span class="n">Fo</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">Fo</span><span class="p">)</span>
163                <span class="n">sigFo</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">sigFo</span><span class="p">)</span>
164                <span class="c"># h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...</span>
165                <span class="bp">self</span><span class="o">.</span><span class="n">RefDict</span><span class="p">[</span><span class="s">&#39;RefList&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="n">h</span><span class="p">,</span><span class="n">k</span><span class="p">,</span><span class="n">l</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="n">Fo</span><span class="p">,</span><span class="n">sigFo</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="n">Fo</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">])</span>
166                <span class="c">#self.RefDict[&#39;FF&#39;].append({}) # now done in OnImportSfact</span>
167            <span class="bp">self</span><span class="o">.</span><span class="n">errors</span> <span class="o">=</span> <span class="s">&#39;Error after reading reflections (unexpected!)&#39;</span>
168            <span class="bp">self</span><span class="o">.</span><span class="n">RefDict</span><span class="p">[</span><span class="s">&#39;RefList&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">RefDict</span><span class="p">[</span><span class="s">&#39;RefList&#39;</span><span class="p">])</span>
169            <span class="bp">self</span><span class="o">.</span><span class="n">UpdateControls</span><span class="p">(</span><span class="n">Type</span><span class="o">=</span><span class="s">&#39;Fosq&#39;</span><span class="p">,</span><span class="n">FcalcPresent</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span> <span class="c"># set Fobs type &amp; if Fcalc values are loaded</span>
170            <span class="bp">self</span><span class="o">.</span><span class="n">UpdateParameters</span><span class="p">(</span><span class="n">Type</span><span class="o">=</span><span class="s">&#39;SXC&#39;</span><span class="p">,</span><span class="n">Wave</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="c"># histogram type</span>
171            <span class="k">return</span> <span class="bp">True</span>
172        <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">detail</span><span class="p">:</span>
173            <span class="bp">self</span><span class="o">.</span><span class="n">errors</span> <span class="o">+=</span> <span class="s">&#39;</span><span class="se">\n</span><span class="s">  &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">detail</span><span class="p">)</span>
174            <span class="k">print</span> <span class="s">&#39;</span><span class="se">\n\n</span><span class="s">&#39;</span><span class="o">+</span><span class="bp">self</span><span class="o">.</span><span class="n">formatName</span><span class="o">+</span><span class="s">&#39; read error: &#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">detail</span><span class="p">)</span> <span class="c"># for testing</span>
175            <span class="kn">import</span> <span class="nn">traceback</span>
176            <span class="n">traceback</span><span class="o">.</span><span class="n">print_exc</span><span class="p">(</span><span class="nb">file</span><span class="o">=</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">)</span>
177            <span class="k">return</span> <span class="bp">False</span>
178</pre></div></div></div>
179
180          </div>
181        </div>
182      </div>
183      <div class="sphinxsidebar">
184        <div class="sphinxsidebarwrapper">
185            <p class="logo"><a href="../index.html">
186              <img class="logo" src="../_static/G2_html_logo.png" alt="Logo"/>
187            </a></p>
188<div id="searchbox" style="display: none">
189  <h3>Quick search</h3>
190    <form class="search" action="../search.html" method="get">
191      <input type="text" name="q" />
192      <input type="submit" value="Go" />
193      <input type="hidden" name="check_keywords" value="yes" />
194      <input type="hidden" name="area" value="default" />
195    </form>
196    <p class="searchtip" style="font-size: 90%">
197    Enter search terms or a module, class or function name.
198    </p>
199</div>
200<script type="text/javascript">$('#searchbox').show(0);</script>
201        </div>
202      </div>
203      <div class="clearer"></div>
204    </div>
205    <div class="related">
206      <h3>Navigation</h3>
207      <ul>
208        <li class="right" style="margin-right: 10px">
209          <a href="../genindex.html" title="General Index"
210             >index</a></li>
211        <li class="right" >
212          <a href="../py-modindex.html" title="Python Module Index"
213             >modules</a> |</li>
214        <li><a href="../index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li>
215          <li><a href="index.html" >Module code</a> &raquo;</li> 
216      </ul>
217    </div>
218    <div class="footer">
219        &copy; Copyright 2013, Von Dreele and Toby for Argonne National Laboratory.
220      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
221    </div>
222  </body>
223</html>
Note: See TracBrowser for help on using the repository browser.