Changeset 19dcb933 in sasmodels for sasmodels/models/core_shell_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/core_shell_cylinder.py
r5d4777d r19dcb933 12 12 .. math:: 13 13 14 P( q,\alpha) = \frac{\text{scale}}{V_s} f^2(q) + \text{background}14 P(Q,\alpha) = {\text{scale} \over V_s} F^2(Q) + \text{background} 15 15 16 16 where … … 18 18 .. math:: 19 19 20 f(q) = (\rho_c - \rho_s) V_c \ 21 \frac{\sin( Q L/2 \cos \alpha)}{Q L/2 \cos \alpha} \ 22 \frac{2 J_1 (Q R \sin \alpha)}{Q R \sin \alpha} 23 + (\rho_s - \rho_\text{solv}) V_s \ 24 \frac{\sin( Q (L/2+T) \cos \alpha)}{Q (L/2+T) \cos \alpha} 25 \frac{2 J_1 (Q (R+T) \sin \alpha)}{Q (R+T) \sin \alpha} 20 F(Q) = &\ (\rho_c - \rho_s) V_c 21 {\sin \left( Q \tfrac12 L\cos\alpha \right) 22 \over Q \tfrac12 L\cos\alpha } 23 {2 J_1 \left( QR\sin\alpha \right) 24 \over QR\sin\alpha } \\ 25 &\ + (\rho_s - \rho_\text{solv}) V_s 26 {\sin \left( Q \left(\tfrac12 L+T\right) \cos\alpha \right) 27 \over Q \left(\tfrac12 L +T \right) \cos\alpha } 28 { 2 J_1 \left( Q(R+T)\sin\alpha \right) 29 \over Q(R+T)\sin\alpha } 26 30 27 31 and … … 29 33 .. math:: 30 34 31 V_s = \pi (R + T)^2 \dot (L + 2T) 32 35 V_s = \pi (R + T)^2 (L + 2T) 33 36 34 37 and $\alpha$ is the angle between the axis of the cylinder and $\vec q$, … … 42 45 shell is given by $L+2T$. $J1$ is the first order Bessel function. 43 46 44 .. figure:: img/image069.JPG 47 .. _core-shell-cylinder-geometry: 48 49 .. figure:: img/core_shell_cylinder_geometry.jpg 45 50 46 51 Core shell cylinder schematic. … … 49 54 define the axis of the cylinder using two angles $\theta$ and $\phi$. As 50 55 for the case of the cylinder, those angles are defined in 51 Figure:num:`figure #cylinder-orientation`.56 :num:`figure #cylinder-orientation`. 52 57 53 58 NB: The 2nd virial coefficient of the cylinder is calculated based on 54 59 the radius and 2 length values, and used as the effective radius for 55 $S(Q)$ when $P(Q) \ dot S(Q)$ is applied.60 $S(Q)$ when $P(Q) \cdot S(Q)$ is applied. 56 61 57 62 The $\theta$ and $\phi$ parameters are not used for the 1D output. Our … … 64 69 Validation of our code was done by comparing the output of the 1D model to 65 70 the output of the software provided by the NIST (Kline, 2006). 66 Figure :num:`figure #core-shell-cylinder-comparison-1d` shows a comparison71 :num:`Figure #core-shell-cylinder-1d` shows a comparison 67 72 of the 1D output of our model and the output of the NIST software. 68 73 69 .. _core-shell-cylinder- comparison-1d:74 .. _core-shell-cylinder-1d: 70 75 71 .. figure:: img/ image070.JPG76 .. figure:: img/core_shell_cylinder_1d.jpg 72 77 73 78 Comparison of the SasView scattering intensity for a core-shell cylinder 74 79 with the output of the NIST SANS analysis software. The parameters were 75 set to: *scale =1.0 |Ang|*, *radius=20 |Ang|*, *thickness=10 |Ang|*,76 *length =400 |Ang|*, *core_sld=1e-6 |Ang^-2|*, *shell_sld=4e-6 |Ang^-2|*,77 *solvent_sld =1e-6 |Ang^-2|*, and *background=0.01 |cm^-1|*.80 set to: *scale* = 1.0 |Ang|, *radius* = 20 |Ang|, *thickness* = 10 |Ang|, 81 *length* =400 |Ang|, *core_sld* =1e-6 |Ang^-2|, *shell_sld* = 4e-6 |Ang^-2|, 82 *solvent_sld* = 1e-6 |Ang^-2|, and *background* = 0.01 |cm^-1|. 78 83 79 84 Averaging over a distribution of orientation is done by evaluating the … … 81 86 implementation of the intensity for fully oriented cylinders, we can 82 87 compare the result of averaging our 2D output using a uniform 83 distribution $p(\theta,\phi) *= 1.0$.84 Figure :num:`figure #core-shell-cylinder-comparison-2d` shows the result88 distribution $p(\theta,\phi) = 1.0$. 89 :num:`Figure #core-shell-cylinder-2d` shows the result 85 90 of such a cross-check. 86 91 87 .. _core-shell-cylinder- comparison-2d:92 .. _core-shell-cylinder-2d: 88 93 89 .. figure:: img/ image071.JPG94 .. figure:: img/core_shell_cylinder_2d.jpg 90 95 91 96 Comparison of the intensity for uniformly distributed core-shell 92 97 cylinders calculated from our 2D model and the intensity from the 93 NIST SANS analysis software. The parameters used were: *scale* =1.0*,94 *radius =20 |Ang|*, *thickness=10 |Ang|*, *length*=400 |Ang|*,95 *core_sld =1e-6 |Ang^-2|*, *shell_sld=4e-6 |Ang^-2|*,96 *solvent_sld =1e-6 |Ang^-2|*, and *background=0.0 |cm^-1|*.98 NIST SANS analysis software. The parameters used were: *scale* = 1.0, 99 *radius* = 20 |Ang|, *thickness* = 10 |Ang|, *length* = 400 |Ang|, 100 *core_sld* = 1e-6 |Ang^-2|, *shell_sld* = 4e-6 |Ang^-2|, 101 *solvent_sld* = 1e-6 |Ang^-2|, and *background* = 0.0 |cm^-1|. 97 102 98 103 2013/11/26 - Description reviewed by Heenan, R. … … 101 106 from numpy import pi, inf 102 107 103 name = "c ylinder"108 name = "core_shell_cylinder" 104 109 title = "Right circular cylinder with a core-shell scattering length density profile." 105 110 description = """
Note: See TracChangeset
for help on using the changeset viewer.