Changeset 19dcb933 in sasmodels for sasmodels/models/capped_cylinder.py
- Timestamp:
- Sep 3, 2014 3: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/capped_cylinder.py
rf4cf580 r19dcb933 14 14 The capped cylinder geometry is defined as 15 15 16 .. image:: img/ image112.JPG16 .. image:: img/capped_cylinder_geometry.jpg 17 17 18 18 where $r$ is the radius of the cylinder. All other parameters are as defined … … 24 24 h = - \sqrt{R^2 - r^2} 25 25 26 The scattered intensity $I( q)$ is calculated as26 The scattered intensity $I(Q)$ is calculated as 27 27 28 28 .. math:: 29 29 30 I( q) = \frac{(\Delta \rho)^2}{V} left<A^2(q)\right>30 I(Q) = \frac{(\Delta \rho)^2}{V} \left< A^2(Q)\right> 31 31 32 where the amplitude $A( q)$ is given as32 where the amplitude $A(Q)$ is given as 33 33 34 34 .. math:: 35 35 36 A(Q) = \pi r^2L \frac{sin(Q(L/2) \cos \theta)}{Q(L/2) \cos \theta} \ 37 \frac{2 J_1(Q r \sin \theta)}{Q r \sin \theta} \ 38 + 4 \pi R^3 \int_{-h/R}^1{dt \cos [ Q cos\theta (Rt + h + L/2)] \ 39 x (1-t^2)\frac{J_1[Q R \sin \theta (1-t^2)^{1/2}]}{Q R \sin \theta (1-t^2)^{1/2} 36 A(Q) =&\ \pi r^2L 37 {\sin\left(\tfrac12 QL\cos\theta\right) 38 \over \tfrac12 QL\cos\theta} 39 {2 J_1(Qr\sin\theta) \over Qr\sin\theta} \\ 40 &\ + 4 \pi R^3 \int_{-h/R}^1 dt 41 \cos\left[ Q\cos\theta 42 \left(Rt + h + {\tfrac12} L\right)\right] 43 \times (1-t^2) 44 {J_1\left[QR\sin\theta \left(1-t^2\right)^{1/2}\right] 45 \over QR\sin\theta \left(1-t^2\right)^{1/2}} 40 46 41 47 The $\left< \ldots \right>$ brackets denote an average of the structure over 42 all orientations. $\left< A^2( q)\right>$ is then the form factor, $P(q)$.48 all orientations. $\left< A^2(Q)\right>$ is then the form factor, $P(Q)$. 43 49 The scale factor is equivalent to the volume fraction of cylinders, each of 44 50 volume, $V$. Contrast is the difference of scattering length densities of … … 49 55 .. math:: 50 56 51 V = \pi r_c^2 L + \ frac{2\pi}{3}(R-h)^2(2R + h)57 V = \pi r_c^2 L + \tfrac{2\pi}{3}(R-h)^2(2R + h) 52 58 53 59 54 60 and its radius-of-gyration is 55 61 56 R_g^2 = \left[ \frac{12}{5}R^5 + R^4(6h+\frac{3}{2}L) \ 57 + R^2(4h^2 + L^2 + 4Lh) + R^2(3Lh^2 + [frac{3}{2}L^2h) \ 58 + \frac{2}{5}h^5 - \frac{1}{2}Lh^4 - \frac{1}{2}L^2h^3 \ 59 + \frac{1}{4}L^3r^2 + \frac{3}{2}Lr^4\right] \ 60 (4R^3 6R^2h - 2h^3 + 3r^2L)^{-1} 62 .. math:: 63 64 R_g^2 =&\ \left[ \tfrac{12}{5}R^5 65 + R^4\left(6h+\tfrac32 L\right) 66 + R^2\left(4h^2 + L^2 + 4Lh\right) 67 + R^2\left(3Lh^2 + \tfrac32 L^2h\right) \right. \\ 68 &\ \left. + \tfrac25 h^5 - \tfrac12 Lh^4 - \tfrac12 L^2h^3 69 + \tfrac14 L^3r^2 + \tfrac32 Lr^4 \right] 70 \left( 4R^3 6R^2h - 2h^3 + 3r^2L \right)^{-1} 61 71 62 72 63 **The requirement that $R \ge r$ is not enforced in the model! It is up to 64 you to restrict this during analysis.** 73 .. note:: 65 74 66 Figure :num:`figure #capped-cylinder-1d` shows the output produced by 75 The requirement that $R \ge r$ is not enforced in the model! 76 It is up to you to restrict this during analysis. 77 78 :num:`Figure #capped-cylinder-1d` shows the output produced by 67 79 a running the 1D capped cylinder model, using *qmin* = 0.001 |Ang^-1|, 68 80 *qmax* = 0.7 |Ang^-1| and the default values of the parameters. … … 70 82 .. _capped-cylinder-1d: 71 83 72 .. figure:: img/ image117.jpg84 .. figure:: img/capped_cylinder_1d.jpg 73 85 74 86 1D plot using the default values (w/256 data point). 75 87 76 88 The 2D scattering intensity is calculated similar to the 2D cylinder model. 77 Figure :num:`figure #capped-cylinder-2d` shows the output for $\theta=45^\circ$89 :num:`Figure #capped-cylinder-2d` shows the output for $\theta=45^\circ$ 78 90 and $\phi=0^\circ$ with default values for the other parameters. 79 91 80 92 .. _capped-cylinder-2d: 81 93 82 .. figure:: img/ image118.JPG94 .. figure:: img/capped_cylinder_2d.jpg 83 95 84 96 2D plot (w/(256X265) data points). 85 97 86 .. figure:: img/ image061.JPG98 .. figure:: img/orientation.jpg 87 99 88 100 Definition of the angles for oriented 2D cylinders. 89 101 90 .. figure:: img/ image062.jpg102 .. figure:: img/orientation2.jpg 91 103 92 104 Examples of the angles for oriented pp against the detector plane.
Note: See TracChangeset
for help on using the changeset viewer.