Changeset f71287f4 in sasview for pr_inversion/c_extensions
- Timestamp:
- May 9, 2008 6:09:10 PM (16 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:
- 634f1cf
- Parents:
- 32dffae4
- Location:
- pr_inversion/c_extensions
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pr_inversion/c_extensions/Cinvertor.c
r4f63160 rf71287f4 266 266 return Py_BuildValue("d", self->params.d_max); 267 267 } 268 269 /** 270 * Sets the minimum q 271 */ 272 static PyObject * set_qmin(Cinvertor *self, PyObject *args) { 273 double q_min; 274 275 if (!PyArg_ParseTuple(args, "d", &q_min)) return NULL; 276 self->params.q_min = q_min; 277 return Py_BuildValue("d", self->params.q_min); 278 } 279 280 /** 281 * Gets the minimum q 282 */ 283 static PyObject * get_qmin(Cinvertor *self, PyObject *args) { 284 return Py_BuildValue("d", self->params.q_min); 285 } 286 287 288 /** 289 * Sets the maximum q 290 */ 291 static PyObject * set_qmax(Cinvertor *self, PyObject *args) { 292 double q_max; 293 294 if (!PyArg_ParseTuple(args, "d", &q_max)) return NULL; 295 self->params.q_max = q_max; 296 return Py_BuildValue("d", self->params.q_max); 297 } 298 299 /** 300 * Gets the maximum q 301 */ 302 static PyObject * get_qmax(Cinvertor *self, PyObject *args) { 303 return Py_BuildValue("d", self->params.q_max); 304 } 305 268 306 269 307 static PyObject * set_alpha(Cinvertor *self, PyObject *args) { … … 513 551 {"set_dmax", (PyCFunction)set_dmax, METH_VARARGS, ""}, 514 552 {"get_dmax", (PyCFunction)get_dmax, METH_VARARGS, ""}, 553 {"set_qmin", (PyCFunction)set_qmin, METH_VARARGS, ""}, 554 {"get_qmin", (PyCFunction)get_qmin, METH_VARARGS, ""}, 555 {"set_qmax", (PyCFunction)set_qmax, METH_VARARGS, ""}, 556 {"get_qmax", (PyCFunction)get_qmax, METH_VARARGS, ""}, 515 557 {"set_alpha", (PyCFunction)set_alpha, METH_VARARGS, ""}, 516 558 {"get_alpha", (PyCFunction)get_alpha, METH_VARARGS, ""}, -
pr_inversion/c_extensions/invertor.c
r4f63160 rf71287f4 18 18 void invertor_init(Invertor_params *pars) { 19 19 pars->d_max = 180; 20 pars->q_min = -1.0; 21 pars->q_max = -1.0; 20 22 } 21 23 -
pr_inversion/c_extensions/invertor.h
r4f63160 rf71287f4 12 12 int nerr; 13 13 double alpha; 14 double q_min; 15 double q_max; 14 16 } Invertor_params; 15 17
Note: See TracChangeset
for help on using the changeset viewer.