Changeset 38935ec in sasmodels
- Timestamp:
- Jun 12, 2018 5:01:44 AM (7 years ago)
- Branches:
- master
- Children:
- e46dde6
- Parents:
- 33969b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sesans.py
rfa79f5c r38935ec 67 67 H0 = np.float32(dq/(2*pi)) * q 68 68 69 repq = np.tile(q, (SElength.size, 1)).T 70 repSE = np.tile(SElength, (q.size, 1)) 71 H = np.float32(dq/(2*pi)) * j0(repSE*repq) * repq 69 # repq = np.tile(q, (SElength.size, 1)).T 70 H = np.outer(q, SElength) 71 j0(H, out=H) 72 H *= np.float32(dq/(2*pi)) 73 H *= q.reshape((-1, 1)) 72 74 73 replam = np.tile(lam, (q.size, 1)) 74 reptheta = np.arcsin(repq*replam/2*np.pi) 75 lam = np.asarray(lam, dtype=np.float32) 76 reptheta = np.outer(q, lam) 77 reptheta /= np.float32(2*np.pi) 78 np.arcsin(reptheta, out=reptheta) 79 # reptheta = np.arcsin(repq*replam/2*np.pi) 75 80 mask = reptheta > zaccept 76 81 H[mask] = 0 77 82 83 # H = np.zeros((q.size, SElength.size), dtype=np.float32) 84 # H0 = q * 0 85 assert(H.shape == (q.size, SElength.size)) 86 78 87 self.q_calc = q 79 88 self._H, self._H0 = H, H0
Note: See TracChangeset
for help on using the changeset viewer.