- Timestamp:
- Oct 30, 2018 6:19:38 PM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 5024a56
- Parents:
- aa8c6e0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
example/cylinder_eval.py
r2e66ef5 r23df833 3 3 """ 4 4 5 from numpy import logspace 5 from numpy import logspace, sqrt 6 6 from matplotlib import pyplot as plt 7 7 from sasmodels.core import load_model 8 from sasmodels.direct_model import call_kernel 8 from sasmodels.direct_model import call_kernel, call_Fq 9 9 10 10 model = load_model('cylinder') 11 11 q = logspace(-3, -1, 200) 12 12 kernel = model.make_kernel([q]) 13 Iq = call_kernel(kernel, dict(radius=200.)) 14 plt.loglog(q, Iq) 13 pars = {'radius': 200, 'radius_pd': 0.1, 'scale': 2} 14 Iq = call_kernel(kernel, pars) 15 F, Fsq, Reff, V, Vratio = call_Fq(kernel, pars) 16 plt.loglog(q, Iq, label='2 I(q)') 17 plt.loglog(q, F**2/V, label='<F(q)>^2/V') 18 plt.loglog(q, Fsq/V, label='<F^2(q)>/V') 15 19 plt.xlabel('q (1/A)') 16 plt.ylabel('I(q) ')20 plt.ylabel('I(q) (1/cm)') 17 21 plt.title('Cylinder with radius 200.') 22 plt.legend() 18 23 plt.show()
Note: See TracChangeset
for help on using the changeset viewer.