source: sasmodels/example/sesansfit.py @ c97724e

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 
1import numpy as np
2from bumps.names import *
3
4from sasmodels import bumps_model as sas
5kernel = sas.load_model('sphere', dtype='single')
6
7radius = 1000
8
9SElength = np.linspace(0, 2400, 61) # [A]
10data = np.ones_like(SElength)
11err_data = np.ones_like(SElength)*0.03
12
13class 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
23data = SesansData()
24
25phi = Parameter(0.1, name="phi")
26model = sas.BumpsModel(data, kernel,
27    scale=phi*(1-phi), sld=7.0, solvent_sld=1.0, radius=radius)
28phi.pmp(10)
29model.radius.pmp(40)
30model.sld.pm(2)
31model.background.range(0,5)
32
33problem = FitProblem(model)
34
Note: See TracBrowser for help on using the repository browser.