Changeset 67595af in sasmodels
 Timestamp:
 Mar 22, 2017 10:43:16 PM (2 years ago)
 Branches:
 master, core_shell_microgels, costrafo411, magnetic_model, ticket1257vesicleproduct, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
 Children:
 01ea374
 Parents:
 92dfe0c
 gitauthor:
 Paul Kienzle <pkienzle@…> (03/22/17 22:41:58)
 gitcommitter:
 Paul Kienzle <pkienzle@…> (03/22/17 22:43:16)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sasmodels/models/triaxial_ellipsoid.py
r925ad6e r67595af 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*. For highest accuracy in the orientational 11 average, prefer $R_c > R_b > R_a$. 12 13 Given an ellipsoid 6 14 7 15 .. math:: 8 16 9 P(q) = \text{scale} V \left< F^2(q) \right> + \text{background}17 \frac{X^2}{R_a^2} + \frac{Y^2}{R_b^2} + \frac{Z^2}{R_c^2} = 1 10 18 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 19 the scattering is defined by the average over all orientations $\Omega$, 22 20 23 21 .. math:: 24 22 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)(1y^2) + R_c^2y^2) 27 dx dy 23 P(q) = \text{scale}\frac{V}{4 \pi}\int_\Omega \Phi^2(qr) d\Omega + \text{background} 28 24 29 25 where … … 31 27 .. math:: 32 28 33 \Phi(u) = 3 u^{3} (\sin u  u \cos u) 29 \Phi(qr) &= 3 j_1(qr)/qr = 3 (\sin qr  qr \cos qr)/(qr)^3 \\ 30 r^2 &= R_a^2e^2 + R_b^2f^2 + R_c^2g^2 \\ 31 V &= \tfrac{4}{3} \pi R_a R_b R_c 32 33 The $e$, $f$ and $g$ terms are the projections of the orientation vector on $X$, 34 $Y$ and $Z$ respectively. Keeping the orientation fixed at the canonical 35 axes, we can integrate over the incident direction using polar angle 36 $\pi/2 \le \gamma \le \pi/2$ and equatorial angle $0 \le \phi \le 2\pi$ 37 (as defined in ref [1]), 38 39 .. math:: 40 41 \langle\Phi^2\rangle = \int_0^{2\pi} \int_{\pi/2}^{\pi/2} \Phi^2(qr) \cos \gamma\,d\gamma d\phi 42 43 with $e = \cos\gamma \sin\phi$, $f = \cos\gamma \cos\phi$ and $g = \sin\gamma$. 44 A little algebra yields 45 46 .. math:: 47 48 r^2 = b^2(p_a \sin^2 \phi \cos^2 \gamma + 1 + p_c \sin^2 \gamma) 49 50 for 51 52 .. math:: 53 54 p_a = \frac{a^2}{b^2}  1 \text{ and } p_c = \frac{c^2}{b^2}  1 55 56 Due to symmetry, the ranges can be restricted to a single quadrant 57 $0 \le \gamma \le \pi/2$ and $0 \le \phi \le \pi/2$, scaling the resulting 58 integral by 8. The computation is done using the substitution $u = \sin\gamma$, 59 $du = \cos\gamma\,d\gamma$, giving 60 61 .. math:: 62 63 \langle\Phi^2\rangle &= 8 \int_0^{\pi/2} \int_0^1 \Phi^2(qr) du d\phi \\ 64 r^2 &= b^2(p_a \sin^2(\phi)(1  u^2) + 1 + p_c u^2) 34 65 35 66 To provide easy access to the orientation of the triaxial ellipsoid, … … 69 100  70 101 71 L A Feigin and D I Svergun, *Structure Analysis by SmallAngle XRay 72 and Neutron Scattering*, Plenum, New York, 1987. 102 [1] Finnigan, J.A., Jacobs, D.J., 1971. 103 *Light scattering by ellipsoidal particles in solution*, 104 J. Phys. D: Appl. Phys. 4, 7277. doi:10.1088/00223727/4/1/310 105 73 106 """ 74 107 … … 91 124 "Solvent scattering length density"], 92 125 ["radius_equat_minor", "Ang", 20, [0, inf], "volume", 93 "Minor equatorial radius "],126 "Minor equatorial radius, Ra"], 94 127 ["radius_equat_major", "Ang", 400, [0, inf], "volume", 95 "Major equatorial radius "],128 "Major equatorial radius, Rb"], 96 129 ["radius_polar", "Ang", 10, [0, inf], "volume", 97 "Polar radius "],130 "Polar radius, Rc"], 98 131 ["theta", "degrees", 60, [inf, inf], "orientation", 99 132 "In plane angle"],
Note: See TracChangeset
for help on using the changeset viewer.