Changeset 9f91afe in sasmodels
- Timestamp:
- Apr 6, 2017 3:23:08 AM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 668c38b
- Parents:
- cb0dc22
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sesans.py
r94d13f1 r9f91afe 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): … … 54 54 return P 55 55 56 def _set_hankel(self, SElength, zaccept, Rmax):56 def _set_hankel(self, SElength, lam, zaccept, Rmax): 57 57 # type: (np.ndarray, float, float) -> None 58 58 # Force float32 arrays, otherwise run into memory problems on some machines … … 71 71 H = np.float32(dq/(2*pi)) * j0(repSE*repq) * repq 72 72 73 replam = np.tile(lam, (q.size, 1)) 74 reptheta = np.arcsin(repq*replam/2*np.pi) 75 mask = reptheta > zaccept 76 H[mask] = 0 77 73 78 self.q_calc = q 74 79 self._H, self._H0 = H, H0
Note: See TracChangeset
for help on using the changeset viewer.