source: sasmodels/sasmodels/models/dab.py @ 2f0c07d

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 2f0c07d was 94bd809, checked in by mathieu, 8 years ago

Fix pylint

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