Changeset 2d81cfe in sasmodels for sasmodels/models/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/ellipsoid.py
r110f69c r2d81cfe 123 123 from __future__ import division 124 124 125 import numpy as np 125 126 from numpy import inf, sin, cos, pi 126 127 … … 163 164 164 165 def ER(radius_polar, radius_equatorial): 165 import numpy as np166 166 # see equation (26) in A.Isihara, J.Chem.Phys. 18(1950)1446-1449 167 167 ee = np.empty_like(radius_polar) … … 185 185 186 186 def random(): 187 import numpy as np 188 V = 10**np.random.uniform(5, 12) 187 volume = 10**np.random.uniform(5, 12) 189 188 radius_polar = 10**np.random.uniform(1.3, 4) 190 radius_equatorial = np.sqrt( V/radius_polar) # ignore 4/3 pi189 radius_equatorial = np.sqrt(volume/radius_polar) # ignore 4/3 pi 191 190 pars = dict( 192 191 #background=0, sld=0, sld_solvent=1, … … 208 207 qx = q*cos(pi/6.0) 209 208 qy = q*sin(pi/6.0) 210 tests = [[{}, 0.05, 54.8525847025], 211 [{'theta':80., 'phi':10.}, (qx, qy), 1.74134670026], 212 ] 209 tests = [ 210 [{}, 0.05, 54.8525847025], 211 [{'theta':80., 'phi':10.}, (qx, qy), 1.74134670026], 212 ] 213 213 del qx, qy # not necessary to delete, but cleaner
Note: See TracChangeset
for help on using the changeset viewer.