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


Ignore:
Timestamp:
Nov 30, 2015 9: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/parallelepiped.py

    rd138d43 reb69cce  
    77---------- 
    88 
    9 This model provides the form factor, *P(q)*, for a rectangular parallelepiped 
     9This model provides the form factor, $P(q)$, for a rectangular parallelepiped 
    1010(below) where the form factor is normalized by the volume of the 
    1111parallelepiped. If you need to apply polydispersity, see also 
     
    1616.. math:: 
    1717 
    18     P(Q) = {\text{scale} \over V} F^2(Q) + \text{background} 
     18    P(q) = \frac{\text{scale}}{V} F^2(q) + \text{background} 
    1919 
    20 where the volume *V* = *A B C* and the averaging < > is applied over all 
    21 orientations for 1D. 
     20where the volume $V = A B C$ and the averaging $\left<\ldots\right>$ is 
     21applied over all orientations for 1D. 
    2222 
    2323.. figure:: img/parallelepiped.jpg 
     
    2525   Parallelepiped with the corresponding definition of sides. 
    2626 
    27 The edge of the solid must satisfy the condition that** *A* < *B* < *C*. 
    28 Then, assuming *a* = *A* / *B* < 1, *b* = *B* / *B* = 1, and 
    29 *c* = *C* / *B* > 1, the form factor is 
     27The edge of the solid must satisfy the condition that $A < B < C$. 
     28Then, assuming $a = A/B < 1$, $b = B /B = 1$, and $c = C/B > 1$, the 
     29form factor is 
    3030 
    3131.. math:: 
    3232 
    33     P(q) = \frac{\textstyle{scale}}{V}\int_0^1 \phi(\mu \sqrt{1-\sigma^2},a) 
    34     [S(\mu c \sigma/2)]^2 d\sigma 
     33    P(q) = \frac{\text{scale}}{V}\int_0^1 
     34        \phi\left(\mu \sqrt{1-\sigma^2},a\right) 
     35        \left[S(\mu c \sigma/2)\right]^2 d\sigma 
    3536 
    3637with 
     
    3839.. math:: 
    3940 
    40     \phi(\mu,a) = \int_0^1 \{S[\frac{\mu}{2}\cos(\frac{\pi}{2}u)] 
    41     S[\frac{\mu a}{2}\sin(\frac{\pi}{2}u)]\}^2 du 
     41    \phi(\mu,a) = \int_0^1 
     42        \left\{S\left[\frac{\mu}{2}\cos(\frac{\pi}{2}u)\right] 
     43               S\left[\frac{\mu a}{2}\sin(\frac{\pi}{2}u)\right] 
     44               \right\}^2 du 
    4245 
    4346    S(x) = \frac{\sin x}{x} 
     
    5255 
    5356The scattering intensity per unit volume is returned in units of |cm^-1|; 
    54 ie, *I(q)* = |phi| *P(q)*\ . 
     57i.e., $I(q) = \phi P(q)$. 
    5558 
    5659NB: The 2nd virial coefficient of the parallelpiped is calculated based on 
    57 the averaged effective radius (= sqrt(*short_a* \* *short_b* / |pi|)) and 
    58 length(= *long_c*) values, and used as the effective radius for 
    59 *S(Q)* when *P(Q)* \* *S(Q)* is applied. 
     60the averaged effective radius $(=\sqrt{A B / \pi})$ and 
     61length $(= C)$ values, and used as the effective radius for 
     62$S(q)$ when $P(q) \cdot S(q)$ is applied. 
    6063 
    6164To provide easy access to the orientation of the parallelepiped, we define 
    62 three angles |theta|, |phi| and |bigpsi|. The definition of |theta| and |phi| 
    63 is the same as for the cylinder model (see also figures below). 
    64 The angle |bigpsi| is the rotational angle around the *long_c* axis against 
    65 the *q* plane. For example, |bigpsi| = 0 when the *short_b* axis is parallel 
    66 to the *x*-axis of the detector. 
     65three angles $\theta$, $\phi$ and $\Psi$. The definition of $\theta$ and 
     66$\phi$ is the same as for the cylinder model (see also figures below). 
     67The angle $\Psi$ is the rotational angle around the $C$ axis against 
     68the $q$ plane. For example, $\Psi = 0$ when the $B$ axis is parallel 
     69to the $x$-axis of the detector. 
    6770 
    6871 
     
    8588angles. The Figure below shows the comparison where the solid dot refers to 
    8689averaged 2D while the line represents the result of the 1D calculation (for 
    87 the averaging, 76, 180, 76 points are taken for the angles of |theta|, |phi|, 
    88 and |psi| respectively). 
     90the averaging, 76, 180, 76 points are taken for the angles of $\theta$, 
     91$\phi$, and $\Psi$ respectively). 
    8992 
    9093.. _parallelepiped-compare: 
    9194 
    92 .. figure:: img/parallelepiped_compare.gif 
     95.. figure:: img/parallelepiped_compare.png 
    9396 
    9497   Comparison between 1D and averaged 2D. 
Note: See TracChangeset for help on using the changeset viewer.