Changeset a6ebff8 in sasmodels
- Timestamp:
- Mar 21, 2016 3:06:36 AM (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:
- ca3abe6
- Parents:
- 2684d45 (diff), 3703fde (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 3 added
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/polymer_micelle.py
rdb74c47 r1e9a108 27 27 from numpy import inf 28 28 29 name = " micelle_spherical_core"30 title = " Micelle Spherical Core model"29 name = "polymer_micelle" 30 title = "Polymer micelle model" 31 31 description = """ 32 This model provides the form factor, $P(q)$, for a micelle with33 a spherical core andGaussian polymer chains attached to the surface.32 This model provides an approximate form factor, P(q), for a micelle with 33 a spherical core with Gaussian polymer chains attached to the surface. 34 34 """ 35 category = "shape -independent"35 category = "shape:sphere" 36 36 37 37 # pylint: disable=bad-whitespace, line-too-long … … 51 51 # pylint: enable=bad-whitespace, line-too-long 52 52 53 source = ["lib/sph_j1c.c", " micelle_spherical_core.c"]53 source = ["lib/sph_j1c.c", "polymer_micelle_kernel.c"] 54 54 55 55 demo = dict(scale=1, background=0, … … 75 75 ] 76 76 # RKH 20Mar2016 - need to check whether the core & corona volumes are per monomer ??? and how aggregation number works! 77 # renamed from micelle_spherical_core to polymer_micelle, moved from shape-independent to spheres section. 78 # Ought to be able to add polydisp to core? And add ability to x by S(Q) ? -
example/sesans_parameters_css-hs.py
r3415f4f r2684d45 22 22 # Initial parameter values (if other than defaults) 23 23 initial_vals = { 24 "sld_core" : 1.0592, 25 "sld_solvent" : 2.88, 26 "radius" : 890, 27 "thickness" : 130 24 "sld_core" : 1.83, 25 "sld_shell" : 1.83, 26 "sld_solvent" : 0, 27 "radius" : 730, 28 "thickness" : 20, 29 "volfraction" : phi, 30 "scale" : (1-phi) 28 31 } 29 32 -
sasmodels/models/core_shell_sphere.py
r3556ad7 r3f167d9 91 91 @param thickness: shell thickness 92 92 """ 93 return (1,1) 93 94 whole = 4.0 * pi / 3.0 * pow((radius + thickness), 3) 94 95 core = 4.0 * pi / 3.0 * radius * radius * radius -
sasmodels/sesans.py
rc94577f r2684d45 29 29 30 30 q_min = dq = 0.1 * 2*pi / Rmax 31 return np.arange(q_min, Converter("1/A")(q_max[0], units=q_max[1]), dq) 31 return np.arange(q_min, 32 Converter(q_max[1])(q_max[0], 33 units="1/A"), 34 dq) 32 35 33 36 def make_all_q(data): … … 75 78 76 79 def call_hankel(data, q_calc, Iq_calc): 77 return hankel(data.x, data.lam * 1e-9, 78 data.sample.thickness / 10, 80 return hankel((data.x, data.x_unit), 81 (data.lam, data.lam_unit), 82 (data.sample.thickness, 83 data.sample.thickness_unit), 79 84 q_calc, Iq_calc) 80 85 … … 182 187 *I* [cm$^{-1}$] is the value of the SANS model at *q* 183 188 """ 189 190 from sas.sascalc.data_util.nxsunit import Converter 191 wavelength = Converter(wavelength[1])(wavelength[0],"A") 192 thickness = Converter(thickness[1])(thickness[0],"A") 193 Iq = Converter("1/cm")(Iq,"1/A") # All models default to inverse centimeters 194 SElength = Converter(SElength[1])(SElength[0],"A") 195 184 196 G = np.zeros_like(SElength, 'd') 185 197 #============================================================================== … … 192 204 193 205 # [m^-1] step size in q, needed for integration 194 dq = (q[1]-q[0]) *1e10206 dq = (q[1]-q[0]) 195 207 196 208 # integration step, convert q into [m**-1] and 2 pi circle integration 197 G *= dq* 1e10*2*pi198 G0 *= dq*1e10*2*pi209 G *= dq*2*pi 210 G0 = np.sum(Iq*q)*dq*2*np.pi 199 211 200 212 P = exp(thickness*wavelength**2/(4*pi**2)*(G-G0))
Note: See TracChangeset
for help on using the changeset viewer.