Changeset 13eb1c4 in sasview
- Timestamp:
- Apr 15, 2010 4:41:29 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:
- 8426622
- Parents:
- 2339249f
- Location:
- sansmodels/src/sans/models
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/TriaxialEllipsoidModel.py
rf9a1279 r13eb1c4 36 36 semi_axisB = 100.0 [A] 37 37 semi_axisC = 400.0 [A] 38 contrast = 5.3e-006 [1/A^(2)] 38 sldEll = 1e-006 [1/A^(2)] 39 sldSolv = 6.3e-006 [1/A^(2)] 39 40 background = 0.0 [1/cm] 40 41 axis_theta = 1.0 [rad] … … 64 65 self.details['semi_axisB'] = ['[A]', None, None] 65 66 self.details['semi_axisC'] = ['[A]', None, None] 66 self.details['contrast'] = ['[1/A^(2)]', None, None] 67 self.details['sldEll'] = ['[1/A^(2)]', None, None] 68 self.details['sldSolv'] = ['[1/A^(2)]', None, None] 67 69 self.details['background'] = ['[1/cm]', None, None] 68 70 self.details['axis_theta'] = ['[rad]', None, None] -
sansmodels/src/sans/models/c_extensions/triaxial_ellipsoid.c
r3c102d4 r13eb1c4 18 18 */ 19 19 double triaxial_ellipsoid_analytical_1D(TriaxialEllipsoidParameters *pars, double q) { 20 double dp[ 6];20 double dp[7]; 21 21 22 22 // Fill paramater array … … 25 25 dp[2] = pars->semi_axisB; 26 26 dp[3] = pars->semi_axisC; 27 dp[4] = pars->contrast; 28 dp[5] = pars->background; 27 dp[4] = pars->sldEll; 28 dp[5] = pars->sldSolv; 29 dp[6] = pars->background; 29 30 30 31 // Call library function to evaluate model … … 133 134 134 135 // Multiply by contrast^2 135 answer *= pars->contrast*pars->contrast;136 answer *= (pars->sldEll- pars->sldSolv)*(pars->sldEll- pars->sldSolv); 136 137 137 138 //normalize by cylinder volume -
sansmodels/src/sans/models/c_extensions/triaxial_ellipsoid.h
r27972c1d r13eb1c4 24 24 // [DEFAULT]=semi_axisC=400.0 [A] 25 25 double semi_axisC; 26 /// Contrast [1/A^(2)] 27 // [DEFAULT]=contrast=5.3e-6 [1/A^(2)] 28 double contrast; 26 /// sldEll [1/A^(2)] 27 // [DEFAULT]=sldEll=1.0e-6 [1/A^(2)] 28 double sldEll; 29 /// sldSolv [1/A^(2)] 30 // [DEFAULT]=sldSolv=6.3e-6 [1/A^(2)] 31 double sldSolv; 29 32 /// Incoherent Background [1/cm] 0.00 30 33 // [DEFAULT]=background=0.0 [1/cm] -
sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp
rc724ccd r13eb1c4 97 97 PyDict_SetItemString(self->params,"semi_axisC",Py_BuildValue("d",400.00000000)); 98 98 PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",1.00000000)); 99 PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.00000630)); 99 100 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.00000000)); 100 PyDict_SetItemString(self->params," contrast",Py_BuildValue("d",0.00000530));101 PyDict_SetItemString(self->params,"sldEll",Py_BuildValue("d",0.00000100)); 101 102 // Initialize dispersion / averaging parameter dict 102 103 DispersionVisitor* visitor = new DispersionVisitor(); … … 247 248 self->model->semi_axisC = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisC") ); 248 249 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 250 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 249 251 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 250 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );252 self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 251 253 // Read in dispersion parameters 252 254 PyObject* disp_dict; … … 327 329 self->model->semi_axisC = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisC") ); 328 330 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 331 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 329 332 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 330 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );333 self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 331 334 // Read in dispersion parameters 332 335 PyObject* disp_dict; … … 394 397 self->model->semi_axisC = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisC") ); 395 398 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 399 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 396 400 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 397 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );401 self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 398 402 // Read in dispersion parameters 399 403 PyObject* disp_dict; … … 430 434 self->model->semi_axisC = PyFloat_AsDouble( PyDict_GetItemString(self->params, "semi_axisC") ); 431 435 self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 436 self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 432 437 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 433 self->model-> contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") );438 self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 434 439 // Read in dispersion parameters 435 440 PyObject* disp_dict; -
sansmodels/src/sans/models/c_models/models.hh
r261b864 r13eb1c4 342 342 Parameter semi_axisB; 343 343 Parameter semi_axisC; 344 Parameter contrast; 344 Parameter sldEll; 345 Parameter sldSolv; 345 346 Parameter background; 346 347 Parameter axis_theta; -
sansmodels/src/sans/models/c_models/triaxialellipsoid.cpp
rc451be9 r13eb1c4 41 41 semi_axisC = Parameter(400.0, true); 42 42 semi_axisC.set_min(0.0); 43 contrast = Parameter(5.3e-6); 43 sldEll = Parameter(1.0e-6); 44 sldSolv = Parameter(6.3e-6); 44 45 background = Parameter(0.0); 45 46 axis_theta = Parameter(1.0, true); … … 55 56 */ 56 57 double TriaxialEllipsoidModel :: operator()(double q) { 57 double dp[ 6];58 double dp[7]; 58 59 59 60 // Fill parameter array for IGOR library … … 63 64 dp[2] = semi_axisB(); 64 65 dp[3] = semi_axisC(); 65 dp[4] = contrast(); 66 dp[5] = 0.0; 66 dp[4] = sldEll(); 67 dp[5] = sldSolv(); 68 dp[6] = 0.0; 67 69 68 70 // Get the dispersion points for the semi axis A … … 128 130 dp.semi_axisB = semi_axisB(); 129 131 dp.semi_axisC = semi_axisC(); 130 dp.contrast = contrast(); 132 dp.sldEll = sldEll(); 133 dp.sldSolv = sldSolv(); 131 134 dp.background = 0.0; 132 135 dp.axis_theta = axis_theta();
Note: See TracChangeset
for help on using the changeset viewer.