Changeset 9ce41c6 in sasview for sansmodels/src/sans/models/BaseComponent.py
- Timestamp:
- Sep 9, 2009 7:06:42 PM (15 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:
- 3b865c1
- Parents:
- d2caa18
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/BaseComponent.py
r5eb9154 r9ce41c6 85 85 above, numpy arrays must be created the following way: 86 86 87 qx_prime = numpy.reshape(qx, [ 3,1])88 qy_prime = numpy.reshape(qy, [ 1,3])87 qx_prime = numpy.reshape(qx, [1,3]) 88 qy_prime = numpy.reshape(qy, [3,1]) 89 89 90 90 The method is then called the following way: … … 106 106 107 107 # Create output array 108 iq_array = numpy.zeros([qx.shape[ 0], qy.shape[1]])108 iq_array = numpy.zeros([qx.shape[1], qy.shape[0]]) 109 109 110 for i in range(qx.shape[0]):111 for j in range(qy.shape[1]):112 iq_array[ i][j] = self.runXY([qx[i][0],qy[0][j]])110 for j in range(qy.shape[0]): 111 for i in range(qx.shape[1]): 112 iq_array[j][i] = self.runXY([qx[0][i],qy[j][0]]) 113 113 return iq_array 114 114
Note: See TracChangeset
for help on using the changeset viewer.