Changeset da1c8d1 in sasmodels
- Timestamp:
- Sep 4, 2018 9:38:51 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:
- eb3eb38
- Parents:
- 992299c
- Location:
- sasmodels/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_cylinder.py
r2d81cfe rda1c8d1 130 130 Returns the effective radius used in the S*P calculation 131 131 """ 132 print("radius") 132 133 radius = radius + thickness 133 134 length = length + 2 * thickness 134 135 ddd = 0.75 * radius * (2 * radius * length + (length + radius) * (length + pi * radius)) 135 136 return 0.5 * (ddd) ** (1. / 3.) 136 137 def VR(radius, thickness, length):138 """139 Returns volume ratio140 """141 whole = pi * (radius + thickness) ** 2 * (length + 2 * thickness)142 core = pi * radius ** 2 * length143 return whole, whole - core144 137 145 138 def random(): -
sasmodels/models/core_shell_sphere.py
rdc76240 rda1c8d1 89 89 return radius + thickness 90 90 91 def VR(radius, thickness):92 """93 Volume ratio94 @param radius: core radius95 @param thickness: shell thickness96 """97 return (1, 1)98 whole = 4.0/3.0 * pi * (radius + thickness)**399 core = 4.0/3.0 * pi * radius**3100 return whole, whole - core101 102 91 def random(): 103 92 outer_radius = 10**np.random.uniform(1.3, 4.3) … … 114 103 tests = [ 115 104 [{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], 116 # TODO: VR test suppressed until we sort out new product model117 # and determine what to do with volume ratio.118 #[{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704],119 105 120 106 # The SasView test result was 0.00169, with a background of 0.001
Note: See TracChangeset
for help on using the changeset viewer.