source: sasmodels/_sources/model/cylinder.txt @ 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: 4.5 KB
Line 
1.. _cylinder:
2
3Cylinder
4=======================================================
5
6Right circular cylinder with uniform scattering length density.
7
8=========== ================================== ============ =============
9Parameter   Description                        Units        Default value
10=========== ================================== ============ =============
11scale       Source intensity                   None                     1
12background  Source background                  |cm^-1|                  0
13sld         Cylinder scattering length density |1e-6Ang^-2|             4
14solvent_sld Solvent scattering length density  |1e-6Ang^-2|             1
15radius      Cylinder radius                    |Ang|                   20
16length      Cylinder length                    |Ang|                  400
17theta       In plane angle                     degree                  60
18phi         Out of plane angle                 degree                  60
19=========== ================================== ============ =============
20
21The returned value is scaled to units of |cm^-1|.
22
23
24The form factor is normalized by the particle volume.
25
26For information about polarised and magnetic scattering, click here_.
27
28Definition
29----------
30
31The output of the 2D scattering intensity function for oriented cylinders is
32given by (Guinier, 1955)
33
34.. math::
35
36    P(Q,\alpha) = {\text{scale} \over V} F^2(Q) + \text{background}
37
38where
39
40.. math::
41
42    F(Q) = 2 (\Delta \rho) V
43           {\sin \left(Q\tfrac12 L\cos\alpha \right)
44               \over Q\tfrac12 L \cos \alpha}
45           {J_1 \left(Q R \sin \alpha\right) \over Q R \sin \alpha}
46
47and $\alpha$ is the angle between the axis of the cylinder and $\vec q$, $V$
48is the volume of the cylinder, $L$ is the length of the cylinder, $R$ is the
49radius of the cylinder, and $\Delta\rho$ (contrast) is the scattering length
50density difference between the scatterer and the solvent. $J_1$ is the
51first order Bessel function.
52
53To provide easy access to the orientation of the cylinder, we define the
54axis of the cylinder using two angles $\theta$ and $\phi$. Those angles
55are defined in :num:`figure #cylinder-orientation`.
56
57.. _cylinder-orientation:
58
59.. figure:: img/orientation.jpg
60
61    Definition of the angles for oriented cylinders.
62
63.. figure:: img/orientation2.jpg
64
65    Examples of the angles for oriented cylinders against the detector plane.
66
67NB: The 2nd virial coefficient of the cylinder is calculated based on the
68radius and length values, and used as the effective radius for $S(Q)$
69when $P(Q) \cdot S(Q)$ is applied.
70
71The output of the 1D scattering intensity function for randomly oriented
72cylinders is then given by
73
74.. math::
75
76    P(Q) = {\text{scale} \over V}
77        \int_0^{\pi/2} F^2(Q,\alpha) \sin \alpha\ d\alpha + \text{background}
78
79The *theta* and *phi* parameters are not used for the 1D output. Our
80implementation of the scattering kernel and the 1D scattering intensity
81use the c-library from NIST.
82
83Validation
84----------
85
86Validation of our code was done by comparing the output of the 1D model
87to the output of the software provided by the NIST (Kline, 2006).
88:num:`Figure #cylinder-compare` shows a comparison of
89the 1D output of our model and the output of the NIST software.
90
91.. _cylinder-compare:
92
93.. figure:: img/cylinder_compare.jpg
94
95    Comparison of the SasView scattering intensity for a cylinder with the
96    output of the NIST SANS analysis software.
97    The parameters were set to: *scale* = 1.0, *radius* = 20 |Ang|,
98    *length* = 400 |Ang|, *contrast* = 3e-6 |Ang^-2|, and
99    *background* = 0.01 |cm^-1|.
100
101In general, averaging over a distribution of orientations is done by
102evaluating the following
103
104.. math::
105
106    P(Q) = \int_0^{\pi/2} d\phi
107        \int_0^\pi p(\theta, \phi) P_0(Q,\alpha) \sin \theta\ d\theta
108
109
110where $p(\theta,\phi)$ is the probability distribution for the orientation
111and $P_0(Q,\alpha)$ is the scattering intensity for the fully oriented
112system. Since we have no other software to compare the implementation of
113the intensity for fully oriented cylinders, we can compare the result of
114averaging our 2D output using a uniform distribution $p(\theta, \phi) = 1.0$.
115:num:`Figure #cylinder-crosscheck` shows the result of
116such a cross-check.
117
118.. _cylinder-crosscheck:
119
120.. figure:: img/cylinder_crosscheck.jpg
121
122    Comparison of the intensity for uniformly distributed cylinders
123    calculated from our 2D model and the intensity from the NIST SANS
124    analysis software.
125    The parameters used were: *scale* = 1.0, *radius* = 20 |Ang|,
126    *length* = 400 |Ang|, *contrast* = 3e-6 |Ang^-2|, and
127    *background* = 0.0 |cm^-1|.
128
Note: See TracBrowser for help on using the repository browser.