Changeset e47b06b in sasmodels
- Timestamp:
- Jul 26, 2017 9:42:25 AM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- acc6c8f
- Parents:
- 1dd7a45f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
explore/symint.py
r1dd7a45f re47b06b 32 32 return norm, cylinder 33 33 34 def make_ inf_cylinder(radius, length):35 def inf_cylinder(q):34 def make_long_cylinder(radius, length): 35 def long_cylinder(q): 36 36 return norm/q * sas_2J1x_x(q*radius)**2 37 inf_cylinder.__doc__ = "infcylinder radius=%g, length=%g"%(radius, length)37 long_cylinder.__doc__ = "long cylinder radius=%g, length=%g"%(radius, length) 38 38 volume = pi*radius**2*length 39 39 norm = 1e-4*volume*CONTRAST**2*pi/length 40 return inf_cylinder40 return long_cylinder 41 41 42 42 def make_sphere(radius): … … 135 135 length = 1e5 136 136 NORM, KERNEL = make_cylinder(radius=radius, length=length) 137 inf_cyl = make_inf_cylinder(radius=radius, length=length)137 long_cyl = make_long_cylinder(radius=radius, length=length) 138 138 #NORM, KERNEL = make_sphere(radius=50.) 139 139 … … 145 145 for k in (8, 10, 13, 16, 19): 146 146 gridded_integrals(Q, n=2**k+1) 147 #print("inf cyl", 0, inf_cyl(Q))147 #print("inf cyl", 0, long_cyl(Q)) 148 148 #scipy_romberg(Q) 149 149 … … 155 155 156 156 q = np.logspace(-3, 0, 400) 157 I1 = inf_cyl(q)157 I1 = long_cyl(q) 158 158 I2 = plot_Iq(q, n=2**19+1, form="trapz") 159 159 #plot_Iq(q, n=2**16+1, form="trapz") … … 163 163 #plot_Iq(q, n=150, form="gauss") 164 164 #plot_Iq(q, n=76, form="gauss") 165 pylab.loglog(q, inf_cyl(q), label="limit")165 pylab.loglog(q, long_cyl(q), label="limit") 166 166 pylab.legend() 167 167
Note: See TracChangeset
for help on using the changeset viewer.