Changeset 2d81cfe in sasmodels for sasmodels/models/core_shell_ellipsoid.py
- Timestamp:
- Nov 29, 2017 11:13:23 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 237b800f
- Parents:
- a839b22
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_ellipsoid.py
r8db25bf r2d81cfe 26 26 ellipsoid is large (ie, if $X << 1$ or $X >> 1$ ), when the $S(q)$ 27 27 - which assumes spheres - will not in any case be valid. Generating a 28 custom product model will enable separate effective volume fraction and effective29 radius in the $S(q)$.28 custom product model will enable separate effective volume fraction and 29 effective radius in the $S(q)$. 30 30 31 31 If SAS data are in absolute units, and the SLDs are correct, then scale should 32 32 be the total volume fraction of the "outer particle". When $S(q)$ is introduced 33 this moves to the $S(q)$ volume fraction, and scale should then be 1.0, 34 orcontain some other units conversion factor (for example, if you have SAXS data).35 36 The calculation of intensity follows that for the solid ellipsoid, but with separate37 terms for the core-shell and shell-solvent boundaries.33 this moves to the $S(q)$ volume fraction, and scale should then be 1.0, or 34 contain some other units conversion factor (for example, if you have SAXS data). 35 36 The calculation of intensity follows that for the solid ellipsoid, but 37 with separate terms for the core-shell and shell-solvent boundaries. 38 38 39 39 .. math:: … … 48 48 \begin{align*} 49 49 F(q,\alpha) = &f(q,radius\_equat\_core,radius\_equat\_core.x\_core,\alpha) \\ 50 &+ f(q,radius\_equat\_core + thick\_shell,radius\_equat\_core.x\_core + thick\_shell.x\_polar\_shell,\alpha) 50 &+ f(q,radius\_equat\_core + thick\_shell, 51 radius\_equat\_core.x\_core + thick\_shell.x\_polar\_shell,\alpha) 51 52 \end{align*} 52 53 … … 68 69 69 70 $\alpha$ is the angle between the axis of the ellipsoid and $\vec q$, 70 $V = (4/3)\pi R_pR_e^2$ is the volume of the ellipsoid , $R_p$ is the polar radius along the 71 rotational axis of the ellipsoid, $R_e$ is the equatorial radius perpendicular 72 to the rotational axis of the ellipsoid and $\Delta \rho$ (contrast) is the 73 scattering length density difference, either $(sld\_core - sld\_shell)$ or $(sld\_shell - sld\_solvent)$. 71 $V = (4/3)\pi R_pR_e^2$ is the volume of the ellipsoid , $R_p$ is the 72 polar radius along the rotational axis of the ellipsoid, $R_e$ is the 73 equatorial radius perpendicular to the rotational axis of the ellipsoid 74 and $\Delta \rho$ (contrast) is the scattering length density difference, 75 either $(sld\_core - sld\_shell)$ or $(sld\_shell - sld\_solvent)$. 74 76 75 77 For randomly oriented particles: … … 79 81 F^2(q)=\int_{0}^{\pi/2}{F^2(q,\alpha)\sin(\alpha)d\alpha} 80 82 81 For oriented ellipsoids the *theta*, *phi* and *psi* orientation parameters will appear when fitting 2D data, 82 see the :ref:`elliptical-cylinder` model for further information. 83 For oriented ellipsoids the *theta*, *phi* and *psi* orientation parameters 84 will appear when fitting 2D data, see the :ref:`elliptical-cylinder` model 85 for further information. 83 86 84 87 References … … 94 97 * **Last Modified by:** Richard Heenan (reparametrised model) **Date:** 2015 95 98 * **Last Reviewed by:** Richard Heenan **Date:** October 6, 2016 96 97 99 """ 98 100 101 import numpy as np 99 102 from numpy import inf, sin, cos, pi 100 103 … … 153 156 154 157 def random(): 155 import numpy as np 156 V = 10**np.random.uniform(5, 12) 158 volume = 10**np.random.uniform(5, 12) 157 159 outer_polar = 10**np.random.uniform(1.3, 4) 158 outer_equatorial = np.sqrt( V/outer_polar) # ignore 4/3 pi160 outer_equatorial = np.sqrt(volume/outer_polar) # ignore 4/3 pi 159 161 # Use a distribution with a preference for thin shell or thin core 160 162 # Avoid core,shell radii < 1 … … 180 182 # 11Jan2017 RKH sorted tests after redefinition of angles 181 183 tests = [ 182 184 # Accuracy tests based on content in test/utest_coreshellellipsoidXTmodel.py 183 185 [{'radius_equat_core': 200.0, 184 186 'x_core': 0.1, … … 206 208 }, 0.01, 8688.53], 207 209 208 # 2D tests209 [{'background': 0.001,210 'theta': 90.0,211 'phi': 0.0,210 # 2D tests 211 [{'background': 0.001, 212 'theta': 90.0, 213 'phi': 0.0, 212 214 }, (0.4, 0.5), 0.00690673], 213 215 214 [{'radius_equat_core': 20.0,216 [{'radius_equat_core': 20.0, 215 217 'x_core': 200.0, 216 218 'thick_shell': 54.0, … … 224 226 'phi': 0.0, 225 227 }, (qx, qy), 0.01000025], 226 228 ]
Note: See TracChangeset
for help on using the changeset viewer.