Changeset ea07075 in sasview for sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp
- Timestamp:
- Aug 3, 2009 5:41:22 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:
- e6fa43e
- Parents:
- 2a1be2d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp
r5068697 rea07075 84 84 // Initialize parameter dictionary 85 85 PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 86 PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.000000));87 86 PyDict_SetItemString(self->params,"length",Py_BuildValue("d",1000.000000)); 88 PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",1.000000));89 87 PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.000000)); 90 88 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000100)); … … 98 96 PyDict_SetItemString(self->dispersion, "length", disp_dict); 99 97 disp_dict = PyDict_New(); 98 self->model->kuhn_length.dispersion->accept_as_source(visitor, self->model->kuhn_length.dispersion, disp_dict); 99 PyDict_SetItemString(self->dispersion, "kuhn_length", disp_dict); 100 disp_dict = PyDict_New(); 100 101 self->model->radius.dispersion->accept_as_source(visitor, self->model->radius.dispersion, disp_dict); 101 102 PyDict_SetItemString(self->dispersion, "radius", disp_dict); 102 disp_dict = PyDict_New();103 self->model->axis_theta.dispersion->accept_as_source(visitor, self->model->axis_theta.dispersion, disp_dict);104 PyDict_SetItemString(self->dispersion, "axis_theta", disp_dict);105 disp_dict = PyDict_New();106 self->model->axis_phi.dispersion->accept_as_source(visitor, self->model->axis_phi.dispersion, disp_dict);107 PyDict_SetItemString(self->dispersion, "axis_phi", disp_dict);108 103 109 104 … … 159 154 // Reader parameter dictionary 160 155 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 161 self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );162 156 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 163 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );164 157 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 165 158 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); … … 171 164 disp_dict = PyDict_GetItemString(self->dispersion, "length"); 172 165 self->model->length.dispersion->accept_as_destination(visitor, self->model->length.dispersion, disp_dict); 166 disp_dict = PyDict_GetItemString(self->dispersion, "kuhn_length"); 167 self->model->kuhn_length.dispersion->accept_as_destination(visitor, self->model->kuhn_length.dispersion, disp_dict); 173 168 disp_dict = PyDict_GetItemString(self->dispersion, "radius"); 174 169 self->model->radius.dispersion->accept_as_destination(visitor, self->model->radius.dispersion, disp_dict); 175 disp_dict = PyDict_GetItemString(self->dispersion, "axis_theta");176 self->model->axis_theta.dispersion->accept_as_destination(visitor, self->model->axis_theta.dispersion, disp_dict);177 disp_dict = PyDict_GetItemString(self->dispersion, "axis_phi");178 self->model->axis_phi.dispersion->accept_as_destination(visitor, self->model->axis_phi.dispersion, disp_dict);179 170 180 171 … … 229 220 // Reader parameter dictionary 230 221 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 231 self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") );232 222 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 233 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") );234 223 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 235 224 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); … … 241 230 disp_dict = PyDict_GetItemString(self->dispersion, "length"); 242 231 self->model->length.dispersion->accept_as_destination(visitor, self->model->length.dispersion, disp_dict); 232 disp_dict = PyDict_GetItemString(self->dispersion, "kuhn_length"); 233 self->model->kuhn_length.dispersion->accept_as_destination(visitor, self->model->kuhn_length.dispersion, disp_dict); 243 234 disp_dict = PyDict_GetItemString(self->dispersion, "radius"); 244 235 self->model->radius.dispersion->accept_as_destination(visitor, self->model->radius.dispersion, disp_dict); 245 disp_dict = PyDict_GetItemString(self->dispersion, "axis_theta");246 self->model->axis_theta.dispersion->accept_as_destination(visitor, self->model->axis_theta.dispersion, disp_dict);247 disp_dict = PyDict_GetItemString(self->dispersion, "axis_phi");248 self->model->axis_phi.dispersion->accept_as_destination(visitor, self->model->axis_phi.dispersion, disp_dict);249 236 250 237 … … 304 291 if (!strcmp(par_name, "length")) { 305 292 self->model->length.dispersion = dispersion; 293 } else if (!strcmp(par_name, "kuhn_length")) { 294 self->model->kuhn_length.dispersion = dispersion; 306 295 } else if (!strcmp(par_name, "radius")) { 307 296 self->model->radius.dispersion = dispersion; 308 } else if (!strcmp(par_name, "axis_theta")) {309 self->model->axis_theta.dispersion = dispersion;310 } else if (!strcmp(par_name, "axis_phi")) {311 self->model->axis_phi.dispersion = dispersion;312 297 } else { 313 298 PyErr_SetString(CFlexibleCylinderModelError,
Note: See TracChangeset
for help on using the changeset viewer.