Changeset 988130c6 in sasview for sansmodels/src/sans/models
- Timestamp:
- Dec 20, 2008 2:32:46 PM (16 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:
- 2e10b70
- Parents:
- 08b9c6c8
- Location:
- sansmodels/src/sans/models
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/BEPolyelectrolyte.py
r96672c0 r988130c6 72 72 self.details['c'] = ['mol/L', None, None] 73 73 self.details['background'] = ['cm-1', None, None] 74 74 #list of parameter that cannot be fitted 75 self.fixed= [] 75 76 76 77 def _BEPoly(self, x): -
sansmodels/src/sans/models/BaseComponent.py
r5f89fb8 r988130c6 6 6 # imports 7 7 import copy 8 8 #TO DO: that about a way to make the parameter 9 #is self return if it is fittable or not 9 10 class BaseComponent: 10 11 """ … … 29 30 #of the given model, exception or possible use 30 31 self.description='' 32 #list of parameter that cannot be fitted 33 self.fixed= [] 31 34 32 35 def __str__(self): … … 35 38 """ 36 39 return self.name 40 41 def is_fittable(self, par_name): 42 return par_name.lower() not in self.fixed 43 #For the future 44 #return self.params['par_name'].is_fittable() 37 45 38 46 def run(self, x): return NotImplemented -
sansmodels/src/sans/models/Constant.py
r96672c0 r988130c6 25 25 self.details['value'] = ['', None, None] 26 26 self.params['value'] = 1.0 27 27 #list of parameter that cannot be fitted 28 self.fixed= [] 28 29 def clone(self): 29 30 """ Return a identical copy of self """ -
sansmodels/src/sans/models/CoreShellCylinderModel.py
r95986b5 r988130c6 84 84 self.details['axis_theta'] = ['rad', None, None] 85 85 self.details['axis_phi'] = ['rad', None, None] 86 86 # fixed paramaters 87 self.fixed=['axis_phi.npts','axis_phi.nsigmas', 88 'axis_theta.npts','axis_theta.nsigmas', 89 'length.npts','length.nsigmas', 90 'radius.npts','radius.nsigmas', 91 'thickness.npts','thickness.nsigmas' ] 87 92 88 93 def clone(self): -
sansmodels/src/sans/models/CoreShellModel.py
r95986b5 r988130c6 61 61 self.details['solvent_sld'] = ['A-2', None, None] 62 62 self.details['background'] = ['cm-1', None, None] 63 63 64 self.fixed = ['radius.npts','radius.nsigmas','thickness.npts','thickness.nsigmas'] 64 65 65 66 def clone(self): -
sansmodels/src/sans/models/CylinderModel.py
r95986b5 r988130c6 70 70 self.details['cyl_theta'] = ['rad', None, None] 71 71 self.details['cyl_phi'] = ['rad', None, None] 72 72 # fixed parameters 73 self.fixed = ['cyl_phi.npts','cyl_phi.nsigmas','cyl_theta.npts','cyl_theta.nsigmas', 74 'length.npts','length.nsigmas','radius.npts','radius.nsigmas'] 73 75 74 76 def clone(self): -
sansmodels/src/sans/models/DABModel.py
r753552d r988130c6 46 46 self.details['scale'] = ['', None, None] 47 47 self.details['background'] = ['', None, None] 48 48 #list of parameter that cannot be fitted 49 self.fixed= [] 49 50 def _DAB(self, x): 50 51 """ -
sansmodels/src/sans/models/DebyeModel.py
r96672c0 r988130c6 51 51 self.details['scale'] = ['', None, None] 52 52 self.details['background'] = ['', None, None] 53 53 #list of parameter that cannot be fitted 54 self.fixed= [] 54 55 def _debye(self, x): 55 56 """ -
sansmodels/src/sans/models/DisperseModel.py
r5f89fb8 r988130c6 41 41 self.model = model 42 42 self.description='' 43 #list of parameter that cannot be fitted 44 self.fixed= [] 43 45 def clone(self): 44 46 """ Return a identical copy of self """ -
sansmodels/src/sans/models/EllipsoidModel.py
r95986b5 r988130c6 69 69 self.details['axis_theta'] = ['rad', None, None] 70 70 self.details['axis_phi'] = ['rad', None, None] 71 71 # fixed paramaters 72 self.fixed=['axis_phi.npts','axis_phi.nsigmas', 73 'axis_theta.npts','axis_theta.nsigmas', 74 'radius_a.npts','radius_a.nsigmas', 75 'radius_b.npts','radius_b.nsigmas' ] 72 76 73 77 def clone(self): -
sansmodels/src/sans/models/EllipticalCylinderModel.py
r95986b5 r988130c6 65 65 self.details['cyl_phi'] = ['rad', None, None] 66 66 self.details['cyl_psi'] = ['rad', None, None] 67 67 # fixed paramaters 68 self.fixed=['cyl_phi.npts','cyl_phi.nsigmas', 69 'cyl_psi.npts','cyl_phi.nsigmas', 70 'cyl_theta.npts','cyl_theta.nsigmas', 71 'length.npts','length.nsigmas', 72 'r_minor.npts','r_miror.nsigmas', 73 'r_ratio.npts','r_ratio.nsigmas' ] 68 74 69 75 def clone(self): -
sansmodels/src/sans/models/Gaussian.py
r95986b5 r988130c6 53 53 self.details['sigma'] = ['', None, None] 54 54 self.details['center'] = ['', None, None] 55 55 #list of parameter that cannot be fitted 56 self.fixed= [] 56 57 57 58 def clone(self): -
sansmodels/src/sans/models/GuinierModel.py
r922b0d1 r988130c6 41 41 self.details['scale'] = ['cm-1', None, None] 42 42 self.details['rg'] = ['A', None, None] 43 43 #list of parameter that cannot be fitted 44 self.fixed= [] 44 45 def _guinier(self, x): 45 46 return self.params['scale'] * math.exp( -(self.params['rg']*x)**2 / 3.0 ) -
sansmodels/src/sans/models/LineModel.py
r9696b075 r988130c6 37 37 self.details['A'] = ['', None, None] 38 38 self.details['B'] = ['', None, None] 39 39 # fixed paramaters 40 self.fixed=[] 40 41 def _line(self, x): 41 42 """ -
sansmodels/src/sans/models/LorentzModel.py
r753552d r988130c6 45 45 self.details['scale'] = ['', None, None] 46 46 self.details['background'] = ['cm-1', None, None] 47 47 #list of parameter that cannot be fitted 48 self.fixed= [] 48 49 def _lorentz(self, x): 49 50 """ -
sansmodels/src/sans/models/Lorentzian.py
r95986b5 r988130c6 53 53 self.details['gamma'] = ['', None, None] 54 54 self.details['center'] = ['', None, None] 55 55 #list of parameter that cannot be fitted 56 self.fixed= [] 56 57 57 58 def clone(self): -
sansmodels/src/sans/models/NewCylinderModel.py
r8809e48 r988130c6 68 68 self.details['cyl_theta'] = ['rad', None, None] 69 69 self.details['cyl_phi'] = ['rad', None, None] 70 70 #list of parameter that cannot be fitted 71 self.fixed= [] 71 72 # The C models have a self.params dictionary 72 73 for item in self.params: -
sansmodels/src/sans/models/PorodModel.py
r753552d r988130c6 35 35 self.details['scale'] = ['', None, None] 36 36 self.details['background'] = ['', None, None] 37 37 #list of parameter that cannot be fitted 38 self.fixed= [] 38 39 39 40 def _porod(self, x): -
sansmodels/src/sans/models/PowerLawModel.py
r753552d r988130c6 46 46 self.details['scale'] = ['', None, None] 47 47 self.details['background'] = ['', None, None] 48 48 #list of parameter that cannot be fitted 49 self.fixed= [] 49 50 def _PowerLaw(self, x): 50 51 """ -
sansmodels/src/sans/models/Sin.py
r753552d r988130c6 23 23 ## Parameter details [units, min, max] 24 24 self.details = {} 25 25 #list of parameter that cannot be fitted 26 self.fixed= [] 26 27 def clone(self): 27 28 """ Return a identical copy of self """ -
sansmodels/src/sans/models/SphereModel.py
r95986b5 r988130c6 61 61 self.details['contrast'] = ['A-2', None, None] 62 62 self.details['background'] = ['cm-1', None, None] 63 63 # Fixed parameters 64 self.fixed = ['radius.npts','radius.nsigmas'] 64 65 65 66 def clone(self): -
sansmodels/src/sans/models/TeubnerStreyModel.py
r753552d r988130c6 51 51 self.details['scale'] = ['', None, None] 52 52 self.details['background'] = ['', None, None] 53 53 #list of parameter that cannot be fitted 54 self.fixed= [] 54 55 55 56 def _TeubnerStrey(self, x): -
sansmodels/src/sans/models/dispersion_models.py
r0f5bc9f r988130c6 43 43 """ 44 44 import sans_extension.c_models as c_models 45 46 45 47 46 48 class DispersionModel: … … 97 99 98 100 c_models.set_dispersion_weights(self.cdisp, values, weights) 101 102 models = {GaussianDispersion:"GaussianModel", ArrayDispersion:"MyModel"} 99 103 100
Note: See TracChangeset
for help on using the changeset viewer.