Changeset 279e371 in sasview for sansmodels/src/sans/models/GaussLorentzGelModel.py
- Timestamp:
- Apr 18, 2012 1:26:13 PM (13 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:
- 499fe7a
- Parents:
- 3ee4d96
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/GaussLorentzGelModel.py
r79411b2 r279e371 1 #!/usr/bin/env python2 1 """ 3 Provide I(q) = I_0 exp ( - R_g^2 q^2 / 3.0)4 GaussLorentzGel function as a BaseComponent model2 Provide I(q) = I_0 exp ( - R_g^2 q^2 / 3.0) 3 GaussLorentzGel function as a BaseComponent model 5 4 """ 6 7 5 from sans.models.BaseComponent import BaseComponent 8 6 import math … … 56 54 #list of parameter that cannot be fitted 57 55 self.fixed = [] 56 58 57 def _gausslorentzgel(self, x): 59 58 """ 60 59 Model definition 61 60 """ 62 inten = self.params['scale_g']*math.exp(-1.0*x*x*self.params['stat_colength']* \ 61 inten = self.params['scale_g'] \ 62 *math.exp(-1.0*x*x*self.params['stat_colength']* \ 63 63 self.params['stat_colength']/2.0) + self.params['scale_l']/ \ 64 64 (1.0 + (x*self.params['dyn_colength'])* \ … … 74 74 return self._gausslorentzgel(x[0]) 75 75 elif x.__class__.__name__ == 'tuple': 76 raise ValueError, "Tuples are not allowed as input to BaseComponentmodels"76 raise ValueError, "Tuples are not allowed as input to models" 77 77 else: 78 78 return self._gausslorentzgel(x) … … 87 87 return self._gausslorentzgel(q) 88 88 elif x.__class__.__name__ == 'tuple': 89 raise ValueError, "Tuples are not allowed as input to BaseComponentmodels"89 raise ValueError, "Tuples are not allowed as input to models" 90 90 else: 91 91 return self._gausslorentzgel(x)
Note: See TracChangeset
for help on using the changeset viewer.