r""" This model calculates the scattering from fractal-like aggregates based on the Mildner reference. Definition ---------- The scattering intensity $I(q)$ is calculated as .. math:: :nowrap: \begin{align*} I(q) &= \text{scale} \times P(q)S(q) + \text{background} \\ P(q) &= F(qR)^2 \\ F(x) &= \frac{3\left[\sin(x)-x\cos(x)\right]}{x^3} \\ S(q) &= \Gamma(5-D_S)\xi^{\,5-D_S}\left[1+(q\xi)^2 \right]^{-(5-D_S)/2} \sin\left[-(5-D_S) \tan^{-1}(q\xi) \right] q^{-1} \\ \text{scale} &= \text{scale factor}\, N V^1(\rho_\text{particle} - \rho_\text{solvent})^2 \\ V &= \frac{4}{3}\pi R^3 \end{align*} where $R$ is the radius of the building block, $D_S$ is the **surface** fractal dimension, $\xi$ is the cut-off length, $\rho_\text{solvent}$ is the scattering length density of the solvent and $\rho_\text{particle}$ is the scattering length density of particles. .. note:: The surface fractal dimension is only valid if $1`_ `surface_fractal.c `_ Authorship and Verification ---------------------------- * **Author:** * **Last Modified by:** * **Last Reviewed by:** * **Source added by :** Steve King **Date:** March 25, 2019 """ import numpy as np from numpy import inf name = "surface_fractal" title = "Fractal-like aggregates based on the Mildner reference" description = """\ [The scattering intensity I(x) = scale*P(x)*S(x) + background, where scale = scale_factor * V * delta^(2) p(x) = F(x*radius)^(2) F(x) = 3*[sin(x)-x cos(x)]/x**3 S(x) = [(gamma(5-Ds)*colength^(5-Ds)*[1+(x^2*colength^2)]^((Ds-5)/2) * sin[(Ds-5)*arctan(x*colength)])/x] where delta = sldParticle -sldSolv. radius = Particle radius fractal_dim_surf = Surface fractal dimension (Ds) co_length = Cut-off length background = background Ref. :Mildner, Hall,J Phys D Appl Phys(1986), 19, 1535-1545 Note I : This model is valid for 1