core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since c97724e was
c97724e,
checked in by pkienzle, 10 years ago
|
add sesans support to bumps model
|
-
Property mode set to
100644
|
File size:
791 bytes
|
Line | |
---|
1 | import numpy as np |
---|
2 | from bumps.names import * |
---|
3 | |
---|
4 | from sasmodels import bumps_model as sas |
---|
5 | kernel = sas.load_model('sphere', dtype='single') |
---|
6 | |
---|
7 | radius = 1000 |
---|
8 | |
---|
9 | SElength = np.linspace(0, 2400, 61) # [A] |
---|
10 | data = np.ones_like(SElength) |
---|
11 | err_data = np.ones_like(SElength)*0.03 |
---|
12 | |
---|
13 | class SesansData: |
---|
14 | #q_zmax = 0.23 # [A^-1] |
---|
15 | q_zmax = 0.1 # [A^-1] |
---|
16 | SElength = np.linspace(0, 2400, 61) # [A] |
---|
17 | Rmax = 3*radius # [A] |
---|
18 | wavelength = 2e-10 # [m] |
---|
19 | thickness = 0.2 # [cm] |
---|
20 | SElength = SElength |
---|
21 | data = data |
---|
22 | err_data = err_data |
---|
23 | data = SesansData() |
---|
24 | |
---|
25 | phi = Parameter(0.1, name="phi") |
---|
26 | model = sas.BumpsModel(data, kernel, |
---|
27 | scale=phi*(1-phi), sld=7.0, solvent_sld=1.0, radius=radius) |
---|
28 | phi.pmp(10) |
---|
29 | model.radius.pmp(40) |
---|
30 | model.sld.pm(2) |
---|
31 | model.background.range(0,5) |
---|
32 | |
---|
33 | problem = FitProblem(model) |
---|
34 | |
---|
Note: See
TracBrowser
for help on using the repository browser.