broad-peak (SASfit) - sasfit_broad_peak.py

    r"""
This file has been automatically generated by sasfit_convert and manually edited
by Wojciech Potrzebowski, ESS on 2017-12-05.

The model calculates an empirical functional form for SAS data characterized
by broad_peak (as defined in SASFit)

Definition:
-----------

Many SANS spectra are characterized by a broad peak even though they are
from amorphous soft materials.
The d-spacing corresponding to the broad peak is a characteristic distance
between the scattering inhomogeneities (such as in lamellar, cylindrical,
or spherical morphologies or for bicontinuous structures).
The following simple functional form reproduces the broad peak feature:

.. math:: I(q) = frac{I_0}{({1 + (|q - q_0|xi)^m})^p}

Here the peak position is related to the d-spacing as $q_0 = 2pi d$.
Soft systems that show a SANS peak include copolymers, polyelectrolytes,
multiphase systems, layered structures, etc.
.. note::
    For $q0 = 0$, $m = 2$ and $p = 1$ one gets the Ornstein-Zernike model.
    For $q0 = 0$, $m = 2$ and $p = 2$ The Broad-Peak model is identical to the
    Debye-Anderson-Brumberger model.

For 2D data the scattering intensity is calculated in the same way as 1D,
where the $q$ vector is defined as

.. math:: q = sqrt{q_x^2 + q_y^2}

References:
-----------
https://github.com/SASfit/SASfit/
Original SASfit file: /src/plugins/non_particulate/sasfit_ff_broad_peak.c

A paper about SASfit has been published in
J. Appl. Cryst. (2015). 48, 1587-1598
doi:10.1107/S1600576715016544
"""
from numpy import inf

name = "broad_peak"
title = " "
description = """
            F^2(q,I0,xi,m,q0) = I0/(1+(|q-q0|*xi)^m)^p
            List of default parameters
            I0: forward scattering
            xi: correlation length
            q0:peak position which is related to the d-spacing as q0 = 2pi/d
            m: exponent m
            p: exponnent p
            """
category = "shape-independent"
#pylint: disable=bad-whitespace, line-too-long
parameters = [
 ["I0", 	"", 	10.0, 	[-inf, inf], 	"", 	"forward scattering"],
 ["XI", 	"Ang", 	50.0, 	[-inf, inf], 	"", 	"correlation length"],
 ["Q0", 	"1/Ang", 	0.01, 	[-inf, inf], 	"", 	"peak position which is related to the d-spacing as q0 = 2pi/d"],
 ["M", 	"", 	2.0, 	[-inf, inf], 	"", 	"exponent m"],
 ["P", 	"", 	1.0, 	[-inf, inf], 	"", 	"exponnet p"],
]
#pylint: enable=bad-whitespace, line-too-long

source = ["sasfit_broad_peak.c"]

demo = {
	"I0" : 10.0,
	"XI" : 50.0,
	"Q0" : 0.01,
	"M" : 2.0,
	"P" : 1.0
}

tests = [[{}, 0.001, 8.31700831601],
         [{'P':2}, 0.001, 6.91659943119],
         [{}, 0.2, 0.110589041096],
         [{'Q0':0.2}, 0.2, 10.001],
         [{}, [0.2], [0.110589041096]]
        ]
Back to Model Download