Changeset 19dcb933 in sasmodels for sasmodels/models/ellipsoid.py
- Timestamp:
- Sep 3, 2014 1:16:10 AM (10 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:
- 1c7ffdc
- Parents:
- 87985ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/ellipsoid.py
r5d4777d r19dcb933 12 12 .. math:: 13 13 14 P( q,\alpha) = \frac{\text{scale}}{V} f^2(q) + \text{background}14 P(Q,\alpha) = {\text{scale} \over V} F^2(Q) + \text{background} 15 15 16 16 where … … 18 18 .. math:: 19 19 20 f(q) = \frac{3 (\Delta rho)) V (\sin[qr(R_p,R_e,\alpha)] \ 21 - \cos[qr(R_p,R_e,\alpha)])}{[qr(R_q,R_b,\alpha)]^3} 20 F(Q) = {3 (\Delta rho)) V (\sin[Qr(R_p,R_e,\alpha)] 21 - \cos[Qr(R_p,R_e,\alpha)]) 22 \over [Qr(R_p,R_e,\alpha)]^3 } 22 23 23 24 and … … 25 26 .. math:: 26 27 27 r(R_p,R_e,\alpha) = \left[ R_e^2 \sin^2 \alpha + R_p^2 \cos^2 \alpha \right]^{1/2} 28 r(R_p,R_e,\alpha) = \left[ R_e^2 \sin^2 \alpha 29 + R_p^2 \cos^2 \alpha \right]^{1/2} 28 30 29 31 … … 36 38 To provide easy access to the orientation of the ellipsoid, we define 37 39 the rotation axis of the ellipsoid using two angles $\theta$ and $\phi$. 38 These angles are defined in Figure :num:`figure #cylinder-orientation`. 40 These angles are defined in the 41 :ref:`cylinder orientation figure <cylinder-orientation>`. 39 42 For the ellipsoid, $\theta$ is the angle between the rotational axis 40 43 and the $z$-axis. … … 42 45 NB: The 2nd virial coefficient of the solid ellipsoid is calculated based 43 46 on the $R_p$ and $R_e$ values, and used as the effective radius for 44 $S(Q)$ when $P(Q) \ dot S(Q)$ is applied.47 $S(Q)$ when $P(Q) \cdot S(Q)$ is applied. 45 48 46 .. figure:: img/image121.JPG 49 .. _ellipsoid-1d: 50 51 .. figure:: img/ellipsoid_1d.JPG 47 52 48 53 The output of the 1D scattering intensity function for randomly oriented … … 54 59 use the c-library from NIST. 55 60 56 .. figure:: img/image122.JPG 61 .. _ellipsoid-geometry: 62 63 .. figure:: img/ellipsoid_geometry.JPG 57 64 58 65 The angles for oriented ellipsoid. … … 63 70 Validation of our code was done by comparing the output of the 1D model 64 71 to the output of the software provided by the NIST (Kline, 2006). 65 Figure :num:`figure ellipsoid-comparison-1d` below shows a comparison of72 :num:`Figure ellipsoid-comparison-1d` below shows a comparison of 66 73 the 1D output of our model and the output of the NIST software. 67 74 68 75 .. _ellipsoid-comparison-1d: 69 76 70 .. figure:: img/ image123.JPG77 .. figure:: img/ellipsoid_comparison_1d.jpg 71 78 72 79 Comparison of the SasView scattering intensity for an ellipsoid 73 80 with the output of the NIST SANS analysis software. The parameters 74 were set to: *scale=1.0*, *a=20 |Ang|*, *b=400 |Ang|*, 75 *sld-solvent_sld=3e-6 |Ang^-2|*, and *background=0.01 |cm^-1|*. 81 were set to: *scale* = 1.0, *rpolar* = 20 |Ang|, 82 *requatorial* =400 |Ang|, *contrast* = 3e-6 |Ang^-2|, 83 and *background* = 0.01 |cm^-1|. 76 84 77 85 Averaging over a distribution of orientation is done by evaluating the … … 79 87 implementation of the intensity for fully oriented ellipsoids, we can 80 88 compare the result of averaging our 2D output using a uniform distribution 81 $p(\theta,\phi) = 1.0$. Figure :num:`figure #ellipsoid-comparison-2d`89 $p(\theta,\phi) = 1.0$. :num:`Figure #ellipsoid-comparison-2d` 82 90 shows the result of such a cross-check. 83 91 84 92 .. _ellipsoid-comparison-2d: 85 93 86 .. figure:: img/ image124.jpg94 .. figure:: img/ellipsoid_comparison_2d.jpg 87 95 88 96 Comparison of the intensity for uniformly distributed ellipsoids 89 97 calculated from our 2D model and the intensity from the NIST SANS 90 analysis software. The parameters used were: *scale =1.0*,91 * a=20 |Ang|*, *b=400 |Ang|*, *sld-solvent_sld=3e-6 |Ang^-2|*,92 and *background=0.0 |cm^-1|*.98 analysis software. The parameters used were: *scale* = 1.0, 99 *rpolar* = 20 |Ang|, *requatorial* = 400 |Ang|, 100 *contrast* = 3e-6 |Ang^-2|, and *background* = 0.0 |cm^-1|. 93 101 94 The discrepancy above *q =0.3 |cm^-1|*is due to the way the form factors102 The discrepancy above *q* = 0.3 |cm^-1| is due to the way the form factors 95 103 are calculated in the c-library provided by NIST. A numerical integration 96 has to be performed to obtain *P(q)*for randomly oriented particles.104 has to be performed to obtain $P(Q)$ for randomly oriented particles. 97 105 The NIST software performs that integration with a 76-point Gaussian 98 quadrature rule, which will become imprecise at high qwhere the amplitude99 varies quickly as a function of $ q$. The SasView result shown has been106 quadrature rule, which will become imprecise at high $Q$ where the amplitude 107 varies quickly as a function of $Q$. The SasView result shown has been 100 108 obtained by summing over 501 equidistant points. Our result was found 101 to be stable over the range of *q*shown for a number of points higher109 to be stable over the range of $Q$ shown for a number of points higher 102 110 than 500. 103 111
Note: See TracChangeset
for help on using the changeset viewer.