Changeset 404ebbd in sasmodels for sasmodels/models/sc_paracrystal.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/sc_paracrystal.py
r69e1afc r404ebbd 138 138 source = ["lib/sas_3j1x_x.c", "lib/sphere_form.c", "lib/gauss150.c", "sc_paracrystal.c"] 139 139 140 def random(): 141 import numpy as np 142 # Define lattice spacing as a multiple of the particle radius 143 # using the formulat a = 4 r/sqrt(3). Systems which are ordered 144 # are probably mostly filled, so use a distribution which goes from 145 # zero to one, but leaving 90% of them within 80% of the 146 # maximum bcc packing. Lattice distortion values are empirically 147 # useful between 0.01 and 0.7. Use an exponential distribution 148 # in this range 'cuz its easy. 149 dnn_fraction = np.random.beta(a=10, b=1) 150 pars = dict( 151 #sld=1, sld_solvent=0, scale=1, background=1e-32, 152 radius=10**np.random.uniform(1.3, 4), 153 d_factor=10**np.random.uniform(-2, -0.7), # sigma_d in 0.01-0.7 154 ) 155 pars['dnn'] = pars['radius']*4/np.sqrt(3)/dnn_fraction 156 #pars['scale'] = 1/(0.68*dnn_fraction**3) # bcc packing fraction is 0.68 157 pars['scale'] = 1 158 return pars 159 140 160 demo = dict(scale=1, background=0, 141 161 dnn=220.0,
Note: See TracChangeset
for help on using the changeset viewer.