Changeset 18695bf in sasview for sansmodels/src/sans/models/UnifiedPowerRgModel.py
- Timestamp:
- Jan 18, 2011 8:38:36 AM (14 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:
- 18b89c4
- Parents:
- 1b02da1d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/UnifiedPowerRgModel.py
r29100cb r18695bf 1 1 2 2 from sans.models.BaseComponent import BaseComponent 3 from math import pow,exp, sqrt 3 from math import exp, sqrt 4 from numpy import power 4 5 from scipy.special import erf 5 6 max_level_n = 7 … … 74 75 for ind in range(1,l_num+1): 75 76 # get exp term 76 exp_now = exp(-pow (x*self.params['Rg%s'% ind],2)/3.0)77 exp_now = exp(-power(x*self.params['Rg%s'% ind],2)/3.0) 77 78 # get erf term 78 79 erf_now = erf(x*self.params['Rg%s'% ind]/sqrt(6.0)) 79 80 # get power term 80 pow_now = pow ((erf_now*erf_now*erf_now/x),self.params['power%s'% ind])81 pow_now = power((erf_now*erf_now*erf_now/x),self.params['power%s'% ind]) 81 82 # get next exp term only if it exists 82 83 try: 83 exp_next = exp(-pow (x*self.params['Rg%s'% (ind+1)],2)/3.0)84 exp_next = exp(-power(x*self.params['Rg%s'% (ind+1)],2)/3.0) 84 85 except: 85 86 exp_next = 1.0
Note: See TracChangeset
for help on using the changeset viewer.