Changeset 96656e3 in sasview for sansmodels/src/sans/models/BinaryHSPSF11Model.py
- Timestamp:
- Jan 6, 2011 12:42:14 PM (13 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/BinaryHSPSF11Model.py
r35aface r96656e3 28 28 from sans_extension.c_models import CBinaryHSPSF11Model 29 29 import copy 30 30 31 def create_BinaryHSPSF11Model(): 32 obj = BinaryHSPSF11Model() 33 #CBinaryHSPSF11Model.__init__(obj) is called by BinaryHSPSF11Model constructor 34 return obj 35 31 36 class BinaryHSPSF11Model(CBinaryHSPSF11Model, BaseComponent): 32 37 """ … … 52 57 # Initialize BaseComponent first, then sphere 53 58 BaseComponent.__init__(self) 59 #apply(CBinaryHSPSF11Model.__init__, (self,)) 54 60 CBinaryHSPSF11Model.__init__(self) 55 61 … … 84 90 85 91 ## non-fittable parameters 86 self.non_fittable =[]92 self.non_fittable = [] 87 93 88 94 ## parameters with orientation 89 self.orientation_params = []95 self.orientation_params = [] 90 96 97 def __reduce_ex__(self, proto): 98 """ 99 Overwrite the __reduce_ex__ of PyTypeObject *type call in the init of 100 c model. 101 """ 102 return (create_BinaryHSPSF11Model,tuple()) 103 91 104 def clone(self): 92 105 """ Return a identical copy of self """ 93 106 return self._clone(BinaryHSPSF11Model()) 94 95 def __getstate__(self):96 """97 return object state for pickling and copying98 """99 model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log}100 101 return self.__dict__, model_state102 103 def __setstate__(self, state):104 """105 create object from pickled state106 107 :param state: the state of the current model108 109 """110 111 self.__dict__, model_state = state112 self.params = model_state['params']113 self.dispersion = model_state['dispersion']114 self.log = model_state['log']115 107 116 108
Note: See TracChangeset
for help on using the changeset viewer.