Changes in / [275b98e5:dd27e0c] in sasmodels
- Location:
- sasmodels/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/elliptical_cylinder.py
re65a3e7 r74fd96f 12 12 .. figure:: img/elliptical_cylinder_geometry.png 13 13 14 Elliptical cylinder geometry $a$ = $r_{minor}$ and \nu = $ r_{ratio}$ = $r_{major} / r_{minor}$14 Elliptical cylinder geometry $a$ = $r_{minor}$ and \nu = $axis\_ratio$ = $r_{major} / r_{minor}$ 15 15 16 16 The function calculated is … … 57 57 Examples of the angles for oriented elliptical cylinders against the detector plane. 58 58 59 NB: The 2nd virial coefficient of the cylinder is calculated based on the averaged radius (= sqrt(*r_minor*\ :sup:`2` \* * r_ratio*))59 NB: The 2nd virial coefficient of the cylinder is calculated based on the averaged radius (= sqrt(*r_minor*\ :sup:`2` \* *axis_ratio*)) 60 60 and length values, and used as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied. 61 61 … … 95 95 # ["name", "units", default, [lower, upper], "type","description"], 96 96 parameters = [["r_minor", "Ang", 20.0, [0, inf], "volume", "Ellipse minor radius"], 97 [" r_ratio", "", 1.5, [1, inf], "volume", "Ratio of major radius over minor radius"],97 ["axis_ratio", "", 1.5, [1, inf], "volume", "Ratio of major radius over minor radius"], 98 98 ["length", "Ang", 400.0, [1, inf], "volume", "Length of the cylinder"], 99 99 ["sld", "1e-6/Ang^2", 4.0, [-inf, inf], "", "Cylinder scattering length density"], … … 107 107 source = ["lib/polevl.c","lib/sas_J1.c", "lib/gauss76.c", "lib/gauss20.c", "elliptical_cylinder.c"] 108 108 109 demo = dict(scale=1, background=0, r_minor=100, r_ratio=1.5, length=400.0,109 demo = dict(scale=1, background=0, r_minor=100, axis_ratio=1.5, length=400.0, 110 110 sld=4.0, sld_solvent=1.0, theta=10.0, phi=20, psi=30, theta_pd=10, phi_pd=2, psi_pd=3) 111 111 112 112 oldname = 'EllipticalCylinderModel' 113 oldpars = dict( theta='cyl_theta', phi='cyl_phi', psi='cyl_psi', sld='sldCyl', sld_solvent='sldSolv')113 oldpars = dict(axis_ratio="r_ratio",theta='cyl_theta', phi='cyl_phi', psi='cyl_psi', sld='sldCyl', sld_solvent='sldSolv') 114 114 115 def ER(r_minor, r_ratio, length):115 def ER(r_minor, axis_ratio, length): 116 116 """ 117 117 Equivalent radius 118 118 @param r_minor: Ellipse minor radius 119 @param r_ratio: Ratio of major radius over minor radius119 @param axis_ratio: Ratio of major radius over minor radius 120 120 @param length: Length of the cylinder 121 121 """ 122 radius = math.sqrt(r_minor * r_minor * r_ratio)122 radius = math.sqrt(r_minor * r_minor * axis_ratio) 123 123 ddd = 0.75 * radius * (2 * radius * length + (length + radius) * (length + pi * radius)) 124 124 return 0.5 * (ddd) ** (1. / 3.) 125 125 126 tests = [[{'r_minor': 20.0, ' r_ratio': 1.5, 'length':400.0}, 'ER', 79.89245454155024],127 [{'r_minor': 20.0, ' r_ratio': 1.2, 'length':300.0}, 'VR', 1],126 tests = [[{'r_minor': 20.0, 'axis_ratio': 1.5, 'length':400.0}, 'ER', 79.89245454155024], 127 [{'r_minor': 20.0, 'axis_ratio': 1.2, 'length':300.0}, 'VR', 1], 128 128 129 129 # The SasView test result was 0.00169, with a background of 0.001 130 130 [{'r_minor': 20.0, 131 ' r_ratio': 1.5,131 'axis_ratio': 1.5, 132 132 'sld': 4.0, 133 133 'length':400.0, -
sasmodels/models/flexible_cylinder_ex.py
rce8bed9 r74fd96f 102 102 ["length", "Ang", 1000.0, [0, inf], "volume", "Length of the flexible cylinder"], 103 103 ["kuhn_length", "Ang", 100.0, [0, inf], "volume", "Kuhn length of the flexible cylinder"], 104 ["radius", "Ang", 20.0, [ 0, inf], "volume", "Radius of the flexible cylinder"],104 ["radius", "Ang", 20.0, [1, inf], "volume", "Radius of the flexible cylinder"], 105 105 ["axis_ratio", "", 1.5, [0, inf], "", "Axis_ratio (major_radius/minor_radius"], 106 106 ["sld", "1e-6/Ang^2", 1.0, [-inf, inf], "", "Cylinder scattering length density"],
Note: See TracChangeset
for help on using the changeset viewer.