Changeset 5eb9154 in sasview for sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp
- Timestamp:
- Aug 31, 2009 5:25:44 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:
- 5be36bb
- Parents:
- 572beba
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp
r870f131 r5eb9154 345 345 } 346 346 } 347 347 /** 348 * Function to call to calculate_ER 349 * @return: effective radius value 350 */ 351 static PyObject * calculate_ER(CDiamEllipFunc *self) { 352 353 PyObject* pars; 354 int npars; 355 356 // Get parameters 357 358 // Reader parameter dictionary 359 self->model->radius_b = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_b") ); 360 self->model->radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") ); 361 // Read in dispersion parameters 362 PyObject* disp_dict; 363 DispersionVisitor* visitor = new DispersionVisitor(); 364 disp_dict = PyDict_GetItemString(self->dispersion, "radius_a"); 365 self->model->radius_a.dispersion->accept_as_destination(visitor, self->model->radius_a.dispersion, disp_dict); 366 disp_dict = PyDict_GetItemString(self->dispersion, "radius_b"); 367 self->model->radius_b.dispersion->accept_as_destination(visitor, self->model->radius_b.dispersion, disp_dict); 368 369 370 return Py_BuildValue("d",(*(self->model)).calculate_ER()); 371 372 } 348 373 /** 349 374 * Function to call to evaluate model in cartesian coordinates … … 446 471 {"runXY", (PyCFunction)runXY , METH_VARARGS, 447 472 "Evaluate the model at a given Q or Qx, Qy"}, 473 {"calculate_ER", (PyCFunction)calculate_ER , METH_VARARGS, 474 "Evaluate the model at a given Q or Q, phi"}, 448 475 449 476 {"evalDistribution", (PyCFunction)evalDistribution , METH_VARARGS,
Note: See TracChangeset
for help on using the changeset viewer.