Changeset 65ceb7d in sasmodels for sasmodels/sesans.py
- Timestamp:
- Sep 18, 2017 2:53:23 PM (7 years ago)
- Branches:
- costrafo411
- Children:
- 3a45c2c
- Parents:
- 2f9f1ec (diff), 058460c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sesans.py
r2cdc35b r65ceb7d 41 41 _H0 = None # type: np.ndarray 42 42 43 def __init__(self, z, SElength, zaccept, Rmax):43 def __init__(self, z, SElength, lam, zaccept, Rmax): 44 44 # type: (np.ndarray, float, float) -> None 45 45 #import logging; logging.info("creating SESANS transform") 46 46 self.q = z 47 self._set_hankel(SElength, zaccept, Rmax)47 self._set_hankel(SElength, lam, zaccept, Rmax) 48 48 49 49 def apply(self, Iq): … … 53 53 return P 54 54 55 def _set_hankel(self, SElength, zaccept, Rmax):55 def _set_hankel(self, SElength, lam, zaccept, Rmax): 56 56 # type: (np.ndarray, float, float) -> None 57 57 # Force float32 arrays, otherwise run into memory problems on some machines … … 69 69 repSE = np.tile(SElength, (q.size, 1)) 70 70 H = np.float32(dq/(2*pi)) * j0(repSE*repq) * repq 71 72 replam = np.tile(lam, (q.size, 1)) 73 reptheta = np.arcsin(repq*replam/2*np.pi) 74 mask = reptheta > zaccept 75 H[mask] = 0 71 76 72 77 self.q_calc = q
Note: See TracChangeset
for help on using the changeset viewer.