Changeset 2d81cfe in sasmodels for sasmodels/models/elliptical_cylinder.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/elliptical_cylinder.py
reda8b30 r2d81cfe 43 43 P(q) = \text{scale} <F^2> / V 44 44 45 For 2d data the orientation of the particle is required, described using a different set 46 of angles as in the diagrams below, for further details of the calculation and angular 45 For 2d data the orientation of the particle is required, described using a different set 46 of angles as in the diagrams below, for further details of the calculation and angular 47 47 dispersions see :ref:`orientation` . 48 48 … … 95 95 * **Last Modified by:** 96 96 * **Last Reviewed by:** Richard Heenan - corrected equation in docs **Date:** December 21, 2016 97 98 97 """ 99 98 99 import numpy as np 100 100 from numpy import pi, inf, sqrt, sin, cos 101 101 … … 141 141 142 142 def random(): 143 import numpy as np144 143 # V = pi * radius_major * radius_minor * length; 145 V= 10**np.random.uniform(3, 9)144 volume = 10**np.random.uniform(3, 9) 146 145 length = 10**np.random.uniform(1, 3) 147 146 axis_ratio = 10**np.random.uniform(0, 2) 148 radius_minor = np.sqrt( V/length/axis_ratio)149 Vf= 10**np.random.uniform(-4, -2)147 radius_minor = np.sqrt(volume/length/axis_ratio) 148 volfrac = 10**np.random.uniform(-4, -2) 150 149 pars = dict( 151 150 #background=0, sld=0, sld_solvent=1, 152 scale=1e9* Vf/V,151 scale=1e9*volfrac/volume, 153 152 length=length, 154 153 radius_minor=radius_minor, … … 170 169 'sld_solvent':1.0, 'background':0.0}, 171 170 0.001, 675.504402], 172 #[{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ],171 #[{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ], 173 172 ]
Note: See TracChangeset
for help on using the changeset viewer.