Changeset eb69cce in sasmodels for sasmodels/models/capped_cylinder.py


Ignore:
Timestamp:
Nov 30, 2015 7:18:41 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
d18f8a8
Parents:
d138d43
Message:

make model docs more consistent; build pdf docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/capped_cylinder.py

    r485aee2 reb69cce  
    11r""" 
    22Calculates the scattering from a cylinder with spherical section end-caps. 
    3 This model simply becomes the a convex lens when the length of the cylinder 
    4 $L=0$, that is, a sphereocylinder with end caps that have a radius larger 
    5 than that of the cylinder and the center of the end cap radius lies within 
    6 the cylinder. See the diagram for the details of the geometry and 
    7 restrictions on parameter values. 
     3Like :ref:`barbell`, this is a sphereocylinder with end caps that have a 
     4radius larger than that of the cylinder, but with the center of the end cap 
     5radius lying within the cylinder. This model simply becomes the a convex 
     6lens when the length of the cylinder $L=0$. See the diagram for the details 
     7of the geometry and restrictions on parameter values. 
    88 
    99Definitions 
    1010----------- 
    1111 
    12 The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale. 
     12.. figure:: img/capped_cylinder_geometry.jpg 
    1313 
    14 The capped cylinder geometry is defined as 
     14    Capped cylinder geometry, where $r$ is *radius*, $R$ is *bell_radius* and 
     15    $L$ is *length*. Since the end cap radius $R \geq r$ and by definition 
     16    for this geometry $h < 0$, $h$ is then defined by $r$ and $R$ as 
     17    $h = - \sqrt{R^2 - r^2}$ 
    1518 
    16 .. image:: img/capped_cylinder_geometry.jpg 
    17  
    18 where $r$ is the radius of the cylinder. All other parameters are as defined 
    19 in the diagram. Since the end cap radius $R \ge r$ and by definition for this 
    20 geometry $h < 0$, $h$ is then defined by $r$ and $R$ as 
     19The scattered intensity $I(q)$ is calculated as 
    2120 
    2221.. math:: 
    2322 
    24     h = - \sqrt{R^2 - r^2} 
     23    I(q) = \frac{\Delta \rho^2}{V} \left<A^2(q)\right> 
    2524 
    26 The scattered intensity $I(Q)$ is calculated as 
     25where the amplitude $A(q)$ is given as 
    2726 
    2827.. math:: 
    2928 
    30     I(Q) = \frac{(\Delta \rho)^2}{V} \left< A^2(Q)\right> 
    31  
    32 where the amplitude $A(Q)$ is given as 
    33  
    34 .. math:: 
    35  
    36     A(Q) =&\ \pi r^2L 
    37         {\sin\left(\tfrac12 QL\cos\theta\right) 
    38             \over \tfrac12 QL\cos\theta} 
    39         {2 J_1(Qr\sin\theta) \over Qr\sin\theta} \\ 
     29    A(q) =&\ \pi r^2L 
     30        \frac{\sin\left(\tfrac12 qL\cos\theta\right)} 
     31            {\tfrac12 qL\cos\theta} 
     32        \frac{2 J_1(qr\sin\theta)}{qr\sin\theta} \\ 
    4033        &\ + 4 \pi R^3 \int_{-h/R}^1 dt 
    41         \cos\left[ Q\cos\theta 
     34        \cos\left[ q\cos\theta 
    4235            \left(Rt + h + {\tfrac12} L\right)\right] 
    4336        \times (1-t^2) 
    44         {J_1\left[QR\sin\theta \left(1-t^2\right)^{1/2}\right] 
    45              \over QR\sin\theta \left(1-t^2\right)^{1/2}} 
     37        \frac{J_1\left[qR\sin\theta \left(1-t^2\right)^{1/2}\right]} 
     38             {qR\sin\theta \left(1-t^2\right)^{1/2}} 
    4639 
    47 The $\left< \ldots \right>$ brackets denote an average of the structure over 
    48 all orientations. $\left< A^2(Q)\right>$ is then the form factor, $P(Q)$. 
     40The $\left<\ldots\right>$ brackets denote an average of the structure over 
     41all orientations. $\left< A^2(q)\right>$ is then the form factor, $P(q)$. 
    4942The scale factor is equivalent to the volume fraction of cylinders, each of 
    50 volume, $V$. Contrast is the difference of scattering length densities of 
    51 the cylinder and the surrounding solvent. 
     43volume, $V$. Contrast $\Delta\rho$ is the difference of scattering length 
     44densities of the cylinder and the surrounding solvent. 
    5245 
    5346The volume of the capped cylinder is (with $h$ as a positive value here) 
     
    5851 
    5952 
    60 and its radius-of-gyration is 
     53and its radius of gyration is 
    6154 
    6255.. math:: 
     
    7366.. note:: 
    7467 
    75     The requirement that $R \ge r$ is not enforced in the model! 
     68    The requirement that $R \geq r$ is not enforced in the model! 
    7669    It is up to you to restrict this during analysis. 
    7770 
     
    10497    Examples of the angles for oriented pp against the detector plane. 
    10598 
    106 REFERENCE 
     99References 
     100---------- 
    107101 
    108102H Kaya, *J. Appl. Cryst.*, 37 (2004) 223-230 
Note: See TracChangeset for help on using the changeset viewer.