Changeset eb69cce in sasmodels for sasmodels/models/parallelepiped.py
- Timestamp:
- Nov 30, 2015 9:18:41 PM (8 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/parallelepiped.py
rd138d43 reb69cce 7 7 ---------- 8 8 9 This model provides the form factor, *P(q)*, for a rectangular parallelepiped9 This model provides the form factor, $P(q)$, for a rectangular parallelepiped 10 10 (below) where the form factor is normalized by the volume of the 11 11 parallelepiped. If you need to apply polydispersity, see also … … 16 16 .. math:: 17 17 18 P( Q) = {\text{scale} \over V} F^2(Q) + \text{background}18 P(q) = \frac{\text{scale}}{V} F^2(q) + \text{background} 19 19 20 where the volume *V* = *A B C* and the averaging < > is applied over all21 orientations for 1D.20 where the volume $V = A B C$ and the averaging $\left<\ldots\right>$ is 21 applied over all orientations for 1D. 22 22 23 23 .. figure:: img/parallelepiped.jpg … … 25 25 Parallelepiped with the corresponding definition of sides. 26 26 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, and29 *c* = *C* / *B* > 1, theform factor is27 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 $c = C/B > 1$, the 29 form factor is 30 30 31 31 .. math:: 32 32 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 35 36 36 37 with … … 38 39 .. math:: 39 40 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 42 45 43 46 S(x) = \frac{\sin x}{x} … … 52 55 53 56 The scattering intensity per unit volume is returned in units of |cm^-1|; 54 i e, *I(q)* = |phi| *P(q)*\.57 i.e., $I(q) = \phi P(q)$. 55 58 56 59 NB: The 2nd virial coefficient of the parallelpiped is calculated based on 57 the averaged effective radius (= sqrt(*short_a* \* *short_b* / |pi|))and58 length (= *long_c*)values, and used as the effective radius for59 *S(Q)* when *P(Q)* \* *S(Q)*is applied.60 the averaged effective radius $(=\sqrt{A B / \pi})$ and 61 length $(= C)$ values, and used as the effective radius for 62 $S(q)$ when $P(q) \cdot S(q)$ is applied. 60 63 61 64 To 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 against65 the *q* plane. For example, |bigpsi| = 0 when the *short_b*axis is parallel66 to the *x*-axis of the detector.65 three angles $\theta$, $\phi$ and $\Psi$. The definition of $\theta$ and 66 $\phi$ is the same as for the cylinder model (see also figures below). 67 The angle $\Psi$ is the rotational angle around the $C$ axis against 68 the $q$ plane. For example, $\Psi = 0$ when the $B$ axis is parallel 69 to the $x$-axis of the detector. 67 70 68 71 … … 85 88 angles. The Figure below shows the comparison where the solid dot refers to 86 89 averaged 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).90 the averaging, 76, 180, 76 points are taken for the angles of $\theta$, 91 $\phi$, and $\Psi$ respectively). 89 92 90 93 .. _parallelepiped-compare: 91 94 92 .. figure:: img/parallelepiped_compare. gif95 .. figure:: img/parallelepiped_compare.png 93 96 94 97 Comparison between 1D and averaged 2D.
Note: See TracChangeset
for help on using the changeset viewer.