Changeset eb3eb38 in sasmodels
- Timestamp:
- Sep 5, 2018 5:30:25 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- ee5fc99
- Parents:
- da1c8d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/fractal_core_shell.py
ref07e95 reb3eb38 88 88 ["sld_shell", "1e-6/Ang^2", 2.0, [-inf, inf], "sld", "Sphere shell scattering length density"], 89 89 ["sld_solvent", "1e-6/Ang^2", 3.0, [-inf, inf], "sld", "Solvent scattering length density"], 90 ["volfraction", "", 1.0, [0.0, inf], "", "Volume fraction of building block spheres"],90 ["volfraction", "", 0.05, [0.0, inf], "", "Volume fraction of building block spheres"], 91 91 ["fractal_dim", "", 2.0, [0.0, 6.0], "", "Fractal dimension"], 92 92 ["cor_length", "Ang", 100.0, [0.0, inf], "", "Correlation length of fractal-like aggregates"], … … 134 134 return radius + thickness 135 135 136 def VR(radius, thickness): 137 """ 138 Volume ratio 139 @param radius: core radius 140 @param thickness: shell thickness 141 """ 142 whole = 4.0/3.0 * pi * (radius + thickness)**3 143 core = 4.0/3.0 * pi * radius**3 144 return whole, whole-core 136 tests = [[{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], 145 137 146 tests = [[{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], 147 [{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704]] 148 149 # # The SasView test result was 0.00169, with a background of 0.001 150 # # They are however wrong as we now know. IGOR might be a more 151 # # appropriate source. Otherwise will just have to assume this is now 152 # # correct and self generate a correct answer for the future. Until we 153 # # figure it out leave the tests commented out 154 # [{'radius': 60.0, 155 # 'thickness': 10.0, 156 # 'sld_core': 1.0, 157 # 'sld_shell': 2.0, 158 # 'sld_solvent': 3.0, 159 # 'background': 0.0 160 # }, 0.015211, 692.84]] 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]]]
Note: See TracChangeset
for help on using the changeset viewer.