source: sasmodels/sasmodels/models/lamellarCailleHG.py @ bfb195e

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

fake 2D patterns for pure 1D models using Iqq

  • Property mode set to 100644
File size: 4.4 KB
Line 
1# Note: model title and parameter table are inserted automatically
2r"""
3This model provides the scattering intensity, *I(q)* = *P(q)* \* *S(q)*, for a lamellar phase where a random
4distribution in solution are assumed. Here a Caille S(Q) is used for the lamellar stacks.
5
6The scattering intensity *I(q)* is
7
8.. image:: img/lamellarCailleHG_139.PNG
9
10The form factor is
11
12.. image:: img/lamellarCailleHG_143.PNG
13
14and the structure factor is
15
16.. image:: img/lamellarCailleHG_140.PNG
17
18where
19
20.. image:: img/lamellarCailleHG_141.PNG
21
22where |delta|\ T = tail length (or *tail_length*), |delta|\ H = head thickness (or *h_thickness*),
23|drho|\ H = SLD(headgroup) - SLD(solvent), and |drho|\ T = SLD(tail) - SLD(headgroup).
24Here *d* = (repeat) spacing, *K* = smectic bending elasticity, *B* = compression modulus, and N = number of lamellar
25plates (*n_plates*).
26
27NB: **When the Caille parameter is greater than approximately 0.8 to 1.0, the assumptions of the model are incorrect.**
28And due to a complication of the model function, users are responsible for making sure that all the assumptions are
29handled accurately (see the original reference below for more details).
30
31Non-integer numbers of stacks are calculated as a linear combination of results for the next lower and higher values.
32
33The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
34
35.. math::
36
37    Q = \sqrt{Q_x^2 + Q_y^2}
38
39The returned value is in units of |cm^-1|, on absolute scale.
40
41==============  ========  =============
42Parameter name  Units     Default value
43==============  ========  =============
44background      |cm^-1|   0.001
45sld_head        |Ang^-2|  2e-06
46scale           None      1
47sld_solvent     |Ang^-2|  6e-06
48deltaH          |Ang|     2
49deltaT          |Ang|     10
50sld_tail        |Ang^-2|  0
51n_plates        None      30
52spacing         |Ang|     40
53caille          |Ang^-2|  0.001
54==============  ========  =============
55
56.. image:: img/lamellarCailleHG_142.jpg
57
58*Figure. 1D plot using the default values (w/6000 data point).*
59
60Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
61(Kline, 2006).
62
63REFERENCE
64
65F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502
66
67also in J. Phys. Chem. B, 105, (2001) 11081-11088
68"""
69from numpy import pi, inf
70
71name = "lamellarCailleHG"
72title = "Random lamellar sheet with Caille structure factor"
73description = """\
74        [Random lamellar phase with Caille  structure factor]
75        randomly oriented stacks of infinite sheets
76                with Caille S(Q), having polydisperse spacing.
77                layer thickness =(H+T+T+H) = 2(Head+Tail)
78                sld = Tail scattering length density
79                sld_head = Head scattering length density
80                sld_solvent = solvent scattering length density
81                background = incoherent background
82                scale = scale factor
83"""
84category = "shape:lamellae"
85
86parameters = [
87#   [ "name", "units", default, [lower, upper], "type",
88#     "description" ],
89    [ "tail_length", "Ang",  10, [0, inf], "volume",
90      "Tail thickness" ],
91    [ "head_length", "Ang",  2, [0, inf], "volume",
92      "head thickness" ],
93    [ "Nlayers", "",  30, [0, inf], "",
94      "Number of layers" ],
95    [ "spacing", "Ang", 40., [0.0,inf], "volume",
96      "d-spacing of Caille S(Q)" ],
97    [ "Caille_parameter", "", 0.001, [0.0,0.8], "",
98      "Caille parameter" ],
99    [ "sld", "1e-6/Ang^2", 0.4, [-inf,inf], "",
100      "Tail scattering length density" ],
101    [ "head_sld", "1e-6/Ang^2", 2.0, [-inf,inf], "",
102      "Head scattering length density" ],
103    [ "solvent_sld", "1e-6/Ang^2", 6, [-inf,inf], "",
104      "Solvent scattering length density" ],
105    ]
106
107source = [ "lamellarCailleHG_kernel.c"]
108
109# No volume normalization despite having a volume parameter
110# This should perhaps be volume normalized?
111form_volume = """
112    return 1.0;
113    """
114
115Iqxy = """
116    return Iq(sqrt(qx*qx+qy*qy), IQ_PARAMETERS);
117    """
118
119# ER defaults to 0.0
120# VR defaults to 1.0
121
122demo = dict(
123        scale=1, background=0,
124                Nlayers=20,spacing=200.,
125        Caille_parameter=0.05,
126                tail_length=15,head_length=10,
127        sld=-1, head_sld=4.0, solvent_sld=6.0,
128                tail_length_pd= 0.1, tail_length_pd_n=20,
129                head_length_pd= 0.05, head_length_pd_n=30,
130                spacing_pd= 0.2, spacing_pd_n=40
131         )
132
133oldname = 'LamellarPSHGModel'
134oldpars = dict(tail_length='deltaT',head_length='deltaH',Nlayers='n_plates',Caille_parameter='caille', sld='sld_tail', head_sld='sld_head',solvent_sld='sld_solvent')
Note: See TracBrowser for help on using the repository browser.