Changeset 1c8ff89 in sasmodels
- Timestamp:
- Mar 30, 2019 6:49:45 AM (6 years ago)
- Branches:
- master
- Children:
- da33725
- Parents:
- ccbbc3b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sesans.py
r3f3df6c r1c8ff89 42 42 _H0 = None # type: np.ndarray 43 43 44 def __init__(self, z, SElength, lam, zaccept, Rmax ):44 def __init__(self, z, SElength, lam, zaccept, Rmax, log_spacing=1.0003): 45 45 # type: (np.ndarray, float, float) -> None 46 46 self.q = z 47 self.log_spacing = log_spacing 47 48 self._set_hankel(SElength, lam, zaccept, Rmax) 48 49 … … 62 63 q_max = 2*pi / (SElength[1] - SElength[0]) 63 64 q_min = 0.1 * 2*pi / (np.size(SElength) * SElength[-1]) 64 q = np.exp(np.arange(np.log(q_min), np.log(q_max), np.log(1.0003))) 65 q = np.exp(np.arange(np.log(q_min), np.log(q_max), 66 np.log(self.log_spacing))) 65 67 66 dq = q[1:]-q[:-1]67 dq = np. hstack([[dq[0]], dq])68 dq = np.diff(q) 69 dq = np.insert(dq, 0, dq[0]) 68 70 69 71 H0 = dq/(2*pi) * q … … 71 73 H = np.outer(q, SElength) 72 74 j0(H, out=H) 73 H *= (dq * q).reshape((-1, 1)) 74 H /= 2*pi 75 H *= (dq * q / (2*pi)).reshape((-1, 1)) 75 76 76 reptheta = np.outer(q, lam) 77 reptheta /= 2*np.pi 77 reptheta = np.outer(q, lam/2*pi) 78 78 np.arcsin(reptheta, out=reptheta) 79 79 mask = reptheta > zaccept
Note: See TracChangeset
for help on using the changeset viewer.