core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since eff3d66 was
eff3d66,
checked in by krzywon, 8 years ago
|
Finished the conversion of the lorentz and guinier models.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | r""" |
---|
2 | Guinier (Model) |
---|
3 | |
---|
4 | Definition |
---|
5 | ---------- |
---|
6 | |
---|
7 | This model fits the Guinier function |
---|
8 | |
---|
9 | .. math:: Q_1=\frac{1}{R_g}\sqrt{\frac{(m-s)(3-s)}{2}} |
---|
10 | |
---|
11 | to the data directly without any need for linearisation (*cf*. Ln *I(q)* vs *q*\ :sup:`2`). |
---|
12 | |
---|
13 | For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as |
---|
14 | |
---|
15 | .. math:: q=\sqrt{q_x^2 + q_y^2} |
---|
16 | |
---|
17 | REFERENCE |
---|
18 | |
---|
19 | A Guinier and G Fournet, *Small-Angle Scattering of X-Rays*, John Wiley & Sons, New York (1955) |
---|
20 | """ |
---|
21 | |
---|
22 | from numpy import inf |
---|
23 | |
---|
24 | name = "guinier" |
---|
25 | title = "" |
---|
26 | description = """ |
---|
27 | I(q) = scale exp ( - rg^2 q^2 / 3.0 ) |
---|
28 | |
---|
29 | List of default parameters: |
---|
30 | scale = scale |
---|
31 | rg = Radius of gyration |
---|
32 | """ |
---|
33 | category = "shape-independent" |
---|
34 | |
---|
35 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
36 | parameters = [["rg", "Ang", 60.0, [0, inf], "", "Radius of Gyration"],] |
---|
37 | |
---|
38 | Iq = """ |
---|
39 | double value = rg*rg*q*q/3.0; |
---|
40 | return exp(-value); |
---|
41 | """ |
---|
42 | |
---|
43 | Iqxy = """ |
---|
44 | return Iq(sqrt(qx*qx + qy*qy), rg); |
---|
45 | """ |
---|
46 | |
---|
47 | # parameters for demo |
---|
48 | demo = dict(scale=1.0,rg=60.0) |
---|
49 | |
---|
50 | # For testing against the old sasview models, include the converted parameter |
---|
51 | # names and the target sasview model name. |
---|
52 | oldname = 'GuinierModel' |
---|
53 | oldpars = dict(rg='rg') |
---|
Note: See
TracBrowser
for help on using the repository browser.