Changeset a807206 in sasmodels for sasmodels/models/elliptical_cylinder.py
- Timestamp:
- Sep 30, 2016 10:42:06 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- caddb14, 5031ca3
- Parents:
- 2222134
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/elliptical_cylinder.py
r40a87fa ra807206 110 110 # pylint: disable=bad-whitespace, line-too-long 111 111 # ["name", "units", default, [lower, upper], "type","description"], 112 parameters = [["r _minor", "Ang", 20.0, [0, inf], "volume", "Ellipse minor radius"],112 parameters = [["radius_minor", "Ang", 20.0, [0, inf], "volume", "Ellipse minor radius"], 113 113 ["axis_ratio", "", 1.5, [1, inf], "volume", "Ratio of major radius over minor radius"], 114 114 ["length", "Ang", 400.0, [1, inf], "volume", "Length of the cylinder"], … … 124 124 "elliptical_cylinder.c"] 125 125 126 demo = dict(scale=1, background=0, r _minor=100, axis_ratio=1.5, length=400.0,126 demo = dict(scale=1, background=0, radius_minor=100, axis_ratio=1.5, length=400.0, 127 127 sld=4.0, sld_solvent=1.0, theta=10.0, phi=20, psi=30, 128 128 theta_pd=10, phi_pd=2, psi_pd=3) 129 129 130 def ER(r _minor, axis_ratio, length):130 def ER(radius_minor, axis_ratio, length): 131 131 """ 132 132 Equivalent radius 133 @param r _minor: Ellipse minor radius133 @param radius_minor: Ellipse minor radius 134 134 @param axis_ratio: Ratio of major radius over minor radius 135 135 @param length: Length of the cylinder 136 136 """ 137 radius = sqrt(r _minor * r_minor * axis_ratio)137 radius = sqrt(radius_minor * radius_minor * axis_ratio) 138 138 ddd = 0.75 * radius * (2 * radius * length 139 139 + (length + radius) * (length + pi * radius)) … … 141 141 142 142 tests = [ 143 [{'r _minor': 20.0, 'axis_ratio': 1.5, 'length':400.0}, 'ER', 79.89245454155024],144 [{'r _minor': 20.0, 'axis_ratio': 1.2, 'length':300.0}, 'VR', 1],143 [{'radius_minor': 20.0, 'axis_ratio': 1.5, 'length':400.0}, 'ER', 79.89245454155024], 144 [{'radius_minor': 20.0, 'axis_ratio': 1.2, 'length':300.0}, 'VR', 1], 145 145 146 146 # The SasView test result was 0.00169, with a background of 0.001 147 [{'r _minor': 20.0, 'axis_ratio': 1.5, 'sld': 4.0, 'length':400.0,147 [{'radius_minor': 20.0, 'axis_ratio': 1.5, 'sld': 4.0, 'length':400.0, 148 148 'sld_solvent':1.0, 'background':0.0}, 149 149 0.001, 675.504402],
Note: See TracChangeset
for help on using the changeset viewer.