Changeset 19dcb933 in sasmodels for sasmodels/models/capped_cylinder.py


Ignore:
Timestamp:
Sep 3, 2014 3:16:10 AM (10 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:
1c7ffdc
Parents:
87985ca
Message:

build docs for models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/capped_cylinder.py

    rf4cf580 r19dcb933  
    1414The capped cylinder geometry is defined as 
    1515 
    16 .. image:: img/image112.JPG 
     16.. image:: img/capped_cylinder_geometry.jpg 
    1717 
    1818where $r$ is the radius of the cylinder. All other parameters are as defined 
     
    2424    h = - \sqrt{R^2 - r^2} 
    2525 
    26 The scattered intensity $I(q)$ is calculated as 
     26The scattered intensity $I(Q)$ is calculated as 
    2727 
    2828.. math:: 
    2929 
    30     I(q) = \frac{(\Delta \rho)^2}{V} left<A^2(q)\right> 
     30    I(Q) = \frac{(\Delta \rho)^2}{V} \left< A^2(Q)\right> 
    3131 
    32 where the amplitude $A(q)$ is given as 
     32where the amplitude $A(Q)$ is given as 
    3333 
    3434.. math:: 
    3535 
    36     A(Q) = \pi r^2L \frac{sin(Q(L/2) \cos \theta)}{Q(L/2) \cos \theta} \ 
    37         \frac{2 J_1(Q r \sin \theta)}{Q r \sin \theta} \ 
    38         + 4 \pi R^3 \int_{-h/R}^1{dt \cos [ Q cos\theta (Rt + h + L/2)] \ 
    39         x (1-t^2)\frac{J_1[Q R \sin \theta (1-t^2)^{1/2}]}{Q R \sin \theta (1-t^2)^{1/2} 
     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} \\ 
     40        &\ + 4 \pi R^3 \int_{-h/R}^1 dt 
     41        \cos\left[ Q\cos\theta 
     42            \left(Rt + h + {\tfrac12} L\right)\right] 
     43        \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}} 
    4046 
    4147The $\left< \ldots \right>$ brackets denote an average of the structure over 
    42 all orientations. $\left< A^2(q)\right>$ is then the form factor, $P(q)$. 
     48all orientations. $\left< A^2(Q)\right>$ is then the form factor, $P(Q)$. 
    4349The scale factor is equivalent to the volume fraction of cylinders, each of 
    4450volume, $V$. Contrast is the difference of scattering length densities of 
     
    4955.. math:: 
    5056 
    51     V = \pi r_c^2 L + \frac{2\pi}{3}(R-h)^2(2R + h) 
     57    V = \pi r_c^2 L + \tfrac{2\pi}{3}(R-h)^2(2R + h) 
    5258 
    5359 
    5460and its radius-of-gyration is 
    5561 
    56     R_g^2 = \left[ \frac{12}{5}R^5 + R^4(6h+\frac{3}{2}L) \ 
    57         + R^2(4h^2 + L^2 + 4Lh) + R^2(3Lh^2 + [frac{3}{2}L^2h) \ 
    58         + \frac{2}{5}h^5 - \frac{1}{2}Lh^4 - \frac{1}{2}L^2h^3 \ 
    59         + \frac{1}{4}L^3r^2 + \frac{3}{2}Lr^4\right] \ 
    60         (4R^3 6R^2h - 2h^3 + 3r^2L)^{-1} 
     62.. math:: 
     63 
     64    R_g^2 =&\ \left[ \tfrac{12}{5}R^5 
     65        + R^4\left(6h+\tfrac32 L\right) 
     66        + R^2\left(4h^2 + L^2 + 4Lh\right) 
     67        + R^2\left(3Lh^2 + \tfrac32 L^2h\right) \right. \\ 
     68        &\ \left. + \tfrac25 h^5 - \tfrac12 Lh^4 - \tfrac12 L^2h^3 
     69        + \tfrac14 L^3r^2 + \tfrac32 Lr^4 \right] 
     70        \left( 4R^3 6R^2h - 2h^3 + 3r^2L \right)^{-1} 
    6171 
    6272 
    63 **The requirement that $R \ge r$ is not enforced in the model! It is up to 
    64 you to restrict this during analysis.** 
     73.. note:: 
    6574 
    66 Figure :num:`figure #capped-cylinder-1d` shows the output produced by 
     75    The requirement that $R \ge r$ is not enforced in the model! 
     76    It is up to you to restrict this during analysis. 
     77 
     78:num:`Figure #capped-cylinder-1d` shows the output produced by 
    6779a running the 1D capped cylinder model, using *qmin* = 0.001 |Ang^-1|, 
    6880*qmax* = 0.7 |Ang^-1| and  the default values of the parameters. 
     
    7082.. _capped-cylinder-1d: 
    7183 
    72 .. figure:: img/image117.jpg 
     84.. figure:: img/capped_cylinder_1d.jpg 
    7385 
    7486    1D plot using the default values (w/256 data point). 
    7587 
    7688The 2D scattering intensity is calculated similar to the 2D cylinder model. 
    77 Figure :num:`figure #capped-cylinder-2d` shows the output for $\theta=45^\circ$ 
     89:num:`Figure #capped-cylinder-2d` shows the output for $\theta=45^\circ$ 
    7890and $\phi=0^\circ$ with default values for the other parameters. 
    7991 
    8092.. _capped-cylinder-2d: 
    8193 
    82 .. figure:: img/image118.JPG 
     94.. figure:: img/capped_cylinder_2d.jpg 
    8395 
    8496    2D plot (w/(256X265) data points). 
    8597 
    86 .. figure:: img/image061.JPG 
     98.. figure:: img/orientation.jpg 
    8799 
    88100    Definition of the angles for oriented 2D cylinders. 
    89101 
    90 .. figure:: img/image062.jpg 
     102.. figure:: img/orientation2.jpg 
    91103 
    92104    Examples of the angles for oriented pp against the detector plane. 
Note: See TracChangeset for help on using the changeset viewer.