Changeset fe9c19b4 in sasview for sansmodels/src/sans/models/OblateModel.py
- Timestamp:
- Dec 14, 2009 10:39:21 AM (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:
- 6e9976b
- Parents:
- 7975f2b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/OblateModel.py
r27972c1d rfe9c19b4 28 28 class OblateModel(COblateModel, BaseComponent): 29 29 """ Class that evaluates a OblateModel model. 30 31 32 33 30 This file was auto-generated from ..\c_extensions\oblate.h. 31 Refer to that file and the structure it contains 32 for details of the model. 33 List of default parameters: 34 34 scale = 1.0 35 35 major_core = 200.0 [A] … … 73 73 that shell radii are larger than core radii.""" 74 74 75 75 ## Parameter details [units, min, max] 76 76 self.details = {} 77 77 self.details['scale'] = ['', None, None] … … 86 86 self.details['axis_phi'] = ['[rad]', None, None] 87 87 88 88 ## fittable parameters 89 89 self.fixed=['major_core.width', 'minor_core.width', 'major_shell.width', 'minor_shell.width'] 90 90 … … 95 95 """ Return a identical copy of self """ 96 96 return self._clone(OblateModel()) 97 98 def __getstate__(self): 99 """ return object state for pickling and copying """ 100 print "__dict__",self.__dict__ 101 #self.__dict__['params'] = self.params 102 #self.__dict__['dispersion'] = self.dispersion 103 #self.__dict__['log'] = self.log 104 model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 105 106 return self.__dict__, model_state 107 108 def __setstate__(self, state): 109 """ create object from pickled state """ 110 111 self.__dict__, model_state = state 112 self.params = model_state['params'] 113 self.dispersion = model_state['dispersion'] 114 self.log = model_state['log'] 115 97 116 98 117 def run(self, x = 0.0):
Note: See TracChangeset
for help on using the changeset viewer.