Ignore:
Timestamp:
Jan 6, 2011 12:42:14 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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
Message:

update models due to changes of template

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/BinaryHSPSF11Model.py

    r35aface r96656e3  
    2828from sans_extension.c_models import CBinaryHSPSF11Model 
    2929import copy     
    30      
     30 
     31def create_BinaryHSPSF11Model(): 
     32    obj = BinaryHSPSF11Model() 
     33    #CBinaryHSPSF11Model.__init__(obj) is called by BinaryHSPSF11Model constructor 
     34    return obj 
     35 
    3136class BinaryHSPSF11Model(CBinaryHSPSF11Model, BaseComponent): 
    3237    """  
     
    5257        # Initialize BaseComponent first, then sphere 
    5358        BaseComponent.__init__(self) 
     59        #apply(CBinaryHSPSF11Model.__init__, (self,))  
    5460        CBinaryHSPSF11Model.__init__(self) 
    5561         
     
    8490         
    8591        ## non-fittable parameters 
    86         self.non_fittable=[] 
     92        self.non_fittable = [] 
    8793         
    8894        ## parameters with orientation 
    89         self.orientation_params =[] 
     95        self.orientation_params = [] 
    9096    
     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         
    91104    def clone(self): 
    92105        """ Return a identical copy of self """ 
    93106        return self._clone(BinaryHSPSF11Model())    
    94          
    95     def __getstate__(self): 
    96         """ 
    97         return object state for pickling and copying 
    98         """ 
    99         model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
    100          
    101         return self.__dict__, model_state 
    102          
    103     def __setstate__(self, state): 
    104         """ 
    105         create object from pickled state 
    106          
    107         :param state: the state of the current model 
    108          
    109         """ 
    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'] 
    115107         
    116108    
Note: See TracChangeset for help on using the changeset viewer.