Changeset 6e8b436 in sasview for sansmodels/src/sans/models
- Timestamp:
- Mar 22, 2011 5:16:25 PM (13 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 384647dc
- Parents:
- ec611aad
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/smearing_2d.py
rd4bf55e9 r6e8b436 200 200 numpy.exp(-0.5 * ((r + bin_size / 2.0 ) *\ 201 201 (r + bin_size / 2.0))) 202 weight_res /= numpy.sum(weight_res) 202 # No needs of normalization here. 203 #weight_res /= numpy.sum(weight_res) 203 204 weight_res = weight_res.repeat(nphi).reshape(nr, nphi) 204 205 … … 218 219 # The polar needs rotation by -q_phi 219 220 if self.coords == 'polar': 220 qx_res = qx + (dqx*numpy.cos(dphi) * numpy.cos(-q_phi) +\ 221 q_r = numpy.sqrt(qx * qx + qy * qy) 222 qx_res = ((dqx*numpy.cos(dphi) + q_r) * numpy.cos(-q_phi) +\ 221 223 dqy*numpy.sin(dphi) * numpy.sin(-q_phi)) 222 qy_res = qy + (-dqx*numpy.cos(dphi) * numpy.sin(-q_phi) +\224 qy_res = (-(dqx*numpy.cos(dphi) + q_r) * numpy.sin(-q_phi) +\ 223 225 dqy*numpy.sin(dphi) * numpy.cos(-q_phi)) 224 226 else: 225 227 qx_res = qx + dqx*numpy.cos(dphi) 226 qy_res = q x+ dqy*numpy.sin(dphi)228 qy_res = qy + dqy*numpy.sin(dphi) 227 229 228 230 ## Evaluate all points
Note: See TracChangeset
for help on using the changeset viewer.