Changes in sasmodels/models/capped_cylinder.py [9802ab3:fcb33e4] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/capped_cylinder.py
r9802ab3 rfcb33e4 71 71 The 2D scattering intensity is calculated similar to the 2D cylinder model. 72 72 73 .. figure:: img/cylinder_angle_definition. png73 .. figure:: img/cylinder_angle_definition.jpg 74 74 75 75 Definition of the angles for oriented 2D cylinders. … … 91 91 92 92 """ 93 from numpy import inf , sin, cos, pi93 from numpy import inf 94 94 95 95 name = "capped_cylinder" … … 129 129 ["radius_cap", "Ang", 20, [0, inf], "volume", "Cap radius"], 130 130 ["length", "Ang", 400, [0, inf], "volume", "Cylinder length"], 131 ["theta", "degrees", 60, [- 360, 360], "orientation", "cylinder axis to beamangle"],132 ["phi", "degrees", 60, [- 360, 360], "orientation", "rotation about beam"],131 ["theta", "degrees", 60, [-inf, inf], "orientation", "inclination angle"], 132 ["phi", "degrees", 60, [-inf, inf], "orientation", "deflection angle"], 133 133 ] 134 134 # pylint: enable=bad-whitespace, line-too-long … … 145 145 theta_pd=15, theta_pd_n=45, 146 146 phi_pd=15, phi_pd_n=1) 147 q = 0.1148 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct!149 qx = q*cos(pi/6.0)150 qy = q*sin(pi/6.0)151 tests = [[{}, 0.075, 26.0698570695],152 [{'theta':80., 'phi':10.}, (qx, qy), 0.561811990502],153 ]154 del qx, qy # not necessary to delete, but cleaner
Note: See TracChangeset
for help on using the changeset viewer.