Changeset 186c4eb in sasview for sansmodels/src/sans
- Timestamp:
- Aug 2, 2010 5:46:04 PM (14 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:
- 6ca38f3
- Parents:
- c4dd2fe
- Location:
- sansmodels/src/sans/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_extensions/triaxial_ellipsoid.h
r13eb1c4 r186c4eb 3 3 /** Structure definition for cylinder parameters 4 4 * [PYTHONCLASS] = TriaxialEllipsoidModel 5 * [DISP_PARAMS] = axis_theta, axis_phi, axis_psi5 * [DISP_PARAMS] = semi_axisA, semi_axisB, semi_axisC,axis_theta, axis_phi, axis_psi 6 6 [DESCRIPTION] = <text>Note: During fitting ensure that the inequality A<B<C is not 7 7 violated. Otherwise the calculation will -
sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp
r13eb1c4 r186c4eb 103 103 DispersionVisitor* visitor = new DispersionVisitor(); 104 104 PyObject * disp_dict; 105 disp_dict = PyDict_New(); 106 self->model->semi_axisA.dispersion->accept_as_source(visitor, self->model->semi_axisA.dispersion, disp_dict); 107 PyDict_SetItemString(self->dispersion, "semi_axisA", disp_dict); 108 disp_dict = PyDict_New(); 109 self->model->semi_axisB.dispersion->accept_as_source(visitor, self->model->semi_axisB.dispersion, disp_dict); 110 PyDict_SetItemString(self->dispersion, "semi_axisB", disp_dict); 111 disp_dict = PyDict_New(); 112 self->model->semi_axisC.dispersion->accept_as_source(visitor, self->model->semi_axisC.dispersion, disp_dict); 113 PyDict_SetItemString(self->dispersion, "semi_axisC", disp_dict); 105 114 disp_dict = PyDict_New(); 106 115 self->model->axis_theta.dispersion->accept_as_source(visitor, self->model->axis_theta.dispersion, disp_dict); … … 254 263 PyObject* disp_dict; 255 264 DispersionVisitor* visitor = new DispersionVisitor(); 265 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisA"); 266 self->model->semi_axisA.dispersion->accept_as_destination(visitor, self->model->semi_axisA.dispersion, disp_dict); 267 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisB"); 268 self->model->semi_axisB.dispersion->accept_as_destination(visitor, self->model->semi_axisB.dispersion, disp_dict); 269 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisC"); 270 self->model->semi_axisC.dispersion->accept_as_destination(visitor, self->model->semi_axisC.dispersion, disp_dict); 256 271 disp_dict = PyDict_GetItemString(self->dispersion, "axis_theta"); 257 272 self->model->axis_theta.dispersion->accept_as_destination(visitor, self->model->axis_theta.dispersion, disp_dict); … … 335 350 PyObject* disp_dict; 336 351 DispersionVisitor* visitor = new DispersionVisitor(); 352 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisA"); 353 self->model->semi_axisA.dispersion->accept_as_destination(visitor, self->model->semi_axisA.dispersion, disp_dict); 354 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisB"); 355 self->model->semi_axisB.dispersion->accept_as_destination(visitor, self->model->semi_axisB.dispersion, disp_dict); 356 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisC"); 357 self->model->semi_axisC.dispersion->accept_as_destination(visitor, self->model->semi_axisC.dispersion, disp_dict); 337 358 disp_dict = PyDict_GetItemString(self->dispersion, "axis_theta"); 338 359 self->model->axis_theta.dispersion->accept_as_destination(visitor, self->model->axis_theta.dispersion, disp_dict); … … 403 424 PyObject* disp_dict; 404 425 DispersionVisitor* visitor = new DispersionVisitor(); 426 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisA"); 427 self->model->semi_axisA.dispersion->accept_as_destination(visitor, self->model->semi_axisA.dispersion, disp_dict); 428 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisB"); 429 self->model->semi_axisB.dispersion->accept_as_destination(visitor, self->model->semi_axisB.dispersion, disp_dict); 430 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisC"); 431 self->model->semi_axisC.dispersion->accept_as_destination(visitor, self->model->semi_axisC.dispersion, disp_dict); 405 432 disp_dict = PyDict_GetItemString(self->dispersion, "axis_theta"); 406 433 self->model->axis_theta.dispersion->accept_as_destination(visitor, self->model->axis_theta.dispersion, disp_dict); … … 440 467 PyObject* disp_dict; 441 468 DispersionVisitor* visitor = new DispersionVisitor(); 469 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisA"); 470 self->model->semi_axisA.dispersion->accept_as_destination(visitor, self->model->semi_axisA.dispersion, disp_dict); 471 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisB"); 472 self->model->semi_axisB.dispersion->accept_as_destination(visitor, self->model->semi_axisB.dispersion, disp_dict); 473 disp_dict = PyDict_GetItemString(self->dispersion, "semi_axisC"); 474 self->model->semi_axisC.dispersion->accept_as_destination(visitor, self->model->semi_axisC.dispersion, disp_dict); 442 475 disp_dict = PyDict_GetItemString(self->dispersion, "axis_theta"); 443 476 self->model->axis_theta.dispersion->accept_as_destination(visitor, self->model->axis_theta.dispersion, disp_dict); … … 501 534 // Ugliness necessary to go from python to C 502 535 // TODO: refactor this 503 if (!strcmp(par_name, "axis_theta")) { 536 if (!strcmp(par_name, "semi_axisA")) { 537 self->model->semi_axisA.dispersion = dispersion; 538 } else if (!strcmp(par_name, "semi_axisB")) { 539 self->model->semi_axisB.dispersion = dispersion; 540 } else if (!strcmp(par_name, "semi_axisC")) { 541 self->model->semi_axisC.dispersion = dispersion; 542 } else if (!strcmp(par_name, "axis_theta")) { 504 543 self->model->axis_theta.dispersion = dispersion; 505 544 } else if (!strcmp(par_name, "axis_phi")) {
Note: See TracChangeset
for help on using the changeset viewer.