Changeset ab2aea8 in sasmodels for sasmodels/models/hollow_rectangular_prism_thin_walls.py
- Timestamp:
- Oct 15, 2016 5:49:53 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- e30d645
- Parents:
- ed0827a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/hollow_rectangular_prism_thin_walls.py
ra807206 rab2aea8 3 3 r""" 4 4 5 This model provides the form factor, *P(q)*, for a hollow rectangular5 This model provides the form factor, $P(q)$, for a hollow rectangular 6 6 prism with infinitely thin walls. It computes only the 1D scattering, not the 2D. 7 7 … … 14 14 15 15 Assuming a hollow parallelepiped with infinitely thin walls, edge lengths 16 :math:`A \le B \le C`and presenting an orientation with respect to the17 scattering vector given by |theta| and |phi|, where |theta|is the angle18 between the *z* axis and the longest axis of the parallelepiped *C*, and19 |phi| is the angle between the scattering vector (lying in the *xy*plane)20 and the *y*axis, the form factor is given by16 $A \le B \le C$ and presenting an orientation with respect to the 17 scattering vector given by $\theta$ and $\phi$, where $\theta$ is the angle 18 between the $z$ axis and the longest axis of the parallelepiped $C$, and 19 $\phi$ is the angle between the scattering vector (lying in the $xy$ plane) 20 and the $y$ axis, the form factor is given by 21 21 22 22 .. math:: 23 P(q) = \frac{1}{V^2} \frac{2}{\pi} \int_0^{\frac{\pi}{2}} 24 \int_0^{\frac{\pi}{2}} [A_L(q)+A_T(q)]^2 \sin\theta d\theta d\phi 23 24 P(q) = \frac{1}{V^2} \frac{2}{\pi} \int_0^{\frac{\pi}{2}} 25 \int_0^{\frac{\pi}{2}} [A_L(q)+A_T(q)]^2 \sin\theta\,d\theta\,d\phi 25 26 26 27 where 27 28 28 29 .. math:: 29 V = 2AB + 2AC + 2BC30 30 31 .. math:: 32 A_L(q) = 8 \times \frac{ \sin \bigl( q \frac{A}{2} \sin\phi \sin\theta \bigr)33 \sin \bigl( q \frac{B}{2} \cos\phi \sin\theta \bigr)34 \cos \bigl( q \frac{C}{2} \cos\theta \bigr) }35 {q^2 \, \sin^2\theta \, \sin\phi \cos\phi}36 37 .. math:: 38 A_T(q) = A_F(q) \times \frac{2 \, \sin \bigl( q \frac{C}{2} \cos\theta \bigr)}{q \,\cos\theta}31 V &= 2AB + 2AC + 2BC \\ 32 A_L(q) &= 8 \times \frac{ 33 \sin \left( \tfrac{1}{2} q A \sin\phi \sin\theta \right) 34 \sin \left( \tfrac{1}{2} q B \cos\phi \sin\theta \right) 35 \cos \left( \tfrac{1}{2} q C \cos\theta \right) 36 }{q^2 \, \sin^2\theta \, \sin\phi \cos\phi} \\ 37 A_T(q) &= A_F(q) \times 38 \frac{2\,\sin \left( \tfrac{1}{2} q C \cos\theta \right)}{q\,\cos\theta} 39 39 40 40 and 41 41 42 42 .. math:: 43 A_F(q) = 4 \frac{ \cos \bigl( q \frac{A}{2} \sin\phi \sin\theta \bigr) 44 \sin \bigl( q \frac{B}{2} \cos\phi \sin\theta \bigr) } 43 44 A_F(q) = 4 \frac{ \cos \left( \tfrac{1}{2} q A \sin\phi \sin\theta \right) 45 \sin \left( \tfrac{1}{2} q B \cos\phi \sin\theta \right) } 45 46 {q \, \cos\phi \, \sin\theta} + 46 4 \frac{ \sin \ bigl( q \frac{A}{2} \sin\phi \sin\theta \bigr)47 \cos \ bigl( q \frac{B}{2} \cos\phi \sin\theta \bigr) }47 4 \frac{ \sin \left( \tfrac{1}{2} q A \sin\phi \sin\theta \right) 48 \cos \left( \tfrac{1}{2} q B \cos\phi \sin\theta \right) } 48 49 {q \, \sin\phi \, \sin\theta} 49 50 … … 51 52 52 53 .. math:: 53 I(q) = \mbox{scale} \times V \times (\rho_{\mbox{p}} - \rho_{\mbox{solvent}})^2 \times P(q)54 54 55 where *V* is the volume of the rectangular prism, :math:`\rho_{\mbox{p}}` 56 is the scattering length of the parallelepiped, :math:`\rho_{\mbox{solvent}}` 55 I(q) = \text{scale} \times V \times (\rho_\text{p} - \rho_\text{solvent})^2 \times P(q) 56 57 where $V$ is the volume of the rectangular prism, $\rho_\text{p}$ 58 is the scattering length of the parallelepiped, $\rho_\text{solvent}$ 57 59 is the scattering length of the solvent, and (if the data are in absolute 58 60 units) *scale* represents the volume fraction (which is unitless). … … 127 129 # parameters for demo 128 130 demo = dict(scale=1, background=0, 129 sld=6.3 e-6, sld_solvent=1.0e-6,131 sld=6.3, sld_solvent=1.0, 130 132 length_a=35, b2a_ratio=1, c2a_ratio=1, 131 133 length_a_pd=0.1, length_a_pd_n=10,
Note: See TracChangeset
for help on using the changeset viewer.