Changeset b297ba9 in sasmodels for sasmodels/models/fractal_core_shell.py
- Timestamp:
- Mar 20, 2019 5:03:50 PM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 4e28511
- Parents:
- 0d362b7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/fractal_core_shell.py
r2cc8aa2 rb297ba9 60 60 61 61 import numpy as np 62 from numpy import pi,inf62 from numpy import inf 63 63 64 64 name = "fractal_core_shell" … … 98 98 99 99 def random(): 100 """Return a random parameter set for the model.""" 100 101 outer_radius = 10**np.random.uniform(0.7, 4) 101 102 # Use a distribution with a preference for thin shell or thin core … … 126 127 cor_length=100.0) 127 128 129 # TODO: why is there an ER function here? 128 130 def ER(radius, thickness): 129 131 """ … … 136 138 #tests = [[{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], 137 139 tests = [ 138 # # At some point the SasView 3.x test result was deemed incorrect. The 139 #following tests were verified against NIST IGOR macros ver 7.850. 140 #NOTE: NIST macros do only provide for a polydispers core (no option 141 #for a poly shell or for a monodisperse core. The results seemed 142 #extremely sensitive to the core PD, varying non monotonically all 143 #the way to a PD of 1e-6. From 1e-6 to 1e-9 no changes in the 144 #results were observed and the values below were taken using PD=1e-9. 145 #Non-monotonically = I(0.001)=188 to 140 to 177 back to 160 etc. 146 [{'radius': 20.0, 147 'thickness': 5.0, 148 'sld_core': 3.5, 149 'sld_shell': 1.0, 150 'sld_solvent': 6.35, 151 'volfraction': 0.05, 152 'background': 0.0}, 153 [0.001,0.00291,0.0107944,0.029923,0.100726,0.476304], 154 [177.146,165.151,84.1596,20.1466,1.40906,0.00622666]]] 140 # At some point the SasView 3.x test result was deemed incorrect. The 141 # following tests were verified against NIST IGOR macros ver 7.850. 142 # NOTE: NIST macros do only provide for a polydispers core (no option 143 # for a poly shell or for a monodisperse core. The results seemed 144 # extremely sensitive to the core PD, varying non monotonically all 145 # the way to a PD of 1e-6. From 1e-6 to 1e-9 no changes in the 146 # results were observed and the values below were taken using PD=1e-9. 147 # Non-monotonically = I(0.001)=188 to 140 to 177 back to 160 etc. 148 [{'radius': 20.0, 149 'thickness': 5.0, 150 'sld_core': 3.5, 151 'sld_shell': 1.0, 152 'sld_solvent': 6.35, 153 'volfraction': 0.05, 154 'background': 0.0}, 155 [0.001, 0.00291, 0.0107944, 0.029923, 0.100726, 0.476304], 156 [177.146, 165.151, 84.1596, 20.1466, 1.40906, 0.00622666] 157 ] 158 ]
Note: See TracChangeset
for help on using the changeset viewer.