Changeset 8f04da4 in sasmodels for sasmodels/models/stacked_disks.py
- Timestamp:
- Aug 2, 2017 2:53:56 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:
- bd21b12
- Parents:
- 1511c37c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/stacked_disks.py
r9d50a1e r8f04da4 137 137 138 138 source = ["lib/polevl.c", "lib/sas_J1.c", "lib/gauss76.c", "stacked_disks.c"] 139 140 def random(): 141 import numpy as np 142 radius = 10**np.random.uniform(1, 4.7) 143 total_stack = 10**np.random.uniform(1, 4.7) 144 n_stacking = int(10**np.random.uniform(0, np.log10(total_stack)-1) + 0.5) 145 d = total_stack/n_stacking 146 thick_core = np.random.uniform(0, d-2) # at least 1 A for each layer 147 thick_layer = (d - thick_core)/2 148 # Let polydispersity peak around 15%; 95% < 0.4; max=100% 149 sigma_d = d * np.random.beta(1.5, 7) 150 pars = dict( 151 thick_core=thick_core, 152 thick_layer=thick_layer, 153 radius=radius, 154 n_stacking=n_stacking, 155 sigma_d=sigma_d, 156 ) 157 return pars 139 158 140 159 demo = dict(background=0.001,
Note: See TracChangeset
for help on using the changeset viewer.