Changeset fe9c19b4 in sasview


Ignore:
Timestamp:
Dec 14, 2009 10:39:21 AM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
6e9976b
Parents:
7975f2b
Message:

implement set and get state

Location:
sansmodels/src/sans/models
Files:
34 edited

Legend:

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

    r27972c1d rfe9c19b4  
    2828class BinaryHSModel(CBinaryHSModel, BaseComponent): 
    2929    """ Class that evaluates a BinaryHSModel model.  
    30         This file was auto-generated from ..\c_extensions\binaryHS.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\binaryHS.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         l_radius        = 100.0 [A] 
    3535         s_radius        = 25.0 [A] 
     
    5858                background: incoherent background""" 
    5959        
    60                 ## Parameter details [units, min, max] 
     60        ## Parameter details [units, min, max] 
    6161        self.details = {} 
    6262        self.details['l_radius'] = ['[A]', None, None] 
     
    6565        self.details['vol_frac_ss'] = ['', None, None] 
    6666 
    67                 ## fittable parameters 
     67        ## fittable parameters 
    6868        self.fixed=['l_radius.width', 's_radius.width'] 
    6969         
     
    7474        """ Return a identical copy of self """ 
    7575        return self._clone(BinaryHSModel())    
     76         
     77    def __getstate__(self): 
     78        """ return object state for pickling and copying """ 
     79        print "__dict__",self.__dict__ 
     80        #self.__dict__['params'] = self.params 
     81        #self.__dict__['dispersion'] = self.dispersion 
     82        #self.__dict__['log'] = self.log 
     83        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     84         
     85        return self.__dict__, model_state 
     86         
     87    def __setstate__(self, state): 
     88        """ create object from pickled state """ 
     89         
     90        self.__dict__, model_state = state 
     91        self.params = model_state['params'] 
     92        self.dispersion = model_state['dispersion'] 
     93        self.log = model_state['log'] 
     94         
    7695    
    7796    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/BinaryHSPSF11Model.py

    r27972c1d rfe9c19b4  
    2828class BinaryHSPSF11Model(CBinaryHSPSF11Model, BaseComponent): 
    2929    """ Class that evaluates a BinaryHSPSF11Model model.  
    30         This file was auto-generated from ..\c_extensions\binaryHS_PSF11.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\binaryHS_PSF11.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         l_radius        = 160.0 [A] 
    3535         s_radius        = 25.0 [A] 
     
    6565                background: incoherent background""" 
    6666        
    67                 ## Parameter details [units, min, max] 
     67        ## Parameter details [units, min, max] 
    6868        self.details = {} 
    6969        self.details['l_radius'] = ['[A]', None, None] 
     
    7676        self.details['background'] = ['[1/cm]', None, None] 
    7777 
    78                 ## fittable parameters 
     78        ## fittable parameters 
    7979        self.fixed=['l_radius.width', 's_radius.width'] 
    8080         
     
    8585        """ Return a identical copy of self """ 
    8686        return self._clone(BinaryHSPSF11Model())    
     87         
     88    def __getstate__(self): 
     89        """ return object state for pickling and copying """ 
     90        print "__dict__",self.__dict__ 
     91        #self.__dict__['params'] = self.params 
     92        #self.__dict__['dispersion'] = self.dispersion 
     93        #self.__dict__['log'] = self.log 
     94        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     95         
     96        return self.__dict__, model_state 
     97         
     98    def __setstate__(self, state): 
     99        """ create object from pickled state """ 
     100         
     101        self.__dict__, model_state = state 
     102        self.params = model_state['params'] 
     103        self.dispersion = model_state['dispersion'] 
     104        self.log = model_state['log'] 
     105         
    87106    
    88107    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/CoreShellCylinderModel.py

    r27972c1d rfe9c19b4  
    2828class CoreShellCylinderModel(CCoreShellCylinderModel, BaseComponent): 
    2929    """ Class that evaluates a CoreShellCylinderModel model.  
    30         This file was auto-generated from ..\c_extensions\core_shell_cylinder.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\core_shell_cylinder.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         radius          = 20.0 [A] 
     
    8080                phi: the axis_phi of the cylinder...""" 
    8181        
    82                 ## Parameter details [units, min, max] 
     82        ## Parameter details [units, min, max] 
    8383        self.details = {} 
    8484        self.details['scale'] = ['', None, None] 
     
    9393        self.details['axis_phi'] = ['[rad]', None, None] 
    9494 
    95                 ## fittable parameters 
     95        ## fittable parameters 
    9696        self.fixed=['axis_phi.width', 'axis_theta.width', 'length.width', 'radius.width', 'thickness.width'] 
    9797         
     
    102102        """ Return a identical copy of self """ 
    103103        return self._clone(CoreShellCylinderModel())    
     104         
     105    def __getstate__(self): 
     106        """ return object state for pickling and copying """ 
     107        print "__dict__",self.__dict__ 
     108        #self.__dict__['params'] = self.params 
     109        #self.__dict__['dispersion'] = self.dispersion 
     110        #self.__dict__['log'] = self.log 
     111        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     112         
     113        return self.__dict__, model_state 
     114         
     115    def __setstate__(self, state): 
     116        """ create object from pickled state """ 
     117         
     118        self.__dict__, model_state = state 
     119        self.params = model_state['params'] 
     120        self.dispersion = model_state['dispersion'] 
     121        self.log = model_state['log'] 
     122         
    104123    
    105124    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/CoreShellEllipsoidModel.py

    r27972c1d rfe9c19b4  
    2828class CoreShellEllipsoidModel(CCoreShellEllipsoidModel, BaseComponent): 
    2929    """ Class that evaluates a CoreShellEllipsoidModel model.  
    30         This file was auto-generated from ..\c_extensions\spheroid.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\spheroid.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         equat_core      = 200.0 [A] 
     
    7575                prolate :  polar radius > equatorial radius""" 
    7676        
    77                 ## Parameter details [units, min, max] 
     77        ## Parameter details [units, min, max] 
    7878        self.details = {} 
    7979        self.details['scale'] = ['', None, None] 
     
    8888        self.details['axis_phi'] = ['[rad]', None, None] 
    8989 
    90                 ## fittable parameters 
     90        ## fittable parameters 
    9191        self.fixed=['equat_core.width', 'polar_core.width', 'equat_shell.width', 'polar_shell.width', 'axis_phi.width', 'axis_theta.width'] 
    9292         
     
    9797        """ Return a identical copy of self """ 
    9898        return self._clone(CoreShellEllipsoidModel())    
     99         
     100    def __getstate__(self): 
     101        """ return object state for pickling and copying """ 
     102        print "__dict__",self.__dict__ 
     103        #self.__dict__['params'] = self.params 
     104        #self.__dict__['dispersion'] = self.dispersion 
     105        #self.__dict__['log'] = self.log 
     106        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     107         
     108        return self.__dict__, model_state 
     109         
     110    def __setstate__(self, state): 
     111        """ create object from pickled state """ 
     112         
     113        self.__dict__, model_state = state 
     114        self.params = model_state['params'] 
     115        self.dispersion = model_state['dispersion'] 
     116        self.log = model_state['log'] 
     117         
    99118    
    100119    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/CoreShellModel.py

    r27972c1d rfe9c19b4  
    2828class CoreShellModel(CCoreShellModel, BaseComponent): 
    2929    """ Class that evaluates a CoreShellModel model.  
    30         This file was auto-generated from ..\c_extensions\core_shell.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\core_shell.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         radius          = 60.0 [A] 
     
    6363                John Wiley and Sons, New York, 1955.""" 
    6464        
    65                 ## Parameter details [units, min, max] 
     65        ## Parameter details [units, min, max] 
    6666        self.details = {} 
    6767        self.details['scale'] = ['', None, None] 
     
    7373        self.details['background'] = ['[1/cm]', None, None] 
    7474 
    75                 ## fittable parameters 
     75        ## fittable parameters 
    7676        self.fixed=['thickness.width', 'radius.width'] 
    7777         
     
    8282        """ Return a identical copy of self """ 
    8383        return self._clone(CoreShellModel())    
     84         
     85    def __getstate__(self): 
     86        """ return object state for pickling and copying """ 
     87        print "__dict__",self.__dict__ 
     88        #self.__dict__['params'] = self.params 
     89        #self.__dict__['dispersion'] = self.dispersion 
     90        #self.__dict__['log'] = self.log 
     91        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     92         
     93        return self.__dict__, model_state 
     94         
     95    def __setstate__(self, state): 
     96        """ create object from pickled state """ 
     97         
     98        self.__dict__, model_state = state 
     99        self.params = model_state['params'] 
     100        self.dispersion = model_state['dispersion'] 
     101        self.log = model_state['log'] 
     102         
    84103    
    85104    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/CylinderModel.py

    r27972c1d rfe9c19b4  
    2828class CylinderModel(CCylinderModel, BaseComponent): 
    2929    """ Class that evaluates a CylinderModel model.  
    30         This file was auto-generated from ..\c_extensions\cylinder.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\cylinder.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         radius          = 20.0 [A] 
     
    6666                f(q)^(2)*sin(alpha)*dalpha+ bkg""" 
    6767        
    68                 ## Parameter details [units, min, max] 
     68        ## Parameter details [units, min, max] 
    6969        self.details = {} 
    7070        self.details['scale'] = ['', None, None] 
     
    7676        self.details['cyl_phi'] = ['[rad]', None, None] 
    7777 
    78                 ## fittable parameters 
     78        ## fittable parameters 
    7979        self.fixed=['cyl_phi.width', 'cyl_theta.width', 'length.width', 'radius.width'] 
    8080         
     
    8585        """ Return a identical copy of self """ 
    8686        return self._clone(CylinderModel())    
     87         
     88    def __getstate__(self): 
     89        """ return object state for pickling and copying """ 
     90        print "__dict__",self.__dict__ 
     91        #self.__dict__['params'] = self.params 
     92        #self.__dict__['dispersion'] = self.dispersion 
     93        #self.__dict__['log'] = self.log 
     94        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     95         
     96        return self.__dict__, model_state 
     97         
     98    def __setstate__(self, state): 
     99        """ create object from pickled state """ 
     100         
     101        self.__dict__, model_state = state 
     102        self.params = model_state['params'] 
     103        self.dispersion = model_state['dispersion'] 
     104        self.log = model_state['log'] 
     105         
    87106    
    88107    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/DiamCylFunc.py

    rf9bf661 rfe9c19b4  
    2828class DiamCylFunc(CDiamCylFunc, BaseComponent): 
    2929    """ Class that evaluates a DiamCylFunc model.  
    30         This file was auto-generated from ..\c_extensions\DiamCyl.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\DiamCyl.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         radius          = 20.0 A 
    3535         length          = 400.0 A 
     
    5252                virial coefficient.""" 
    5353        
    54                 ## Parameter details [units, min, max] 
     54        ## Parameter details [units, min, max] 
    5555        self.details = {} 
    5656        self.details['radius'] = ['A', None, None] 
    5757        self.details['length'] = ['A', None, None] 
    5858 
    59                 ## fittable parameters 
     59        ## fittable parameters 
    6060        self.fixed=['radius.width', 'length.width'] 
    6161         
     
    6666        """ Return a identical copy of self """ 
    6767        return self._clone(DiamCylFunc())    
     68         
     69    def __getstate__(self): 
     70        """ return object state for pickling and copying """ 
     71        print "__dict__",self.__dict__ 
     72        #self.__dict__['params'] = self.params 
     73        #self.__dict__['dispersion'] = self.dispersion 
     74        #self.__dict__['log'] = self.log 
     75        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     76         
     77        return self.__dict__, model_state 
     78         
     79    def __setstate__(self, state): 
     80        """ create object from pickled state """ 
     81         
     82        self.__dict__, model_state = state 
     83        self.params = model_state['params'] 
     84        self.dispersion = model_state['dispersion'] 
     85        self.log = model_state['log'] 
     86         
    6887    
    6988    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/DiamEllipFunc.py

    rf9bf661 rfe9c19b4  
    2828class DiamEllipFunc(CDiamEllipFunc, BaseComponent): 
    2929    """ Class that evaluates a DiamEllipFunc model.  
    30         This file was auto-generated from ..\c_extensions\DiamEllip.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\DiamEllip.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         radius_a        = 20.0 A 
    3535         radius_b        = 400.0 A 
     
    5656                radius_a < radius_b: Oblate spheroid.""" 
    5757        
    58                 ## Parameter details [units, min, max] 
     58        ## Parameter details [units, min, max] 
    5959        self.details = {} 
    6060        self.details['radius_a'] = ['A', None, None] 
    6161        self.details['radius_b'] = ['A', None, None] 
    6262 
    63                 ## fittable parameters 
     63        ## fittable parameters 
    6464        self.fixed=['radius_a.width', 'radius_b.width'] 
    6565         
     
    7070        """ Return a identical copy of self """ 
    7171        return self._clone(DiamEllipFunc())    
     72         
     73    def __getstate__(self): 
     74        """ return object state for pickling and copying """ 
     75        print "__dict__",self.__dict__ 
     76        #self.__dict__['params'] = self.params 
     77        #self.__dict__['dispersion'] = self.dispersion 
     78        #self.__dict__['log'] = self.log 
     79        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     80         
     81        return self.__dict__, model_state 
     82         
     83    def __setstate__(self, state): 
     84        """ create object from pickled state """ 
     85         
     86        self.__dict__, model_state = state 
     87        self.params = model_state['params'] 
     88        self.dispersion = model_state['dispersion'] 
     89        self.log = model_state['log'] 
     90         
    7291    
    7392    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/EllipsoidModel.py

    r27972c1d rfe9c19b4  
    2828class EllipsoidModel(CEllipsoidModel, BaseComponent): 
    2929    """ Class that evaluates a EllipsoidModel model.  
    30         This file was auto-generated from ..\c_extensions\ellipsoid.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\ellipsoid.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         radius_a        = 20.0 [A] 
     
    7070                rotation axis of the ellipsoid""" 
    7171        
    72                 ## Parameter details [units, min, max] 
     72        ## Parameter details [units, min, max] 
    7373        self.details = {} 
    7474        self.details['scale'] = ['', None, None] 
     
    8080        self.details['axis_phi'] = ['[rad]', None, None] 
    8181 
    82                 ## fittable parameters 
     82        ## fittable parameters 
    8383        self.fixed=['axis_phi.width', 'axis_theta.width', 'radius_a.width', 'radius_b.width', 'length.width', 'r_minor.width'] 
    8484         
     
    8989        """ Return a identical copy of self """ 
    9090        return self._clone(EllipsoidModel())    
     91         
     92    def __getstate__(self): 
     93        """ return object state for pickling and copying """ 
     94        print "__dict__",self.__dict__ 
     95        #self.__dict__['params'] = self.params 
     96        #self.__dict__['dispersion'] = self.dispersion 
     97        #self.__dict__['log'] = self.log 
     98        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     99         
     100        return self.__dict__, model_state 
     101         
     102    def __setstate__(self, state): 
     103        """ create object from pickled state """ 
     104         
     105        self.__dict__, model_state = state 
     106        self.params = model_state['params'] 
     107        self.dispersion = model_state['dispersion'] 
     108        self.log = model_state['log'] 
     109         
    91110    
    92111    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/EllipticalCylinderModel.py

    r27972c1d rfe9c19b4  
    2828class EllipticalCylinderModel(CEllipticalCylinderModel, BaseComponent): 
    2929    """ Class that evaluates a EllipticalCylinderModel model.  
    30         This file was auto-generated from ..\c_extensions\elliptical_cylinder.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\elliptical_cylinder.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         r_minor         = 20.0 [A] 
     
    6060                background = incoherent background""" 
    6161        
    62                 ## Parameter details [units, min, max] 
     62        ## Parameter details [units, min, max] 
    6363        self.details = {} 
    6464        self.details['scale'] = ['', None, None] 
     
    7272        self.details['cyl_psi'] = ['[rad]', None, None] 
    7373 
    74                 ## fittable parameters 
     74        ## fittable parameters 
    7575        self.fixed=['cyl_phi.width', 'cyl_theta.width', 'cyl_psi.width', 'length.width', 'r_minor.width', 'r_ratio.width'] 
    7676         
     
    8181        """ Return a identical copy of self """ 
    8282        return self._clone(EllipticalCylinderModel())    
     83         
     84    def __getstate__(self): 
     85        """ return object state for pickling and copying """ 
     86        print "__dict__",self.__dict__ 
     87        #self.__dict__['params'] = self.params 
     88        #self.__dict__['dispersion'] = self.dispersion 
     89        #self.__dict__['log'] = self.log 
     90        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     91         
     92        return self.__dict__, model_state 
     93         
     94    def __setstate__(self, state): 
     95        """ create object from pickled state """ 
     96         
     97        self.__dict__, model_state = state 
     98        self.params = model_state['params'] 
     99        self.dispersion = model_state['dispersion'] 
     100        self.log = model_state['log'] 
     101         
    83102    
    84103    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/FlexibleCylinderModel.py

    r27972c1d rfe9c19b4  
    2828class FlexibleCylinderModel(CFlexibleCylinderModel, BaseComponent): 
    2929    """ Class that evaluates a FlexibleCylinderModel model.  
    30         This file was auto-generated from ..\c_extensions\flexible_cylinder.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\flexible_cylinder.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         length          = 1000.0 [A] 
     
    5656                during model fitting.""" 
    5757        
    58                 ## Parameter details [units, min, max] 
     58        ## Parameter details [units, min, max] 
    5959        self.details = {} 
    6060        self.details['scale'] = ['', None, None] 
     
    6565        self.details['background'] = ['[1/cm]', None, None] 
    6666 
    67                 ## fittable parameters 
     67        ## fittable parameters 
    6868        self.fixed=['length.width', 'kuhn_length.width', 'radius.width'] 
    6969         
     
    7474        """ Return a identical copy of self """ 
    7575        return self._clone(FlexibleCylinderModel())    
     76         
     77    def __getstate__(self): 
     78        """ return object state for pickling and copying """ 
     79        print "__dict__",self.__dict__ 
     80        #self.__dict__['params'] = self.params 
     81        #self.__dict__['dispersion'] = self.dispersion 
     82        #self.__dict__['log'] = self.log 
     83        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     84         
     85        return self.__dict__, model_state 
     86         
     87    def __setstate__(self, state): 
     88        """ create object from pickled state """ 
     89         
     90        self.__dict__, model_state = state 
     91        self.params = model_state['params'] 
     92        self.dispersion = model_state['dispersion'] 
     93        self.log = model_state['log'] 
     94         
    7695    
    7796    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/Gaussian.py

    rf9bf661 rfe9c19b4  
    2828class Gaussian(CGaussian, BaseComponent): 
    2929    """ Class that evaluates a Gaussian model.  
    30         This file was auto-generated from ..\c_extensions\gaussian.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\gaussian.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         sigma           = 1.0  
     
    5050        self.description ="""f(x)=scale * 1/(sigma^2*2pi)e^(-(x-mu)^2/2sigma^2)""" 
    5151        
    52                 ## Parameter details [units, min, max] 
     52        ## Parameter details [units, min, max] 
    5353        self.details = {} 
    5454        self.details['scale'] = ['', None, None] 
     
    5656        self.details['center'] = ['', None, None] 
    5757 
    58                 ## fittable parameters 
     58        ## fittable parameters 
    5959        self.fixed=[] 
    6060         
     
    6565        """ Return a identical copy of self """ 
    6666        return self._clone(Gaussian())    
     67         
     68    def __getstate__(self): 
     69        """ return object state for pickling and copying """ 
     70        print "__dict__",self.__dict__ 
     71        #self.__dict__['params'] = self.params 
     72        #self.__dict__['dispersion'] = self.dispersion 
     73        #self.__dict__['log'] = self.log 
     74        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     75         
     76        return self.__dict__, model_state 
     77         
     78    def __setstate__(self, state): 
     79        """ create object from pickled state """ 
     80         
     81        self.__dict__, model_state = state 
     82        self.params = model_state['params'] 
     83        self.dispersion = model_state['dispersion'] 
     84        self.log = model_state['log'] 
     85         
    6786    
    6887    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/HardsphereStructure.py

    rf9bf661 rfe9c19b4  
    2828class HardsphereStructure(CHardsphereStructure, BaseComponent): 
    2929    """ Class that evaluates a HardsphereStructure model.  
    30         This file was auto-generated from ..\c_extensions\Hardsphere.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\Hardsphere.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         effect_radius   = 50.0 [A] 
    3535         volfraction     = 0.2  
     
    6060                Rev. 1958, 110, 1.""" 
    6161        
    62                 ## Parameter details [units, min, max] 
     62        ## Parameter details [units, min, max] 
    6363        self.details = {} 
    6464        self.details['effect_radius'] = ['[A]', None, None] 
    6565        self.details['volfraction'] = ['', None, None] 
    6666 
    67                 ## fittable parameters 
     67        ## fittable parameters 
    6868        self.fixed=['effect_radius.width'] 
    6969         
     
    7474        """ Return a identical copy of self """ 
    7575        return self._clone(HardsphereStructure())    
     76         
     77    def __getstate__(self): 
     78        """ return object state for pickling and copying """ 
     79        print "__dict__",self.__dict__ 
     80        #self.__dict__['params'] = self.params 
     81        #self.__dict__['dispersion'] = self.dispersion 
     82        #self.__dict__['log'] = self.log 
     83        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     84         
     85        return self.__dict__, model_state 
     86         
     87    def __setstate__(self, state): 
     88        """ create object from pickled state """ 
     89         
     90        self.__dict__, model_state = state 
     91        self.params = model_state['params'] 
     92        self.dispersion = model_state['dispersion'] 
     93        self.log = model_state['log'] 
     94         
    7695    
    7796    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/HayterMSAStructure.py

    rf9bf661 rfe9c19b4  
    2828class HayterMSAStructure(CHayterMSAStructure, BaseComponent): 
    2929    """ Class that evaluates a HayterMSAStructure model.  
    30         This file was auto-generated from ..\c_extensions\HayterMSA.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\HayterMSA.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         effect_radius   = 20.75 [A] 
    3535         charge          = 19.0  
     
    6666                """ 
    6767        
    68                 ## Parameter details [units, min, max] 
     68        ## Parameter details [units, min, max] 
    6969        self.details = {} 
    7070        self.details['effect_radius'] = ['[A]', None, None] 
     
    7575        self.details['dielectconst'] = ['', None, None] 
    7676 
    77                 ## fittable parameters 
     77        ## fittable parameters 
    7878        self.fixed=['effect_radius.width'] 
    7979         
     
    8484        """ Return a identical copy of self """ 
    8585        return self._clone(HayterMSAStructure())    
     86         
     87    def __getstate__(self): 
     88        """ return object state for pickling and copying """ 
     89        print "__dict__",self.__dict__ 
     90        #self.__dict__['params'] = self.params 
     91        #self.__dict__['dispersion'] = self.dispersion 
     92        #self.__dict__['log'] = self.log 
     93        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     94         
     95        return self.__dict__, model_state 
     96         
     97    def __setstate__(self, state): 
     98        """ create object from pickled state """ 
     99         
     100        self.__dict__, model_state = state 
     101        self.params = model_state['params'] 
     102        self.dispersion = model_state['dispersion'] 
     103        self.log = model_state['log'] 
     104         
    86105    
    87106    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/HollowCylinderModel.py

    r27972c1d rfe9c19b4  
    2828class HollowCylinderModel(CHollowCylinderModel, BaseComponent): 
    2929    """ Class that evaluates a HollowCylinderModel model.  
    30         This file was auto-generated from ..\c_extensions\hollow_cylinder.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\hollow_cylinder.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         core_radius     = 20.0 [A] 
     
    6060                background = incoherent background""" 
    6161        
    62                 ## Parameter details [units, min, max] 
     62        ## Parameter details [units, min, max] 
    6363        self.details = {} 
    6464        self.details['scale'] = ['', None, None] 
     
    7171        self.details['axis_phi'] = ['[rad]', None, None] 
    7272 
    73                 ## fittable parameters 
     73        ## fittable parameters 
    7474        self.fixed=['axis_phi.width', 'axis_theta.width', 'length.width', 'core_radius.width', 'radius'] 
    7575         
     
    8080        """ Return a identical copy of self """ 
    8181        return self._clone(HollowCylinderModel())    
     82         
     83    def __getstate__(self): 
     84        """ return object state for pickling and copying """ 
     85        print "__dict__",self.__dict__ 
     86        #self.__dict__['params'] = self.params 
     87        #self.__dict__['dispersion'] = self.dispersion 
     88        #self.__dict__['log'] = self.log 
     89        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     90         
     91        return self.__dict__, model_state 
     92         
     93    def __setstate__(self, state): 
     94        """ create object from pickled state """ 
     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'] 
     100         
    82101    
    83102    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/LamellarFFHGModel.py

    r27972c1d rfe9c19b4  
    2828class LamellarFFHGModel(CLamellarFFHGModel, BaseComponent): 
    2929    """ Class that evaluates a LamellarFFHGModel model.  
    30         This file was auto-generated from ..\c_extensions\lamellarFF_HG.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\lamellarFF_HG.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         t_length        = 15.0 [A] 
     
    6161                """ 
    6262        
    63                 ## Parameter details [units, min, max] 
     63        ## Parameter details [units, min, max] 
    6464        self.details = {} 
    6565        self.details['scale'] = ['', None, None] 
     
    7171        self.details['background'] = ['[1/cm]', None, None] 
    7272 
    73                 ## fittable parameters 
     73        ## fittable parameters 
    7474        self.fixed=['t_length.width', 'h_thickness.width'] 
    7575         
     
    8080        """ Return a identical copy of self """ 
    8181        return self._clone(LamellarFFHGModel())    
     82         
     83    def __getstate__(self): 
     84        """ return object state for pickling and copying """ 
     85        print "__dict__",self.__dict__ 
     86        #self.__dict__['params'] = self.params 
     87        #self.__dict__['dispersion'] = self.dispersion 
     88        #self.__dict__['log'] = self.log 
     89        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     90         
     91        return self.__dict__, model_state 
     92         
     93    def __setstate__(self, state): 
     94        """ create object from pickled state """ 
     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'] 
     100         
    82101    
    83102    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/LamellarModel.py

    r27972c1d rfe9c19b4  
    2828class LamellarModel(CLamellarModel, BaseComponent): 
    2929    """ Class that evaluates a LamellarModel model.  
    30         This file was auto-generated from ..\c_extensions\lamellar.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\lamellar.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         bi_thick        = 50.0 [A] 
     
    6060                """ 
    6161        
    62                 ## Parameter details [units, min, max] 
     62        ## Parameter details [units, min, max] 
    6363        self.details = {} 
    6464        self.details['scale'] = ['', None, None] 
     
    6868        self.details['background'] = ['[1/cm]', None, None] 
    6969 
    70                 ## fittable parameters 
     70        ## fittable parameters 
    7171        self.fixed=[] 
    7272         
     
    7777        """ Return a identical copy of self """ 
    7878        return self._clone(LamellarModel())    
     79         
     80    def __getstate__(self): 
     81        """ return object state for pickling and copying """ 
     82        print "__dict__",self.__dict__ 
     83        #self.__dict__['params'] = self.params 
     84        #self.__dict__['dispersion'] = self.dispersion 
     85        #self.__dict__['log'] = self.log 
     86        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     87         
     88        return self.__dict__, model_state 
     89         
     90    def __setstate__(self, state): 
     91        """ create object from pickled state """ 
     92         
     93        self.__dict__, model_state = state 
     94        self.params = model_state['params'] 
     95        self.dispersion = model_state['dispersion'] 
     96        self.log = model_state['log'] 
     97         
    7998    
    8099    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/LamellarPSHGModel.py

    r27972c1d rfe9c19b4  
    2828class LamellarPSHGModel(CLamellarPSHGModel, BaseComponent): 
    2929    """ Class that evaluates a LamellarPSHGModel model.  
    30         This file was auto-generated from ..\c_extensions\lamellarPS_HG.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\lamellarPS_HG.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         spacing         = 40.0 [A] 
     
    7575                scale = scale factor ...""" 
    7676        
    77                 ## Parameter details [units, min, max] 
     77        ## Parameter details [units, min, max] 
    7878        self.details = {} 
    7979        self.details['scale'] = ['', None, None] 
     
    8888        self.details['background'] = ['[1/cm]', None, None] 
    8989 
    90                 ## fittable parameters 
     90        ## fittable parameters 
    9191        self.fixed=['deltaT.width', 'deltaH.width', 'spacing.width'] 
    9292         
     
    9797        """ Return a identical copy of self """ 
    9898        return self._clone(LamellarPSHGModel())    
     99         
     100    def __getstate__(self): 
     101        """ return object state for pickling and copying """ 
     102        print "__dict__",self.__dict__ 
     103        #self.__dict__['params'] = self.params 
     104        #self.__dict__['dispersion'] = self.dispersion 
     105        #self.__dict__['log'] = self.log 
     106        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     107         
     108        return self.__dict__, model_state 
     109         
     110    def __setstate__(self, state): 
     111        """ create object from pickled state """ 
     112         
     113        self.__dict__, model_state = state 
     114        self.params = model_state['params'] 
     115        self.dispersion = model_state['dispersion'] 
     116        self.log = model_state['log'] 
     117         
    99118    
    100119    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/LamellarPSModel.py

    r27972c1d rfe9c19b4  
    2828class LamellarPSModel(CLamellarPSModel, BaseComponent): 
    2929    """ Class that evaluates a LamellarPSModel model.  
    30         This file was auto-generated from ..\c_extensions\lamellarPS.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\lamellarPS.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         spacing         = 400.0 [A] 
     
    7171                scale = scale factor""" 
    7272        
    73                 ## Parameter details [units, min, max] 
     73        ## Parameter details [units, min, max] 
    7474        self.details = {} 
    7575        self.details['scale'] = ['', None, None] 
     
    8181        self.details['background'] = ['[1/cm]', None, None] 
    8282 
    83                 ## fittable parameters 
     83        ## fittable parameters 
    8484        self.fixed=['delta.width', 'spacing.width'] 
    8585         
     
    9090        """ Return a identical copy of self """ 
    9191        return self._clone(LamellarPSModel())    
     92         
     93    def __getstate__(self): 
     94        """ return object state for pickling and copying """ 
     95        print "__dict__",self.__dict__ 
     96        #self.__dict__['params'] = self.params 
     97        #self.__dict__['dispersion'] = self.dispersion 
     98        #self.__dict__['log'] = self.log 
     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        """ create object from pickled state """ 
     105         
     106        self.__dict__, model_state = state 
     107        self.params = model_state['params'] 
     108        self.dispersion = model_state['dispersion'] 
     109        self.log = model_state['log'] 
     110         
    92111    
    93112    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/LogNormal.py

    r27972c1d rfe9c19b4  
    2828class LogNormal(CLogNormal, BaseComponent): 
    2929    """ Class that evaluates a LogNormal model.  
    30         This file was auto-generated from ..\c_extensions\logNormal.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\logNormal.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         sigma           = 1.0  
     
    5050        self.description ="""f(x)=scale * 1/(sigma*math.sqrt(2pi))e^(-1/2*((math.log(x)-mu)/sigma)^2)""" 
    5151        
    52                 ## Parameter details [units, min, max] 
     52        ## Parameter details [units, min, max] 
    5353        self.details = {} 
    5454        self.details['scale'] = ['', None, None] 
     
    5656        self.details['center'] = ['', None, None] 
    5757 
    58                 ## fittable parameters 
     58        ## fittable parameters 
    5959        self.fixed=[] 
    6060         
     
    6565        """ Return a identical copy of self """ 
    6666        return self._clone(LogNormal())    
     67         
     68    def __getstate__(self): 
     69        """ return object state for pickling and copying """ 
     70        print "__dict__",self.__dict__ 
     71        #self.__dict__['params'] = self.params 
     72        #self.__dict__['dispersion'] = self.dispersion 
     73        #self.__dict__['log'] = self.log 
     74        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     75         
     76        return self.__dict__, model_state 
     77         
     78    def __setstate__(self, state): 
     79        """ create object from pickled state """ 
     80         
     81        self.__dict__, model_state = state 
     82        self.params = model_state['params'] 
     83        self.dispersion = model_state['dispersion'] 
     84        self.log = model_state['log'] 
     85         
    6786    
    6887    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/Lorentzian.py

    r27972c1d rfe9c19b4  
    2828class Lorentzian(CLorentzian, BaseComponent): 
    2929    """ Class that evaluates a Lorentzian model.  
    30         This file was auto-generated from ..\c_extensions\lorentzian.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\lorentzian.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         gamma           = 1.0  
     
    5050        self.description ="""f(x)=scale * 1/pi 0.5gamma / [ (x-x_0)^2 + (0.5gamma)^2 ]""" 
    5151        
    52                 ## Parameter details [units, min, max] 
     52        ## Parameter details [units, min, max] 
    5353        self.details = {} 
    5454        self.details['scale'] = ['', None, None] 
     
    5656        self.details['center'] = ['', None, None] 
    5757 
    58                 ## fittable parameters 
     58        ## fittable parameters 
    5959        self.fixed=[] 
    6060         
     
    6565        """ Return a identical copy of self """ 
    6666        return self._clone(Lorentzian())    
     67         
     68    def __getstate__(self): 
     69        """ return object state for pickling and copying """ 
     70        print "__dict__",self.__dict__ 
     71        #self.__dict__['params'] = self.params 
     72        #self.__dict__['dispersion'] = self.dispersion 
     73        #self.__dict__['log'] = self.log 
     74        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     75         
     76        return self.__dict__, model_state 
     77         
     78    def __setstate__(self, state): 
     79        """ create object from pickled state """ 
     80         
     81        self.__dict__, model_state = state 
     82        self.params = model_state['params'] 
     83        self.dispersion = model_state['dispersion'] 
     84        self.log = model_state['log'] 
     85         
    6786    
    6887    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/MultiShellModel.py

    r27972c1d rfe9c19b4  
    2828class MultiShellModel(CMultiShellModel, BaseComponent): 
    2929    """ Class that evaluates a MultiShellModel model.  
    30         This file was auto-generated from ..\c_extensions\multishell.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\multishell.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         core_radius     = 60.0 [A] 
     
    6363                background: incoherent background""" 
    6464        
    65                 ## Parameter details [units, min, max] 
     65        ## Parameter details [units, min, max] 
    6666        self.details = {} 
    6767        self.details['scale'] = ['', None, None] 
     
    7474        self.details['background'] = ['[1/cm]', None, None] 
    7575 
    76                 ## fittable parameters 
     76        ## fittable parameters 
    7777        self.fixed=['core_radius.width', 's_thickness.width', 'w_thickness.width'] 
    7878         
     
    8383        """ Return a identical copy of self """ 
    8484        return self._clone(MultiShellModel())    
     85         
     86    def __getstate__(self): 
     87        """ return object state for pickling and copying """ 
     88        print "__dict__",self.__dict__ 
     89        #self.__dict__['params'] = self.params 
     90        #self.__dict__['dispersion'] = self.dispersion 
     91        #self.__dict__['log'] = self.log 
     92        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     93         
     94        return self.__dict__, model_state 
     95         
     96    def __setstate__(self, state): 
     97        """ create object from pickled state """ 
     98         
     99        self.__dict__, model_state = state 
     100        self.params = model_state['params'] 
     101        self.dispersion = model_state['dispersion'] 
     102        self.log = model_state['log'] 
     103         
    85104    
    86105    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/MultiplicationModel.py

    r1affe64 rfe9c19b4  
    5858        obj.p_model  = self.p_model.clone() 
    5959        obj.s_model  = self.s_model.clone() 
    60          
     60        #obj = copy.deepcopy(self) 
    6161        return obj 
    6262     
  • sansmodels/src/sans/models/OblateModel.py

    r27972c1d rfe9c19b4  
    2828class OblateModel(COblateModel, BaseComponent): 
    2929    """ Class that evaluates a OblateModel model.  
    30         This file was auto-generated from ..\c_extensions\oblate.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\oblate.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         major_core      = 200.0 [A] 
     
    7373                that shell radii are larger than core radii.""" 
    7474        
    75                 ## Parameter details [units, min, max] 
     75        ## Parameter details [units, min, max] 
    7676        self.details = {} 
    7777        self.details['scale'] = ['', None, None] 
     
    8686        self.details['axis_phi'] = ['[rad]', None, None] 
    8787 
    88                 ## fittable parameters 
     88        ## fittable parameters 
    8989        self.fixed=['major_core.width', 'minor_core.width', 'major_shell.width', 'minor_shell.width'] 
    9090         
     
    9595        """ Return a identical copy of self """ 
    9696        return self._clone(OblateModel())    
     97         
     98    def __getstate__(self): 
     99        """ return object state for pickling and copying """ 
     100        print "__dict__",self.__dict__ 
     101        #self.__dict__['params'] = self.params 
     102        #self.__dict__['dispersion'] = self.dispersion 
     103        #self.__dict__['log'] = self.log 
     104        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     105         
     106        return self.__dict__, model_state 
     107         
     108    def __setstate__(self, state): 
     109        """ create object from pickled state """ 
     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'] 
     115         
    97116    
    98117    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/ParallelepipedModel.py

    r27972c1d rfe9c19b4  
    2828class ParallelepipedModel(CParallelepipedModel, BaseComponent): 
    2929    """ Class that evaluates a ParallelepipedModel model.  
    30         This file was auto-generated from ..\c_extensions\parallelepiped.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\parallelepiped.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         short_a         = 35.0 [A] 
     
    6363                background:Incoherent Background [1/cm]""" 
    6464        
    65                 ## Parameter details [units, min, max] 
     65        ## Parameter details [units, min, max] 
    6666        self.details = {} 
    6767        self.details['scale'] = ['', None, None] 
     
    7575        self.details['parallel_psi'] = ['[rad]', None, None] 
    7676 
    77                 ## fittable parameters 
     77        ## fittable parameters 
    7878        self.fixed=['short_a.width', 'short_b.width', 'long_c.width', 'parallel_phi.width', 'parallel_psi.width', 'parallel_theta.width'] 
    7979         
     
    8484        """ Return a identical copy of self """ 
    8585        return self._clone(ParallelepipedModel())    
     86         
     87    def __getstate__(self): 
     88        """ return object state for pickling and copying """ 
     89        print "__dict__",self.__dict__ 
     90        #self.__dict__['params'] = self.params 
     91        #self.__dict__['dispersion'] = self.dispersion 
     92        #self.__dict__['log'] = self.log 
     93        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     94         
     95        return self.__dict__, model_state 
     96         
     97    def __setstate__(self, state): 
     98        """ create object from pickled state """ 
     99         
     100        self.__dict__, model_state = state 
     101        self.params = model_state['params'] 
     102        self.dispersion = model_state['dispersion'] 
     103        self.log = model_state['log'] 
     104         
    86105    
    87106    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/ProlateModel.py

    r27972c1d rfe9c19b4  
    2828class ProlateModel(CProlateModel, BaseComponent): 
    2929    """ Class that evaluates a ProlateModel model.  
    30         This file was auto-generated from ..\c_extensions\prolate.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\prolate.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         major_core      = 100.0 [A] 
     
    7171                that shell radii are larger than core radii.""" 
    7272        
    73                 ## Parameter details [units, min, max] 
     73        ## Parameter details [units, min, max] 
    7474        self.details = {} 
    7575        self.details['scale'] = ['', None, None] 
     
    8282        self.details['background'] = ['[1/cm]', None, None] 
    8383 
    84                 ## fittable parameters 
     84        ## fittable parameters 
    8585        self.fixed=['major_core.width', 'minor_core.width', 'major_shell.width', 'minor_shell.width'] 
    8686         
     
    9191        """ Return a identical copy of self """ 
    9292        return self._clone(ProlateModel())    
     93         
     94    def __getstate__(self): 
     95        """ return object state for pickling and copying """ 
     96        print "__dict__",self.__dict__ 
     97        #self.__dict__['params'] = self.params 
     98        #self.__dict__['dispersion'] = self.dispersion 
     99        #self.__dict__['log'] = self.log 
     100        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     101         
     102        return self.__dict__, model_state 
     103         
     104    def __setstate__(self, state): 
     105        """ create object from pickled state """ 
     106         
     107        self.__dict__, model_state = state 
     108        self.params = model_state['params'] 
     109        self.dispersion = model_state['dispersion'] 
     110        self.log = model_state['log'] 
     111         
    93112    
    94113    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/Schulz.py

    rc5607fa rfe9c19b4  
    1717 
    1818        WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 
    19                  DO NOT MODIFY THIS FILE, MODIFY ../c_extensions/schulz.h 
     19                 DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\schulz.h 
    2020                 AND RE-RUN THE GENERATOR SCRIPT 
    2121 
     
    2828class Schulz(CSchulz, BaseComponent): 
    2929    """ Class that evaluates a Schulz model.  
    30         This file was auto-generated from ../c_extensions/schulz.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\schulz.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         sigma           = 1.0  
     
    5252                z= math.pow[(1/(sigma/center),2]-1""" 
    5353        
    54                 ## Parameter details [units, min, max] 
     54        ## Parameter details [units, min, max] 
    5555        self.details = {} 
    5656        self.details['scale'] = ['', None, None] 
     
    5858        self.details['center'] = ['', None, None] 
    5959 
    60                 ## fittable parameters 
     60        ## fittable parameters 
    6161        self.fixed=[] 
    6262         
     
    6767        """ Return a identical copy of self """ 
    6868        return self._clone(Schulz())    
     69         
     70    def __getstate__(self): 
     71        """ return object state for pickling and copying """ 
     72        print "__dict__",self.__dict__ 
     73        #self.__dict__['params'] = self.params 
     74        #self.__dict__['dispersion'] = self.dispersion 
     75        #self.__dict__['log'] = self.log 
     76        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     77         
     78        return self.__dict__, model_state 
     79         
     80    def __setstate__(self, state): 
     81        """ create object from pickled state """ 
     82         
     83        self.__dict__, model_state = state 
     84        self.params = model_state['params'] 
     85        self.dispersion = model_state['dispersion'] 
     86        self.log = model_state['log'] 
     87         
    6988    
    7089    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/SphereModel.py

    r27972c1d rfe9c19b4  
    2828class SphereModel(CSphereModel, BaseComponent): 
    2929    """ Class that evaluates a SphereModel model.  
    30         This file was auto-generated from ..\c_extensions\sphere.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\sphere.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         radius          = 60.0 [A] 
     
    6060                """ 
    6161        
    62                 ## Parameter details [units, min, max] 
     62        ## Parameter details [units, min, max] 
    6363        self.details = {} 
    6464        self.details['scale'] = ['', None, None] 
     
    6767        self.details['background'] = ['[1/cm]', None, None] 
    6868 
    69                 ## fittable parameters 
     69        ## fittable parameters 
    7070        self.fixed=['radius.width'] 
    7171         
     
    7676        """ Return a identical copy of self """ 
    7777        return self._clone(SphereModel())    
     78         
     79    def __getstate__(self): 
     80        """ return object state for pickling and copying """ 
     81        print "__dict__",self.__dict__ 
     82        #self.__dict__['params'] = self.params 
     83        #self.__dict__['dispersion'] = self.dispersion 
     84        #self.__dict__['log'] = self.log 
     85        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     86         
     87        return self.__dict__, model_state 
     88         
     89    def __setstate__(self, state): 
     90        """ create object from pickled state """ 
     91         
     92        self.__dict__, model_state = state 
     93        self.params = model_state['params'] 
     94        self.dispersion = model_state['dispersion'] 
     95        self.log = model_state['log'] 
     96         
    7897    
    7998    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/SquareWellStructure.py

    rf9bf661 rfe9c19b4  
    2828class SquareWellStructure(CSquareWellStructure, BaseComponent): 
    2929    """ Class that evaluates a SquareWellStructure model.  
    30         This file was auto-generated from ..\c_extensions\SquareWell.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\SquareWell.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         effect_radius   = 50.0 [A] 
    3535         volfraction     = 0.04  
     
    6666                K. C., Physica, 1977, 89A, 213.""" 
    6767        
    68                 ## Parameter details [units, min, max] 
     68        ## Parameter details [units, min, max] 
    6969        self.details = {} 
    7070        self.details['effect_radius'] = ['[A]', None, None] 
     
    7373        self.details['wellwidth'] = ['', None, None] 
    7474 
    75                 ## fittable parameters 
     75        ## fittable parameters 
    7676        self.fixed=['effect_radius.width'] 
    7777         
     
    8282        """ Return a identical copy of self """ 
    8383        return self._clone(SquareWellStructure())    
     84         
     85    def __getstate__(self): 
     86        """ return object state for pickling and copying """ 
     87        print "__dict__",self.__dict__ 
     88        #self.__dict__['params'] = self.params 
     89        #self.__dict__['dispersion'] = self.dispersion 
     90        #self.__dict__['log'] = self.log 
     91        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     92         
     93        return self.__dict__, model_state 
     94         
     95    def __setstate__(self, state): 
     96        """ create object from pickled state """ 
     97         
     98        self.__dict__, model_state = state 
     99        self.params = model_state['params'] 
     100        self.dispersion = model_state['dispersion'] 
     101        self.log = model_state['log'] 
     102         
    84103    
    85104    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/StackedDisksModel.py

    r27972c1d rfe9c19b4  
    2828class StackedDisksModel(CStackedDisksModel, BaseComponent): 
    2929    """ Class that evaluates a StackedDisksModel model.  
    30         This file was auto-generated from ..\c_extensions\stacked_disks.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\stacked_disks.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 0.01  
    3535         radius          = 3000.0 [A] 
     
    6767                solvent_sld = the SLD of the solvent""" 
    6868        
    69                 ## Parameter details [units, min, max] 
     69        ## Parameter details [units, min, max] 
    7070        self.details = {} 
    7171        self.details['scale'] = ['', None, None] 
     
    8282        self.details['axis_phi'] = ['[rad]', None, None] 
    8383 
    84                 ## fittable parameters 
     84        ## fittable parameters 
    8585        self.fixed=['core_thick.width', 'layer_thick.width', 'radius.width', 'axis_theta.width', 'axis_phi.width'] 
    8686         
     
    9191        """ Return a identical copy of self """ 
    9292        return self._clone(StackedDisksModel())    
     93         
     94    def __getstate__(self): 
     95        """ return object state for pickling and copying """ 
     96        print "__dict__",self.__dict__ 
     97        #self.__dict__['params'] = self.params 
     98        #self.__dict__['dispersion'] = self.dispersion 
     99        #self.__dict__['log'] = self.log 
     100        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     101         
     102        return self.__dict__, model_state 
     103         
     104    def __setstate__(self, state): 
     105        """ create object from pickled state """ 
     106         
     107        self.__dict__, model_state = state 
     108        self.params = model_state['params'] 
     109        self.dispersion = model_state['dispersion'] 
     110        self.log = model_state['log'] 
     111         
    93112    
    94113    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/StickyHSStructure.py

    rf9bf661 rfe9c19b4  
    2828class StickyHSStructure(CStickyHSStructure, BaseComponent): 
    2929    """ Class that evaluates a StickyHSStructure model.  
    30         This file was auto-generated from ..\c_extensions\StickyHS.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\StickyHS.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         effect_radius   = 50.0 [A] 
    3535         volfraction     = 0.1  
     
    6666                Phys., 1991, 95(12), 9186-9190.""" 
    6767        
    68                 ## Parameter details [units, min, max] 
     68        ## Parameter details [units, min, max] 
    6969        self.details = {} 
    7070        self.details['effect_radius'] = ['[A]', None, None] 
     
    7373        self.details['stickiness'] = ['', None, None] 
    7474 
    75                 ## fittable parameters 
     75        ## fittable parameters 
    7676        self.fixed=['effect_radius.width'] 
    7777         
     
    8282        """ Return a identical copy of self """ 
    8383        return self._clone(StickyHSStructure())    
     84         
     85    def __getstate__(self): 
     86        """ return object state for pickling and copying """ 
     87        print "__dict__",self.__dict__ 
     88        #self.__dict__['params'] = self.params 
     89        #self.__dict__['dispersion'] = self.dispersion 
     90        #self.__dict__['log'] = self.log 
     91        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     92         
     93        return self.__dict__, model_state 
     94         
     95    def __setstate__(self, state): 
     96        """ create object from pickled state """ 
     97         
     98        self.__dict__, model_state = state 
     99        self.params = model_state['params'] 
     100        self.dispersion = model_state['dispersion'] 
     101        self.log = model_state['log'] 
     102         
    84103    
    85104    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/TriaxialEllipsoidModel.py

    r27972c1d rfe9c19b4  
    2828class TriaxialEllipsoidModel(CTriaxialEllipsoidModel, BaseComponent): 
    2929    """ Class that evaluates a TriaxialEllipsoidModel model.  
    30         This file was auto-generated from ..\c_extensions\triaxial_ellipsoid.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\triaxial_ellipsoid.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         semi_axisA      = 35.0 [A] 
     
    5858                not be correct.""" 
    5959        
    60                 ## Parameter details [units, min, max] 
     60        ## Parameter details [units, min, max] 
    6161        self.details = {} 
    6262        self.details['scale'] = ['', None, None] 
     
    7070        self.details['axis_psi'] = ['[rad]', None, None] 
    7171 
    72                 ## fittable parameters 
     72        ## fittable parameters 
    7373        self.fixed=['axis_psi.width', 'axis_phi.width', 'axis_theta.width', 'semi_axisA.width', 'semi_axisB.width', 'semi_axisC.width'] 
    7474         
     
    7979        """ Return a identical copy of self """ 
    8080        return self._clone(TriaxialEllipsoidModel())    
     81         
     82    def __getstate__(self): 
     83        """ return object state for pickling and copying """ 
     84        print "__dict__",self.__dict__ 
     85        #self.__dict__['params'] = self.params 
     86        #self.__dict__['dispersion'] = self.dispersion 
     87        #self.__dict__['log'] = self.log 
     88        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     89         
     90        return self.__dict__, model_state 
     91         
     92    def __setstate__(self, state): 
     93        """ create object from pickled state """ 
     94         
     95        self.__dict__, model_state = state 
     96        self.params = model_state['params'] 
     97        self.dispersion = model_state['dispersion'] 
     98        self.log = model_state['log'] 
     99         
    81100    
    82101    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/VesicleModel.py

    r27972c1d rfe9c19b4  
    2828class VesicleModel(CVesicleModel, BaseComponent): 
    2929    """ Class that evaluates a VesicleModel model.  
    30         This file was auto-generated from ..\c_extensions\vesicle.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     30        This file was auto-generated from ..\c_extensions\vesicle.h. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        List of default parameters: 
    3434         scale           = 1.0  
    3535         radius          = 100.0 [A] 
     
    5858                scale : scale factor""" 
    5959        
    60                 ## Parameter details [units, min, max] 
     60        ## Parameter details [units, min, max] 
    6161        self.details = {} 
    6262        self.details['scale'] = ['', None, None] 
     
    6767        self.details['background'] = ['[1/cm]', None, None] 
    6868 
    69                 ## fittable parameters 
     69        ## fittable parameters 
    7070        self.fixed=['radius.width', 'thickness.width'] 
    7171         
     
    7676        """ Return a identical copy of self """ 
    7777        return self._clone(VesicleModel())    
     78         
     79    def __getstate__(self): 
     80        """ return object state for pickling and copying """ 
     81        print "__dict__",self.__dict__ 
     82        #self.__dict__['params'] = self.params 
     83        #self.__dict__['dispersion'] = self.dispersion 
     84        #self.__dict__['log'] = self.log 
     85        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     86         
     87        return self.__dict__, model_state 
     88         
     89    def __setstate__(self, state): 
     90        """ create object from pickled state """ 
     91         
     92        self.__dict__, model_state = state 
     93        self.params = model_state['params'] 
     94        self.dispersion = model_state['dispersion'] 
     95        self.log = model_state['log'] 
     96         
    7897    
    7998    def run(self, x = 0.0): 
  • sansmodels/src/sans/models/c_models/modelTemplate.txt

    rf9bf661 rfe9c19b4  
    2828class [PYTHONCLASS]([CPYTHONCLASS], BaseComponent): 
    2929    """ Class that evaluates a [PYTHONCLASS] model.  
    30         This file was auto-generated from [INCLUDE_FILE]. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         [DEFAULT_LIST] 
     30        This file was auto-generated from [INCLUDE_FILE]. 
     31        Refer to that file and the structure it contains 
     32        for details of the model. 
     33        [DEFAULT_LIST] 
    3434    """ 
    3535         
     
    4646        self.description ="""[DESCRIPTION]""" 
    4747        
    48                 [PAR_DETAILS] 
    49                 ## fittable parameters 
     48        [PAR_DETAILS] 
     49        ## fittable parameters 
    5050        self.fixed=[FIXED] 
    5151         
     
    5656        """ Return a identical copy of self """ 
    5757        return self._clone([PYTHONCLASS]())    
     58         
     59    def __getstate__(self): 
     60        """ return object state for pickling and copying """ 
     61        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
     62         
     63        return self.__dict__, model_state 
     64         
     65    def __setstate__(self, state): 
     66        """ create object from pickled state """ 
     67         
     68        self.__dict__, model_state = state 
     69        self.params = model_state['params'] 
     70        self.dispersion = model_state['dispersion'] 
     71        self.log = model_state['log'] 
     72         
    5873    
    5974    def run(self, x = 0.0): 
Note: See TracChangeset for help on using the changeset viewer.