[80768fc] | 1 | r""" |
---|
[f224873] | 2 | Calculates the scattering from a randomly distributed, two-phase system based on |
---|
| 3 | the Debye-Anderson-Brumberger (DAB) model for such systems. The two-phase system |
---|
| 4 | is characterized by a single length scale, the correlation length, which is a |
---|
| 5 | measure of the average spacing between regions of phase 1 and phase 2. **The |
---|
| 6 | model also assumes smooth interfaces between the phases** and hence exhibits |
---|
[eb69cce] | 7 | Porod behavior $(I \sim q^{-4})$ at large $q$, $(qL \gg 1)$. |
---|
[80768fc] | 8 | |
---|
| 9 | The DAB model is ostensibly a development of the earlier Debye-Bueche model. |
---|
| 10 | |
---|
[eb69cce] | 11 | Definition |
---|
| 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 | |
---|
| 18 | where scale is |
---|
| 19 | |
---|
[eb69cce] | 20 | .. math:: \text{scale} = 8 \pi \phi (1-\phi) \Delta\rho^2 |
---|
[80768fc] | 21 | |
---|
[eb69cce] | 22 | and the parameter $L$ is the correlation length. |
---|
[f224873] | 23 | |
---|
[eb69cce] | 24 | For 2D data the scattering intensity is calculated in the same way as 1D, |
---|
| 25 | where the $q$ vector is defined as |
---|
[f224873] | 26 | |
---|
| 27 | .. math:: q = \sqrt{q_x^2 + q_y^2} |
---|
| 28 | |
---|
| 29 | |
---|
[eb69cce] | 30 | References |
---|
| 31 | ---------- |
---|
[80768fc] | 32 | |
---|
[0507e09] | 33 | .. [#] P Debye, H R Anderson, H Brumberger, *Scattering by an Inhomogeneous Solid. II. The Correlation Function and its Application*, *J. Appl. Phys.*, 28(6) (1957) 679 |
---|
| 34 | .. [#] P Debye, A M Bueche, *Scattering by an Inhomogeneous Solid*, *J. Appl. Phys.*, 20 (1949) 518 |
---|
[80768fc] | 35 | |
---|
[0507e09] | 36 | Source |
---|
| 37 | ------ |
---|
[80768fc] | 38 | |
---|
[0507e09] | 39 | `dab.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/dab.py>`_ |
---|
| 40 | |
---|
| 41 | Authorship and Verification |
---|
| 42 | ---------------------------- |
---|
| 43 | |
---|
| 44 | * **Author:** |
---|
| 45 | * **Last Modified by:** |
---|
| 46 | * **Last Reviewed by:** Steve King & Peter Parker **Date:** September 09, 2013 |
---|
| 47 | * **Source added by :** Steve King **Date:** March 25, 2019 |
---|
[80768fc] | 48 | """ |
---|
| 49 | |
---|
[2d81cfe] | 50 | import numpy as np |
---|
[80768fc] | 51 | from numpy import inf |
---|
| 52 | |
---|
| 53 | name = "dab" |
---|
| 54 | title = "DAB (Debye Anderson Brumberger) Model" |
---|
| 55 | description = """\ |
---|
| 56 | |
---|
[f224873] | 57 | F(q)= scale * L^3/(1 + (q*L)^2)^2 |
---|
[80768fc] | 58 | |
---|
| 59 | L: the correlation length |
---|
| 60 | |
---|
| 61 | """ |
---|
[a5d0d00] | 62 | category = "shape-independent" |
---|
[80768fc] | 63 | |
---|
[3e428ec] | 64 | # ["name", "units", default, [lower, upper], "type", "description"], |
---|
[a807206] | 65 | parameters = [["cor_length", "Ang", 50.0, [0, inf], "", "correlation length"], |
---|
[3e428ec] | 66 | ] |
---|
[80768fc] | 67 | |
---|
| 68 | Iq = """ |
---|
[4962519] | 69 | double numerator = cube(cor_length); |
---|
| 70 | double denominator = square(1 + square(q*cor_length)); |
---|
[404ebbd] | 71 | |
---|
[80768fc] | 72 | return numerator / denominator ; |
---|
| 73 | """ |
---|
| 74 | |
---|
[404ebbd] | 75 | def random(): |
---|
[b297ba9] | 76 | """Return a random parameter set for the model.""" |
---|
[404ebbd] | 77 | pars = dict( |
---|
| 78 | scale=10**np.random.uniform(1, 4), |
---|
| 79 | cor_length=10**np.random.uniform(0.3, 3), |
---|
[0507e09] | 80 | # background = 0, |
---|
[404ebbd] | 81 | ) |
---|
| 82 | pars['scale'] /= pars['cor_length']**3 |
---|
| 83 | return pars |
---|
| 84 | |
---|
[a807206] | 85 | demo = dict(scale=1, background=0, cor_length=50) |
---|