[12dbc90] | 1 | r""" |
---|
| 2 | Definition |
---|
| 3 | ---------- |
---|
| 4 | This model calculates the scattering from fractal-like aggregates of spherical |
---|
| 5 | building blocks according the following equation: |
---|
| 6 | |
---|
| 7 | .. math:: |
---|
| 8 | |
---|
[785cbec] | 9 | I(q) = \phi\ V_\text{block} (\rho_\text{block} |
---|
| 10 | - \rho_\text{solvent})^2 P(q)S(q) + \text{background} |
---|
[12dbc90] | 11 | |
---|
| 12 | where $\phi$ is The volume fraction of the spherical "building block" particles |
---|
| 13 | of radius $R_0$, $V_{block}$ is the volume of a single building block, |
---|
| 14 | $\rho_{solvent}$ is the scattering length density of the solvent, and |
---|
| 15 | $\rho_{block}$ is the scattering length density of the building blocks, and |
---|
| 16 | P(q), S(q) are the scattering from randomly distributed spherical particles |
---|
| 17 | (the building blocks) and the interference from such building blocks organized |
---|
| 18 | in a fractal-like clusters. P(q) and S(q) are calculated as: |
---|
| 19 | |
---|
| 20 | .. math:: |
---|
| 21 | |
---|
[785cbec] | 22 | P(q)&= F(qR_0)^2 |
---|
| 23 | |
---|
| 24 | F(q)&= \frac{3 (\sin x - x \cos x)}{x^3} |
---|
| 25 | |
---|
| 26 | V_\text{particle} &= \frac{4}{3}\ \pi R_0 |
---|
| 27 | |
---|
| 28 | S(q) &= 1 + \frac{D_f\ \Gamma\!(D_f-1)}{[1+1/(q \xi)^2\ ]^{(D_f -1)/2}} |
---|
| 29 | \frac{\sin[(D_f-1) \tan^{-1}(q \xi) ]}{(q R_0)^{D_f}} |
---|
[12dbc90] | 30 | |
---|
| 31 | where $\xi$ is the correlation length representing the cluster size and $D_f$ |
---|
| 32 | is the fractal dimension, representing the self similarity of the structure. |
---|
| 33 | |
---|
| 34 | **Polydispersity on the radius is provided for.** |
---|
| 35 | |
---|
| 36 | For 2D data: The 2D scattering intensity is calculated in the same way as |
---|
| 37 | 1D, where the *q* vector is defined as |
---|
| 38 | |
---|
| 39 | .. math:: |
---|
| 40 | |
---|
| 41 | q = \sqrt{q_x^2 + q_y^2} |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | References |
---|
| 45 | ---------- |
---|
| 46 | |
---|
| 47 | J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-785 |
---|
| 48 | |
---|
[5e29b9d] | 49 | **Author:** NIST IGOR/DANSE **on:** pre 2010 |
---|
[12dbc90] | 50 | |
---|
[dff1088] | 51 | **Last Modified by:** Paul Butler **on:** March 20, 2016 |
---|
[12dbc90] | 52 | |
---|
[dff1088] | 53 | **Last Reviewed by:** Paul Butler **on:** March 20, 2016 |
---|
[12dbc90] | 54 | |
---|
| 55 | """ |
---|
| 56 | |
---|
| 57 | from numpy import inf |
---|
| 58 | |
---|
| 59 | name = "fractal" |
---|
| 60 | title = "Calculates the scattering from fractal-like aggregates of spheres \ |
---|
| 61 | following theTexiera reference." |
---|
| 62 | description = """ |
---|
| 63 | The scattering intensity is given by |
---|
| 64 | I(q) = scale * V * delta^(2) * P(q) * S(q) + background, where |
---|
| 65 | p(q)= F(q*radius)^(2) |
---|
| 66 | F(x) = 3*[sin(x)-x cos(x)]/x**3 |
---|
| 67 | delta = sld_block -sld_solv |
---|
| 68 | scale = scale * volfraction |
---|
| 69 | radius = Block radius |
---|
| 70 | sld_block = SDL block |
---|
| 71 | sld_solv = SDL solvent |
---|
| 72 | background = background |
---|
| 73 | and S(q) is the interference term between building blocks given |
---|
| 74 | in the full documentation and depending on the parameters |
---|
| 75 | fractal_dim = Fractal dimension |
---|
| 76 | cor_length = Correlation Length """ |
---|
| 77 | |
---|
| 78 | category = "shape-independent" |
---|
| 79 | |
---|
| 80 | # pylint: disable=bad-whitespace, line-too-long |
---|
| 81 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
| 82 | parameters = [["volfraction", "", 0.05, [0.0, 1], "", |
---|
| 83 | "volume fraction of blocks"], |
---|
| 84 | ["radius", "Ang", 5.0, [0.0, inf], "", |
---|
| 85 | "radius of particles"], |
---|
[6d96b66] | 86 | ["fractal_dim", "", 2.0, [1.0, 6.0], "", |
---|
[12dbc90] | 87 | "fractal dimension"], |
---|
| 88 | ["cor_length", "Ang", 100.0, [0.0, inf], "", |
---|
| 89 | "cluster correlation length"], |
---|
[42356c8] | 90 | ["sld_block", "1e-6/Ang^2", 2.0, [-inf, inf], "sld", |
---|
[12dbc90] | 91 | "scattering length density of particles"], |
---|
[42356c8] | 92 | ["sld_solvent", "1e-6/Ang^2", 6.4, [-inf, inf], "sld", |
---|
[12dbc90] | 93 | "scattering length density of solvent"], |
---|
| 94 | ] |
---|
| 95 | # pylint: enable=bad-whitespace, line-too-long |
---|
| 96 | |
---|
| 97 | source = ["lib/sph_j1c.c", "lib/sas_gamma.c", "fractal.c"] |
---|
| 98 | |
---|
[dff1088] | 99 | demo = dict(volfraction=0.05, |
---|
[12dbc90] | 100 | radius=5.0, |
---|
| 101 | fractal_dim=2.0, |
---|
| 102 | cor_length=100.0, |
---|
| 103 | sld_block=2.0, |
---|
| 104 | sld_solvent=6.4) |
---|
| 105 | |
---|
| 106 | # NOTE: test results taken from values returned by SasView 3.1.2 |
---|
| 107 | tests = [ |
---|
[dff1088] | 108 | [{}, 0.0005, 40.4980069872], |
---|
| 109 | [{}, 0.234734468938, 0.0947143166058], |
---|
| 110 | [{}, 0.5, 0.0176878183458], |
---|
[12dbc90] | 111 | ] |
---|