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/core_shell_cylinder.py

    r5d4777d r19dcb933  
    1212.. math:: 
    1313 
    14     P(q,\alpha) = \frac{\text{scale}}{V_s} f^2(q) + \text{background} 
     14    P(Q,\alpha) = {\text{scale} \over V_s} F^2(Q) + \text{background} 
    1515 
    1616where 
     
    1818.. math:: 
    1919 
    20     f(q) = (\rho_c - \rho_s) V_c \ 
    21            \frac{\sin( Q L/2 \cos \alpha)}{Q L/2 \cos \alpha} \ 
    22            \frac{2 J_1 (Q R \sin \alpha)}{Q R \sin \alpha} 
    23            + (\rho_s - \rho_\text{solv}) V_s \ 
    24            \frac{\sin( Q (L/2+T) \cos \alpha)}{Q (L/2+T) \cos \alpha} 
    25            \frac{2 J_1 (Q (R+T) \sin \alpha)}{Q (R+T) \sin \alpha} 
     20    F(Q) = &\ (\rho_c - \rho_s) V_c 
     21           {\sin \left( Q \tfrac12 L\cos\alpha \right) 
     22               \over Q \tfrac12 L\cos\alpha } 
     23           {2 J_1 \left( QR\sin\alpha \right) 
     24               \over QR\sin\alpha } \\ 
     25         &\ + (\rho_s - \rho_\text{solv}) V_s 
     26           {\sin \left( Q \left(\tfrac12 L+T\right) \cos\alpha \right) 
     27               \over Q \left(\tfrac12 L +T \right) \cos\alpha } 
     28           { 2 J_1 \left( Q(R+T)\sin\alpha \right) 
     29               \over Q(R+T)\sin\alpha } 
    2630 
    2731and 
     
    2933.. math:: 
    3034 
    31     V_s = \pi (R + T)^2 \dot (L + 2T) 
    32  
     35    V_s = \pi (R + T)^2 (L + 2T) 
    3336 
    3437and $\alpha$ is the angle between the axis of the cylinder and $\vec q$, 
     
    4245shell is given by $L+2T$. $J1$ is the first order Bessel function. 
    4346 
    44 .. figure:: img/image069.JPG 
     47.. _core-shell-cylinder-geometry: 
     48 
     49.. figure:: img/core_shell_cylinder_geometry.jpg 
    4550 
    4651    Core shell cylinder schematic. 
     
    4954define the axis of the cylinder using two angles $\theta$ and $\phi$. As 
    5055for the case of the cylinder, those angles are defined in 
    51 Figure :num:`figure #cylinder-orientation`. 
     56:num:`figure #cylinder-orientation`. 
    5257 
    5358NB: The 2nd virial coefficient of the cylinder is calculated based on 
    5459the radius and 2 length values, and used as the effective radius for 
    55 $S(Q)$ when $P(Q) \dot S(Q)$ is applied. 
     60$S(Q)$ when $P(Q) \cdot S(Q)$ is applied. 
    5661 
    5762The $\theta$ and $\phi$ parameters are not used for the 1D output. Our 
     
    6469Validation of our code was done by comparing the output of the 1D model to 
    6570the output of the software provided by the NIST (Kline, 2006). 
    66 Figure :num:`figure #core-shell-cylinder-comparison-1d` shows a comparison 
     71:num:`Figure #core-shell-cylinder-1d` shows a comparison 
    6772of the 1D output of our model and the output of the NIST software. 
    6873 
    69 .. _core-shell-cylinder-comparison-1d: 
     74.. _core-shell-cylinder-1d: 
    7075 
    71 .. figure:: img/image070.JPG 
     76.. figure:: img/core_shell_cylinder_1d.jpg 
    7277 
    7378    Comparison of the SasView scattering intensity for a core-shell cylinder 
    7479    with the output of the NIST SANS analysis software. The parameters were 
    75     set to: *scale=1.0 |Ang|*, *radius=20 |Ang|*, *thickness=10 |Ang|*, 
    76     *length=400 |Ang|*, *core_sld=1e-6 |Ang^-2|*, *shell_sld=4e-6 |Ang^-2|*, 
    77     *solvent_sld=1e-6 |Ang^-2|*, and *background=0.01 |cm^-1|*. 
     80    set to: *scale* = 1.0 |Ang|, *radius* = 20 |Ang|, *thickness* = 10 |Ang|, 
     81    *length* =400 |Ang|, *core_sld* =1e-6 |Ang^-2|, *shell_sld* = 4e-6 |Ang^-2|, 
     82    *solvent_sld* = 1e-6 |Ang^-2|, and *background* = 0.01 |cm^-1|. 
    7883 
    7984Averaging over a distribution of orientation is done by evaluating the 
     
    8186implementation of the intensity for fully oriented cylinders, we can 
    8287compare the result of averaging our 2D output using a uniform 
    83 distribution $p(\theta,\phi)* = 1.0$. 
    84 Figure :num:`figure #core-shell-cylinder-comparison-2d` shows the result 
     88distribution $p(\theta,\phi) = 1.0$. 
     89:num:`Figure #core-shell-cylinder-2d` shows the result 
    8590of such a cross-check. 
    8691 
    87 .. _core-shell-cylinder-comparison-2d: 
     92.. _core-shell-cylinder-2d: 
    8893 
    89 .. figure:: img/image071.JPG 
     94.. figure:: img/core_shell_cylinder_2d.jpg 
    9095 
    9196    Comparison of the intensity for uniformly distributed core-shell 
    9297    cylinders calculated from our 2D model and the intensity from the 
    93     NIST SANS analysis software. The parameters used were: *scale*=1.0*, 
    94     *radius=20 |Ang|*, *thickness=10 |Ang|*, *length*=400 |Ang|*, 
    95     *core_sld=1e-6 |Ang^-2|*, *shell_sld=4e-6 |Ang^-2|*, 
    96     *solvent_sld=1e-6 |Ang^-2|*, and *background=0.0 |cm^-1|*. 
     98    NIST SANS analysis software. The parameters used were: *scale* = 1.0, 
     99    *radius* = 20 |Ang|, *thickness* = 10 |Ang|, *length* = 400 |Ang|, 
     100    *core_sld* = 1e-6 |Ang^-2|, *shell_sld* = 4e-6 |Ang^-2|, 
     101    *solvent_sld* = 1e-6 |Ang^-2|, and *background* = 0.0 |cm^-1|. 
    97102 
    981032013/11/26 - Description reviewed by Heenan, R. 
     
    101106from numpy import pi, inf 
    102107 
    103 name = "cylinder" 
     108name = "core_shell_cylinder" 
    104109title = "Right circular cylinder with a core-shell scattering length density profile." 
    105110description = """ 
Note: See TracChangeset for help on using the changeset viewer.