Changeset 59ee4db in sasmodels
- Timestamp:
- Dec 4, 2017 3:20:22 PM (7 years ago)
- Children:
- 7f79cba
- Parents:
- 7a40b08
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/codegen.py
r50b5464 r59ee4db 678 678 x = sin(y) + cos(z.real) 679 679 print("world", outside) 680 a, b = x, y 681 [a, b] = (x, y) 682 (a, b) = [x, y] 680 683 681 684 if __name__ == "__main__": -
sasmodels/models/_cylpy.py
r13cf47a r59ee4db 102 102 import numpy as np # type: ignore 103 103 from sasmodels.special import sas_2J1x_x, sas_sinx_x, pi, inf, sincos, square, gauss76 as gauss 104 from sasmodels.special import sin, cos 104 105 105 106 name = "cylinder" … … 154 155 for i in range(gauss.n): 155 156 theta = gauss.z[i]*zm + zb 156 sin_theta, cos_theta = sincos(theta) 157 # TODO: should be using u-substitution of cos(theta) over [0, 1] 158 #sin_theta, cos_theta = sincos(theta) 159 sin_theta = sin(theta) 160 cos_theta = cos(theta) 157 161 form = fq(q*sin_theta, q*cos_theta, radius, length) 158 162 total += gauss.w[i] * form * form * sin_theta
Note: See TracChangeset
for help on using the changeset viewer.