Changeset 31df0c9 in sasmodels for sasmodels/models/core_shell_ellipsoid.py
- Timestamp:
- Aug 1, 2017 4:38:47 PM (7 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 1511c37c
- Parents:
- d49ca5c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_ellipsoid.py
r9802ab3 r31df0c9 25 25 ellipsoid. This may have some undesirable effects if the aspect ratio of the 26 26 ellipsoid is large (ie, if $X << 1$ or $X >> 1$ ), when the $S(q)$ 27 - which assumes spheres - will not in any case be valid. Generating a 28 custom product model will enable separate effective volume fraction and effective 27 - which assumes spheres - will not in any case be valid. Generating a 28 custom product model will enable separate effective volume fraction and effective 29 29 radius in the $S(q)$. 30 30 … … 44 44 45 45 .. math:: 46 \begin{align} 46 \begin{align} 47 47 F(q,\alpha) = &f(q,radius\_equat\_core,radius\_equat\_core.x\_core,\alpha) \\ 48 48 &+ f(q,radius\_equat\_core + thick\_shell,radius\_equat\_core.x\_core + thick\_shell.x\_polar\_shell,\alpha) 49 \end{align} 49 \end{align} 50 50 51 51 where 52 52 53 53 .. math:: 54 54 … … 77 77 F^2(q)=\int_{0}^{\pi/2}{F^2(q,\alpha)\sin(\alpha)d\alpha} 78 78 79 For oriented ellipsoids the *theta*, *phi* and *psi* orientation parameters will appear when fitting 2D data, 79 For oriented ellipsoids the *theta*, *phi* and *psi* orientation parameters will appear when fitting 2D data, 80 80 see the :ref:`elliptical-cylinder` model for further information. 81 81 … … 151 151 return ellipsoid_ER(polar_outer, equat_outer) 152 152 153 154 demo = dict(scale=0.05, background=0.001, 155 radius_equat_core=20.0, 156 x_core=3.0, 157 thick_shell=30.0, 158 x_polar_shell=1.0, 159 sld_core=2.0, 160 sld_shell=1.0, 161 sld_solvent=6.3, 162 theta=0, 163 phi=0) 153 def random(): 154 import numpy as np 155 V = 10**np.random.uniform(5, 12) 156 radius_polar = 10**np.random.uniform(1.3, 4) 157 radius_equatorial = np.sqrt(V/radius_polar) # ignore 4/3 pi 158 thickness_polar = np.random.uniform(0.01, 1)*radius_polar 159 thickness_equatorial = np.random.uniform(0.01, 1)*radius_equatorial 160 radius_polar -= thickness_polar 161 radius_equatorial -= thickness_equatorial 162 x_core = radius_polar/radius_equatorial 163 x_polar_shell = thickness_polar/thickness_equatorial 164 pars = dict( 165 #background=0, sld=0, sld_solvent=1, 166 radius_equat_core=radius_equatorial, 167 x_core=x_core, 168 thick_shell=thickness_equatorial, 169 x_polar_shell=x_polar_shell, 170 ) 171 return pars 164 172 165 173 q = 0.1
Note: See TracChangeset
for help on using the changeset viewer.