Changeset 96656e3 in sasview for sansmodels/src/sans/models/DiamEllipFunc.py
- Timestamp:
- Jan 6, 2011 2: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/DiamEllipFunc.py
r35aface r96656e3 28 28 from sans_extension.c_models import CDiamEllipFunc 29 29 import copy 30 30 31 def create_DiamEllipFunc(): 32 obj = DiamEllipFunc() 33 #CDiamEllipFunc.__init__(obj) is called by DiamEllipFunc constructor 34 return obj 35 31 36 class DiamEllipFunc(CDiamEllipFunc, BaseComponent): 32 37 """ … … 46 51 # Initialize BaseComponent first, then sphere 47 52 BaseComponent.__init__(self) 53 #apply(CDiamEllipFunc.__init__, (self,)) 48 54 CDiamEllipFunc.__init__(self) 49 55 … … 69 75 70 76 ## non-fittable parameters 71 self.non_fittable =[]77 self.non_fittable = [] 72 78 73 79 ## parameters with orientation 74 self.orientation_params = []80 self.orientation_params = [] 75 81 82 def __reduce_ex__(self, proto): 83 """ 84 Overwrite the __reduce_ex__ of PyTypeObject *type call in the init of 85 c model. 86 """ 87 return (create_DiamEllipFunc,tuple()) 88 76 89 def clone(self): 77 90 """ Return a identical copy of self """ 78 91 return self._clone(DiamEllipFunc()) 79 80 def __getstate__(self):81 """82 return object state for pickling and copying83 """84 model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log}85 86 return self.__dict__, model_state87 88 def __setstate__(self, state):89 """90 create object from pickled state91 92 :param state: the state of the current model93 94 """95 96 self.__dict__, model_state = state97 self.params = model_state['params']98 self.dispersion = model_state['dispersion']99 self.log = model_state['log']100 92 101 93
Note: See TracChangeset
for help on using the changeset viewer.