Changeset 8f04da4 in sasmodels for sasmodels/models/fractal_core_shell.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/fractal_core_shell.py
r1511c37c r8f04da4 100 100 def random(): 101 101 import numpy as np 102 total_radius = 10**np.random.uniform(0.7, 4) 103 core_portion = np.random.uniform(0, 1) 104 radius = total_radius * core_portion 105 thickness = total_radius - radius 106 #radius = 5 107 cor_length = 10**np.random.uniform(0.7, 2)*radius 108 #cor_length = 20*radius 102 outer_radius = 10**np.random.uniform(0.7, 4) 103 # Use a distribution with a preference for thin shell or thin core 104 # Avoid core,shell radii < 1 105 thickness = np.random.beta(0.5, 0.5)*(outer_radius-2) + 1 106 radius = outer_radius - thickness 107 cor_length = 10**np.random.uniform(0.7, 2)*outer_radius 109 108 volfraction = 10**np.random.uniform(-3, -1) 110 #volfraction = 0.05111 109 fractal_dim = 2*np.random.beta(3, 4) + 1 112 #fractal_dim = 2113 110 pars = dict( 114 111 #background=0, sld_block=1, sld_solvent=0, … … 119 116 ) 120 117 return pars 121 122 118 123 119 demo = dict(scale=0.05,
Note: See TracChangeset
for help on using the changeset viewer.