Changeset 6e5c0b7 in sasmodels for sasmodels/models/triaxial_ellipsoid.py
- Timestamp:
- Apr 4, 2017 5:28:58 PM (7 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:
- 3a45c2c
- Parents:
- 933af72 (diff), c4e3215 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/triaxial_ellipsoid.py
r925ad6e r28d3067 2 2 # Note: model title and parameter table are inserted automatically 3 3 r""" 4 All three axes are of different lengths with $R_a \leq R_b \leq R_c$ 5 **Users should maintain this inequality for all calculations**. 4 Definition 5 ---------- 6 7 .. figure:: img/triaxial_ellipsoid_geometry.jpg 8 9 Ellipsoid with $R_a$ as *radius_equat_minor*, $R_b$ as *radius_equat_major* 10 and $R_c$ as *radius_polar*. 11 12 Given an ellipsoid 6 13 7 14 .. math:: 8 15 9 P(q) = \text{scale} V \left< F^2(q) \right> + \text{background}16 \frac{X^2}{R_a^2} + \frac{Y^2}{R_b^2} + \frac{Z^2}{R_c^2} = 1 10 17 11 where the volume $V = 4/3 \pi R_a R_b R_c$, and the averaging 12 $\left<\ldots\right>$ is applied over all orientations for 1D. 13 14 .. figure:: img/triaxial_ellipsoid_geometry.jpg 15 16 Ellipsoid schematic. 17 18 Definition 19 ---------- 20 21 The form factor calculated is 18 the scattering is defined by the average over all orientations $\Omega$, 22 19 23 20 .. math:: 24 21 25 P(q) = \frac{\text{scale}}{V}\int_0^1\int_0^1 26 \Phi^2(qR_a^2\cos^2( \pi x/2) + qR_b^2\sin^2(\pi y/2)(1-y^2) + R_c^2y^2) 27 dx dy 22 P(q) = \text{scale}\frac{V}{4 \pi}\int_\Omega \Phi^2(qr) d\Omega + \text{background} 28 23 29 24 where … … 31 26 .. math:: 32 27 33 \Phi(u) = 3 u^{-3} (\sin u - u \cos u) 28 \Phi(qr) &= 3 j_1(qr)/qr = 3 (\sin qr - qr \cos qr)/(qr)^3 \\ 29 r^2 &= R_a^2e^2 + R_b^2f^2 + R_c^2g^2 \\ 30 V &= \tfrac{4}{3} \pi R_a R_b R_c 31 32 The $e$, $f$ and $g$ terms are the projections of the orientation vector on $X$, 33 $Y$ and $Z$ respectively. Keeping the orientation fixed at the canonical 34 axes, we can integrate over the incident direction using polar angle 35 $-\pi/2 \le \gamma \le \pi/2$ and equatorial angle $0 \le \phi \le 2\pi$ 36 (as defined in ref [1]), 37 38 .. math:: 39 40 \langle\Phi^2\rangle = \int_0^{2\pi} \int_{-\pi/2}^{\pi/2} \Phi^2(qr) \cos \gamma\,d\gamma d\phi 41 42 with $e = \cos\gamma \sin\phi$, $f = \cos\gamma \cos\phi$ and $g = \sin\gamma$. 43 A little algebra yields 44 45 .. math:: 46 47 r^2 = b^2(p_a \sin^2 \phi \cos^2 \gamma + 1 + p_c \sin^2 \gamma) 48 49 for 50 51 .. math:: 52 53 p_a = \frac{a^2}{b^2} - 1 \text{ and } p_c = \frac{c^2}{b^2} - 1 54 55 Due to symmetry, the ranges can be restricted to a single quadrant 56 $0 \le \gamma \le \pi/2$ and $0 \le \phi \le \pi/2$, scaling the resulting 57 integral by 8. The computation is done using the substitution $u = \sin\gamma$, 58 $du = \cos\gamma\,d\gamma$, giving 59 60 .. math:: 61 62 \langle\Phi^2\rangle &= 8 \int_0^{\pi/2} \int_0^1 \Phi^2(qr) du d\phi \\ 63 r^2 &= b^2(p_a \sin^2(\phi)(1 - u^2) + 1 + p_c u^2) 34 64 35 65 To provide easy access to the orientation of the triaxial ellipsoid, … … 69 99 ---------- 70 100 71 L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray 72 and Neutron Scattering*, Plenum, New York, 1987. 101 [1] Finnigan, J.A., Jacobs, D.J., 1971. 102 *Light scattering by ellipsoidal particles in solution*, 103 J. Phys. D: Appl. Phys. 4, 72-77. doi:10.1088/0022-3727/4/1/310 104 73 105 """ 74 106 … … 91 123 "Solvent scattering length density"], 92 124 ["radius_equat_minor", "Ang", 20, [0, inf], "volume", 93 "Minor equatorial radius "],125 "Minor equatorial radius, Ra"], 94 126 ["radius_equat_major", "Ang", 400, [0, inf], "volume", 95 "Major equatorial radius "],127 "Major equatorial radius, Rb"], 96 128 ["radius_polar", "Ang", 10, [0, inf], "volume", 97 "Polar radius "],129 "Polar radius, Rc"], 98 130 ["theta", "degrees", 60, [-inf, inf], "orientation", 99 131 "In plane angle"],
Note: See TracChangeset
for help on using the changeset viewer.