Changeset fe9c19b4 in sasview
- Timestamp:
- Dec 14, 2009 10:39:21 AM (15 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:
- 6e9976b
- Parents:
- 7975f2b
- Location:
- sansmodels/src/sans/models
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/BinaryHSModel.py
r27972c1d rfe9c19b4 28 28 class BinaryHSModel(CBinaryHSModel, BaseComponent): 29 29 """ Class that evaluates a BinaryHSModel model. 30 31 32 33 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: 34 34 l_radius = 100.0 [A] 35 35 s_radius = 25.0 [A] … … 58 58 background: incoherent background""" 59 59 60 60 ## Parameter details [units, min, max] 61 61 self.details = {} 62 62 self.details['l_radius'] = ['[A]', None, None] … … 65 65 self.details['vol_frac_ss'] = ['', None, None] 66 66 67 67 ## fittable parameters 68 68 self.fixed=['l_radius.width', 's_radius.width'] 69 69 … … 74 74 """ Return a identical copy of self """ 75 75 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 76 95 77 96 def run(self, x = 0.0): -
sansmodels/src/sans/models/BinaryHSPSF11Model.py
r27972c1d rfe9c19b4 28 28 class BinaryHSPSF11Model(CBinaryHSPSF11Model, BaseComponent): 29 29 """ Class that evaluates a BinaryHSPSF11Model model. 30 31 32 33 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: 34 34 l_radius = 160.0 [A] 35 35 s_radius = 25.0 [A] … … 65 65 background: incoherent background""" 66 66 67 67 ## Parameter details [units, min, max] 68 68 self.details = {} 69 69 self.details['l_radius'] = ['[A]', None, None] … … 76 76 self.details['background'] = ['[1/cm]', None, None] 77 77 78 78 ## fittable parameters 79 79 self.fixed=['l_radius.width', 's_radius.width'] 80 80 … … 85 85 """ Return a identical copy of self """ 86 86 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 87 106 88 107 def run(self, x = 0.0): -
sansmodels/src/sans/models/CoreShellCylinderModel.py
r27972c1d rfe9c19b4 28 28 class CoreShellCylinderModel(CCoreShellCylinderModel, BaseComponent): 29 29 """ Class that evaluates a CoreShellCylinderModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 radius = 20.0 [A] … … 80 80 phi: the axis_phi of the cylinder...""" 81 81 82 82 ## Parameter details [units, min, max] 83 83 self.details = {} 84 84 self.details['scale'] = ['', None, None] … … 93 93 self.details['axis_phi'] = ['[rad]', None, None] 94 94 95 95 ## fittable parameters 96 96 self.fixed=['axis_phi.width', 'axis_theta.width', 'length.width', 'radius.width', 'thickness.width'] 97 97 … … 102 102 """ Return a identical copy of self """ 103 103 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 104 123 105 124 def run(self, x = 0.0): -
sansmodels/src/sans/models/CoreShellEllipsoidModel.py
r27972c1d rfe9c19b4 28 28 class CoreShellEllipsoidModel(CCoreShellEllipsoidModel, BaseComponent): 29 29 """ Class that evaluates a CoreShellEllipsoidModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 equat_core = 200.0 [A] … … 75 75 prolate : polar radius > equatorial radius""" 76 76 77 77 ## Parameter details [units, min, max] 78 78 self.details = {} 79 79 self.details['scale'] = ['', None, None] … … 88 88 self.details['axis_phi'] = ['[rad]', None, None] 89 89 90 90 ## fittable parameters 91 91 self.fixed=['equat_core.width', 'polar_core.width', 'equat_shell.width', 'polar_shell.width', 'axis_phi.width', 'axis_theta.width'] 92 92 … … 97 97 """ Return a identical copy of self """ 98 98 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 99 118 100 119 def run(self, x = 0.0): -
sansmodels/src/sans/models/CoreShellModel.py
r27972c1d rfe9c19b4 28 28 class CoreShellModel(CCoreShellModel, BaseComponent): 29 29 """ Class that evaluates a CoreShellModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 radius = 60.0 [A] … … 63 63 John Wiley and Sons, New York, 1955.""" 64 64 65 65 ## Parameter details [units, min, max] 66 66 self.details = {} 67 67 self.details['scale'] = ['', None, None] … … 73 73 self.details['background'] = ['[1/cm]', None, None] 74 74 75 75 ## fittable parameters 76 76 self.fixed=['thickness.width', 'radius.width'] 77 77 … … 82 82 """ Return a identical copy of self """ 83 83 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 84 103 85 104 def run(self, x = 0.0): -
sansmodels/src/sans/models/CylinderModel.py
r27972c1d rfe9c19b4 28 28 class CylinderModel(CCylinderModel, BaseComponent): 29 29 """ Class that evaluates a CylinderModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 radius = 20.0 [A] … … 66 66 f(q)^(2)*sin(alpha)*dalpha+ bkg""" 67 67 68 68 ## Parameter details [units, min, max] 69 69 self.details = {} 70 70 self.details['scale'] = ['', None, None] … … 76 76 self.details['cyl_phi'] = ['[rad]', None, None] 77 77 78 78 ## fittable parameters 79 79 self.fixed=['cyl_phi.width', 'cyl_theta.width', 'length.width', 'radius.width'] 80 80 … … 85 85 """ Return a identical copy of self """ 86 86 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 87 106 88 107 def run(self, x = 0.0): -
sansmodels/src/sans/models/DiamCylFunc.py
rf9bf661 rfe9c19b4 28 28 class DiamCylFunc(CDiamCylFunc, BaseComponent): 29 29 """ Class that evaluates a DiamCylFunc model. 30 31 32 33 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: 34 34 radius = 20.0 A 35 35 length = 400.0 A … … 52 52 virial coefficient.""" 53 53 54 54 ## Parameter details [units, min, max] 55 55 self.details = {} 56 56 self.details['radius'] = ['A', None, None] 57 57 self.details['length'] = ['A', None, None] 58 58 59 59 ## fittable parameters 60 60 self.fixed=['radius.width', 'length.width'] 61 61 … … 66 66 """ Return a identical copy of self """ 67 67 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 68 87 69 88 def run(self, x = 0.0): -
sansmodels/src/sans/models/DiamEllipFunc.py
rf9bf661 rfe9c19b4 28 28 class DiamEllipFunc(CDiamEllipFunc, BaseComponent): 29 29 """ Class that evaluates a DiamEllipFunc model. 30 31 32 33 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: 34 34 radius_a = 20.0 A 35 35 radius_b = 400.0 A … … 56 56 radius_a < radius_b: Oblate spheroid.""" 57 57 58 58 ## Parameter details [units, min, max] 59 59 self.details = {} 60 60 self.details['radius_a'] = ['A', None, None] 61 61 self.details['radius_b'] = ['A', None, None] 62 62 63 63 ## fittable parameters 64 64 self.fixed=['radius_a.width', 'radius_b.width'] 65 65 … … 70 70 """ Return a identical copy of self """ 71 71 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 72 91 73 92 def run(self, x = 0.0): -
sansmodels/src/sans/models/EllipsoidModel.py
r27972c1d rfe9c19b4 28 28 class EllipsoidModel(CEllipsoidModel, BaseComponent): 29 29 """ Class that evaluates a EllipsoidModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 radius_a = 20.0 [A] … … 70 70 rotation axis of the ellipsoid""" 71 71 72 72 ## Parameter details [units, min, max] 73 73 self.details = {} 74 74 self.details['scale'] = ['', None, None] … … 80 80 self.details['axis_phi'] = ['[rad]', None, None] 81 81 82 82 ## fittable parameters 83 83 self.fixed=['axis_phi.width', 'axis_theta.width', 'radius_a.width', 'radius_b.width', 'length.width', 'r_minor.width'] 84 84 … … 89 89 """ Return a identical copy of self """ 90 90 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 91 110 92 111 def run(self, x = 0.0): -
sansmodels/src/sans/models/EllipticalCylinderModel.py
r27972c1d rfe9c19b4 28 28 class EllipticalCylinderModel(CEllipticalCylinderModel, BaseComponent): 29 29 """ Class that evaluates a EllipticalCylinderModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 r_minor = 20.0 [A] … … 60 60 background = incoherent background""" 61 61 62 62 ## Parameter details [units, min, max] 63 63 self.details = {} 64 64 self.details['scale'] = ['', None, None] … … 72 72 self.details['cyl_psi'] = ['[rad]', None, None] 73 73 74 74 ## fittable parameters 75 75 self.fixed=['cyl_phi.width', 'cyl_theta.width', 'cyl_psi.width', 'length.width', 'r_minor.width', 'r_ratio.width'] 76 76 … … 81 81 """ Return a identical copy of self """ 82 82 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 83 102 84 103 def run(self, x = 0.0): -
sansmodels/src/sans/models/FlexibleCylinderModel.py
r27972c1d rfe9c19b4 28 28 class FlexibleCylinderModel(CFlexibleCylinderModel, BaseComponent): 29 29 """ Class that evaluates a FlexibleCylinderModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 length = 1000.0 [A] … … 56 56 during model fitting.""" 57 57 58 58 ## Parameter details [units, min, max] 59 59 self.details = {} 60 60 self.details['scale'] = ['', None, None] … … 65 65 self.details['background'] = ['[1/cm]', None, None] 66 66 67 67 ## fittable parameters 68 68 self.fixed=['length.width', 'kuhn_length.width', 'radius.width'] 69 69 … … 74 74 """ Return a identical copy of self """ 75 75 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 76 95 77 96 def run(self, x = 0.0): -
sansmodels/src/sans/models/Gaussian.py
rf9bf661 rfe9c19b4 28 28 class Gaussian(CGaussian, BaseComponent): 29 29 """ Class that evaluates a Gaussian model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 sigma = 1.0 … … 50 50 self.description ="""f(x)=scale * 1/(sigma^2*2pi)e^(-(x-mu)^2/2sigma^2)""" 51 51 52 52 ## Parameter details [units, min, max] 53 53 self.details = {} 54 54 self.details['scale'] = ['', None, None] … … 56 56 self.details['center'] = ['', None, None] 57 57 58 58 ## fittable parameters 59 59 self.fixed=[] 60 60 … … 65 65 """ Return a identical copy of self """ 66 66 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 67 86 68 87 def run(self, x = 0.0): -
sansmodels/src/sans/models/HardsphereStructure.py
rf9bf661 rfe9c19b4 28 28 class HardsphereStructure(CHardsphereStructure, BaseComponent): 29 29 """ Class that evaluates a HardsphereStructure model. 30 31 32 33 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: 34 34 effect_radius = 50.0 [A] 35 35 volfraction = 0.2 … … 60 60 Rev. 1958, 110, 1.""" 61 61 62 62 ## Parameter details [units, min, max] 63 63 self.details = {} 64 64 self.details['effect_radius'] = ['[A]', None, None] 65 65 self.details['volfraction'] = ['', None, None] 66 66 67 67 ## fittable parameters 68 68 self.fixed=['effect_radius.width'] 69 69 … … 74 74 """ Return a identical copy of self """ 75 75 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 76 95 77 96 def run(self, x = 0.0): -
sansmodels/src/sans/models/HayterMSAStructure.py
rf9bf661 rfe9c19b4 28 28 class HayterMSAStructure(CHayterMSAStructure, BaseComponent): 29 29 """ Class that evaluates a HayterMSAStructure model. 30 31 32 33 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: 34 34 effect_radius = 20.75 [A] 35 35 charge = 19.0 … … 66 66 """ 67 67 68 68 ## Parameter details [units, min, max] 69 69 self.details = {} 70 70 self.details['effect_radius'] = ['[A]', None, None] … … 75 75 self.details['dielectconst'] = ['', None, None] 76 76 77 77 ## fittable parameters 78 78 self.fixed=['effect_radius.width'] 79 79 … … 84 84 """ Return a identical copy of self """ 85 85 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 86 105 87 106 def run(self, x = 0.0): -
sansmodels/src/sans/models/HollowCylinderModel.py
r27972c1d rfe9c19b4 28 28 class HollowCylinderModel(CHollowCylinderModel, BaseComponent): 29 29 """ Class that evaluates a HollowCylinderModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 core_radius = 20.0 [A] … … 60 60 background = incoherent background""" 61 61 62 62 ## Parameter details [units, min, max] 63 63 self.details = {} 64 64 self.details['scale'] = ['', None, None] … … 71 71 self.details['axis_phi'] = ['[rad]', None, None] 72 72 73 73 ## fittable parameters 74 74 self.fixed=['axis_phi.width', 'axis_theta.width', 'length.width', 'core_radius.width', 'radius'] 75 75 … … 80 80 """ Return a identical copy of self """ 81 81 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 82 101 83 102 def run(self, x = 0.0): -
sansmodels/src/sans/models/LamellarFFHGModel.py
r27972c1d rfe9c19b4 28 28 class LamellarFFHGModel(CLamellarFFHGModel, BaseComponent): 29 29 """ Class that evaluates a LamellarFFHGModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 t_length = 15.0 [A] … … 61 61 """ 62 62 63 63 ## Parameter details [units, min, max] 64 64 self.details = {} 65 65 self.details['scale'] = ['', None, None] … … 71 71 self.details['background'] = ['[1/cm]', None, None] 72 72 73 73 ## fittable parameters 74 74 self.fixed=['t_length.width', 'h_thickness.width'] 75 75 … … 80 80 """ Return a identical copy of self """ 81 81 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 82 101 83 102 def run(self, x = 0.0): -
sansmodels/src/sans/models/LamellarModel.py
r27972c1d rfe9c19b4 28 28 class LamellarModel(CLamellarModel, BaseComponent): 29 29 """ Class that evaluates a LamellarModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 bi_thick = 50.0 [A] … … 60 60 """ 61 61 62 62 ## Parameter details [units, min, max] 63 63 self.details = {} 64 64 self.details['scale'] = ['', None, None] … … 68 68 self.details['background'] = ['[1/cm]', None, None] 69 69 70 70 ## fittable parameters 71 71 self.fixed=[] 72 72 … … 77 77 """ Return a identical copy of self """ 78 78 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 79 98 80 99 def run(self, x = 0.0): -
sansmodels/src/sans/models/LamellarPSHGModel.py
r27972c1d rfe9c19b4 28 28 class LamellarPSHGModel(CLamellarPSHGModel, BaseComponent): 29 29 """ Class that evaluates a LamellarPSHGModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 spacing = 40.0 [A] … … 75 75 scale = scale factor ...""" 76 76 77 77 ## Parameter details [units, min, max] 78 78 self.details = {} 79 79 self.details['scale'] = ['', None, None] … … 88 88 self.details['background'] = ['[1/cm]', None, None] 89 89 90 90 ## fittable parameters 91 91 self.fixed=['deltaT.width', 'deltaH.width', 'spacing.width'] 92 92 … … 97 97 """ Return a identical copy of self """ 98 98 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 99 118 100 119 def run(self, x = 0.0): -
sansmodels/src/sans/models/LamellarPSModel.py
r27972c1d rfe9c19b4 28 28 class LamellarPSModel(CLamellarPSModel, BaseComponent): 29 29 """ Class that evaluates a LamellarPSModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 spacing = 400.0 [A] … … 71 71 scale = scale factor""" 72 72 73 73 ## Parameter details [units, min, max] 74 74 self.details = {} 75 75 self.details['scale'] = ['', None, None] … … 81 81 self.details['background'] = ['[1/cm]', None, None] 82 82 83 83 ## fittable parameters 84 84 self.fixed=['delta.width', 'spacing.width'] 85 85 … … 90 90 """ Return a identical copy of self """ 91 91 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 92 111 93 112 def run(self, x = 0.0): -
sansmodels/src/sans/models/LogNormal.py
r27972c1d rfe9c19b4 28 28 class LogNormal(CLogNormal, BaseComponent): 29 29 """ Class that evaluates a LogNormal model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 sigma = 1.0 … … 50 50 self.description ="""f(x)=scale * 1/(sigma*math.sqrt(2pi))e^(-1/2*((math.log(x)-mu)/sigma)^2)""" 51 51 52 52 ## Parameter details [units, min, max] 53 53 self.details = {} 54 54 self.details['scale'] = ['', None, None] … … 56 56 self.details['center'] = ['', None, None] 57 57 58 58 ## fittable parameters 59 59 self.fixed=[] 60 60 … … 65 65 """ Return a identical copy of self """ 66 66 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 67 86 68 87 def run(self, x = 0.0): -
sansmodels/src/sans/models/Lorentzian.py
r27972c1d rfe9c19b4 28 28 class Lorentzian(CLorentzian, BaseComponent): 29 29 """ Class that evaluates a Lorentzian model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 gamma = 1.0 … … 50 50 self.description ="""f(x)=scale * 1/pi 0.5gamma / [ (x-x_0)^2 + (0.5gamma)^2 ]""" 51 51 52 52 ## Parameter details [units, min, max] 53 53 self.details = {} 54 54 self.details['scale'] = ['', None, None] … … 56 56 self.details['center'] = ['', None, None] 57 57 58 58 ## fittable parameters 59 59 self.fixed=[] 60 60 … … 65 65 """ Return a identical copy of self """ 66 66 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 67 86 68 87 def run(self, x = 0.0): -
sansmodels/src/sans/models/MultiShellModel.py
r27972c1d rfe9c19b4 28 28 class MultiShellModel(CMultiShellModel, BaseComponent): 29 29 """ Class that evaluates a MultiShellModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 core_radius = 60.0 [A] … … 63 63 background: incoherent background""" 64 64 65 65 ## Parameter details [units, min, max] 66 66 self.details = {} 67 67 self.details['scale'] = ['', None, None] … … 74 74 self.details['background'] = ['[1/cm]', None, None] 75 75 76 76 ## fittable parameters 77 77 self.fixed=['core_radius.width', 's_thickness.width', 'w_thickness.width'] 78 78 … … 83 83 """ Return a identical copy of self """ 84 84 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 85 104 86 105 def run(self, x = 0.0): -
sansmodels/src/sans/models/MultiplicationModel.py
r1affe64 rfe9c19b4 58 58 obj.p_model = self.p_model.clone() 59 59 obj.s_model = self.s_model.clone() 60 60 #obj = copy.deepcopy(self) 61 61 return obj 62 62 -
sansmodels/src/sans/models/OblateModel.py
r27972c1d rfe9c19b4 28 28 class OblateModel(COblateModel, BaseComponent): 29 29 """ Class that evaluates a OblateModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 major_core = 200.0 [A] … … 73 73 that shell radii are larger than core radii.""" 74 74 75 75 ## Parameter details [units, min, max] 76 76 self.details = {} 77 77 self.details['scale'] = ['', None, None] … … 86 86 self.details['axis_phi'] = ['[rad]', None, None] 87 87 88 88 ## fittable parameters 89 89 self.fixed=['major_core.width', 'minor_core.width', 'major_shell.width', 'minor_shell.width'] 90 90 … … 95 95 """ Return a identical copy of self """ 96 96 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 97 116 98 117 def run(self, x = 0.0): -
sansmodels/src/sans/models/ParallelepipedModel.py
r27972c1d rfe9c19b4 28 28 class ParallelepipedModel(CParallelepipedModel, BaseComponent): 29 29 """ Class that evaluates a ParallelepipedModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 short_a = 35.0 [A] … … 63 63 background:Incoherent Background [1/cm]""" 64 64 65 65 ## Parameter details [units, min, max] 66 66 self.details = {} 67 67 self.details['scale'] = ['', None, None] … … 75 75 self.details['parallel_psi'] = ['[rad]', None, None] 76 76 77 77 ## fittable parameters 78 78 self.fixed=['short_a.width', 'short_b.width', 'long_c.width', 'parallel_phi.width', 'parallel_psi.width', 'parallel_theta.width'] 79 79 … … 84 84 """ Return a identical copy of self """ 85 85 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 86 105 87 106 def run(self, x = 0.0): -
sansmodels/src/sans/models/ProlateModel.py
r27972c1d rfe9c19b4 28 28 class ProlateModel(CProlateModel, BaseComponent): 29 29 """ Class that evaluates a ProlateModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 major_core = 100.0 [A] … … 71 71 that shell radii are larger than core radii.""" 72 72 73 73 ## Parameter details [units, min, max] 74 74 self.details = {} 75 75 self.details['scale'] = ['', None, None] … … 82 82 self.details['background'] = ['[1/cm]', None, None] 83 83 84 84 ## fittable parameters 85 85 self.fixed=['major_core.width', 'minor_core.width', 'major_shell.width', 'minor_shell.width'] 86 86 … … 91 91 """ Return a identical copy of self """ 92 92 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 93 112 94 113 def run(self, x = 0.0): -
sansmodels/src/sans/models/Schulz.py
rc5607fa rfe9c19b4 17 17 18 18 WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 19 DO NOT MODIFY THIS FILE, MODIFY .. /c_extensions/schulz.h19 DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\schulz.h 20 20 AND RE-RUN THE GENERATOR SCRIPT 21 21 … … 28 28 class Schulz(CSchulz, BaseComponent): 29 29 """ Class that evaluates a Schulz model. 30 This file was auto-generated from ../c_extensions/schulz.h.31 32 33 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: 34 34 scale = 1.0 35 35 sigma = 1.0 … … 52 52 z= math.pow[(1/(sigma/center),2]-1""" 53 53 54 54 ## Parameter details [units, min, max] 55 55 self.details = {} 56 56 self.details['scale'] = ['', None, None] … … 58 58 self.details['center'] = ['', None, None] 59 59 60 60 ## fittable parameters 61 61 self.fixed=[] 62 62 … … 67 67 """ Return a identical copy of self """ 68 68 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 69 88 70 89 def run(self, x = 0.0): -
sansmodels/src/sans/models/SphereModel.py
r27972c1d rfe9c19b4 28 28 class SphereModel(CSphereModel, BaseComponent): 29 29 """ Class that evaluates a SphereModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 radius = 60.0 [A] … … 60 60 """ 61 61 62 62 ## Parameter details [units, min, max] 63 63 self.details = {} 64 64 self.details['scale'] = ['', None, None] … … 67 67 self.details['background'] = ['[1/cm]', None, None] 68 68 69 69 ## fittable parameters 70 70 self.fixed=['radius.width'] 71 71 … … 76 76 """ Return a identical copy of self """ 77 77 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 78 97 79 98 def run(self, x = 0.0): -
sansmodels/src/sans/models/SquareWellStructure.py
rf9bf661 rfe9c19b4 28 28 class SquareWellStructure(CSquareWellStructure, BaseComponent): 29 29 """ Class that evaluates a SquareWellStructure model. 30 31 32 33 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: 34 34 effect_radius = 50.0 [A] 35 35 volfraction = 0.04 … … 66 66 K. C., Physica, 1977, 89A, 213.""" 67 67 68 68 ## Parameter details [units, min, max] 69 69 self.details = {} 70 70 self.details['effect_radius'] = ['[A]', None, None] … … 73 73 self.details['wellwidth'] = ['', None, None] 74 74 75 75 ## fittable parameters 76 76 self.fixed=['effect_radius.width'] 77 77 … … 82 82 """ Return a identical copy of self """ 83 83 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 84 103 85 104 def run(self, x = 0.0): -
sansmodels/src/sans/models/StackedDisksModel.py
r27972c1d rfe9c19b4 28 28 class StackedDisksModel(CStackedDisksModel, BaseComponent): 29 29 """ Class that evaluates a StackedDisksModel model. 30 31 32 33 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: 34 34 scale = 0.01 35 35 radius = 3000.0 [A] … … 67 67 solvent_sld = the SLD of the solvent""" 68 68 69 69 ## Parameter details [units, min, max] 70 70 self.details = {} 71 71 self.details['scale'] = ['', None, None] … … 82 82 self.details['axis_phi'] = ['[rad]', None, None] 83 83 84 84 ## fittable parameters 85 85 self.fixed=['core_thick.width', 'layer_thick.width', 'radius.width', 'axis_theta.width', 'axis_phi.width'] 86 86 … … 91 91 """ Return a identical copy of self """ 92 92 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 93 112 94 113 def run(self, x = 0.0): -
sansmodels/src/sans/models/StickyHSStructure.py
rf9bf661 rfe9c19b4 28 28 class StickyHSStructure(CStickyHSStructure, BaseComponent): 29 29 """ Class that evaluates a StickyHSStructure model. 30 31 32 33 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: 34 34 effect_radius = 50.0 [A] 35 35 volfraction = 0.1 … … 66 66 Phys., 1991, 95(12), 9186-9190.""" 67 67 68 68 ## Parameter details [units, min, max] 69 69 self.details = {} 70 70 self.details['effect_radius'] = ['[A]', None, None] … … 73 73 self.details['stickiness'] = ['', None, None] 74 74 75 75 ## fittable parameters 76 76 self.fixed=['effect_radius.width'] 77 77 … … 82 82 """ Return a identical copy of self """ 83 83 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 84 103 85 104 def run(self, x = 0.0): -
sansmodels/src/sans/models/TriaxialEllipsoidModel.py
r27972c1d rfe9c19b4 28 28 class TriaxialEllipsoidModel(CTriaxialEllipsoidModel, BaseComponent): 29 29 """ Class that evaluates a TriaxialEllipsoidModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 semi_axisA = 35.0 [A] … … 58 58 not be correct.""" 59 59 60 60 ## Parameter details [units, min, max] 61 61 self.details = {} 62 62 self.details['scale'] = ['', None, None] … … 70 70 self.details['axis_psi'] = ['[rad]', None, None] 71 71 72 72 ## fittable parameters 73 73 self.fixed=['axis_psi.width', 'axis_phi.width', 'axis_theta.width', 'semi_axisA.width', 'semi_axisB.width', 'semi_axisC.width'] 74 74 … … 79 79 """ Return a identical copy of self """ 80 80 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 81 100 82 101 def run(self, x = 0.0): -
sansmodels/src/sans/models/VesicleModel.py
r27972c1d rfe9c19b4 28 28 class VesicleModel(CVesicleModel, BaseComponent): 29 29 """ Class that evaluates a VesicleModel model. 30 31 32 33 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: 34 34 scale = 1.0 35 35 radius = 100.0 [A] … … 58 58 scale : scale factor""" 59 59 60 60 ## Parameter details [units, min, max] 61 61 self.details = {} 62 62 self.details['scale'] = ['', None, None] … … 67 67 self.details['background'] = ['[1/cm]', None, None] 68 68 69 69 ## fittable parameters 70 70 self.fixed=['radius.width', 'thickness.width'] 71 71 … … 76 76 """ Return a identical copy of self """ 77 77 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 78 97 79 98 def run(self, x = 0.0): -
sansmodels/src/sans/models/c_models/modelTemplate.txt
rf9bf661 rfe9c19b4 28 28 class [PYTHONCLASS]([CPYTHONCLASS], BaseComponent): 29 29 """ Class that evaluates a [PYTHONCLASS] model. 30 31 32 33 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] 34 34 """ 35 35 … … 46 46 self.description ="""[DESCRIPTION]""" 47 47 48 49 48 [PAR_DETAILS] 49 ## fittable parameters 50 50 self.fixed=[FIXED] 51 51 … … 56 56 """ Return a identical copy of self """ 57 57 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 58 73 59 74 def run(self, x = 0.0):
Note: See TracChangeset
for help on using the changeset viewer.