Changeset ac7be54 in sasview for src/sas/models
- Timestamp:
- May 8, 2015 2:27:08 PM (10 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:
- 5e880fe1
- Parents:
- c22c5e3
- Location:
- src/sas/models
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/models/BEPolyelectrolyte.py
r79492222 rac7be54 1 """ 2 Provide F(x) = K*1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k2)/(1+(r02)^(2))*(q^(2)+k2)\ 3 *(q^(2)-(12*h*C/b^(2))) 1 """ 4 2 BEPolyelectrolyte as a BaseComponent model 5 3 """ … … 12 10 Class that evaluates a BEPolyelectrolyte. 13 11 14 F(x) = K *1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k2)/(1+(r02)^(2))*(q^(2)+k2)\15 *(q^(2)-(12*h*C/b^(2)))12 F(x) = K/(4 pi Lb (alpha)^(2)) (q^(2)+k2)/(1+(r02)^(2)) (q^(2)+k2)\ 13 (q^(2)-(12 h C/b^(2))) 16 14 17 The model has Eight parameters: 18 K = Constrast factor of the polymer 19 Lb = Bjerrum length 20 H = virial parameter 21 B = monomer length 22 Cs = Concentration of monovalent salt 23 alpha = ionazation degree 15 The model has Eight parameters:: 16 17 K = Constrast factor of the polymer 18 Lb = Bjerrum length 19 H = virial parameter 20 B = monomer length 21 Cs = Concentration of monovalent salt 22 alpha = ionazation degree 24 23 C = polymer molar concentration 25 24 bkd = background … … 75 74 """ 76 75 Evaluate 77 F(x) = K *1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k2)/(1+(r02)^(2))78 *(q^(2)+k2)*(q^(2)-(12*h*C/b^(2)))76 F(x) = K 1/(4 pi Lb (alpha)^(2)) (q^(2)+k2)/(1+(r02)^(2)) 77 (q^(2)+k2) (q^(2)-(12 h C/b^(2))) 79 78 80 79 has 3 internal parameters : 81 The inverse Debye Length: K2 = 4 *pi*Lb*(2*Cs+alpha*C)82 r02 =1/alpha/Ca^(0.5) *(B/(48*pi*Lb)^(0.5))83 Ca = C*6.022136e-480 The inverse Debye Length: K2 = 4 pi Lb (2 Cs+alpha C) 81 r02 =1/alpha/Ca^(0.5) (B/(48 pi Lb)^(0.5)) 82 Ca = 6.022136e-4 C 84 83 """ 85 84 Ca = self.params['c'] * 6.022136e-4 -
src/sas/models/CoreMultiShellModel.py
r79492222 rac7be54 170 170 171 171 : return: (r, beta) where r is a list of radius of the transition points 172 beta is a list of the corresponding SLD values173 : Note: This works only for func_shell #= 2.172 beta is a list of the corresponding SLD values 173 : Note: This works only for func_shell num = 2. 174 174 """ 175 175 r = [] -
src/sas/models/GuinierPorodModel.py
r79492222 rac7be54 1 1 """ 2 I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql 3 = scale/q^m*exp((-ql^2*Rg^2)/(3-s))*ql^(m-s) for q>=ql 4 Guinier function as a BaseComponent model 2 Guinier function as a BaseComponent model 5 3 """ 6 4 from sas.models.BaseComponent import BaseComponent … … 11 9 Class that evaluates a GuinierPorod model. 12 10 13 I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql 14 = scale/q^m*exp((-ql^2*Rg^2)/(3-s))*ql^(m-s) for q>=ql 11 Calculate:: 12 13 I(q) = scale/q^s exp(-q^2 Rg^2 / (3-s) ) for q<= ql 14 I(q) = scale/q^m exp(-ql^2 Rg^2 / (3-s)) ql^(m-s) for q>=ql 15 15 """ 16 16 def __init__(self): -
src/sas/models/MultiplicationModel.py
r79492222 rac7be54 5 5 #from sas.models.pluginmodel import Model1DPlugin 6 6 class MultiplicationModel(BaseComponent): 7 """8 Use for P(Q) *S(Q); function call must be in the order of P(Q) and then S(Q):7 r""" 8 Use for P(Q)\*S(Q); function call must be in the order of P(Q) and then S(Q): 9 9 The model parameters are combined from both models, P(Q) and S(Q), except 1) 'effect_radius' of S(Q) 10 10 which will be calculated from P(Q) via calculate_ER(), … … 109 109 : return: (r, beta) where r is a list of radius of the transition points 110 110 beta is a list of the corresponding SLD values 111 : Note: This works only for func_shell #= 2 (exp function).111 : Note: This works only for func_shell num = 2 (exp function). 112 112 """ 113 113 try: -
src/sas/models/PeakGaussModel.py
r79492222 rac7be54 1 1 #!/usr/bin/env python 2 2 """ 3 Model describes a Gaussian shaped peak including a flat background 4 Provide F(q) = scale*exp( -1/2 *[(q-q0)/B]^2 )+ background 5 PeakGaussModel function as a BaseComponent model 3 PeakGaussModel function as a BaseComponent model 6 4 """ 7 5 … … 12 10 13 11 """ 14 Class that evaluates a gaussian shaped peak.12 Class that evaluates a gaussian shaped peak with a flat background. 15 13 16 F(q) = scale *exp( -1/2 *[(q-qo)/B]^2 )+ background14 F(q) = scale exp( -1/2 [(q-qo)/B]^2 )+ background 17 15 18 16 The model has three parameters: … … 56 54 def _PeakGauss(self, x): 57 55 """ 58 Evaluate F(x) = scale *exp( -1/2 *[(x-q0)/B]^2 )+ background56 Evaluate F(x) = scale exp( -1/2 [(x-q0)/B]^2 )+ background 59 57 60 58 """ -
src/sas/models/TwoPowerLawModel.py
r79492222 rac7be54 1 1 #!/usr/bin/env python 2 2 """ 3 Provide I(q) = A*pow(qval,-1.0*m1) for q<=qc4 =scale*pow(qval,-1.0*m2) for q>qc5 3 TwoPowerLaw function as a BaseComponent model 4 5 Calculate:: 6 7 I(q) = A pow(qval,-m1) for q<=qc 8 I(q) = scale pow(qval,-m2) for q>qc 6 9 """ 7 10 … … 14 17 Class that evaluates a TwoPowerLawModel. 15 18 16 I(q) = coef_A*pow(qval,-1.0*power1) for q<=qc 17 =C*pow(qval,-1.0*power2) for q>qc 18 where C=coef_A*pow(qc,-1.0*power1)/pow(qc,-1.0*power2). 19 Calculate:: 20 21 I(q) = coef_A pow(qval,-power1) for q<=qc 22 I(q) = C pow(qval,-power2) for q>qc 23 24 where C=coef_A pow(qc,-power1)/pow(qc,-power2). 19 25 20 26 List of default parameters:
Note: See TracChangeset
for help on using the changeset viewer.