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