source: sasview/calculator/docs/sphinx/_build/html/api/sld_calculator.html @ 14e9eb3

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 14e9eb3 was 14e9eb3, checked in by Gervaise Alina <gervyh@…>, 14 years ago

working on documentation

  • Property mode set to 100644
File size: 8.1 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<html xmlns="http://www.w3.org/1999/xhtml">
7  <head>
8    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9   
10    <title>Sld Calculator &mdash; calculator v0.1.0 documentation</title>
11    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
12    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13    <script type="text/javascript">
14      var DOCUMENTATION_OPTIONS = {
15        URL_ROOT:    '../',
16        VERSION:     '0.1.0',
17        COLLAPSE_INDEX: false,
18        FILE_SUFFIX: '.html',
19        HAS_SOURCE:  true
20      };
21    </script>
22    <script type="text/javascript" src="../_static/jquery.js"></script>
23    <script type="text/javascript" src="../_static/underscore.js"></script>
24    <script type="text/javascript" src="../_static/doctools.js"></script>
25    <link rel="top" title="calculator v0.1.0 documentation" href="../index.html" />
26    <link rel="up" title="Reference" href="index.html" />
27    <link rel="next" title="Slit Length Calculator" href="slit_length_calculator.html" />
28    <link rel="prev" title="Reference" href="index.html" /> 
29  </head>
30  <body>
31    <div class="related">
32      <h3>Navigation</h3>
33      <ul>
34        <li class="right" style="margin-right: 10px">
35          <a href="../genindex.html" title="General Index"
36             accesskey="I">index</a></li>
37        <li class="right" >
38          <a href="../py-modindex.html" title="Python Module Index"
39             >modules</a> |</li>
40        <li class="right" >
41          <a href="slit_length_calculator.html" title="Slit Length Calculator"
42             accesskey="N">next</a> |</li>
43        <li class="right" >
44          <a href="index.html" title="Reference"
45             accesskey="P">previous</a> |</li>
46        <li><a href="../index.html">calculator v0.1.0 documentation</a> &raquo;</li>
47          <li><a href="index.html" accesskey="U">Reference</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="sld-calculator">
57<h1>Sld Calculator<a class="headerlink" href="#sld-calculator" title="Permalink to this headline">¶</a></h1>
58<div class="section" id="module-sans.calculator.sld_calculator">
59<span id="sans-calculator-sld-calculator"></span><h2><a class="reference internal" href="#module-sans.calculator.sld_calculator"><tt class="xref py py-mod docutils literal"><span class="pre">sans.calculator.sld_calculator</span></tt></a><a class="headerlink" href="#module-sans.calculator.sld_calculator" title="Permalink to this headline">¶</a></h2>
60<p>This module intends to compute the neutron scattering length density
61of a molecule.It uses methods of the periodictable package to provide
62easy user interface for  Sld calculator applications.</p>
63<dl class="class">
64<dt id="sans.calculator.sld_calculator.SldCalculator">
65<em class="property">class </em><tt class="descclassname">sans.calculator.sld_calculator.</tt><tt class="descname">SldCalculator</tt><a class="headerlink" href="#sans.calculator.sld_calculator.SldCalculator" title="Permalink to this definition">¶</a></dt>
66<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
67<p>Given a molecule, a density and a wavelength, this class
68determine scattering length density.</p>
69<p>Example: To get the sld value and the length 1/e the following
70methods need to be called in this later order:</p>
71<div class="highlight-python"><pre>formula = "H2O"
72density = 1.0
73wavelength = 6.0
74sld_calculator = SldCalculator()
75sld_calculator.set_value(formula, density, wavelength)
76sld_real, sld_im, _ = sld_calculator.calculate_neutron_sld()
77result : sld = sld_real +i sld_im</pre>
78</div>
79<p>Note: <strong>set_value()</strong> and <strong>calculate_neutron_sld()</strong> methods must
80be called in this order prior calling <strong>calculate_length()</strong> to get
81the proper result.</p>
82<dl class="method">
83<dt id="sans.calculator.sld_calculator.SldCalculator.calculate_length">
84<tt class="descname">calculate_length</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.calculator.sld_calculator.SldCalculator.calculate_length" title="Permalink to this definition">¶</a></dt>
85<dd>Compute the neutron 1/e length</dd></dl>
86
87<dl class="method">
88<dt id="sans.calculator.sld_calculator.SldCalculator.calculate_neutron_sld">
89<tt class="descname">calculate_neutron_sld</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.calculator.sld_calculator.SldCalculator.calculate_neutron_sld" title="Permalink to this definition">¶</a></dt>
90<dd>Compute the neutron SLD for a given molecule
91&#64;return sld_real : real part of the sld value
92&#64;return sld_im: imaginary part of the sld value
93&#64;return inc: incoherence cross section</dd></dl>
94
95<dl class="method">
96<dt id="sans.calculator.sld_calculator.SldCalculator.calculate_xray_sld">
97<tt class="descname">calculate_xray_sld</tt><big>(</big><em>element</em><big>)</big><a class="headerlink" href="#sans.calculator.sld_calculator.SldCalculator.calculate_xray_sld" title="Permalink to this definition">¶</a></dt>
98<dd>Get an element and compute the corresponding SLD for a given formula
99&#64;param element:  elementis a string of existing atom</dd></dl>
100
101<dl class="method">
102<dt id="sans.calculator.sld_calculator.SldCalculator.set_value">
103<tt class="descname">set_value</tt><big>(</big><em>formula</em>, <em>density</em>, <em>wavelength=6.0</em><big>)</big><a class="headerlink" href="#sans.calculator.sld_calculator.SldCalculator.set_value" title="Permalink to this definition">¶</a></dt>
104<dd>Store values into the sld calculator and compute the corresponding
105volume.</dd></dl>
106
107</dd></dl>
108
109</div>
110</div>
111
112
113          </div>
114        </div>
115      </div>
116      <div class="sphinxsidebar">
117        <div class="sphinxsidebarwrapper">
118  <h3><a href="../index.html">Table Of Contents</a></h3>
119  <ul>
120<li><a class="reference internal" href="#">Sld Calculator</a><ul>
121<li><a class="reference internal" href="#module-sans.calculator.sld_calculator"><tt class="docutils literal"><span class="pre">sans.calculator.sld_calculator</span></tt></a></li>
122</ul>
123</li>
124</ul>
125
126  <h4>Previous topic</h4>
127  <p class="topless"><a href="index.html"
128                        title="previous chapter">Reference</a></p>
129  <h4>Next topic</h4>
130  <p class="topless"><a href="slit_length_calculator.html"
131                        title="next chapter">Slit Length Calculator</a></p>
132  <h3>This Page</h3>
133  <ul class="this-page-menu">
134    <li><a href="../_sources/api/sld_calculator.txt"
135           rel="nofollow">Show Source</a></li>
136  </ul>
137<div id="searchbox" style="display: none">
138  <h3>Quick search</h3>
139    <form class="search" action="../search.html" method="get">
140      <input type="text" name="q" size="18" />
141      <input type="submit" value="Go" />
142      <input type="hidden" name="check_keywords" value="yes" />
143      <input type="hidden" name="area" value="default" />
144    </form>
145    <p class="searchtip" style="font-size: 90%">
146    Enter search terms or a module, class or function name.
147    </p>
148</div>
149<script type="text/javascript">$('#searchbox').show(0);</script>
150        </div>
151      </div>
152      <div class="clearer"></div>
153    </div>
154    <div class="related">
155      <h3>Navigation</h3>
156      <ul>
157        <li class="right" style="margin-right: 10px">
158          <a href="../genindex.html" title="General Index"
159             >index</a></li>
160        <li class="right" >
161          <a href="../py-modindex.html" title="Python Module Index"
162             >modules</a> |</li>
163        <li class="right" >
164          <a href="slit_length_calculator.html" title="Slit Length Calculator"
165             >next</a> |</li>
166        <li class="right" >
167          <a href="index.html" title="Reference"
168             >previous</a> |</li>
169        <li><a href="../index.html">calculator v0.1.0 documentation</a> &raquo;</li>
170          <li><a href="index.html" >Reference</a> &raquo;</li> 
171      </ul>
172    </div>
173    <div class="footer">
174        &copy; Copyright 2010, Gervaise Alina.
175      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0b1.
176    </div>
177  </body>
178</html>
Note: See TracBrowser for help on using the repository browser.