Changeset b1c3295 in sasview for sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp
- Timestamp:
- Dec 7, 2011 1:02:10 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:
- 00c2141
- Parents:
- 8bac371
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp
r34c2649 rb1c3295 110 110 } 111 111 112 static char name_params[] = "params"; 113 static char def_params[] = "Parameters"; 114 static char name_dispersion[] = "dispersion"; 115 static char def_dispersion[] = "Dispersion parameters"; 116 static char name_log[] = "log"; 117 static char def_log[] = "Log"; 118 112 119 static PyMemberDef CHardsphereStructure_members[] = { 113 {"params", T_OBJECT, offsetof(CHardsphereStructure, params), 0, 114 "Parameters"}, 115 {"dispersion", T_OBJECT, offsetof(CHardsphereStructure, dispersion), 0, 116 "Dispersion parameters"}, 117 {"log", T_OBJECT, offsetof(CHardsphereStructure, log), 0, 118 "Log"}, 120 {name_params, T_OBJECT, offsetof(CHardsphereStructure, params), 0, def_params}, 121 {name_dispersion, T_OBJECT, offsetof(CHardsphereStructure, dispersion), 0, def_dispersion}, 122 {name_log, T_OBJECT, offsetof(CHardsphereStructure, log), 0, def_log}, 119 123 {NULL} /* Sentinel */ 120 124 }; … … 175 179 { 176 180 PyArrayObject *result; 177 int i, x_len, dims[1];181 int i,j, x_len, y_len, dims[1]; 178 182 //check validity of input vectors 179 183 if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE … … 188 192 189 193 x_len = dims[0]= x->dimensions[0]; 194 y_len = dims[0]= y->dimensions[0]; 190 195 191 196 // Make a new double matrix of same dims … … 345 350 static PyObject * calculate_ER(CHardsphereStructure *self) { 346 351 352 PyObject* pars; 353 int npars; 354 347 355 // Get parameters 348 356
Note: See TracChangeset
for help on using the changeset viewer.