source: sasmodels/model/cylinder.html @ 68532f3

gh-pages
Last change on this file since 68532f3 was 68532f3, checked in by ajj, 8 years ago

Adding docs

  • Property mode set to 100644
File size: 8.9 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>2.1.1.4. Cylinder &mdash; Sasmodels</title>
10   
11    <link rel="stylesheet" href="../_static/haiku-site.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.9',
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="Sasmodels" href="../index.html" />
28    <link rel="up" title="2.1.1. Cylinder Functions" href="../ref/models/shape-cylinder.html" />
29    <link rel="next" title="2.1.2. Ellipsoid Functions" href="../ref/models/shape-ellipsoid.html" />
30    <link rel="prev" title="2.1.1.3. Core shell cylinder" href="core_shell_cylinder.html" /> 
31  </head>
32  <body>
33      <div class="header"><h1 class="heading"><a href="../index.html">
34          <span>Home</span></a></h1>
35        <h2 class="heading"><span>2.1.1.4. Cylinder</span></h2>
36      </div>
37      <div class="topnav">
38     
39        <p>
40        «&#160;&#160;<a href="core_shell_cylinder.html">2.1.1.3. Core shell cylinder</a>
41        &#160;&#160;::&#160;&#160;
42        <a class="uplink" href="../index.html">Contents</a>
43        &#160;&#160;::&#160;&#160;
44        <a href="../ref/models/shape-ellipsoid.html">2.1.2. Ellipsoid Functions</a>&#160;&#160;»
45        </p>
46
47      </div>
48      <div class="content">
49       
50       
51  <div class="section" id="cylinder">
52<span id="id1"></span><h1>2.1.1.4. Cylinder<a class="headerlink" href="#cylinder" title="Permalink to this headline">¶</a></h1>
53<p>Right circular cylinder with uniform scattering length density.</p>
54<table border="1" class="docutils">
55<colgroup>
56<col width="16%" />
57<col width="49%" />
58<col width="17%" />
59<col width="19%" />
60</colgroup>
61<thead valign="bottom">
62<tr class="row-odd"><th class="head">Parameter</th>
63<th class="head">Description</th>
64<th class="head">Units</th>
65<th class="head">Default value</th>
66</tr>
67</thead>
68<tbody valign="top">
69<tr class="row-even"><td>scale</td>
70<td>Source intensity</td>
71<td>None</td>
72<td>1</td>
73</tr>
74<tr class="row-odd"><td>background</td>
75<td>Source background</td>
76<td>cm<sup>-1</sup></td>
77<td>0</td>
78</tr>
79<tr class="row-even"><td>sld</td>
80<td>Cylinder scattering length density</td>
81<td>10<sup>-6</sup>Å<sup>-2</sup></td>
82<td>4</td>
83</tr>
84<tr class="row-odd"><td>solvent_sld</td>
85<td>Solvent scattering length density</td>
86<td>10<sup>-6</sup>Å<sup>-2</sup></td>
87<td>1</td>
88</tr>
89<tr class="row-even"><td>radius</td>
90<td>Cylinder radius</td>
91<td>Å</td>
92<td>20</td>
93</tr>
94<tr class="row-odd"><td>length</td>
95<td>Cylinder length</td>
96<td>Å</td>
97<td>400</td>
98</tr>
99<tr class="row-even"><td>theta</td>
100<td>In plane angle</td>
101<td>degree</td>
102<td>60</td>
103</tr>
104<tr class="row-odd"><td>phi</td>
105<td>Out of plane angle</td>
106<td>degree</td>
107<td>60</td>
108</tr>
109</tbody>
110</table>
111<p>The returned value is scaled to units of cm<sup>-1</sup>.</p>
112<p>The form factor is normalized by the particle volume.</p>
113<p>For information about polarised and magnetic scattering, click <a href="#id2"><span class="problematic" id="id3">here_</span></a>.</p>
114<div class="section" id="definition">
115<h2>Definition<a class="headerlink" href="#definition" title="Permalink to this headline">¶</a></h2>
116<p>The output of the 2D scattering intensity function for oriented cylinders is
117given by (Guinier, 1955)</p>
118<div class="math">
119\[P(Q,\alpha) = {\text{scale} \over V} F^2(Q) + \text{background}\]</div>
120<p>where</p>
121<div class="math">
122\[F(Q) = 2 (\Delta \rho) V
123       {\sin \left(Q\tfrac12 L\cos\alpha \right)
124           \over Q\tfrac12 L \cos \alpha}
125       {J_1 \left(Q R \sin \alpha\right) \over Q R \sin \alpha}\]</div>
126<p>and <span class="math">\(\alpha\)</span> is the angle between the axis of the cylinder and <span class="math">\(\vec q\)</span>, <span class="math">\(V\)</span>
127is the volume of the cylinder, <span class="math">\(L\)</span> is the length of the cylinder, <span class="math">\(R\)</span> is the
128radius of the cylinder, and <span class="math">\(\Delta\rho\)</span> (contrast) is the scattering length
129density difference between the scatterer and the solvent. <span class="math">\(J_1\)</span> is the
130first order Bessel function.</p>
131<p>To provide easy access to the orientation of the cylinder, we define the
132axis of the cylinder using two angles <span class="math">\(\theta\)</span> and <span class="math">\(\phi\)</span>. Those angles
133are defined in <a class="pageref" href="#cylinder-orientation">figure  1</a>.</p>
134<div class="figure" id="cylinder-orientation">
135<img alt="../_images/orientation.jpg" src="../_images/orientation.jpg" />
136<p class="caption">Figure 1: Definition of the angles for oriented cylinders.</p>
137</div>
138<div class="figure">
139<img alt="../_images/orientation2.jpg" src="../_images/orientation2.jpg" />
140<p class="caption">Figure 2: Examples of the angles for oriented cylinders against the detector plane.</p>
141</div>
142<p>NB: The 2nd virial coefficient of the cylinder is calculated based on the
143radius and length values, and used as the effective radius for <span class="math">\(S(Q)\)</span>
144when <span class="math">\(P(Q) \cdot S(Q)\)</span> is applied.</p>
145<p>The output of the 1D scattering intensity function for randomly oriented
146cylinders is then given by</p>
147<div class="math">
148\[P(Q) = {\text{scale} \over V}
149    \int_0^{\pi/2} F^2(Q,\alpha) \sin \alpha\ d\alpha + \text{background}\]</div>
150<p>The <em>theta</em> and <em>phi</em> parameters are not used for the 1D output. Our
151implementation of the scattering kernel and the 1D scattering intensity
152use the c-library from NIST.</p>
153</div>
154<div class="section" id="validation">
155<h2>Validation<a class="headerlink" href="#validation" title="Permalink to this headline">¶</a></h2>
156<p>Validation of our code was done by comparing the output of the 1D model
157to the output of the software provided by the NIST (Kline, 2006).
158<a class="pageref" href="#cylinder-compare">Figure  3</a> shows a comparison of
159the 1D output of our model and the output of the NIST software.</p>
160<div class="figure" id="cylinder-compare">
161<img alt="../_images/cylinder_compare.jpg" src="../_images/cylinder_compare.jpg" />
162<p class="caption">Figure 3: Comparison of the SasView scattering intensity for a cylinder with the
163output of the NIST SANS analysis software.
164The parameters were set to: <em>scale</em> = 1.0, <em>radius</em> = 20 Å,
165<em>length</em> = 400 Å, <em>contrast</em> = 3e-6 Å<sup>-2</sup>, and
166<em>background</em> = 0.01 cm<sup>-1</sup>.</p>
167</div>
168<p>In general, averaging over a distribution of orientations is done by
169evaluating the following</p>
170<div class="math">
171\[P(Q) = \int_0^{\pi/2} d\phi
172    \int_0^\pi p(\theta, \phi) P_0(Q,\alpha) \sin \theta\ d\theta\]</div>
173<p>where <span class="math">\(p(\theta,\phi)\)</span> is the probability distribution for the orientation
174and <span class="math">\(P_0(Q,\alpha)\)</span> is the scattering intensity for the fully oriented
175system. Since we have no other software to compare the implementation of
176the intensity for fully oriented cylinders, we can compare the result of
177averaging our 2D output using a uniform distribution <span class="math">\(p(\theta, \phi) = 1.0\)</span>.
178<a class="pageref" href="#cylinder-crosscheck">Figure  4</a> shows the result of
179such a cross-check.</p>
180<div class="figure" id="cylinder-crosscheck">
181<img alt="../_images/cylinder_crosscheck.jpg" src="../_images/cylinder_crosscheck.jpg" />
182<p class="caption">Figure 4: Comparison of the intensity for uniformly distributed cylinders
183calculated from our 2D model and the intensity from the NIST SANS
184analysis software.
185The parameters used were: <em>scale</em> = 1.0, <em>radius</em> = 20 Å,
186<em>length</em> = 400 Å, <em>contrast</em> = 3e-6 Å<sup>-2</sup>, and
187<em>background</em> = 0.0 cm<sup>-1</sup>.</p>
188</div>
189</div>
190</div>
191
192
193      </div>
194      <div class="bottomnav">
195     
196        <p>
197        «&#160;&#160;<a href="core_shell_cylinder.html">2.1.1.3. Core shell cylinder</a>
198        &#160;&#160;::&#160;&#160;
199        <a class="uplink" href="../index.html">Contents</a>
200        &#160;&#160;::&#160;&#160;
201        <a href="../ref/models/shape-ellipsoid.html">2.1.2. Ellipsoid Functions</a>&#160;&#160;»
202        </p>
203
204      </div>
205
206    <div class="footer">
207        &copy; Copyright 2014, sasview team.
208      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
209    </div>
210  </body>
211</html>
Note: See TracBrowser for help on using the repository browser.