1 | #fcc paracrystal model |
---|
2 | #note model title and parameter table are automatically inserted |
---|
3 | #note - calculation requires double precision |
---|
4 | r""" |
---|
5 | Calculates the scattering from a **face-centered cubic lattice** with |
---|
6 | paracrystalline distortion. Thermal vibrations are considered to be |
---|
7 | negligible, and the size of the paracrystal is infinitely large. |
---|
8 | Paracrystalline distortion is assumed to be isotropic and characterized by |
---|
9 | a Gaussian distribution. |
---|
10 | |
---|
11 | The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale. |
---|
12 | |
---|
13 | Definition |
---|
14 | ---------- |
---|
15 | |
---|
16 | The scattering intensity *I(q)* is calculated as |
---|
17 | |
---|
18 | .. image:: img/image158.jpg |
---|
19 | |
---|
20 | where *scale* is the volume fraction of spheres, *Vp* is the volume of |
---|
21 | the primary particle, *V(lattice)* is a volume correction for the crystal |
---|
22 | structure, *P(q)* is the form factor of the sphere (normalized), and *Z(q)* |
---|
23 | is the paracrystalline structure factor for a face-centered cubic structure. |
---|
24 | |
---|
25 | Equation (1) of the 1990 reference is used to calculate *Z(q)*, using |
---|
26 | equations (23)-(25) from the 1987 paper for *Z1*\ , *Z2*\ , and *Z3*\ . |
---|
27 | |
---|
28 | The lattice correction (the occupied volume of the lattice) for a |
---|
29 | face-centered cubic structure of particles of radius *R* and nearest |
---|
30 | neighbor separation *D* is |
---|
31 | |
---|
32 | .. image:: img/image159.jpg |
---|
33 | |
---|
34 | The distortion factor (one standard deviation) of the paracrystal is |
---|
35 | included in the calculation of *Z(q)* |
---|
36 | |
---|
37 | .. image:: img/image160.jpg |
---|
38 | |
---|
39 | where *g* is a fractional distortion based on the nearest neighbor distance. |
---|
40 | |
---|
41 | The face-centered cubic lattice is |
---|
42 | |
---|
43 | .. image:: img/image161.jpg |
---|
44 | |
---|
45 | For a crystal, diffraction peaks appear at reduced q-values given by |
---|
46 | |
---|
47 | .. image:: img/image162.jpg |
---|
48 | |
---|
49 | where for a face-centered cubic lattice *h*\ , *k*\ , *l* all odd or all |
---|
50 | even are allowed and reflections where *h*\ , *k*\ , *l* are mixed odd/even |
---|
51 | are forbidden. Thus the peak positions correspond to (just the first 5) |
---|
52 | |
---|
53 | .. image:: img/image163.jpg |
---|
54 | |
---|
55 | **NB: The calculation of** *Z(q)* **is a double numerical integral that |
---|
56 | must be carried out with a high density of** **points to properly capture |
---|
57 | the sharp peaks of the paracrystalline scattering.** So be warned that the |
---|
58 | calculation is SLOW. Go get some coffee. Fitting of any experimental data |
---|
59 | must be resolution smeared for any meaningful fit. This makes a triple |
---|
60 | integral. Very, very slow. Go get lunch! |
---|
61 | |
---|
62 | This example dataset is produced using 200 data points, *qmin* = 0.01 |Ang^-1|, |
---|
63 | *qmax* = 0.1 |Ang^-1| and the above default values. |
---|
64 | |
---|
65 | .. image:: img/image164.jpg |
---|
66 | |
---|
67 | *Figure. 1D plot in the linear scale using the default values (w/200 data point).* |
---|
68 | |
---|
69 | The 2D (Anisotropic model) is based on the reference below where *I(q)* is |
---|
70 | approximated for 1d scattering. Thus the scattering pattern for 2D may not |
---|
71 | be accurate. Note that we are not responsible for any incorrectness of the |
---|
72 | 2D model computation. |
---|
73 | |
---|
74 | .. image:: img/image165.gif |
---|
75 | |
---|
76 | .. image:: img/image166.jpg |
---|
77 | |
---|
78 | *Figure. 2D plot using the default values (w/200X200 pixels).* |
---|
79 | |
---|
80 | REFERENCE |
---|
81 | |
---|
82 | Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765 |
---|
83 | (Original Paper) |
---|
84 | |
---|
85 | Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856 |
---|
86 | (Corrections to FCC and BCC lattice structure calculation) |
---|
87 | """ |
---|
88 | |
---|
89 | from numpy import inf |
---|
90 | |
---|
91 | name = "fcc_paracrystal" |
---|
92 | title = "Face-centred cubic lattic with paracrystalline distortion" |
---|
93 | description = """ |
---|
94 | Calculates the scattering from a **face-centered cubic lattice** with paracrystalline distortion. Thermal vibrations |
---|
95 | are considered to be negligible, and the size of the paracrystal is infinitely large. Paracrystalline distortion is |
---|
96 | assumed to be isotropic and characterized by a Gaussian distribution. |
---|
97 | """ |
---|
98 | category = "shape:paracrystal" |
---|
99 | |
---|
100 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
101 | parameters = [["dnn", "Ang", 220, [-inf, inf], "", "Nearest neighbour distance"], |
---|
102 | ["d_factor", "", 0.06, [-inf, inf], "", "Paracrystal distortion factor"], |
---|
103 | ["radius", "Ang", 40, [0, inf], "volume", "Particle radius"], |
---|
104 | ["sld", "1e-6/Ang^2", 4, [-inf, inf], "", "Particle scattering length density"], |
---|
105 | ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", "Solvent scattering length density"], |
---|
106 | ["theta", "degrees", 60, [-inf, inf], "orientation", "In plane angle"], |
---|
107 | ["phi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"], |
---|
108 | ["psi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"] |
---|
109 | ] |
---|
110 | |
---|
111 | source = ["lib/J1.c", "lib/gauss150.c", "fcc.c"] |
---|
112 | |
---|
113 | # parameters for demo |
---|
114 | demo = dict(scale=1, background=0, |
---|
115 | dnn=220, d_factor=0.06, sld=4, solvent_sld=1, |
---|
116 | radius=40, |
---|
117 | theta=60, phi=60, psi=60, |
---|
118 | radius_pd=.2, radius_pd_n=0.2, |
---|
119 | theta_pd=15, theta_pd_n=0, |
---|
120 | phi_pd=15, phi_pd_n=0, |
---|
121 | psi_pd=15, psi_pd_n=0, |
---|
122 | ) |
---|
123 | |
---|
124 | # For testing against the old sasview models, include the converted parameter |
---|
125 | # names and the target sasview model name. |
---|
126 | oldname = 'FCCrystalModel' |
---|
127 | oldpars = dict(sld='sldSph', solvent_sld='sldSolv') |
---|