Changeset 870f131 in sasview for sansmodels
- Timestamp:
- Aug 24, 2009 4:17: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:
- c8727c5
- Parents:
- a96d246
- Location:
- sansmodels/src/sans/models
- Files:
-
- 1 added
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/BinaryHSModel.py
r975ec8e r870f131 17 17 18 18 WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 19 DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\binaryH S.h19 DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\binaryHs.h 20 20 AND RE-RUN THE GENERATOR SCRIPT 21 21 … … 28 28 class BinaryHSModel(CBinaryHSModel, BaseComponent): 29 29 """ Class that evaluates a BinaryHSModel model. 30 This file was auto-generated from ..\c_extensions\binaryH S.h.30 This file was auto-generated from ..\c_extensions\binaryHs.h. 31 31 Refer to that file and the structure it contains 32 32 for details of the model. -
sansmodels/src/sans/models/DiamEllipFunc.py
r40945a3 r870f131 17 17 18 18 WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 19 DO NOT MODIFY THIS FILE, MODIFY C:\ECLPS\workspace\trunk\sansmodels\src\sans\models\c_extensions\DiamEllip.h19 DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\DiamEllip.h 20 20 AND RE-RUN THE GENERATOR SCRIPT 21 21 … … 28 28 class DiamEllipFunc(CDiamEllipFunc, BaseComponent): 29 29 """ Class that evaluates a DiamEllipFunc model. 30 This file was auto-generated from C:\ECLPS\workspace\trunk\sansmodels\src\sans\models\c_extensions\DiamEllip.h.30 This file was auto-generated from ..\c_extensions\DiamEllip.h. 31 31 Refer to that file and the structure it contains 32 32 for details of the model. … … 63 63 ## fittable parameters 64 64 self.fixed=['radius_a.width', 'radius_b.width'] 65 66 ## parameters with orientation 67 self.orientation_params =[] 65 68 66 69 def clone(self): … … 84 87 return CDiamEllipFunc.runXY(self, x) 85 88 89 def evalDistribition(self, x = []): 90 """ Evaluate the model in cartesian coordinates 91 @param x: input q[], or [qx[], qy[]] 92 @return: scattering function P(q[]) 93 """ 94 return CDiamEllipFunc.evalDistribition(self, x) 95 86 96 def set_dispersion(self, parameter, dispersion): 87 97 """ -
sansmodels/src/sans/models/LamellarPSHGModel.py
r9188cc1 r870f131 114 114 return CLamellarPSHGModel.runXY(self, x) 115 115 116 def evalDistribition(self, x = []): 117 """ Evaluate the model in cartesian coordinates 118 @param x: input q[], or [qx[], qy[]] 119 @return: scattering function P(q[]) 120 """ 121 return CLamellarPSHGModel.evalDistribition(self, x) 122 116 123 def set_dispersion(self, parameter, dispersion): 117 124 """ -
sansmodels/src/sans/models/VesicleModel.py
rb4679de r870f131 93 93 return CVesicleModel.runXY(self, x) 94 94 95 def evalDistribition(self, x = []): 96 """ Evaluate the model in cartesian coordinates 97 @param x: input q[], or [qx[], qy[]] 98 @return: scattering function P(q[]) 99 """ 100 return CVesicleModel.evalDistribition(self, x) 101 95 102 def set_dispersion(self, parameter, dispersion): 96 103 """ -
sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp
re0a8a3c r870f131 192 192 if (PyArray_Check(x) && PyArray_Check(y)) { 193 193 194 x_len = dims[1]= x->dimensions[ 1];195 y_len = dims[0]= y->dimensions[ 0];194 x_len = dims[1]= x->dimensions[0]; 195 y_len = dims[0]= y->dimensions[1]; 196 196 197 197 // Make a new double matrix of same dims … … 206 206 for ( j=0; j< y_len; j++) { 207 207 for ( i=0; i< x_len; i++) { 208 double x_value = *(double *)(x->data + i*x->strides[ 1]);209 double y_value = *(double *)(y->data + j*y->strides[ 0]);208 double x_value = *(double *)(x->data + i*x->strides[0]); 209 double y_value = *(double *)(y->data + j*y->strides[1]); 210 210 double *result_value = (double *)(result->data + 211 i*result->strides[1] + j*result->strides[0]);211 j*result->strides[0] + i*result->strides[1]); 212 212 *result_value = (*model)(x_value, y_value); 213 213 } -
sansmodels/src/sans/models/c_models/CBinaryHSPSF11Model.cpp
re0a8a3c r870f131 192 192 if (PyArray_Check(x) && PyArray_Check(y)) { 193 193 194 x_len = dims[1]= x->dimensions[ 1];195 y_len = dims[0]= y->dimensions[ 0];194 x_len = dims[1]= x->dimensions[0]; 195 y_len = dims[0]= y->dimensions[1]; 196 196 197 197 // Make a new double matrix of same dims … … 206 206 for ( j=0; j< y_len; j++) { 207 207 for ( i=0; i< x_len; i++) { 208 double x_value = *(double *)(x->data + i*x->strides[ 1]);209 double y_value = *(double *)(y->data + j*y->strides[ 0]);208 double x_value = *(double *)(x->data + i*x->strides[0]); 209 double y_value = *(double *)(y->data + j*y->strides[1]); 210 210 double *result_value = (double *)(result->data + 211 i*result->strides[1] + j*result->strides[0]);211 j*result->strides[0] + i*result->strides[1]); 212 212 *result_value = (*model)(x_value, y_value); 213 213 } -
sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp
re0a8a3c r870f131 203 203 if (PyArray_Check(x) && PyArray_Check(y)) { 204 204 205 x_len = dims[1]= x->dimensions[ 1];206 y_len = dims[0]= y->dimensions[ 0];205 x_len = dims[1]= x->dimensions[0]; 206 y_len = dims[0]= y->dimensions[1]; 207 207 208 208 // Make a new double matrix of same dims … … 217 217 for ( j=0; j< y_len; j++) { 218 218 for ( i=0; i< x_len; i++) { 219 double x_value = *(double *)(x->data + i*x->strides[ 1]);220 double y_value = *(double *)(y->data + j*y->strides[ 0]);219 double x_value = *(double *)(x->data + i*x->strides[0]); 220 double y_value = *(double *)(y->data + j*y->strides[1]); 221 221 double *result_value = (double *)(result->data + 222 i*result->strides[1] + j*result->strides[0]);222 j*result->strides[0] + i*result->strides[1]); 223 223 *result_value = (*model)(x_value, y_value); 224 224 } -
sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp
re0a8a3c r870f131 206 206 if (PyArray_Check(x) && PyArray_Check(y)) { 207 207 208 x_len = dims[1]= x->dimensions[ 1];209 y_len = dims[0]= y->dimensions[ 0];208 x_len = dims[1]= x->dimensions[0]; 209 y_len = dims[0]= y->dimensions[1]; 210 210 211 211 // Make a new double matrix of same dims … … 220 220 for ( j=0; j< y_len; j++) { 221 221 for ( i=0; i< x_len; i++) { 222 double x_value = *(double *)(x->data + i*x->strides[ 1]);223 double y_value = *(double *)(y->data + j*y->strides[ 0]);222 double x_value = *(double *)(x->data + i*x->strides[0]); 223 double y_value = *(double *)(y->data + j*y->strides[1]); 224 224 double *result_value = (double *)(result->data + 225 i*result->strides[1] + j*result->strides[0]);225 j*result->strides[0] + i*result->strides[1]); 226 226 *result_value = (*model)(x_value, y_value); 227 227 } -
sansmodels/src/sans/models/c_models/CCoreShellModel.cpp
re0a8a3c r870f131 191 191 if (PyArray_Check(x) && PyArray_Check(y)) { 192 192 193 x_len = dims[1]= x->dimensions[ 1];194 y_len = dims[0]= y->dimensions[ 0];193 x_len = dims[1]= x->dimensions[0]; 194 y_len = dims[0]= y->dimensions[1]; 195 195 196 196 // Make a new double matrix of same dims … … 205 205 for ( j=0; j< y_len; j++) { 206 206 for ( i=0; i< x_len; i++) { 207 double x_value = *(double *)(x->data + i*x->strides[ 1]);208 double y_value = *(double *)(y->data + j*y->strides[ 0]);207 double x_value = *(double *)(x->data + i*x->strides[0]); 208 double y_value = *(double *)(y->data + j*y->strides[1]); 209 209 double *result_value = (double *)(result->data + 210 i*result->strides[1] + j*result->strides[0]);210 j*result->strides[0] + i*result->strides[1]); 211 211 *result_value = (*model)(x_value, y_value); 212 212 } -
sansmodels/src/sans/models/c_models/CCylinderModel.cpp
re0a8a3c r870f131 197 197 if (PyArray_Check(x) && PyArray_Check(y)) { 198 198 199 x_len = dims[1]= x->dimensions[ 1];200 y_len = dims[0]= y->dimensions[ 0];199 x_len = dims[1]= x->dimensions[0]; 200 y_len = dims[0]= y->dimensions[1]; 201 201 202 202 // Make a new double matrix of same dims … … 211 211 for ( j=0; j< y_len; j++) { 212 212 for ( i=0; i< x_len; i++) { 213 double x_value = *(double *)(x->data + i*x->strides[ 1]);214 double y_value = *(double *)(y->data + j*y->strides[ 0]);213 double x_value = *(double *)(x->data + i*x->strides[0]); 214 double y_value = *(double *)(y->data + j*y->strides[1]); 215 215 double *result_value = (double *)(result->data + 216 i*result->strides[1] + j*result->strides[0]);216 j*result->strides[0] + i*result->strides[1]); 217 217 *result_value = (*model)(x_value, y_value); 218 218 } -
sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp
re0a8a3c r870f131 186 186 if (PyArray_Check(x) && PyArray_Check(y)) { 187 187 188 x_len = dims[1]= x->dimensions[ 1];189 y_len = dims[0]= y->dimensions[ 0];188 x_len = dims[1]= x->dimensions[0]; 189 y_len = dims[0]= y->dimensions[1]; 190 190 191 191 // Make a new double matrix of same dims … … 200 200 for ( j=0; j< y_len; j++) { 201 201 for ( i=0; i< x_len; i++) { 202 double x_value = *(double *)(x->data + i*x->strides[ 1]);203 double y_value = *(double *)(y->data + j*y->strides[ 0]);202 double x_value = *(double *)(x->data + i*x->strides[0]); 203 double y_value = *(double *)(y->data + j*y->strides[1]); 204 204 double *result_value = (double *)(result->data + 205 i*result->strides[1] + j*result->strides[0]);205 j*result->strides[0] + i*result->strides[1]); 206 206 *result_value = (*model)(x_value, y_value); 207 207 } -
sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp
re0a8a3c r870f131 186 186 if (PyArray_Check(x) && PyArray_Check(y)) { 187 187 188 x_len = dims[1]= x->dimensions[ 1];189 y_len = dims[0]= y->dimensions[ 0];188 x_len = dims[1]= x->dimensions[0]; 189 y_len = dims[0]= y->dimensions[1]; 190 190 191 191 // Make a new double matrix of same dims … … 200 200 for ( j=0; j< y_len; j++) { 201 201 for ( i=0; i< x_len; i++) { 202 double x_value = *(double *)(x->data + i*x->strides[ 1]);203 double y_value = *(double *)(y->data + j*y->strides[ 0]);202 double x_value = *(double *)(x->data + i*x->strides[0]); 203 double y_value = *(double *)(y->data + j*y->strides[1]); 204 204 double *result_value = (double *)(result->data + 205 i*result->strides[1] + j*result->strides[0]);205 j*result->strides[0] + i*result->strides[1]); 206 206 *result_value = (*model)(x_value, y_value); 207 207 } -
sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp
re0a8a3c r870f131 197 197 if (PyArray_Check(x) && PyArray_Check(y)) { 198 198 199 x_len = dims[1]= x->dimensions[ 1];200 y_len = dims[0]= y->dimensions[ 0];199 x_len = dims[1]= x->dimensions[0]; 200 y_len = dims[0]= y->dimensions[1]; 201 201 202 202 // Make a new double matrix of same dims … … 211 211 for ( j=0; j< y_len; j++) { 212 212 for ( i=0; i< x_len; i++) { 213 double x_value = *(double *)(x->data + i*x->strides[ 1]);214 double y_value = *(double *)(y->data + j*y->strides[ 0]);213 double x_value = *(double *)(x->data + i*x->strides[0]); 214 double y_value = *(double *)(y->data + j*y->strides[1]); 215 215 double *result_value = (double *)(result->data + 216 i*result->strides[1] + j*result->strides[0]);216 j*result->strides[0] + i*result->strides[1]); 217 217 *result_value = (*model)(x_value, y_value); 218 218 } -
sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp
re0a8a3c r870f131 205 205 if (PyArray_Check(x) && PyArray_Check(y)) { 206 206 207 x_len = dims[1]= x->dimensions[ 1];208 y_len = dims[0]= y->dimensions[ 0];207 x_len = dims[1]= x->dimensions[0]; 208 y_len = dims[0]= y->dimensions[1]; 209 209 210 210 // Make a new double matrix of same dims … … 219 219 for ( j=0; j< y_len; j++) { 220 220 for ( i=0; i< x_len; i++) { 221 double x_value = *(double *)(x->data + i*x->strides[ 1]);222 double y_value = *(double *)(y->data + j*y->strides[ 0]);221 double x_value = *(double *)(x->data + i*x->strides[0]); 222 double y_value = *(double *)(y->data + j*y->strides[1]); 223 223 double *result_value = (double *)(result->data + 224 i*result->strides[1] + j*result->strides[0]);224 j*result->strides[0] + i*result->strides[1]); 225 225 *result_value = (*model)(x_value, y_value); 226 226 } -
sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp
re0a8a3c r870f131 193 193 if (PyArray_Check(x) && PyArray_Check(y)) { 194 194 195 x_len = dims[1]= x->dimensions[ 1];196 y_len = dims[0]= y->dimensions[ 0];195 x_len = dims[1]= x->dimensions[0]; 196 y_len = dims[0]= y->dimensions[1]; 197 197 198 198 // Make a new double matrix of same dims … … 207 207 for ( j=0; j< y_len; j++) { 208 208 for ( i=0; i< x_len; i++) { 209 double x_value = *(double *)(x->data + i*x->strides[ 1]);210 double y_value = *(double *)(y->data + j*y->strides[ 0]);209 double x_value = *(double *)(x->data + i*x->strides[0]); 210 double y_value = *(double *)(y->data + j*y->strides[1]); 211 211 double *result_value = (double *)(result->data + 212 i*result->strides[1] + j*result->strides[0]);212 j*result->strides[0] + i*result->strides[1]); 213 213 *result_value = (*model)(x_value, y_value); 214 214 } -
sansmodels/src/sans/models/c_models/CGaussian.cpp
re0a8a3c r870f131 181 181 if (PyArray_Check(x) && PyArray_Check(y)) { 182 182 183 x_len = dims[1]= x->dimensions[ 1];184 y_len = dims[0]= y->dimensions[ 0];183 x_len = dims[1]= x->dimensions[0]; 184 y_len = dims[0]= y->dimensions[1]; 185 185 186 186 // Make a new double matrix of same dims … … 195 195 for ( j=0; j< y_len; j++) { 196 196 for ( i=0; i< x_len; i++) { 197 double x_value = *(double *)(x->data + i*x->strides[ 1]);198 double y_value = *(double *)(y->data + j*y->strides[ 0]);197 double x_value = *(double *)(x->data + i*x->strides[0]); 198 double y_value = *(double *)(y->data + j*y->strides[1]); 199 199 double *result_value = (double *)(result->data + 200 i*result->strides[1] + j*result->strides[0]);200 j*result->strides[0] + i*result->strides[1]); 201 201 *result_value = (*model)(x_value, y_value); 202 202 } -
sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp
re0a8a3c r870f131 183 183 if (PyArray_Check(x) && PyArray_Check(y)) { 184 184 185 x_len = dims[1]= x->dimensions[ 1];186 y_len = dims[0]= y->dimensions[ 0];185 x_len = dims[1]= x->dimensions[0]; 186 y_len = dims[0]= y->dimensions[1]; 187 187 188 188 // Make a new double matrix of same dims … … 197 197 for ( j=0; j< y_len; j++) { 198 198 for ( i=0; i< x_len; i++) { 199 double x_value = *(double *)(x->data + i*x->strides[ 1]);200 double y_value = *(double *)(y->data + j*y->strides[ 0]);199 double x_value = *(double *)(x->data + i*x->strides[0]); 200 double y_value = *(double *)(y->data + j*y->strides[1]); 201 201 double *result_value = (double *)(result->data + 202 i*result->strides[1] + j*result->strides[0]);202 j*result->strides[0] + i*result->strides[1]); 203 203 *result_value = (*model)(x_value, y_value); 204 204 } -
sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp
re0a8a3c r870f131 187 187 if (PyArray_Check(x) && PyArray_Check(y)) { 188 188 189 x_len = dims[1]= x->dimensions[ 1];190 y_len = dims[0]= y->dimensions[ 0];189 x_len = dims[1]= x->dimensions[0]; 190 y_len = dims[0]= y->dimensions[1]; 191 191 192 192 // Make a new double matrix of same dims … … 201 201 for ( j=0; j< y_len; j++) { 202 202 for ( i=0; i< x_len; i++) { 203 double x_value = *(double *)(x->data + i*x->strides[ 1]);204 double y_value = *(double *)(y->data + j*y->strides[ 0]);203 double x_value = *(double *)(x->data + i*x->strides[0]); 204 double y_value = *(double *)(y->data + j*y->strides[1]); 205 205 double *result_value = (double *)(result->data + 206 i*result->strides[1] + j*result->strides[0]);206 j*result->strides[0] + i*result->strides[1]); 207 207 *result_value = (*model)(x_value, y_value); 208 208 } -
sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp
re0a8a3c r870f131 201 201 if (PyArray_Check(x) && PyArray_Check(y)) { 202 202 203 x_len = dims[1]= x->dimensions[ 1];204 y_len = dims[0]= y->dimensions[ 0];203 x_len = dims[1]= x->dimensions[0]; 204 y_len = dims[0]= y->dimensions[1]; 205 205 206 206 // Make a new double matrix of same dims … … 215 215 for ( j=0; j< y_len; j++) { 216 216 for ( i=0; i< x_len; i++) { 217 double x_value = *(double *)(x->data + i*x->strides[ 1]);218 double y_value = *(double *)(y->data + j*y->strides[ 0]);217 double x_value = *(double *)(x->data + i*x->strides[0]); 218 double y_value = *(double *)(y->data + j*y->strides[1]); 219 219 double *result_value = (double *)(result->data + 220 i*result->strides[1] + j*result->strides[0]);220 j*result->strides[0] + i*result->strides[1]); 221 221 *result_value = (*model)(x_value, y_value); 222 222 } -
sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp
re0a8a3c r870f131 191 191 if (PyArray_Check(x) && PyArray_Check(y)) { 192 192 193 x_len = dims[1]= x->dimensions[ 1];194 y_len = dims[0]= y->dimensions[ 0];193 x_len = dims[1]= x->dimensions[0]; 194 y_len = dims[0]= y->dimensions[1]; 195 195 196 196 // Make a new double matrix of same dims … … 205 205 for ( j=0; j< y_len; j++) { 206 206 for ( i=0; i< x_len; i++) { 207 double x_value = *(double *)(x->data + i*x->strides[ 1]);208 double y_value = *(double *)(y->data + j*y->strides[ 0]);207 double x_value = *(double *)(x->data + i*x->strides[0]); 208 double y_value = *(double *)(y->data + j*y->strides[1]); 209 209 double *result_value = (double *)(result->data + 210 i*result->strides[1] + j*result->strides[0]);210 j*result->strides[0] + i*result->strides[1]); 211 211 *result_value = (*model)(x_value, y_value); 212 212 } -
sansmodels/src/sans/models/c_models/CLamellarModel.cpp
re0a8a3c r870f131 186 186 if (PyArray_Check(x) && PyArray_Check(y)) { 187 187 188 x_len = dims[1]= x->dimensions[ 1];189 y_len = dims[0]= y->dimensions[ 0];188 x_len = dims[1]= x->dimensions[0]; 189 y_len = dims[0]= y->dimensions[1]; 190 190 191 191 // Make a new double matrix of same dims … … 200 200 for ( j=0; j< y_len; j++) { 201 201 for ( i=0; i< x_len; i++) { 202 double x_value = *(double *)(x->data + i*x->strides[ 1]);203 double y_value = *(double *)(y->data + j*y->strides[ 0]);202 double x_value = *(double *)(x->data + i*x->strides[0]); 203 double y_value = *(double *)(y->data + j*y->strides[1]); 204 204 double *result_value = (double *)(result->data + 205 i*result->strides[1] + j*result->strides[0]);205 j*result->strides[0] + i*result->strides[1]); 206 206 *result_value = (*model)(x_value, y_value); 207 207 } -
sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp
re0a8a3c r870f131 197 197 if (PyArray_Check(x) && PyArray_Check(y)) { 198 198 199 x_len = dims[1]= x->dimensions[ 1];200 y_len = dims[0]= y->dimensions[ 0];199 x_len = dims[1]= x->dimensions[0]; 200 y_len = dims[0]= y->dimensions[1]; 201 201 202 202 // Make a new double matrix of same dims … … 211 211 for ( j=0; j< y_len; j++) { 212 212 for ( i=0; i< x_len; i++) { 213 double x_value = *(double *)(x->data + i*x->strides[ 1]);214 double y_value = *(double *)(y->data + j*y->strides[ 0]);213 double x_value = *(double *)(x->data + i*x->strides[0]); 214 double y_value = *(double *)(y->data + j*y->strides[1]); 215 215 double *result_value = (double *)(result->data + 216 i*result->strides[1] + j*result->strides[0]);216 j*result->strides[0] + i*result->strides[1]); 217 217 *result_value = (*model)(x_value, y_value); 218 218 } -
sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp
re0a8a3c r870f131 191 191 if (PyArray_Check(x) && PyArray_Check(y)) { 192 192 193 x_len = dims[1]= x->dimensions[ 1];194 y_len = dims[0]= y->dimensions[ 0];193 x_len = dims[1]= x->dimensions[0]; 194 y_len = dims[0]= y->dimensions[1]; 195 195 196 196 // Make a new double matrix of same dims … … 205 205 for ( j=0; j< y_len; j++) { 206 206 for ( i=0; i< x_len; i++) { 207 double x_value = *(double *)(x->data + i*x->strides[ 1]);208 double y_value = *(double *)(y->data + j*y->strides[ 0]);207 double x_value = *(double *)(x->data + i*x->strides[0]); 208 double y_value = *(double *)(y->data + j*y->strides[1]); 209 209 double *result_value = (double *)(result->data + 210 i*result->strides[1] + j*result->strides[0]);210 j*result->strides[0] + i*result->strides[1]); 211 211 *result_value = (*model)(x_value, y_value); 212 212 } -
sansmodels/src/sans/models/c_models/CLogNormal.cpp
re0a8a3c r870f131 181 181 if (PyArray_Check(x) && PyArray_Check(y)) { 182 182 183 x_len = dims[1]= x->dimensions[ 1];184 y_len = dims[0]= y->dimensions[ 0];183 x_len = dims[1]= x->dimensions[0]; 184 y_len = dims[0]= y->dimensions[1]; 185 185 186 186 // Make a new double matrix of same dims … … 195 195 for ( j=0; j< y_len; j++) { 196 196 for ( i=0; i< x_len; i++) { 197 double x_value = *(double *)(x->data + i*x->strides[ 1]);198 double y_value = *(double *)(y->data + j*y->strides[ 0]);197 double x_value = *(double *)(x->data + i*x->strides[0]); 198 double y_value = *(double *)(y->data + j*y->strides[1]); 199 199 double *result_value = (double *)(result->data + 200 i*result->strides[1] + j*result->strides[0]);200 j*result->strides[0] + i*result->strides[1]); 201 201 *result_value = (*model)(x_value, y_value); 202 202 } -
sansmodels/src/sans/models/c_models/CLorentzian.cpp
re0a8a3c r870f131 181 181 if (PyArray_Check(x) && PyArray_Check(y)) { 182 182 183 x_len = dims[1]= x->dimensions[ 1];184 y_len = dims[0]= y->dimensions[ 0];183 x_len = dims[1]= x->dimensions[0]; 184 y_len = dims[0]= y->dimensions[1]; 185 185 186 186 // Make a new double matrix of same dims … … 195 195 for ( j=0; j< y_len; j++) { 196 196 for ( i=0; i< x_len; i++) { 197 double x_value = *(double *)(x->data + i*x->strides[ 1]);198 double y_value = *(double *)(y->data + j*y->strides[ 0]);197 double x_value = *(double *)(x->data + i*x->strides[0]); 198 double y_value = *(double *)(y->data + j*y->strides[1]); 199 199 double *result_value = (double *)(result->data + 200 i*result->strides[1] + j*result->strides[0]);200 j*result->strides[0] + i*result->strides[1]); 201 201 *result_value = (*model)(x_value, y_value); 202 202 } -
sansmodels/src/sans/models/c_models/CMultiShellModel.cpp
re0a8a3c r870f131 195 195 if (PyArray_Check(x) && PyArray_Check(y)) { 196 196 197 x_len = dims[1]= x->dimensions[ 1];198 y_len = dims[0]= y->dimensions[ 0];197 x_len = dims[1]= x->dimensions[0]; 198 y_len = dims[0]= y->dimensions[1]; 199 199 200 200 // Make a new double matrix of same dims … … 209 209 for ( j=0; j< y_len; j++) { 210 210 for ( i=0; i< x_len; i++) { 211 double x_value = *(double *)(x->data + i*x->strides[ 1]);212 double y_value = *(double *)(y->data + j*y->strides[ 0]);211 double x_value = *(double *)(x->data + i*x->strides[0]); 212 double y_value = *(double *)(y->data + j*y->strides[1]); 213 213 double *result_value = (double *)(result->data + 214 i*result->strides[1] + j*result->strides[0]);214 j*result->strides[0] + i*result->strides[1]); 215 215 *result_value = (*model)(x_value, y_value); 216 216 } -
sansmodels/src/sans/models/c_models/COblateModel.cpp
re0a8a3c r870f131 200 200 if (PyArray_Check(x) && PyArray_Check(y)) { 201 201 202 x_len = dims[1]= x->dimensions[ 1];203 y_len = dims[0]= y->dimensions[ 0];202 x_len = dims[1]= x->dimensions[0]; 203 y_len = dims[0]= y->dimensions[1]; 204 204 205 205 // Make a new double matrix of same dims … … 214 214 for ( j=0; j< y_len; j++) { 215 215 for ( i=0; i< x_len; i++) { 216 double x_value = *(double *)(x->data + i*x->strides[ 1]);217 double y_value = *(double *)(y->data + j*y->strides[ 0]);216 double x_value = *(double *)(x->data + i*x->strides[0]); 217 double y_value = *(double *)(y->data + j*y->strides[1]); 218 218 double *result_value = (double *)(result->data + 219 i*result->strides[1] + j*result->strides[0]);219 j*result->strides[0] + i*result->strides[1]); 220 220 *result_value = (*model)(x_value, y_value); 221 221 } -
sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp
re0a8a3c r870f131 205 205 if (PyArray_Check(x) && PyArray_Check(y)) { 206 206 207 x_len = dims[1]= x->dimensions[ 1];208 y_len = dims[0]= y->dimensions[ 0];207 x_len = dims[1]= x->dimensions[0]; 208 y_len = dims[0]= y->dimensions[1]; 209 209 210 210 // Make a new double matrix of same dims … … 219 219 for ( j=0; j< y_len; j++) { 220 220 for ( i=0; i< x_len; i++) { 221 double x_value = *(double *)(x->data + i*x->strides[ 1]);222 double y_value = *(double *)(y->data + j*y->strides[ 0]);221 double x_value = *(double *)(x->data + i*x->strides[0]); 222 double y_value = *(double *)(y->data + j*y->strides[1]); 223 223 double *result_value = (double *)(result->data + 224 i*result->strides[1] + j*result->strides[0]);224 j*result->strides[0] + i*result->strides[1]); 225 225 *result_value = (*model)(x_value, y_value); 226 226 } -
sansmodels/src/sans/models/c_models/CProlateModel.cpp
re0a8a3c r870f131 198 198 if (PyArray_Check(x) && PyArray_Check(y)) { 199 199 200 x_len = dims[1]= x->dimensions[ 1];201 y_len = dims[0]= y->dimensions[ 0];200 x_len = dims[1]= x->dimensions[0]; 201 y_len = dims[0]= y->dimensions[1]; 202 202 203 203 // Make a new double matrix of same dims … … 212 212 for ( j=0; j< y_len; j++) { 213 213 for ( i=0; i< x_len; i++) { 214 double x_value = *(double *)(x->data + i*x->strides[ 1]);215 double y_value = *(double *)(y->data + j*y->strides[ 0]);214 double x_value = *(double *)(x->data + i*x->strides[0]); 215 double y_value = *(double *)(y->data + j*y->strides[1]); 216 216 double *result_value = (double *)(result->data + 217 i*result->strides[1] + j*result->strides[0]);217 j*result->strides[0] + i*result->strides[1]); 218 218 *result_value = (*model)(x_value, y_value); 219 219 } -
sansmodels/src/sans/models/c_models/CSchulz.cpp
re0a8a3c r870f131 181 181 if (PyArray_Check(x) && PyArray_Check(y)) { 182 182 183 x_len = dims[1]= x->dimensions[ 1];184 y_len = dims[0]= y->dimensions[ 0];183 x_len = dims[1]= x->dimensions[0]; 184 y_len = dims[0]= y->dimensions[1]; 185 185 186 186 // Make a new double matrix of same dims … … 195 195 for ( j=0; j< y_len; j++) { 196 196 for ( i=0; i< x_len; i++) { 197 double x_value = *(double *)(x->data + i*x->strides[ 1]);198 double y_value = *(double *)(y->data + j*y->strides[ 0]);197 double x_value = *(double *)(x->data + i*x->strides[0]); 198 double y_value = *(double *)(y->data + j*y->strides[1]); 199 199 double *result_value = (double *)(result->data + 200 i*result->strides[1] + j*result->strides[0]);200 j*result->strides[0] + i*result->strides[1]); 201 201 *result_value = (*model)(x_value, y_value); 202 202 } -
sansmodels/src/sans/models/c_models/CSphereModel.cpp
re0a8a3c r870f131 185 185 if (PyArray_Check(x) && PyArray_Check(y)) { 186 186 187 x_len = dims[1]= x->dimensions[ 1];188 y_len = dims[0]= y->dimensions[ 0];187 x_len = dims[1]= x->dimensions[0]; 188 y_len = dims[0]= y->dimensions[1]; 189 189 190 190 // Make a new double matrix of same dims … … 199 199 for ( j=0; j< y_len; j++) { 200 200 for ( i=0; i< x_len; i++) { 201 double x_value = *(double *)(x->data + i*x->strides[ 1]);202 double y_value = *(double *)(y->data + j*y->strides[ 0]);201 double x_value = *(double *)(x->data + i*x->strides[0]); 202 double y_value = *(double *)(y->data + j*y->strides[1]); 203 203 double *result_value = (double *)(result->data + 204 i*result->strides[1] + j*result->strides[0]);204 j*result->strides[0] + i*result->strides[1]); 205 205 *result_value = (*model)(x_value, y_value); 206 206 } -
sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp
re0a8a3c r870f131 185 185 if (PyArray_Check(x) && PyArray_Check(y)) { 186 186 187 x_len = dims[1]= x->dimensions[ 1];188 y_len = dims[0]= y->dimensions[ 0];187 x_len = dims[1]= x->dimensions[0]; 188 y_len = dims[0]= y->dimensions[1]; 189 189 190 190 // Make a new double matrix of same dims … … 199 199 for ( j=0; j< y_len; j++) { 200 200 for ( i=0; i< x_len; i++) { 201 double x_value = *(double *)(x->data + i*x->strides[ 1]);202 double y_value = *(double *)(y->data + j*y->strides[ 0]);201 double x_value = *(double *)(x->data + i*x->strides[0]); 202 double y_value = *(double *)(y->data + j*y->strides[1]); 203 203 double *result_value = (double *)(result->data + 204 i*result->strides[1] + j*result->strides[0]);204 j*result->strides[0] + i*result->strides[1]); 205 205 *result_value = (*model)(x_value, y_value); 206 206 } -
sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp
re0a8a3c r870f131 205 205 if (PyArray_Check(x) && PyArray_Check(y)) { 206 206 207 x_len = dims[1]= x->dimensions[ 1];208 y_len = dims[0]= y->dimensions[ 0];207 x_len = dims[1]= x->dimensions[0]; 208 y_len = dims[0]= y->dimensions[1]; 209 209 210 210 // Make a new double matrix of same dims … … 219 219 for ( j=0; j< y_len; j++) { 220 220 for ( i=0; i< x_len; i++) { 221 double x_value = *(double *)(x->data + i*x->strides[ 1]);222 double y_value = *(double *)(y->data + j*y->strides[ 0]);221 double x_value = *(double *)(x->data + i*x->strides[0]); 222 double y_value = *(double *)(y->data + j*y->strides[1]); 223 223 double *result_value = (double *)(result->data + 224 i*result->strides[1] + j*result->strides[0]);224 j*result->strides[0] + i*result->strides[1]); 225 225 *result_value = (*model)(x_value, y_value); 226 226 } -
sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp
re0a8a3c r870f131 185 185 if (PyArray_Check(x) && PyArray_Check(y)) { 186 186 187 x_len = dims[1]= x->dimensions[ 1];188 y_len = dims[0]= y->dimensions[ 0];187 x_len = dims[1]= x->dimensions[0]; 188 y_len = dims[0]= y->dimensions[1]; 189 189 190 190 // Make a new double matrix of same dims … … 199 199 for ( j=0; j< y_len; j++) { 200 200 for ( i=0; i< x_len; i++) { 201 double x_value = *(double *)(x->data + i*x->strides[ 1]);202 double y_value = *(double *)(y->data + j*y->strides[ 0]);201 double x_value = *(double *)(x->data + i*x->strides[0]); 202 double y_value = *(double *)(y->data + j*y->strides[1]); 203 203 double *result_value = (double *)(result->data + 204 i*result->strides[1] + j*result->strides[0]);204 j*result->strides[0] + i*result->strides[1]); 205 205 *result_value = (*model)(x_value, y_value); 206 206 } -
sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp
re0a8a3c r870f131 196 196 if (PyArray_Check(x) && PyArray_Check(y)) { 197 197 198 x_len = dims[1]= x->dimensions[ 1];199 y_len = dims[0]= y->dimensions[ 0];198 x_len = dims[1]= x->dimensions[0]; 199 y_len = dims[0]= y->dimensions[1]; 200 200 201 201 // Make a new double matrix of same dims … … 210 210 for ( j=0; j< y_len; j++) { 211 211 for ( i=0; i< x_len; i++) { 212 double x_value = *(double *)(x->data + i*x->strides[ 1]);213 double y_value = *(double *)(y->data + j*y->strides[ 0]);212 double x_value = *(double *)(x->data + i*x->strides[0]); 213 double y_value = *(double *)(y->data + j*y->strides[1]); 214 214 double *result_value = (double *)(result->data + 215 i*result->strides[1] + j*result->strides[0]);215 j*result->strides[0] + i*result->strides[1]); 216 216 *result_value = (*model)(x_value, y_value); 217 217 } -
sansmodels/src/sans/models/c_models/CVesicleModel.cpp
re0a8a3c r870f131 190 190 if (PyArray_Check(x) && PyArray_Check(y)) { 191 191 192 x_len = dims[1]= x->dimensions[ 1];193 y_len = dims[0]= y->dimensions[ 0];192 x_len = dims[1]= x->dimensions[0]; 193 y_len = dims[0]= y->dimensions[1]; 194 194 195 195 // Make a new double matrix of same dims … … 204 204 for ( j=0; j< y_len; j++) { 205 205 for ( i=0; i< x_len; i++) { 206 double x_value = *(double *)(x->data + i*x->strides[ 1]);207 double y_value = *(double *)(y->data + j*y->strides[ 0]);206 double x_value = *(double *)(x->data + i*x->strides[0]); 207 double y_value = *(double *)(y->data + j*y->strides[1]); 208 208 double *result_value = (double *)(result->data + 209 i*result->strides[1] + j*result->strides[0]);209 j*result->strides[0] + i*result->strides[1]); 210 210 *result_value = (*model)(x_value, y_value); 211 211 } -
sansmodels/src/sans/models/c_models/classTemplate.txt
re0a8a3c r870f131 171 171 if (PyArray_Check(x) && PyArray_Check(y)) { 172 172 173 x_len = dims[1]= x->dimensions[ 1];174 y_len = dims[0]= y->dimensions[ 0];173 x_len = dims[1]= x->dimensions[0]; 174 y_len = dims[0]= y->dimensions[1]; 175 175 176 176 // Make a new double matrix of same dims … … 185 185 for ( j=0; j< y_len; j++) { 186 186 for ( i=0; i< x_len; i++) { 187 double x_value = *(double *)(x->data + i*x->strides[ 1]);188 double y_value = *(double *)(y->data + j*y->strides[ 0]);187 double x_value = *(double *)(x->data + i*x->strides[0]); 188 double y_value = *(double *)(y->data + j*y->strides[1]); 189 189 double *result_value = (double *)(result->data + 190 i*result->strides[1] + j*result->strides[0]);190 j*result->strides[0] + i*result->strides[1]); 191 191 *result_value = (*model)(x_value, y_value); 192 192 }
Note: See TracChangeset
for help on using the changeset viewer.