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


Ignore:
Timestamp:
Sep 3, 2014 1: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/ellipsoid.py

    r5d4777d r19dcb933  
    1212.. math:: 
    1313 
    14     P(q,\alpha) = \frac{\text{scale}}{V} f^2(q) + \text{background} 
     14    P(Q,\alpha) = {\text{scale} \over V} F^2(Q) + \text{background} 
    1515 
    1616where 
     
    1818.. math:: 
    1919 
    20     f(q) = \frac{3 (\Delta rho)) V (\sin[qr(R_p,R_e,\alpha)] \ 
    21                  - \cos[qr(R_p,R_e,\alpha)])}{[qr(R_q,R_b,\alpha)]^3} 
     20    F(Q) = {3 (\Delta rho)) V (\sin[Qr(R_p,R_e,\alpha)] 
     21                - \cos[Qr(R_p,R_e,\alpha)]) 
     22            \over [Qr(R_p,R_e,\alpha)]^3 } 
    2223 
    2324and 
     
    2526.. math:: 
    2627 
    27     r(R_p,R_e,\alpha) = \left[ R_e^2 \sin^2 \alpha + R_p^2 \cos^2 \alpha \right]^{1/2} 
     28    r(R_p,R_e,\alpha) = \left[ R_e^2 \sin^2 \alpha 
     29        + R_p^2 \cos^2 \alpha \right]^{1/2} 
    2830 
    2931 
     
    3638To provide easy access to the orientation of the ellipsoid, we define 
    3739the rotation axis of the ellipsoid using two angles $\theta$ and $\phi$. 
    38 These angles are defined in Figure :num:`figure #cylinder-orientation`. 
     40These angles are defined in the 
     41:ref:`cylinder orientation figure <cylinder-orientation>`. 
    3942For the ellipsoid, $\theta$ is the angle between the rotational axis 
    4043and the $z$-axis. 
     
    4245NB: The 2nd virial coefficient of the solid ellipsoid is calculated based 
    4346on the $R_p$ and $R_e$ values, and used as the effective radius for 
    44 $S(Q)$ when $P(Q) \dot S(Q)$ is applied. 
     47$S(Q)$ when $P(Q) \cdot S(Q)$ is applied. 
    4548 
    46 .. figure:: img/image121.JPG 
     49.. _ellipsoid-1d: 
     50 
     51.. figure:: img/ellipsoid_1d.JPG 
    4752 
    4853    The output of the 1D scattering intensity function for randomly oriented 
     
    5459use the c-library from NIST. 
    5560 
    56 .. figure:: img/image122.JPG 
     61.. _ellipsoid-geometry: 
     62 
     63.. figure:: img/ellipsoid_geometry.JPG 
    5764 
    5865    The angles for oriented ellipsoid. 
     
    6370Validation of our code was done by comparing the output of the 1D model 
    6471to the output of the software provided by the NIST (Kline, 2006). 
    65 Figure :num:`figure ellipsoid-comparison-1d` below shows a comparison of 
     72:num:`Figure ellipsoid-comparison-1d` below shows a comparison of 
    6673the 1D output of our model and the output of the NIST software. 
    6774 
    6875.. _ellipsoid-comparison-1d: 
    6976 
    70 .. figure:: img/image123.JPG 
     77.. figure:: img/ellipsoid_comparison_1d.jpg 
    7178 
    7279    Comparison of the SasView scattering intensity for an ellipsoid 
    7380    with the output of the NIST SANS analysis software.  The parameters 
    74     were set to: *scale=1.0*, *a=20 |Ang|*, *b=400 |Ang|*, 
    75     *sld-solvent_sld=3e-6 |Ang^-2|*, and *background=0.01 |cm^-1|*. 
     81    were set to: *scale* = 1.0, *rpolar* = 20 |Ang|, 
     82    *requatorial* =400 |Ang|, *contrast* = 3e-6 |Ang^-2|, 
     83    and *background* = 0.01 |cm^-1|. 
    7684 
    7785Averaging over a distribution of orientation is done by evaluating the 
     
    7987implementation of the intensity for fully oriented ellipsoids, we can 
    8088compare the result of averaging our 2D output using a uniform distribution 
    81 $p(\theta,\phi) = 1.0$.  Figure :num:`figure #ellipsoid-comparison-2d` 
     89$p(\theta,\phi) = 1.0$.  :num:`Figure #ellipsoid-comparison-2d` 
    8290shows the result of such a cross-check. 
    8391 
    8492.. _ellipsoid-comparison-2d: 
    8593 
    86 .. figure:: img/image124.jpg 
     94.. figure:: img/ellipsoid_comparison_2d.jpg 
    8795 
    8896    Comparison of the intensity for uniformly distributed ellipsoids 
    8997    calculated from our 2D model and the intensity from the NIST SANS 
    90     analysis software. The parameters used were: *scale=1.0*, 
    91     *a=20 |Ang|*, *b=400 |Ang|*, *sld-solvent_sld=3e-6 |Ang^-2|*, 
    92     and *background=0.0 |cm^-1|*. 
     98    analysis software. The parameters used were: *scale* = 1.0, 
     99    *rpolar* = 20 |Ang|, *requatorial* = 400 |Ang|, 
     100    *contrast* = 3e-6 |Ang^-2|, and *background* = 0.0 |cm^-1|. 
    93101 
    94 The discrepancy above *q=0.3 |cm^-1|* is due to the way the form factors 
     102The discrepancy above *q* = 0.3 |cm^-1| is due to the way the form factors 
    95103are calculated in the c-library provided by NIST. A numerical integration 
    96 has to be performed to obtain *P(q)* for randomly oriented particles. 
     104has to be performed to obtain $P(Q)$ for randomly oriented particles. 
    97105The NIST software performs that integration with a 76-point Gaussian 
    98 quadrature rule, which will become imprecise at high q where the amplitude 
    99 varies quickly as a function of $q$. The SasView result shown has been 
     106quadrature rule, which will become imprecise at high $Q$ where the amplitude 
     107varies quickly as a function of $Q$. The SasView result shown has been 
    100108obtained by summing over 501 equidistant points. Our result was found 
    101 to be stable over the range of *q* shown for a number of points higher 
     109to be stable over the range of $Q$ shown for a number of points higher 
    102110than 500. 
    103111 
Note: See TracChangeset for help on using the changeset viewer.