Changeset 2cdc35b in sasmodels for sasmodels/sesans.py
- Timestamp:
- Apr 11, 2017 9:44:18 AM (7 years ago)
- Branches:
- costrafo411
- Children:
- 2f9f1ec
- Parents:
- 7c1cce3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sesans.py
r7c1cce3 r2cdc35b 45 45 #import logging; logging.info("creating SESANS transform") 46 46 self.q = z 47 # isoriented flag determines whether data is from an oriented sample or48 # not, should be a selection variable upon entering SESANS data.49 47 self._set_hankel(SElength, zaccept, Rmax) 50 48 … … 105 103 #import logging; logging.info("creating SESANS transform") 106 104 self.q = z 107 # isoriented flag determines whether data is from an oriented sample or108 # not, should be a selection variable upon entering SESANS data.109 105 self._set_cosmat(SElength, zaccept, Rmax) 110 106 … … 113 109 Iq = np.reshape(Iq, self._Iq_shape) 114 110 G0 = self._cos0 * np.sum(Iq) * dq 115 G = np.sum(np.dot(Iq, self._cosmat .T), axis=1) * dq111 G = np.sum(np.dot(Iq, self._cosmat), axis=0) * dq 116 112 P = G - G0 117 113 return P … … 125 121 q_max = 2 * pi / (SElength[1] - SElength[0]) 126 122 q_min = 0.1 * 2 * pi / (np.size(SElength) * SElength[-1]) 123 q_min *= 100 127 124 128 125 q = np.arange(q_min, q_max, q_min, dtype='float32') … … 130 127 131 128 cos0 = np.float32(dq / (2 * pi)) 132 cosmat = np.float32(dq / (2 * pi)) * np.cos(q[:, None] * SE [None, :])129 cosmat = np.float32(dq / (2 * pi)) * np.cos(q[:, None] * SElength[None, :]) 133 130 134 131 qx, qy = np.meshgrid(q, q)
Note: See TracChangeset
for help on using the changeset viewer.