1 | #fcc paracrystal model |
---|
2 | #note model title and parameter table are automatically inserted |
---|
3 | #note - calculation requires double precision |
---|
4 | r""" |
---|
5 | .. warning:: This model and this model description are under review following |
---|
6 | concerns raised by SasView users. If you need to use this model, |
---|
7 | please email help@sasview.org for the latest situation. *The |
---|
8 | SasView Developers. September 2018.* |
---|
9 | |
---|
10 | Definition |
---|
11 | ---------- |
---|
12 | |
---|
13 | Calculates the scattering from a **face-centered cubic lattice** with |
---|
14 | paracrystalline distortion. Thermal vibrations are considered to be |
---|
15 | negligible, and the size of the paracrystal is infinitely large. |
---|
16 | Paracrystalline distortion is assumed to be isotropic and characterized by |
---|
17 | a Gaussian distribution. |
---|
18 | |
---|
19 | The scattering intensity $I(q)$ is calculated as |
---|
20 | |
---|
21 | .. math:: |
---|
22 | |
---|
23 | I(q) = \frac{\text{scale}}{V_p} V_\text{lattice} P(q) Z(q) |
---|
24 | |
---|
25 | where *scale* is the volume fraction of spheres, $V_p$ is the volume of |
---|
26 | the primary particle, $V_\text{lattice}$ is a volume correction for the crystal |
---|
27 | structure, $P(q)$ is the form factor of the sphere (normalized), and $Z(q)$ |
---|
28 | is the paracrystalline structure factor for a face-centered cubic structure. |
---|
29 | |
---|
30 | Equation (1) of the 1990 reference\ [#CIT1990]_ is used to calculate $Z(q)$, |
---|
31 | using equations (23)-(25) from the 1987 paper\ [#CIT1987]_ for $Z1$, $Z2$, and |
---|
32 | $Z3$. |
---|
33 | |
---|
34 | The lattice correction (the occupied volume of the lattice) for a |
---|
35 | face-centered cubic structure of particles of radius $R$ and nearest |
---|
36 | neighbor separation $D$ is |
---|
37 | |
---|
38 | .. math:: |
---|
39 | |
---|
40 | V_\text{lattice} = \frac{16\pi}{3}\frac{R^3}{\left(D\sqrt{2}\right)^3} |
---|
41 | |
---|
42 | The distortion factor (one standard deviation) of the paracrystal is |
---|
43 | included in the calculation of $Z(q)$ |
---|
44 | |
---|
45 | .. math:: |
---|
46 | |
---|
47 | \Delta a = gD |
---|
48 | |
---|
49 | where $g$ is a fractional distortion based on the nearest neighbor distance. |
---|
50 | |
---|
51 | .. figure:: img/fcc_geometry.jpg |
---|
52 | |
---|
53 | Face-centered cubic lattice. |
---|
54 | |
---|
55 | For a crystal, diffraction peaks appear at reduced q-values given by |
---|
56 | |
---|
57 | .. math:: |
---|
58 | |
---|
59 | \frac{qD}{2\pi} = \sqrt{h^2 + k^2 + l^2} |
---|
60 | |
---|
61 | where for a face-centered cubic lattice $h, k , l$ all odd or all |
---|
62 | even are allowed and reflections where $h, k, l$ are mixed odd/even |
---|
63 | are forbidden. Thus the peak positions correspond to (just the first 5) |
---|
64 | |
---|
65 | .. math:: |
---|
66 | |
---|
67 | \begin{array}{cccccc} |
---|
68 | q/q_0 & 1 & \sqrt{4/3} & \sqrt{8/3} & \sqrt{11/3} & \sqrt{4} \\ |
---|
69 | \text{Indices} & (111) & (200) & (220) & (311) & (222) |
---|
70 | \end{array} |
---|
71 | |
---|
72 | .. note:: |
---|
73 | |
---|
74 | The calculation of $Z(q)$ is a double numerical integral that |
---|
75 | must be carried out with a high density of points to properly capture |
---|
76 | the sharp peaks of the paracrystalline scattering. |
---|
77 | So be warned that the calculation is slow. Fitting of any experimental data |
---|
78 | must be resolution smeared for any meaningful fit. This makes a triple integral |
---|
79 | which may be very slow. |
---|
80 | |
---|
81 | The 2D (Anisotropic model) is based on the reference below where $I(q)$ is |
---|
82 | approximated for 1d scattering. Thus the scattering pattern for 2D may not |
---|
83 | be accurate particularly at low $q$. For general details of the calculation |
---|
84 | and angular dispersions for oriented particles see :ref:`orientation` . |
---|
85 | Note that we are not responsible for any incorrectness of the |
---|
86 | 2D model computation. |
---|
87 | |
---|
88 | .. figure:: img/parallelepiped_angle_definition.png |
---|
89 | |
---|
90 | Orientation of the crystal with respect to the scattering plane, when |
---|
91 | $\theta = \phi = 0$ the $c$ axis is along the beam direction (the $z$ axis). |
---|
92 | |
---|
93 | References |
---|
94 | ---------- |
---|
95 | |
---|
96 | .. [#CIT1987] Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765 |
---|
97 | (Original Paper) |
---|
98 | .. [#CIT1990] Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856 |
---|
99 | (Corrections to FCC and BCC lattice structure calculation) |
---|
100 | |
---|
101 | Authorship and Verification |
---|
102 | --------------------------- |
---|
103 | |
---|
104 | * **Author:** NIST IGOR/DANSE **Date:** pre 2010 |
---|
105 | * **Last Modified by:** Paul Butler **Date:** September 29, 2016 |
---|
106 | * **Last Reviewed by:** Richard Heenan **Date:** March 21, 2016 |
---|
107 | """ |
---|
108 | |
---|
109 | import numpy as np |
---|
110 | from numpy import inf, pi |
---|
111 | |
---|
112 | name = "fcc_paracrystal" |
---|
113 | title = "Face-centred cubic lattic with paracrystalline distortion" |
---|
114 | description = """ |
---|
115 | Calculates the scattering from a **face-centered cubic lattice** with paracrystalline distortion. Thermal vibrations |
---|
116 | are considered to be negligible, and the size of the paracrystal is infinitely large. Paracrystalline distortion is |
---|
117 | assumed to be isotropic and characterized by a Gaussian distribution. |
---|
118 | """ |
---|
119 | category = "shape:paracrystal" |
---|
120 | |
---|
121 | single = False |
---|
122 | |
---|
123 | # pylint: disable=bad-whitespace, line-too-long |
---|
124 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
125 | parameters = [["dnn", "Ang", 220, [-inf, inf], "", "Nearest neighbour distance"], |
---|
126 | ["d_factor", "", 0.06, [-inf, inf], "", "Paracrystal distortion factor"], |
---|
127 | ["radius", "Ang", 40, [0, inf], "volume", "Particle radius"], |
---|
128 | ["sld", "1e-6/Ang^2", 4, [-inf, inf], "sld", "Particle scattering length density"], |
---|
129 | ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "sld", "Solvent scattering length density"], |
---|
130 | ["theta", "degrees", 60, [-360, 360], "orientation", "c axis to beam angle"], |
---|
131 | ["phi", "degrees", 60, [-360, 360], "orientation", "rotation about beam"], |
---|
132 | ["psi", "degrees", 60, [-360, 360], "orientation", "rotation about c axis"] |
---|
133 | ] |
---|
134 | # pylint: enable=bad-whitespace, line-too-long |
---|
135 | |
---|
136 | source = ["lib/sas_3j1x_x.c", "lib/gauss150.c", "lib/sphere_form.c", "fcc_paracrystal.c"] |
---|
137 | |
---|
138 | def random(): |
---|
139 | # copied from bcc_paracrystal |
---|
140 | radius = 10**np.random.uniform(1.3, 4) |
---|
141 | d_factor = 10**np.random.uniform(-2, -0.7) # sigma_d in 0.01-0.7 |
---|
142 | dnn_fraction = np.random.beta(a=10, b=1) |
---|
143 | dnn = radius*4/np.sqrt(2)/dnn_fraction |
---|
144 | pars = dict( |
---|
145 | #sld=1, sld_solvent=0, scale=1, background=1e-32, |
---|
146 | dnn=dnn, |
---|
147 | d_factor=d_factor, |
---|
148 | radius=radius, |
---|
149 | ) |
---|
150 | return pars |
---|
151 | |
---|
152 | # april 10 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! |
---|
153 | # TODO: fix the 2d tests |
---|
154 | q = 4.*pi/220. |
---|
155 | tests = [ |
---|
156 | [{}, [0.001, q, 0.215268], [0.275164706668, 5.7776842567, 0.00958167119232]], |
---|
157 | #[{}, (-0.047, -0.007), 238.103096286], |
---|
158 | #[{}, (0.053, 0.063), 0.863609587796], |
---|
159 | ] |
---|