source:sasmodels/sasmodels/models/lamellarFFHG.py@22eac46

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 22eac46 was 22eac46, checked in by Paul Kienzle <pkienzle@…>, 9 years ago

fix sasview variable mapping for tail length

• Property mode set to 100644
File size: 3.6 KB
Line
1# Note: model title and parameter table are inserted automatically
2r"""
3This model provides the scattering intensity, *I(q)*, for a lyotropic lamellar
4phase where a random distribution in solution are assumed. The SLD of the head
5region is taken to be different from the SLD of the tail region.
6
7*2.1.31.1. Definition*
8
9The scattering intensity *I(q)* is
10
11.. math::
12
13    I(Q) = 2\pi{P(Q) \over (2(|delta|\ H +|delta|\ T) Q^2)
14
15The form factor is
16
17.. image:: img/lamellarFFHG_.jpg
18
19where |delta|\ T = tail length (or *tail_length*), |delta|\ H = head thickness
20(or *h_thickness*), |drho|\ H = SLD(headgroup) - SLD(solvent),
21and |drho|\ T = SLD(tail) - SLD(solvent).
22
23The 2D scattering intensity is calculated in the same way as 1D, where
24the *q* vector is defined as
25
26.. math::
27
28    Q = \sqrt{Q_x^2 + Q_y^2}
29
30The returned value is in units of |cm^-1|, on absolute scale. In the
31parameters, *sld_tail* = SLD of the tail group, and *sld_head* = SLD
33
34.. image:: img/lamellarFFHG_138.jpg
35
36*Figure. 1D plot using the default values (w/1000 data point).*
37
38Our model uses the form factor calculations implemented in a C library
39provided by the NIST Center for Neutron Research (Kline, 2006).
40
41REFERENCE
42
43F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502
44
45also in J. Phys. Chem. B, 105, (2001) 11081-11088
46
47*2014/04/17 - Description reviewed by S King and P Butler.*
48"""
49
50from numpy import inf
51
52name = "lamellar_FFHG"
53title = "Random lamellar phase with Head Groups "
54description = """\
55    [Random lamellar phase with Head Groups]
56        I(q)= 2*pi*P(q)/(2(H+T)*q^(2)), where
57        P(q)= see manual
58        layer thickness =(H+T+T+H) = 2(Head+Tail)
59        sld = Tail scattering length density
61        solvent_sld = solvent scattering length density
62        background = incoherent background
63        scale = scale factor
64"""
65category = "shape:lamellae"
66
67#             ["name", "units", default, [lower, upper], "type","description"],
68parameters = [["tail_length", "Ang",  15, [0, inf], "volume",
69               "Tail thickness"],
70              ["head_length", "Ang",  10, [0, inf], "volume",
72              ["sld", "1e-6/Ang^2", 0.4, [-inf,inf], "",
73               "Tail scattering length density"],
74              ["head_sld", "1e-6/Ang^2", 3.0, [-inf,inf], "",
76              ["solvent_sld", "1e-6/Ang^2", 6, [-inf,inf], "",
77               "Solvent scattering length density"],
78             ]
79
80# No volume normalization despite having a volume parameter
81# This should perhaps be volume normalized?
82form_volume = """
83    return 1.0;
84    """
85
86Iq = """
87    const double qsq = q*q;
88    const double drh = head_sld - solvent_sld;
89    const double drt = sld - solvent_sld;    //correction 13FEB06 by L.Porcar
90    const double qT = q*tail_length;
91    double Pq, inten;
92    Pq = drh*(sin(q*(head_length+tail_length))-sin(qT)) + drt*sin(qT);
93    Pq *= Pq;
94    Pq *= 4.0/(qsq);
95
96    inten = 2.0e-4*M_PI*Pq/qsq;
97
98    // normalize by the bilayer thickness
100
101    return inten;
102    """
103
104Iqxy = """
105    return Iq(sqrt(qx*qx+qy*qy), IQ_PARAMETERS);
106    """
107
108# ER defaults to 0.0
109# VR defaults to 1.0
110
111demo = dict(scale=1, background=0,