Changeset 404ebbd in sasmodels for sasmodels/models/ellipsoid.py
- Timestamp:
- Jul 30, 2017 12:56:22 AM (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:
- 48462b0
- Parents:
- a151caa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/ellipsoid.py
r9b79f29 r404ebbd 2 2 # Note: model title and parameter table are inserted automatically 3 3 r""" 4 The form factor is normalized by the particle volume 4 The form factor is normalized by the particle volume 5 5 6 6 Definition … … 119 119 * **Last Modified by:** Paul Kienzle **Date:** March 22, 2017 120 120 """ 121 from __future__ import division 121 122 122 123 from numpy import inf, sin, cos, pi … … 177 178 delta = 0.75 * b1 * b2 178 179 179 ddd = np.zeros_like(radius_polar)180 #ddd = np.zeros_like(radius_polar) 180 181 ddd[valid] = 2.0 * (delta + 1.0) * radius_polar * radius_equatorial ** 2 181 182 return 0.5 * ddd ** (1.0 / 3.0) 182 183 184 def random(): 185 import numpy as np 186 V = 10**np.random.uniform(4, 12) 187 radius_polar = 10**np.random.uniform(1.3, 4) 188 radius_equatorial = np.sqrt(V/radius_polar) # ignore 4/3 pi 189 Vf = 10**np.random.uniform(-4, -2) 190 pars = dict( 191 #background=0, sld=0, sld_solvent=1, 192 scale=1e9*Vf/V, 193 radius_polar=radius_polar, 194 radius_equatorial=radius_equatorial, 195 ) 196 return pars 183 197 184 198 demo = dict(scale=1, background=0,
Note: See TracChangeset
for help on using the changeset viewer.