Changeset 3bcd03d in sasmodels
- Timestamp:
- Mar 17, 2016 12:13:52 PM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 78d3341
- Parents:
- 2352350
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/hardsphere.py
r84db7a5 r3bcd03d 7 7 the maths needs to be modified (no \Beta(Q) correction yet in sasview). 8 8 9 effect_radiusis the effective hard sphere radius.9 radius_effective is the effective hard sphere radius. 10 10 volfraction is the volume fraction occupied by the spheres. 11 11 … … 53 53 systems. Though strictly the maths needs to be modified - 54 54 which sasview does not do yet. 55 effect_radiusis the hard sphere radius55 radius_effective is the hard sphere radius 56 56 volfraction is the volume fraction occupied by the spheres. 57 57 """ … … 60 60 61 61 # ["name", "units", default, [lower, upper], "type","description"], 62 parameters = [[" effect_radius", "Ang", 50.0, [0, inf], "volume",62 parameters = [["radius_effective", "Ang", 50.0, [0, inf], "volume", 63 63 "effective radius of hard sphere"], 64 64 ["volfraction", "", 0.2, [0, 0.74], "", … … 75 75 double D,A,B,G,X,X2,X4,S,C,FF,HARDSPH; 76 76 77 if(fabs( effect_radius) < 1.E-12) {77 if(fabs(radius_effective) < 1.E-12) { 78 78 HARDSPH=1.0; 79 79 return(HARDSPH); … … 84 84 A= (1.+2.*volfraction)*D; 85 85 A *=A; 86 X=fabs(q* effect_radius*2.0);86 X=fabs(q*radius_effective*2.0); 87 87 88 88 if(X < 5.E-06) { … … 147 147 # VR defaults to 1.0 148 148 149 demo = dict( effect_radius=200, volfraction=0.2, effect_radius_pd=0.1, effect_radius_pd_n=40)149 demo = dict(radius_effective=200, volfraction=0.2, radius_effective_pd=0.1, radius_effective_pd_n=40) 150 150 oldname = 'HardsphereStructure' 151 oldpars = dict( effect_radius="effect_radius",effect_radius_pd="effect_radius_pd",effect_radius_pd_n="effect_radius_pd_n")151 oldpars = dict(radius_effective="effect_radius",radius_effective_pd="effect_radius_pd",radius_effective_pd_n="effect_radius_pd_n") 152 152 # Q=0.001 is in the Taylor series, low Q part, so add Q=0.1, assuming double precision sasview is correct 153 153 tests = [ 154 [ {'scale': 1.0, 'background' : 0.0, ' effect_radius' : 50.0, 'volfraction' : 0.2,155 ' effect_radius_pd' : 0}, [0.001,0.1], [0.209128,0.930587]]154 [ {'scale': 1.0, 'background' : 0.0, 'radius_effective' : 50.0, 'volfraction' : 0.2, 155 'radius_effective_pd' : 0}, [0.001,0.1], [0.209128,0.930587]] 156 156 ] 157 157 # ADDED by: RKH ON: 16Mar2016 using equations from FISH as better than orig sasview, see notes above. Added Taylor expansions at small Q, -
sasmodels/product.py
rfcd7bbd r3bcd03d 18 18 SCALE=0 19 19 BACKGROUND=1 20 EFFECT_RADIUS=220 RADIUS_EFFECTIVE=2 21 21 VOLFRACTION=3 22 22 … … 31 31 assert s_pars[BACKGROUND].name == 'background' 32 32 # We require structure factors to start with effect radius and volfraction 33 assert s_pars[ EFFECT_RADIUS].name == 'effect_radius'33 assert s_pars[RADIUS_EFFECTIVE].name == 'radius_effective' 34 34 assert s_pars[VOLFRACTION].name == 'volfraction' 35 35 # Combine the parameter sets. We are skipping the first three
Note: See TracChangeset
for help on using the changeset viewer.