# source:sasmodels/sasmodels/models/dab.py@f224873

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since f224873 was f224873, checked in by butler, 7 years ago

updated documentation - see ticket #400

• Property mode set to 100644
File size: 2.5 KB
Line
1r"""
2
3Scattering model class for the DAB (Debye Anderson Brumberger) Model
4
5Definition
6----------
7
8Calculates the scattering from a randomly distributed, two-phase system based on
9the Debye-Anderson-Brumberger (DAB) model for such systems. The two-phase system
10is characterized by a single length scale, the correlation length, which is a
11measure of the average spacing between regions of phase 1 and phase 2. **The
12model also assumes smooth interfaces between the phases** and hence exhibits
13Porod behavior (I ~ *q*\ :sup:-4) at large *q* (*QL* >> 1).
14
15The DAB model is ostensibly a development of the earlier Debye-Bueche model.
16
17*Definition*
18
19.. math:: I(q) = \text{scale}\cdot\frac{L^3}{(1 + (q \cdot L)^2)^2} + \text{background}
20
21where scale is
22
23.. math:: \text{scale} = 8 \pi \phi (1-\phi)(\Delta \rho)^2
24
25and the parameter *L* is the correlation length.
26
27For 2D data: The 2D scattering intensity is calculated in the same way as 1D,
28where the *q* vector is defined as
29
30.. math:: q = \sqrt{q_x^2 + q_y^2}
31
32==============  ========  =============
33Parameter name  Units     Default value
34==============  ========  =============
35scale           None      1.0
36corr length L   |Ang|     50.0
37background      |cm^-1|   0.0
38==============  ========  =============
39
40
41.. figure:: img/dab_1d.jpg
42
43   1D plot using the default values (w/200 data point).
44
45
46Reference
47---------
48
49P Debye, H R Anderson, H Brumberger, *Scattering by an Inhomogeneous Solid. II.
50The Correlation Function and its Application*, *J. Appl. Phys.*, 28(6) (1957) 679
51
52P Debye, A M Bueche, *Scattering by an Inhomogeneous Solid*, *J. Appl. Phys.*,
5320 (1949) 518
54
55*2013/09/09 - Description reviewed by King, S and Parker, P.*
56
57"""
58
59from numpy import inf
60
61name = "dab"
62title = "DAB (Debye Anderson Brumberger) Model"
63description = """\
64
65F(q)= scale * L^3/(1 + (q*L)^2)^2
66
67L: the correlation length
68
69"""
70category = "shape-independent"
71
72#             ["name", "units", default, [lower, upper], "type", "description"],
73parameters = [["length", "Ang", 50.0, [0, inf], "", "correlation length"],
74             ]
75
76Iq = """
77    double numerator   = pow(length, 3);
78    double denominator = pow(1 + pow(q*length,2), 2);
79
80    return numerator / denominator ;
81    """
82
83Iqxy = """
84    // never called since no orientation or magnetic parameters.
85    //return -1.0;
86    return Iq(sqrt(qx*qx + qy*qy), length);
87    """
88
89# ER defaults to 1.0
90
91# VR defaults to 1.0
92
93demo = dict(scale=1, background=0, length=50)
94oldname = "DABModel"
95oldpars = dict(length='length')
Note: See TracBrowser for help on using the repository browser.