Changeset 416f5c7 in sasmodels


Ignore:
Timestamp:
Oct 7, 2016 1:51:36 PM (8 years ago)
Author:
richardh
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
5df888c
Parents:
8749c1c4
Message:

fixes for numref warnings in docu, new equations core_shell_bicelle core_shell_ellipsoid

Location:
sasmodels/models
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_shell_bicelle.py

    radc753d r416f5c7  
    4242    I(Q,\alpha) = \frac{\text{scale}}{V} \cdot 
    4343        F(Q,\alpha)^2 + \text{background} 
     44 
    4445where 
    4546 
    4647.. math:: 
    4748 
    48     \begin{align}     
    49     F(Q,\alpha) = &\frac{1}{V_t} \bigg[  
    50     (\rho_c - \rho_f) V_c \frac{J_1(QRsin \alpha)}{QRsin\alpha}\frac{2 \cdot QLcos\alpha}{QLcos\alpha} \\ 
    51     &+(\rho_f - \rho_r) V_{c+f} \frac{J_1(QRsin\alpha)}{QRsin\alpha}\frac{2 \cdot Q(L+t_f)cos\alpha}{Q(L+t_f)cos\alpha} \\ 
    52     &+(\rho_r - \rho_s) V_t \frac{J_1(Q(R+t_r)sin\alpha)}{Q(R+t_r)sin\alpha}\frac{2 \cdot Q(L+t_f)cos\alpha}{Q(L+t_f)cos\alpha} 
     49        \begin{align}     
     50    F(Q,\alpha) = &\bigg[  
     51    (\rho_c - \rho_f) V_c \frac{J_1(QRsin \alpha)}{QRsin\alpha}\frac{2 \cdot sin(QLcos\alpha/2)}{QLcos\alpha} \\ 
     52    &+(\rho_f - \rho_r) V_{c+f} \frac{J_1(QRsin\alpha)}{QRsin\alpha}\frac{2 \cdot sin(Q(L/2+t_f)cos\alpha)}{Q(L+2t_f)cos\alpha} \\ 
     53    &+(\rho_r - \rho_s) V_t \frac{J_1(Q(R+t_r)sin\alpha)}{Q(R+t_r)sin\alpha}\frac{2 \cdot sin(Q(L/2+t_f)cos\alpha)}{Q(L+2t_f)cos\alpha} 
    5354    \bigg] 
    5455    \end{align}  
     
    130131#             ["name", "units", default, [lower, upper], "type", "description"], 
    131132parameters = [ 
    132     ["radius",         "Ang",       20, [0, inf],    "volume",      "Cylinder core radius"], 
     133    ["radius",         "Ang",       80, [0, inf],    "volume",      "Cylinder core radius"], 
    133134    ["thick_rim",  "Ang",       10, [0, inf],    "volume",      "Rim shell thickness"], 
    134135    ["thick_face", "Ang",       10, [0, inf],    "volume",      "Cylinder face thickness"], 
    135     ["length",         "Ang",      400, [0, inf],    "volume",      "Cylinder length"], 
     136    ["length",         "Ang",      50, [0, inf],    "volume",      "Cylinder length"], 
    136137    ["sld_core",       "1e-6/Ang^2", 1, [-inf, inf], "sld",         "Cylinder core scattering length density"], 
    137138    ["sld_face",       "1e-6/Ang^2", 4, [-inf, inf], "sld",         "Cylinder face scattering length density"], 
  • sasmodels/models/core_shell_ellipsoid.py

    r9272cbd r416f5c7  
    1212 
    1313The geometric parameters of this model are shown in the diagram above, which 
    14 shows (a) a cross section of the circular equator and (b) a cross section through 
     14shows (a) a cut through at the circular equator and (b) a cross section through 
    1515the poles, of a prolate ellipsoid. 
    1616 
     
    1919 
    2020For a fixed shell thickness *XpolarShell = 1*, to scale the shell thickness 
    21 pro-rata with the radius *XpolarShell = X_core*. 
     21pro-rata with the radius set or constrain *XpolarShell = X_core*. 
    2222 
    2323When including an $S(q)$, the radius in $S(q)$ is calculated to be that of 
     
    3333this moves to the $S(q)$ volume fraction, and scale should then be 1.0, 
    3434or contain some other units conversion factor (for example, if you have SAXS data). 
     35 
     36The calculation of intensity follows that for the solid ellipsoid, but with separate 
     37terms for the core-shell and shell-solvent boundaries. 
     38 
     39.. math:: 
     40 
     41    P(q,\alpha) = \frac{\text{scale}}{V} F^2(q,\alpha) + \text{background} 
     42 
     43where 
     44 
     45.. math:: 
     46    \begin{align}     
     47    F(q,\alpha) = &f(q,radius\_equat\_core,radius\_equat\_core.x\_core,\alpha) \\ 
     48    &+ f(q,radius\_equat\_core + thick\_shell,radius\_equat\_core.x\_core + thick\_shell.x\_polar\_shell,\alpha) 
     49    \end{align}  
     50 
     51where 
     52  
     53.. math:: 
     54 
     55    f(q,R_e,R_p,\alpha) = \frac{3 \Delta \rho V (\sin[qr(R_p,R_e,\alpha)] 
     56                - \cos[qr(R_p,R_e,\alpha)])} 
     57                {[qr(R_p,R_e,\alpha)]^3} 
     58 
     59and 
     60 
     61.. math:: 
     62 
     63    r(R_e,R_p,\alpha) = \left[ R_e^2 \sin^2 \alpha 
     64        + R_p^2 \cos^2 \alpha \right]^{1/2} 
     65 
     66 
     67$\alpha$ is the angle between the axis of the ellipsoid and $\vec q$, 
     68$V = (4/3)\pi R_pR_e^2$ is the volume of the ellipsoid , $R_p$ is the polar radius along the 
     69rotational axis of the ellipsoid, $R_e$ is the equatorial radius perpendicular 
     70to the rotational axis of the ellipsoid and $\Delta \rho$ (contrast) is the 
     71scattering length density difference, either $(sld\_core - sld\_shell)$ or $(sld\_shell - sld\_solvent)$. 
     72 
     73For randomly oriented particles: 
     74 
     75.. math:: 
     76 
     77   F^2(q)=\int_{0}^{\pi/2}{F^2(q,\alpha)\sin(\alpha)d\alpha} 
     78 
    3579 
    3680References 
  • sasmodels/models/cylinder.py

    r551398c r416f5c7  
    1414.. math:: 
    1515 
    16     P(q,\alpha) = \frac{\text{scale}}{V} F^2(q) + \text{background} 
     16    P(q,\alpha) = \frac{\text{scale}}{V} F^2(q,\alpha) + \text{background} 
    1717 
    1818where 
     
    2020.. math:: 
    2121 
    22     F(q) = 2 (\Delta \rho) V 
     22    F(q,\alpha) = 2 (\Delta \rho) V 
    2323           \frac{\sin \left(\tfrac12 qL\cos\alpha \right)} 
    2424                {\tfrac12 qL \cos \alpha} 
     
    3131first order Bessel function. 
    3232 
     33For randomly oriented particles: 
     34 
     35.. math:: 
     36 
     37    F^2(q)=\int_{0}^{\pi/2}{F^2(q,\alpha)\sin(\alpha)d\alpha} 
     38 
     39 
    3340To provide easy access to the orientation of the cylinder, we define the 
    3441axis of the cylinder using two angles $\theta$ and $\phi$. Those angles 
    35 are defined in :numref:`cylinder-angle-definition`. 
     42are defined in :numref:`cylinder-angle-definition` . 
    3643 
    3744.. _cylinder-angle-definition: 
  • sasmodels/models/ellipsoid.py

    ra807206 r416f5c7  
    3535to the rotational axis of the ellipsoid and $\Delta \rho$ (contrast) is the 
    3636scattering length density difference between the scatterer and the solvent. 
     37 
     38For randomly oriented particles: 
     39 
     40.. math:: 
     41 
     42   F^2(q)=\int_{0}^{\pi/2}{F^2(q,\alpha)\sin(\alpha)d\alpha} 
     43 
    3744 
    3845To provide easy access to the orientation of the ellipsoid, we define 
  • sasmodels/models/parallelepiped.py

    ra807206 r416f5c7  
    1010 
    1111| This model calculates the scattering from a rectangular parallelepiped 
    12 | (:numref:`parallelepiped-image`). 
     12| (\:numref:`parallelepiped-image`\). 
    1313| If you need to apply polydispersity, see also :ref:`rectangular-prism`. 
    1414 
  • sasmodels/models/triaxial_ellipsoid.py

    ra807206 r416f5c7  
    3636we define the axis of the cylinder using the angles $\theta$, $\phi$ 
    3737and $\psi$. These angles are defined on 
    38 :numref:`triaxial-ellipsoid-angles`. 
     38:numref:`triaxial-ellipsoid-angles` . 
    3939The angle $\psi$ is the rotational angle around its own $c$ axis 
    4040against the $q$ plane. For example, $\psi = 0$ when the 
Note: See TracChangeset for help on using the changeset viewer.