Changeset 8f04da4 in sasmodels for sasmodels/models/core_shell_sphere.py
- Timestamp:
- Aug 2, 2017 12: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/core_shell_sphere.py
r31df0c9 r8f04da4 101 101 def random(): 102 102 import numpy as np 103 total_radius = 10**np.random.uniform(1.3, 4.3) 104 radius = np.random.uniform(0, 1)*total_radius 105 thickness = total_radius - radius 103 outer_radius = 10**np.random.uniform(1.3, 4.3) 104 # Use a distribution with a preference for thin shell or thin core 105 # Avoid core,shell radii < 1 106 radius = np.random.beta(0.5, 0.5)*(outer_radius-2) + 1 107 thickness = outer_radius - core 106 108 pars = dict( 107 109 radius=radius, … … 112 114 tests = [ 113 115 [{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], 114 115 116 116 # TODO: VR test suppressed until we sort out new product model 117 # and determine what to do with volume ratio. 118 #[{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704], 117 119 118 # The SasView test result was 0.00169, with a background of 0.001 119 [{'radius': 60.0, 'thickness': 10.0, 'sld_core': 1.0, 'sld_shell':2.0, 120 'sld_solvent':3.0, 'background':0.0}, 121 0.4, 0.000698838], 120 # The SasView test result was 0.00169, with a background of 0.001 121 [{'radius': 60.0, 'thickness': 10.0, 'sld_core': 1.0, 'sld_shell': 2.0, 122 'sld_solvent': 3.0, 'background': 0.0}, 0.4, 0.000698838], 122 123 ]
Note: See TracChangeset
for help on using the changeset viewer.