Changeset 7e94989 in sasmodels
- Timestamp:
- Dec 7, 2016 1:37:48 PM (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:
- 91a7c2b
- Parents:
- 447e9aa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/resolution2d.py
r40a87fa r7e94989 64 64 # just need q_calc and weights 65 65 self.data = data 66 self.index = index 67 68 self.qx_data = data.qx_data[ index]69 self.qy_data = data.qy_data[ index]70 self.q_data = data.q_data[ index]66 self.index = index if index is not None else slice(None) 67 68 self.qx_data = data.qx_data[self.index] 69 self.qy_data = data.qy_data[self.index] 70 self.q_data = data.q_data[self.index] 71 71 72 72 dqx = getattr(data, 'dqx_data', None) … … 74 74 if dqx is not None and dqy is not None: 75 75 # Here dqx and dqy mean dq_parr and dq_perp 76 self.dqx_data = dqx[ index]77 self.dqy_data = dqy[ index]76 self.dqx_data = dqx[self.index] 77 self.dqy_data = dqy[self.index] 78 78 ## Remove singular points if exists 79 79 self.dqx_data[self.dqx_data < SIGMA_ZERO] = SIGMA_ZERO … … 126 126 # The angle (phi) of the original q point 127 127 q_phi = np.arctan(q_phi).repeat(nbins)\ 128 .reshape( nq, nbins).transpose().flatten()128 .reshape([nq, nbins]).transpose().flatten() 129 129 ## Find Gaussian weight for each dq bins: The weight depends only 130 130 # on r-direction (The integration may not need)
Note: See TracChangeset
for help on using the changeset viewer.