Changeset f10063e in sasview for sansmodels/src/sans/models/c_models
- Timestamp:
- Mar 30, 2010 7:56:04 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:
- 8d97277
- Parents:
- 6e93a02
- Location:
- sansmodels/src/sans/models/c_models
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp
r3080527 rf10063e 91 91 // Initialize parameter dictionary 92 92 PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 93 PyDict_SetItemString(self->params,"sld_core",Py_BuildValue("d",0.000002)); 93 94 PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",0.000000)); 94 95 PyDict_SetItemString(self->params,"polar_shell",Py_BuildValue("d",30.000000)); … … 99 100 PyDict_SetItemString(self->params,"equat_core",Py_BuildValue("d",200.000000)); 100 101 PyDict_SetItemString(self->params,"polar_core",Py_BuildValue("d",20.000000)); 101 PyDict_SetItemString(self->params," contrast",Py_BuildValue("d",0.000001));102 PyDict_SetItemString(self->params,"sld_shell",Py_BuildValue("d",0.000001)); 102 103 // Initialize dispersion / averaging parameter dict 103 104 DispersionVisitor* visitor = new DispersionVisitor(); … … 251 252 // Reader parameter dictionary 252 253 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 254 self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 253 255 self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 254 256 self->model->polar_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_shell") ); … … 259 261 self->model->equat_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_core") ); 260 262 self->model->polar_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_core") ); 261 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );263 self->model->sld_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_shell") ); 262 264 // Read in dispersion parameters 263 265 PyObject* disp_dict; … … 338 340 // Reader parameter dictionary 339 341 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 342 self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 340 343 self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 341 344 self->model->polar_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_shell") ); … … 346 349 self->model->equat_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_core") ); 347 350 self->model->polar_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_core") ); 348 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );351 self->model->sld_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_shell") ); 349 352 // Read in dispersion parameters 350 353 PyObject* disp_dict; … … 412 415 // Reader parameter dictionary 413 416 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 417 self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 414 418 self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 415 419 self->model->polar_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_shell") ); … … 420 424 self->model->equat_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_core") ); 421 425 self->model->polar_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_core") ); 422 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );426 self->model->sld_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_shell") ); 423 427 // Read in dispersion parameters 424 428 PyObject* disp_dict; … … 455 459 // Reader parameter dictionary 456 460 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 461 self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 457 462 self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 458 463 self->model->polar_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_shell") ); … … 463 468 self->model->equat_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_core") ); 464 469 self->model->polar_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_core") ); 465 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );470 self->model->sld_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_shell") ); 466 471 // Read in dispersion parameters 467 472 PyObject* disp_dict; -
sansmodels/src/sans/models/c_models/CCylinderModel.cpp
r3080527 rf10063e 91 91 // Initialize parameter dictionary 92 92 PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 93 PyDict_SetItemString(self->params,"sldCyl",Py_BuildValue("d",0.000004)); 94 PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",1.000000)); 93 95 PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000)); 94 PyDict_SetItemString(self->params," cyl_theta",Py_BuildValue("d",1.000000));96 PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 95 97 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 96 98 PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.000000)); 97 PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000003));98 99 PyDict_SetItemString(self->params,"cyl_phi",Py_BuildValue("d",1.000000)); 99 100 // Initialize dispersion / averaging parameter dict … … 242 243 // Reader parameter dictionary 243 244 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 245 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 246 self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 244 247 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 245 self->model-> cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") );248 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 246 249 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 247 250 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 248 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );249 251 self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 250 252 // Read in dispersion parameters … … 322 324 // Reader parameter dictionary 323 325 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 326 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 327 self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 324 328 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 325 self->model-> cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") );329 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 326 330 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 327 331 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 328 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );329 332 self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 330 333 // Read in dispersion parameters … … 389 392 // Reader parameter dictionary 390 393 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 394 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 395 self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 391 396 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 392 self->model-> cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") );397 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 393 398 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 394 399 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 395 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );396 400 self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 397 401 // Read in dispersion parameters … … 425 429 // Reader parameter dictionary 426 430 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 431 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 432 self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 427 433 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 428 self->model-> cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") );434 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 429 435 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 430 436 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 431 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );432 437 self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 433 438 // Read in dispersion parameters -
sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp
r3080527 rf10063e 95 95 PyDict_SetItemString(self->params,"radius_a",Py_BuildValue("d",20.000000)); 96 96 PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",0.000000)); 97 PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 97 98 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 98 PyDict_SetItemString(self->params," contrast",Py_BuildValue("d",0.000003));99 PyDict_SetItemString(self->params,"sldEll",Py_BuildValue("d",0.000004)); 99 100 // Initialize dispersion / averaging parameter dict 100 101 DispersionVisitor* visitor = new DispersionVisitor(); … … 246 247 self->model->radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") ); 247 248 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 249 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 248 250 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 249 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );251 self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 250 252 // Read in dispersion parameters 251 253 PyObject* disp_dict; … … 326 328 self->model->radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") ); 327 329 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 330 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 328 331 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 329 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );332 self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 330 333 // Read in dispersion parameters 331 334 PyObject* disp_dict; … … 393 396 self->model->radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") ); 394 397 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 398 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 395 399 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 396 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );400 self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 397 401 // Read in dispersion parameters 398 402 PyObject* disp_dict; … … 429 433 self->model->radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") ); 430 434 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 435 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 431 436 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 432 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );437 self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 433 438 // Read in dispersion parameters 434 439 PyObject* disp_dict; -
sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp
r3080527 rf10063e 91 91 // Initialize parameter dictionary 92 92 PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 93 PyDict_SetItemString(self->params,"sldCyl",Py_BuildValue("d",0.000004)); 93 94 PyDict_SetItemString(self->params,"cyl_psi",Py_BuildValue("d",0.000000)); 94 95 PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000)); 95 96 PyDict_SetItemString(self->params,"r_minor",Py_BuildValue("d",20.000000)); 97 PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 98 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 96 99 PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",1.570000)); 97 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000));98 100 PyDict_SetItemString(self->params,"r_ratio",Py_BuildValue("d",1.500000)); 99 PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000003));100 101 PyDict_SetItemString(self->params,"cyl_phi",Py_BuildValue("d",0.000000)); 101 102 // Initialize dispersion / averaging parameter dict … … 250 251 // Reader parameter dictionary 251 252 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 253 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 252 254 self->model->cyl_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_psi") ); 253 255 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 254 256 self->model->r_minor = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_minor") ); 257 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 258 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 255 259 self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 256 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );257 260 self->model->r_ratio = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_ratio") ); 258 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );259 261 self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 260 262 // Read in dispersion parameters … … 336 338 // Reader parameter dictionary 337 339 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 340 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 338 341 self->model->cyl_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_psi") ); 339 342 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 340 343 self->model->r_minor = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_minor") ); 344 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 345 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 341 346 self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 342 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );343 347 self->model->r_ratio = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_ratio") ); 344 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );345 348 self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 346 349 // Read in dispersion parameters … … 409 412 // Reader parameter dictionary 410 413 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 414 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 411 415 self->model->cyl_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_psi") ); 412 416 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 413 417 self->model->r_minor = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_minor") ); 418 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 419 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 414 420 self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 415 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );416 421 self->model->r_ratio = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_ratio") ); 417 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );418 422 self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 419 423 // Read in dispersion parameters … … 451 455 // Reader parameter dictionary 452 456 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 457 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 453 458 self->model->cyl_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_psi") ); 454 459 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 455 460 self->model->r_minor = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_minor") ); 461 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 462 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 456 463 self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 457 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );458 464 self->model->r_ratio = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_ratio") ); 459 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );460 465 self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 461 466 // Read in dispersion parameters -
sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp
r3080527 rf10063e 91 91 // Initialize parameter dictionary 92 92 PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 93 PyDict_SetItemString(self->params,"sldCyl",Py_BuildValue("d",0.000006)); 93 94 PyDict_SetItemString(self->params,"length",Py_BuildValue("d",1000.000000)); 95 PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 96 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000100)); 94 97 PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.000000)); 95 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000100));96 98 PyDict_SetItemString(self->params,"kuhn_length",Py_BuildValue("d",100.000000)); 97 PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005));98 99 // Initialize dispersion / averaging parameter dict 99 100 DispersionVisitor* visitor = new DispersionVisitor(); … … 238 239 // Reader parameter dictionary 239 240 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 241 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 240 242 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 243 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 244 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 241 245 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 242 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );243 246 self->model->kuhn_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "kuhn_length") ); 244 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );245 247 // Read in dispersion parameters 246 248 PyObject* disp_dict; … … 315 317 // Reader parameter dictionary 316 318 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 319 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 317 320 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 321 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 322 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 318 323 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 319 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );320 324 self->model->kuhn_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "kuhn_length") ); 321 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );322 325 // Read in dispersion parameters 323 326 PyObject* disp_dict; … … 379 382 // Reader parameter dictionary 380 383 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 384 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 381 385 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 386 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 387 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 382 388 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 383 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );384 389 self->model->kuhn_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "kuhn_length") ); 385 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );386 390 // Read in dispersion parameters 387 391 PyObject* disp_dict; … … 412 416 // Reader parameter dictionary 413 417 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 418 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 414 419 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 420 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 421 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 415 422 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 416 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );417 423 self->model->kuhn_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "kuhn_length") ); 418 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );419 424 // Read in dispersion parameters 420 425 PyObject* disp_dict; -
sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp
r3080527 rf10063e 91 91 // Initialize parameter dictionary 92 92 PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 93 PyDict_SetItemString(self->params,"sldCyl",Py_BuildValue("d",0.000006)); 93 94 PyDict_SetItemString(self->params,"core_radius",Py_BuildValue("d",20.000000)); 94 95 PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.570000)); 95 96 PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000)); 96 97 PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",0.000000)); 98 PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 99 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.010000)); 97 100 PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",30.000000)); 98 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.010000));99 PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005));100 101 // Initialize dispersion / averaging parameter dict 101 102 DispersionVisitor* visitor = new DispersionVisitor(); … … 246 247 // Reader parameter dictionary 247 248 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 249 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 248 250 self->model->core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") ); 249 251 self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 250 252 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 251 253 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 254 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 255 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 252 256 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 253 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );254 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );255 257 // Read in dispersion parameters 256 258 PyObject* disp_dict; … … 329 331 // Reader parameter dictionary 330 332 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 333 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 331 334 self->model->core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") ); 332 335 self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 333 336 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 334 337 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 338 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 339 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 335 340 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 336 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );337 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );338 341 // Read in dispersion parameters 339 342 PyObject* disp_dict; … … 399 402 // Reader parameter dictionary 400 403 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 404 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 401 405 self->model->core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") ); 402 406 self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 403 407 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 404 408 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 409 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 410 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 405 411 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 406 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );407 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );408 412 // Read in dispersion parameters 409 413 PyObject* disp_dict; … … 438 442 // Reader parameter dictionary 439 443 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 444 self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 440 445 self->model->core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") ); 441 446 self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 442 447 self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 443 448 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 449 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 450 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 444 451 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 445 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") );446 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );447 452 // Read in dispersion parameters 448 453 PyObject* disp_dict; -
sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp
r3080527 rf10063e 92 92 PyDict_SetItemString(self->params,"n_plates",Py_BuildValue("d",20.000000)); 93 93 PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 94 PyDict_SetItemString(self->params,"sld_sol",Py_BuildValue("d",0.000001)); 95 PyDict_SetItemString(self->params,"delta",Py_BuildValue("d",30.000000)); 94 96 PyDict_SetItemString(self->params,"spacing",Py_BuildValue("d",400.000000)); 95 97 PyDict_SetItemString(self->params,"caille",Py_BuildValue("d",0.100000)); 96 98 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 97 PyDict_SetItemString(self->params,"delta",Py_BuildValue("d",30.000000)); 98 PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005)); 99 PyDict_SetItemString(self->params,"sld_bi",Py_BuildValue("d",0.000006)); 99 100 // Initialize dispersion / averaging parameter dict 100 101 DispersionVisitor* visitor = new DispersionVisitor(); … … 237 238 self->model->n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") ); 238 239 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 240 self->model->sld_sol = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_sol") ); 241 self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 239 242 self->model->spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") ); 240 243 self->model->caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") ); 241 244 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 242 self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 243 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 245 self->model->sld_bi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_bi") ); 244 246 // Read in dispersion parameters 245 247 PyObject* disp_dict; … … 313 315 self->model->n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") ); 314 316 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 317 self->model->sld_sol = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_sol") ); 318 self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 315 319 self->model->spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") ); 316 320 self->model->caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") ); 317 321 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 318 self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 319 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 322 self->model->sld_bi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_bi") ); 320 323 // Read in dispersion parameters 321 324 PyObject* disp_dict; … … 376 379 self->model->n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") ); 377 380 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 381 self->model->sld_sol = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_sol") ); 382 self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 378 383 self->model->spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") ); 379 384 self->model->caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") ); 380 385 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 381 self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 382 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 386 self->model->sld_bi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_bi") ); 383 387 // Read in dispersion parameters 384 388 PyObject* disp_dict; … … 408 412 self->model->n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") ); 409 413 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 414 self->model->sld_sol = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_sol") ); 415 self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 410 416 self->model->spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") ); 411 417 self->model->caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") ); 412 418 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 413 self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 414 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 419 self->model->sld_bi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_bi") ); 415 420 // Read in dispersion parameters 416 421 PyObject* disp_dict; -
sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp
r3080527 rf10063e 94 94 PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 95 95 PyDict_SetItemString(self->params,"long_c",Py_BuildValue("d",400.000000)); 96 PyDict_SetItemString(self->params,"sldPipe",Py_BuildValue("d",0.000006)); 96 97 PyDict_SetItemString(self->params,"parallel_psi",Py_BuildValue("d",0.000000)); 97 98 PyDict_SetItemString(self->params,"parallel_phi",Py_BuildValue("d",0.000000)); 98 99 PyDict_SetItemString(self->params,"parallel_theta",Py_BuildValue("d",0.000000)); 100 PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 99 101 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 100 PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005));101 102 // Initialize dispersion / averaging parameter dict 102 103 DispersionVisitor* visitor = new DispersionVisitor(); … … 253 254 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 254 255 self->model->long_c = PyFloat_AsDouble( PyDict_GetItemString(self->params, "long_c") ); 256 self->model->sldPipe = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldPipe") ); 255 257 self->model->parallel_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_psi") ); 256 258 self->model->parallel_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_phi") ); 257 259 self->model->parallel_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_theta") ); 260 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 258 261 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 259 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );260 262 // Read in dispersion parameters 261 263 PyObject* disp_dict; … … 339 341 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 340 342 self->model->long_c = PyFloat_AsDouble( PyDict_GetItemString(self->params, "long_c") ); 343 self->model->sldPipe = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldPipe") ); 341 344 self->model->parallel_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_psi") ); 342 345 self->model->parallel_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_phi") ); 343 346 self->model->parallel_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_theta") ); 347 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 344 348 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 345 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );346 349 // Read in dispersion parameters 347 350 PyObject* disp_dict; … … 412 415 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 413 416 self->model->long_c = PyFloat_AsDouble( PyDict_GetItemString(self->params, "long_c") ); 417 self->model->sldPipe = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldPipe") ); 414 418 self->model->parallel_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_psi") ); 415 419 self->model->parallel_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_phi") ); 416 420 self->model->parallel_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_theta") ); 421 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 417 422 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 418 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );419 423 // Read in dispersion parameters 420 424 PyObject* disp_dict; … … 454 458 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 455 459 self->model->long_c = PyFloat_AsDouble( PyDict_GetItemString(self->params, "long_c") ); 460 self->model->sldPipe = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldPipe") ); 456 461 self->model->parallel_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_psi") ); 457 462 self->model->parallel_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_phi") ); 458 463 self->model->parallel_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_theta") ); 464 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 459 465 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 460 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );461 466 // Read in dispersion parameters 462 467 PyObject* disp_dict; -
sansmodels/src/sans/models/c_models/CSphereModel.cpp
r3080527 rf10063e 90 90 91 91 // Initialize parameter dictionary 92 PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 93 PyDict_SetItemString(self->params,"sldSph",Py_BuildValue("d",0.000002)); 92 94 PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 93 95 PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",60.000000)); 94 96 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 95 PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000001));96 97 // Initialize dispersion / averaging parameter dict 97 98 DispersionVisitor* visitor = new DispersionVisitor(); … … 229 230 230 231 // Reader parameter dictionary 232 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 233 self->model->sldSph = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSph") ); 231 234 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 232 235 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 233 236 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 234 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );235 237 // Read in dispersion parameters 236 238 PyObject* disp_dict; … … 300 302 301 303 // Reader parameter dictionary 304 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 305 self->model->sldSph = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSph") ); 302 306 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 303 307 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 304 308 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 305 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );306 309 // Read in dispersion parameters 307 310 PyObject* disp_dict; … … 358 361 359 362 // Reader parameter dictionary 363 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 364 self->model->sldSph = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSph") ); 360 365 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 361 366 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 362 367 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 363 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );364 368 // Read in dispersion parameters 365 369 PyObject* disp_dict; … … 385 389 386 390 // Reader parameter dictionary 391 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 392 self->model->sldSph = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSph") ); 387 393 self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 388 394 self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 389 395 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 390 self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );391 396 // Read in dispersion parameters 392 397 PyObject* disp_dict; -
sansmodels/src/sans/models/c_models/cylinder.cpp
rc451be9 rf10063e 39 39 length = Parameter(400.0, true); 40 40 length.set_min(0.0); 41 contrast = Parameter(3.e-6); 41 sldCyl = Parameter(4.e-6); 42 sldSolv = Parameter(1.e-6); 42 43 background = Parameter(0.0); 43 44 cyl_theta = Parameter(0.0, true); … … 52 53 */ 53 54 double CylinderModel :: operator()(double q) { 54 double dp[ 5];55 double dp[6]; 55 56 56 57 // Fill parameter array for IGOR library … … 59 60 dp[1] = radius(); 60 61 dp[2] = length(); 61 dp[3] = contrast(); 62 dp[4] = 0.0; 62 dp[3] = sldCyl(); 63 dp[4] = sldSolv(); 64 dp[5] = 0.0; 63 65 64 66 // Get the dispersion points for the radius … … 113 115 dp.radius = radius(); 114 116 dp.length = length(); 115 dp.contrast = contrast(); 117 dp.sldCyl = sldCyl(); 118 dp.sldSolv = sldSolv(); 116 119 dp.background = 0.0; 117 120 dp.cyl_theta = cyl_theta(); -
sansmodels/src/sans/models/c_models/ellipsoid.cpp
rc451be9 rf10063e 39 39 radius_b = Parameter(400.0, true); 40 40 radius_b.set_min(0.0); 41 contrast = Parameter(3.e-6); 41 sldEll = Parameter(4.e-6); 42 sldSolv = Parameter(1.e-6); 42 43 background = Parameter(0.0); 43 44 axis_theta = Parameter(1.57, true); … … 52 53 */ 53 54 double EllipsoidModel :: operator()(double q) { 54 double dp[ 5];55 double dp[6]; 55 56 56 57 // Fill parameter array for IGOR library … … 59 60 dp[1] = radius_a(); 60 61 dp[2] = radius_b(); 61 dp[3] = contrast(); 62 dp[4] = 0.0; 62 dp[3] = sldEll(); 63 dp[4] = sldSolv(); 64 dp[5] = 0.0; 63 65 64 66 // Get the dispersion points for the radius_a … … 116 118 dp.radius_a = radius_a(); 117 119 dp.radius_b = radius_b(); 118 dp.contrast = contrast(); 120 dp.sldEll = sldEll(); 121 dp.sldSolv = sldSolv(); 119 122 dp.background = 0.0; 120 123 dp.axis_theta = axis_theta(); -
sansmodels/src/sans/models/c_models/ellipticalcylinder.cpp
rc451be9 rf10063e 41 41 length = Parameter(400.0, true); 42 42 length.set_min(0.0); 43 contrast = Parameter(3.e-6); 43 sldCyl = Parameter(4.e-6); 44 sldSolv = Parameter(1.e-6); 44 45 background = Parameter(0.0); 45 46 cyl_theta = Parameter(1.57, true); … … 55 56 */ 56 57 double EllipticalCylinderModel :: operator()(double q) { 57 double dp[ 6];58 double dp[7]; 58 59 59 60 dp[0] = scale(); … … 61 62 dp[2] = r_ratio(); 62 63 dp[3] = length(); 63 dp[4] = contrast(); 64 dp[5] = 0.0; 64 dp[4] = sldCyl(); 65 dp[5] = sldSolv(); 66 dp[6] = 0.0; 65 67 66 68 // Get the dispersion points for the r_minor … … 132 134 dp.r_ratio = r_ratio(); 133 135 dp.length = length(); 134 dp.contrast = contrast(); 136 dp.sldCyl = sldCyl(); 137 dp.sldSolv = sldSolv(); 135 138 dp.background = 0.0; 136 139 dp.cyl_theta = cyl_theta(); -
sansmodels/src/sans/models/c_models/flexiblecylinder.cpp
rc451be9 rf10063e 42 42 radius = Parameter(20.0, true); 43 43 radius.set_min(0.0); 44 contrast = Parameter(5.3e-6); 44 sldCyl = Parameter(6.3e-6); 45 sldSolv = Parameter(1.0e-6); 45 46 background = Parameter(0.0001); 46 47 } … … 53 54 */ 54 55 double FlexibleCylinderModel :: operator()(double q) { 55 double dp[ 6];56 double dp[7]; 56 57 57 58 // Fill parameter array for IGOR library … … 61 62 dp[2] = kuhn_length(); 62 63 dp[3] = radius(); 63 dp[4] = contrast(); 64 dp[5] = 0.0; 64 dp[4] = sldCyl(); 65 dp[5] = sldSolv(); 66 dp[6] = 0.0; 65 67 66 68 // Get the dispersion points for the length -
sansmodels/src/sans/models/c_models/hollowcylinder.cpp
rc451be9 rf10063e 41 41 length = Parameter(400.0, true); 42 42 length.set_min(0.0); 43 contrast = Parameter(5.3e-6); 43 sldCyl = Parameter(6.3e-6); 44 sldSolv = Parameter(1.0e-6); 44 45 background = Parameter(0.0); 45 46 axis_theta = Parameter(0.0, true); … … 54 55 */ 55 56 double HollowCylinderModel :: operator()(double q) { 56 double dp[ 6];57 double dp[7]; 57 58 58 59 dp[0] = scale(); … … 60 61 dp[2] = radius(); 61 62 dp[3] = length(); 62 dp[4] = contrast(); 63 dp[5] = 0.0; 63 dp[4] = sldCyl(); 64 dp[5] = sldSolv(); 65 dp[6] = 0.0; 64 66 65 67 // Get the dispersion points for the core radius … … 113 115 if (vol != 0.0 && norm != 0.0) { 114 116 //Re-normalize by avg volume 115 sum = sum /(vol/norm);}117 sum = sum*(vol/norm);} 116 118 117 119 return sum/norm + background(); … … 131 133 dp.radius = radius(); 132 134 dp.length = length(); 133 dp.contrast = contrast(); 135 dp.sldCyl = sldCyl(); 136 dp.sldSolv = sldSolv(); 134 137 dp.background = 0.0; 135 138 dp.axis_theta = axis_theta(); … … 223 226 if (vol != 0.0 && norm_vol != 0.0) { 224 227 //Re-normalize by avg volume 225 sum = sum /(vol/norm_vol);}228 sum = sum*(vol/norm_vol);} 226 229 return sum/norm + background(); 227 230 } -
sansmodels/src/sans/models/c_models/lamellarPS.cpp
rf9bf661 rf10063e 39 39 delta = Parameter(30.0); 40 40 delta.set_min(0.0); 41 contrast = Parameter(5.3e-6); 41 sld_bi = Parameter(6.3e-6); 42 sld_sol = Parameter(1.0e-6); 42 43 n_plates = Parameter(20.0); 43 44 caille = Parameter(0.1); … … 53 54 */ 54 55 double LamellarPSModel :: operator()(double q) { 55 double dp[ 7];56 double dp[8]; 56 57 57 58 // Fill parameter array for IGOR library … … 60 61 dp[1] = spacing(); 61 62 dp[2] = delta(); 62 dp[3] = contrast(); 63 dp[4] = n_plates(); 64 dp[5] = caille(); 65 dp[6] = 0.0; 63 dp[3] = sld_bi(); 64 dp[4] = sld_sol(); 65 dp[5] = n_plates(); 66 dp[6] = caille(); 67 dp[7] = 0.0; 66 68 67 69 -
sansmodels/src/sans/models/c_models/models.hh
r5eb9154 rf10063e 32 32 Parameter scale; 33 33 Parameter length; 34 Parameter contrast; 34 Parameter sldCyl; 35 Parameter sldSolv; 35 36 Parameter background; 36 37 Parameter cyl_theta; … … 55 56 Parameter short_b; 56 57 Parameter long_c; 57 Parameter contrast; 58 Parameter sldPipe; 59 Parameter sldSolv; 58 60 Parameter background; 59 61 Parameter parallel_theta; … … 77 79 Parameter radius; 78 80 Parameter scale; 79 Parameter contrast; 81 Parameter sldSph; 82 Parameter sldSolv; 80 83 Parameter background; 81 84 … … 245 248 Parameter scale; 246 249 Parameter radius_b; 247 Parameter contrast; 250 Parameter sldEll; 251 Parameter sldSolv; 248 252 Parameter background; 249 253 Parameter axis_theta; … … 267 271 Parameter r_ratio; 268 272 Parameter length; 269 Parameter contrast; 273 Parameter sldCyl; 274 Parameter sldSolv; 270 275 Parameter background; 271 276 Parameter cyl_theta; … … 312 317 Parameter kuhn_length; 313 318 Parameter radius; 314 Parameter contrast; 319 Parameter sldCyl; 320 Parameter sldSolv; 315 321 Parameter background; 316 322 Parameter axis_theta; … … 403 409 Parameter spacing; 404 410 Parameter delta; 405 Parameter contrast; 411 Parameter sld_bi; 412 Parameter sld_sol; 406 413 Parameter n_plates; 407 414 Parameter caille; … … 450 457 Parameter equat_shell; 451 458 Parameter polar_shell; 452 Parameter contrast; 459 Parameter sld_core; 460 Parameter sld_shell; 453 461 Parameter sld_solvent; 454 462 Parameter background; … … 473 481 Parameter radius; 474 482 Parameter length; 475 Parameter contrast; 483 Parameter sldCyl; 484 Parameter sldSolv; 476 485 Parameter background; 477 486 Parameter axis_theta; -
sansmodels/src/sans/models/c_models/parallelepiped.cpp
rc451be9 rf10063e 42 42 long_c = Parameter(400.0, true); 43 43 long_c.set_min(1.0); 44 contrast = Parameter(53.e-7); 44 sldPipe = Parameter(6.3e-6); 45 sldSolv = Parameter(1.0e-6); 45 46 background = Parameter(0.0); 46 47 parallel_theta = Parameter(0.0, true); … … 56 57 */ 57 58 double ParallelepipedModel :: operator()(double q) { 58 double dp[ 6];59 double dp[7]; 59 60 60 61 // Fill parameter array for IGOR library … … 64 65 dp[2] = short_b(); 65 66 dp[3] = long_c(); 66 dp[4] = contrast(); 67 dp[5] = 0.0; 67 dp[4] = sldPipe(); 68 dp[5] = sldSolv(); 69 dp[6] = 0.0; 68 70 69 71 // Get the dispersion points for the short_edgeA … … 132 134 dp.short_b = short_b(); 133 135 dp.long_c = long_c(); 134 dp.contrast = contrast(); 136 dp.sldPipe = sldPipe(); 137 dp.sldSolv = sldSolv(); 135 138 dp.background = 0.0; 136 139 //dp.background = background(); -
sansmodels/src/sans/models/c_models/sphere.cpp
rc451be9 rf10063e 35 35 radius = Parameter(20.0, true); 36 36 radius.set_min(0.0); 37 contrast = Parameter(3.e-6); 37 sldSph = Parameter(4.0e-6); 38 sldSolv = Parameter(1.0e-6); 38 39 background = Parameter(0.0); 39 40 } … … 46 47 */ 47 48 double SphereModel :: operator()(double q) { 48 double dp[ 4];49 double dp[5]; 49 50 50 51 // Fill parameter array for IGOR library … … 52 53 dp[0] = scale(); 53 54 dp[1] = radius(); 54 dp[2] = contrast(); 55 dp[3] = 0.0; 55 dp[2] = sldSph(); 56 dp[3] = sldSolv(); 57 dp[4] = 0.0; 56 58 57 59 // Get the dispersion points for the radius … … 114 116 dp.scale = scale(); 115 117 dp.radius = radius(); 116 dp.contrast = contrast(); 118 dp.sldSph = sldSph(); 119 dp.sldSolv = sldSolv(); 117 120 dp.background = background(); 118 121 double rad_out = 0.0; -
sansmodels/src/sans/models/c_models/spheroid.cpp
rc451be9 rf10063e 43 43 polar_shell = Parameter(30.0, true); 44 44 polar_shell.set_min(0.0); 45 contrast = Parameter(1e-6); 45 sld_core = Parameter(2e-6); 46 sld_shell = Parameter(1e-6); 46 47 sld_solvent = Parameter(6.3e-6); 47 48 background = Parameter(0.0); … … 58 59 */ 59 60 double CoreShellEllipsoidModel :: operator()(double q) { 60 double dp[ 8];61 double dp[9]; 61 62 62 63 // Fill parameter array for IGOR library … … 67 68 dp[3] = equat_shell(); 68 69 dp[4] = polar_shell(); 69 dp[5] = contrast(); 70 dp[6] = sld_solvent(); 71 dp[7] = 0.0; 70 dp[5] = sld_core(); 71 dp[6] = sld_shell(); 72 dp[7] = sld_solvent(); 73 dp[8] = 0.0; 72 74 73 75 // Get the dispersion points for the major core … … 110 112 //Un-normalize by volume 111 113 sum += weights_equat_core[i].weight* weights_polar_core[j].weight * weights_equat_shell[k].weight 112 * weights_polar_shell[l].weight * ProlateForm(dp, q)114 * weights_polar_shell[l].weight * OblateForm(dp, q) 113 115 * pow(weights_equat_shell[k].value,2)*weights_polar_shell[l].value; 114 116 //Find average volume … … 170 172 dp.equat_shell = equat_shell(); 171 173 dp.polar_shell = polar_shell(); 172 dp.contrast = contrast(); 174 dp.sld_core = sld_core(); 175 dp.sld_shell = sld_shell(); 173 176 dp.sld_solvent = sld_solvent(); 174 177 dp.background = 0.0;
Note: See TracChangeset
for help on using the changeset viewer.