[e7b3d7b] | 1 | #fcc paracrystal model |
---|
[3271e20] | 2 | #note model title and parameter table are automatically inserted |
---|
| 3 | #note - calculation requires double precision |
---|
[e7b3d7b] | 4 | r""" |
---|
[3c56da87] | 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. |
---|
[3271e20] | 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 | |
---|
[e7b3d7b] | 18 | .. image:: img/image158.jpg |
---|
[3271e20] | 19 | |
---|
[3c56da87] | 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. |
---|
[3271e20] | 24 | |
---|
[3c56da87] | 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*\ . |
---|
[3271e20] | 27 | |
---|
[3c56da87] | 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 |
---|
[3271e20] | 31 | |
---|
| 32 | .. image:: img/image159.jpg |
---|
| 33 | |
---|
[3c56da87] | 34 | The distortion factor (one standard deviation) of the paracrystal is |
---|
| 35 | included in the calculation of *Z(q)* |
---|
[3271e20] | 36 | |
---|
| 37 | .. image:: img/image160.jpg |
---|
| 38 | |
---|
| 39 | where *g* is a fractional distortion based on the nearest neighbor distance. |
---|
| 40 | |
---|
[e7b3d7b] | 41 | The face-centered cubic lattice is |
---|
[3271e20] | 42 | |
---|
[e7b3d7b] | 43 | .. image:: img/image161.jpg |
---|
[3271e20] | 44 | |
---|
| 45 | For a crystal, diffraction peaks appear at reduced q-values given by |
---|
| 46 | |
---|
| 47 | .. image:: img/image162.jpg |
---|
| 48 | |
---|
[3c56da87] | 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) |
---|
[3271e20] | 52 | |
---|
[e7b3d7b] | 53 | .. image:: img/image163.jpg |
---|
[3271e20] | 54 | |
---|
[3c56da87] | 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! |
---|
[3271e20] | 61 | |
---|
[3c56da87] | 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. |
---|
[3271e20] | 64 | |
---|
[e7b3d7b] | 65 | .. image:: img/image164.jpg |
---|
[3271e20] | 66 | |
---|
| 67 | *Figure. 1D plot in the linear scale using the default values (w/200 data point).* |
---|
| 68 | |
---|
[3c56da87] | 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. |
---|
[3271e20] | 73 | |
---|
| 74 | .. image:: img/image165.gif |
---|
| 75 | |
---|
[e7b3d7b] | 76 | .. image:: img/image166.jpg |
---|
[3271e20] | 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 | |
---|
[3c56da87] | 89 | from numpy import inf |
---|
[3271e20] | 90 | |
---|
[e7b3d7b] | 91 | name = "fcc_paracrystal" |
---|
| 92 | title = "Face-centred cubic lattic with paracrystalline distortion" |
---|
[3271e20] | 93 | description = """ |
---|
[e7b3d7b] | 94 | Calculates the scattering from a **face-centered cubic lattice** with paracrystalline distortion. Thermal vibrations |
---|
[3271e20] | 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 | """ |
---|
[a5d0d00] | 98 | category = "shape:paracrystal" |
---|
[3271e20] | 99 | |
---|
[3e428ec] | 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"] |
---|
[3271e20] | 112 | |
---|
| 113 | # parameters for demo |
---|
[3e428ec] | 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 | ) |
---|
[3271e20] | 123 | |
---|
| 124 | # For testing against the old sasview models, include the converted parameter |
---|
| 125 | # names and the target sasview model name. |
---|
[3e428ec] | 126 | oldname = 'FCCrystalModel' |
---|
| 127 | oldpars = dict(sld='sldSph', solvent_sld='sldSolv') |
---|