Changes in / [49da079:5430333] in sasmodels
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
example/sesans_parameters_css-hs.py
r3415f4f rca3abe6 22 22 # Initial parameter values (if other than defaults) 23 23 initial_vals = { 24 "sld_core" : 1.0592, 24 "sld_core" : 1.05, 25 "sld_shell" : 2.88*pen-0.05*(1-pen), 25 26 "sld_solvent" : 2.88, 26 "radius" : 890, 27 "thickness" : 130 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.