Ignore:
Timestamp:
Jan 6, 2011 2:42:14 PM (14 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/DiamEllipFunc.py

    r35aface r96656e3  
    2828from sans_extension.c_models import CDiamEllipFunc 
    2929import copy     
    30      
     30 
     31def create_DiamEllipFunc(): 
     32    obj = DiamEllipFunc() 
     33    #CDiamEllipFunc.__init__(obj) is called by DiamEllipFunc constructor 
     34    return obj 
     35 
    3136class DiamEllipFunc(CDiamEllipFunc, BaseComponent): 
    3237    """  
     
    4651        # Initialize BaseComponent first, then sphere 
    4752        BaseComponent.__init__(self) 
     53        #apply(CDiamEllipFunc.__init__, (self,))  
    4854        CDiamEllipFunc.__init__(self) 
    4955         
     
    6975         
    7076        ## non-fittable parameters 
    71         self.non_fittable=[] 
     77        self.non_fittable = [] 
    7278         
    7379        ## parameters with orientation 
    74         self.orientation_params =[] 
     80        self.orientation_params = [] 
    7581    
     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         
    7689    def clone(self): 
    7790        """ Return a identical copy of self """ 
    7891        return self._clone(DiamEllipFunc())    
    79          
    80     def __getstate__(self): 
    81         """ 
    82         return object state for pickling and copying 
    83         """ 
    84         model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
    85          
    86         return self.__dict__, model_state 
    87          
    88     def __setstate__(self, state): 
    89         """ 
    90         create object from pickled state 
    91          
    92         :param state: the state of the current model 
    93          
    94         """ 
    95          
    96         self.__dict__, model_state = state 
    97         self.params = model_state['params'] 
    98         self.dispersion = model_state['dispersion'] 
    99         self.log = model_state['log'] 
    10092         
    10193    
Note: See TracChangeset for help on using the changeset viewer.