Changeset 4cbaf35 in sasview
- Timestamp:
- Jan 7, 2010 5:00:43 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:
- c451be9
- Parents:
- 4d270706
- Location:
- sansmodels/src/sans/models
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/BinaryHSModel.py
rfe9c19b4 r4cbaf35 36 36 vol_frac_ls = 0.1 37 37 vol_frac_ss = 0.2 38 ls_sld = 3.5e-006 [1/A^(2)] 39 ss_sld = 5e-007 [1/A^(2)] 40 solvent_sld = 6.36e-006 [1/A^(2)] 41 background = 0.001 [1/cm] 38 42 39 43 """ … … 64 68 self.details['vol_frac_ls'] = ['', None, None] 65 69 self.details['vol_frac_ss'] = ['', None, None] 70 self.details['ls_sld'] = ['[1/A^(2)]', None, None] 71 self.details['ss_sld'] = ['[1/A^(2)]', None, None] 72 self.details['solvent_sld'] = ['[1/A^(2)]', None, None] 73 self.details['background'] = ['[1/cm]', None, None] 66 74 67 75 ## fittable parameters … … 77 85 def __getstate__(self): 78 86 """ return object state for pickling and copying """ 79 print "__dict__",self.__dict__80 #self.__dict__['params'] = self.params81 #self.__dict__['dispersion'] = self.dispersion82 #self.__dict__['log'] = self.log83 87 model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 84 88 -
sansmodels/src/sans/models/BinaryHSPSF11Model.py
rfe9c19b4 r4cbaf35 88 88 def __getstate__(self): 89 89 """ return object state for pickling and copying """ 90 print "__dict__",self.__dict__91 #self.__dict__['params'] = self.params92 #self.__dict__['dispersion'] = self.dispersion93 #self.__dict__['log'] = self.log94 90 model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 95 91 -
sansmodels/src/sans/models/c_extensions/binaryHS.h
r27972c1d r4cbaf35 38 38 39 39 /// large sphere scattering length density [1/A^(2)] 40 // [DEFAULT]=ls_sld= 3.5e-6 [1/A^ {2}]40 // [DEFAULT]=ls_sld= 3.5e-6 [1/A^(2)] 41 41 double ls_sld; 42 42 -
sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp
r71e2de7 r4cbaf35 90 90 91 91 // Initialize parameter dictionary 92 PyDict_SetItemString(self->params,"vol_frac_ls",Py_BuildValue("d",0.100000)); 93 PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.001000)); 94 PyDict_SetItemString(self->params,"vol_frac_ss",Py_BuildValue("d",0.200000)); 95 PyDict_SetItemString(self->params,"solvent_sld",Py_BuildValue("d",0.000006)); 96 PyDict_SetItemString(self->params,"ls_sld",Py_BuildValue("d",0.000003)); 97 PyDict_SetItemString(self->params,"ss_sld",Py_BuildValue("d",0.000000)); 92 98 PyDict_SetItemString(self->params,"s_radius",Py_BuildValue("d",25.000000)); 93 PyDict_SetItemString(self->params,"vol_frac_ss",Py_BuildValue("d",0.200000));94 99 PyDict_SetItemString(self->params,"l_radius",Py_BuildValue("d",100.000000)); 95 PyDict_SetItemString(self->params,"vol_frac_ls",Py_BuildValue("d",0.100000));96 100 // Initialize dispersion / averaging parameter dict 97 101 DispersionVisitor* visitor = new DispersionVisitor(); … … 234 238 235 239 // Reader parameter dictionary 240 self->model->vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") ); 241 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 242 self->model->vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") ); 243 self->model->solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") ); 244 self->model->ls_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ls_sld") ); 245 self->model->ss_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ss_sld") ); 236 246 self->model->s_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "s_radius") ); 237 self->model->vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") );238 247 self->model->l_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "l_radius") ); 239 self->model->vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") );240 248 // Read in dispersion parameters 241 249 PyObject* disp_dict; … … 307 315 308 316 // Reader parameter dictionary 317 self->model->vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") ); 318 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 319 self->model->vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") ); 320 self->model->solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") ); 321 self->model->ls_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ls_sld") ); 322 self->model->ss_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ss_sld") ); 309 323 self->model->s_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "s_radius") ); 310 self->model->vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") );311 324 self->model->l_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "l_radius") ); 312 self->model->vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") );313 325 // Read in dispersion parameters 314 326 PyObject* disp_dict; … … 367 379 368 380 // Reader parameter dictionary 381 self->model->vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") ); 382 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 383 self->model->vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") ); 384 self->model->solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") ); 385 self->model->ls_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ls_sld") ); 386 self->model->ss_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ss_sld") ); 369 387 self->model->s_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "s_radius") ); 370 self->model->vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") );371 388 self->model->l_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "l_radius") ); 372 self->model->vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") );373 389 // Read in dispersion parameters 374 390 PyObject* disp_dict; … … 396 412 397 413 // Reader parameter dictionary 414 self->model->vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") ); 415 self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 416 self->model->vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") ); 417 self->model->solvent_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "solvent_sld") ); 418 self->model->ls_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ls_sld") ); 419 self->model->ss_sld = PyFloat_AsDouble( PyDict_GetItemString(self->params, "ss_sld") ); 398 420 self->model->s_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "s_radius") ); 399 self->model->vol_frac_ss = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ss") );400 421 self->model->l_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "l_radius") ); 401 self->model->vol_frac_ls = PyFloat_AsDouble( PyDict_GetItemString(self->params, "vol_frac_ls") );402 422 // Read in dispersion parameters 403 423 PyObject* disp_dict;
Note: See TracChangeset
for help on using the changeset viewer.