Changeset 823e620 in sasmodels for sasmodels/resolution2d.py
- Timestamp:
- Jan 29, 2016 8:46:54 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- eafc9fa
- Parents:
- 803f835
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/resolution2d.py
r841753c r823e620 143 143 if self.coords == 'polar': 144 144 q_r = sqrt(qx**2 + qy**2) 145 qx_res = ((dqx*cos(dphi) + q_r) * cos(-q_phi) +146 147 qy_res = (-(dqx*cos(dphi) + q_r) * sin(-q_phi) +148 145 qx_res = ((dqx*cos(dphi) + q_r) * cos(-q_phi) 146 + dqy*sin(dphi) * sin(-q_phi)) 147 qy_res = (-(dqx*cos(dphi) + q_r) * sin(-q_phi) 148 + dqy*sin(dphi) * cos(-q_phi)) 149 149 else: 150 qx_res = qx + 151 qy_res = qy + 150 qx_res = qx + dqx*cos(dphi) 151 qy_res = qy + dqy*sin(dphi) 152 152 153 153 … … 162 162 theory = np.reshape(theory, (nbins, nq)) 163 163 ## Averaging with Gaussian weighting: normalization included. 164 value = np.average(theory, axis=0, weights=self.q_calc_weights)164 value = np.average(theory, axis=0, weights=self.q_calc_weights) 165 165 ## Return the smeared values in the range of self.index 166 166 return value
Note: See TracChangeset
for help on using the changeset viewer.