Changeset 96656e3 in sasview for sansmodels/src/sans/models/SLDCalFunc.py
- Timestamp:
- Jan 6, 2011 12:42:14 PM (14 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:
- 3be060d
- Parents:
- b9b9930
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/SLDCalFunc.py
r4b3d25b r96656e3 28 28 from sans_extension.c_models import CSLDCalFunc 29 29 import copy 30 30 31 def create_SLDCalFunc(): 32 obj = SLDCalFunc() 33 #CSLDCalFunc.__init__(obj) is called by SLDCalFunc constructor 34 return obj 35 31 36 class SLDCalFunc(CSLDCalFunc, BaseComponent): 32 37 """ … … 50 55 # Initialize BaseComponent first, then sphere 51 56 BaseComponent.__init__(self) 57 #apply(CSLDCalFunc.__init__, (self,)) 52 58 CSLDCalFunc.__init__(self) 53 59 … … 70 76 71 77 ## non-fittable parameters 72 self.non_fittable =[]78 self.non_fittable = [] 73 79 74 80 ## parameters with orientation 75 self.orientation_params = []81 self.orientation_params = [] 76 82 83 def __reduce_ex__(self, proto): 84 """ 85 Overwrite the __reduce_ex__ of PyTypeObject *type call in the init of 86 c model. 87 """ 88 return (create_SLDCalFunc,tuple()) 89 77 90 def clone(self): 78 91 """ Return a identical copy of self """ 79 92 return self._clone(SLDCalFunc()) 80 81 def __getstate__(self):82 """83 return object state for pickling and copying84 """85 model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log}86 87 return self.__dict__, model_state88 89 def __setstate__(self, state):90 """91 create object from pickled state92 93 :param state: the state of the current model94 95 """96 97 self.__dict__, model_state = state98 self.params = model_state['params']99 self.dispersion = model_state['dispersion']100 self.log = model_state['log']101 93 102 94
Note: See TracChangeset
for help on using the changeset viewer.