Changeset a5d0d00 in sasmodels for sasmodels/models/bcc.py
- Timestamp:
- Feb 27, 2015 11:16:23 AM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 61ba623
- Parents:
- 529b8b4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/bcc.py
re166cb9 ra5d0d00 3 3 #note - calculation requires double precision 4 4 """ 5 Calculates the scattering from a **body-centered cubic lattice** with paracrystalline distortion. Thermal vibrations 6 are considered to be negligible, and the size of the paracrystal is infinitely large. Paracrystalline distortion is 7 assumed to be isotropic and characterized by a Gaussian distribution. 5 Calculates the scattering from a **body-centered cubic lattice** with 6 paracrystalline distortion. Thermal vibrations are considered to be negligible, 7 and the size of the paracrystal is infinitely large. Paracrystalline distortion 8 is assumed to be isotropic and characterized by a Gaussian distribution. 8 9 9 10 The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale. … … 12 13 ---------- 13 14 14 The scattering intensity *I(q)*is calculated as15 The scattering intensity $I(q)$ is calculated as 15 16 16 .. image:: img/image167.jpg17 .. math: 17 18 18 where *scale* is the volume fraction of spheres, *Vp* is the volume of the primary particle, *V(lattice)* is a volume 19 correction for the crystal structure, *P(q)* is the form factor of the sphere (normalized), and *Z(q)* is the 20 paracrystalline structure factor for a body-centered cubic structure. 19 I(q) = \frac{\text{scale}}{V_P} V_\text{lattice} P(q) Z(q) 21 20 22 Equation (1) of the 1990 reference is used to calculate *Z(q)*, using equations (29)-(31) from the 1987 paper for23 *Z1*\ , *Z2*\ , and *Z3*\ .24 21 25 The lattice correction (the occupied volume of the lattice) for a body-centered cubic structure of particles of radius 26 *R* and nearest neighbor separation *D* is 22 where *scale* is the volume fraction of spheres, *Vp* is the volume of the 23 primary particle, *V(lattice)* is a volume correction for the crystal 24 structure, $P(q)$ is the form factor of the sphere (normalized), and $Z(q)$ 25 is the paracrystalline structure factor for a body-centered cubic structure. 27 26 28 .. image:: img/image159.jpg 27 Equation (1) of the 1990 reference is used to calculate $Z(q)$, using 28 equations (29)-(31) from the 1987 paper for *Z1*\ , *Z2*\ , and *Z3*\ . 29 29 30 The distortion factor (one standard deviation) of the paracrystal is included in the calculation of *Z(q)* 30 The lattice correction (the occupied volume of the lattice) for a 31 body-centered cubic structure of particles of radius $R$ and nearest neighbor 32 separation $D$ is 31 33 32 .. image:: img/image160.jpg34 .. math: 33 35 34 where *g* is a fractional distortion based on the nearest neighbor distance. 36 V_\text{lattice} = \frac{16\pi}{3} \frac{R^3}{\left(D\sqrt{2}\right)^3} 37 38 39 The distortion factor (one standard deviation) of the paracrystal is included 40 in the calculation of $Z(q)$ 41 42 .. math: 43 44 \Delta a = g D 45 46 where $g$ is a fractional distortion based on the nearest neighbor distance. 35 47 36 48 The body-centered cubic lattice is 37 49 38 .. image:: img/ image168.jpg50 .. image:: img/bcc_lattice.jpg 39 51 40 52 For a crystal, diffraction peaks appear at reduced q-values given by 41 53 42 .. image:: img/image162.jpg54 .. math: 43 55 44 where for a body-centered cubic lattice, only reflections where (\ *h* + *k* + *l*\ ) = even are allowed and 45 reflections where (\ *h* + *k* + *l*\ ) = odd are forbidden. Thus the peak positions correspond to (just the first 5) 56 \frac{qD}{2\pi} = \sqrt{h^2 + k^2 + l^2} 46 57 47 .. image:: img/image169.jpg 58 where for a body-centered cubic lattice, only reflections where 59 $(h + k + l) = \text{even}$ are allowed and reflections where 60 $(h + k + l) = \text{odd}$ are forbidden. Thus the peak positions 61 correspond to (just the first 5) 48 62 49 **NB: The calculation of** *Z(q)* **is a double numerical integral that must be carried out with a high density of** 50 **points to properly capture the sharp peaks of the paracrystalline scattering.** So be warned that the calculation is 51 SLOW. Go get some coffee. Fitting of any experimental data must be resolution smeared for any meaningful fit. This 52 makes a triple integral. Very, very slow. Go get lunch! 63 .. math: 53 64 54 This example dataset is produced using 200 data points, *qmin* = 0.001 |Ang^-1|, *qmax* = 0.1 |Ang^-1| and the above 55 default values. 65 \begin{eqnarray} 66 &q/q_o&&\quad 1&& \ \sqrt{2} && \ \sqrt{3} && \ \sqrt{4} && \ \sqrt{5} \\ 67 &\text{Indices}&& (110) && (200) && (211) && (220) && (310) 68 \end{eqnarray} 56 69 57 .. image:: img/image170.jpg 70 **NB: The calculation of $Z(q)$ is a double numerical integral that must 71 be carried out with a high density of points to properly capture the sharp 72 peaks of the paracrystalline scattering.** So be warned that the calculation 73 is SLOW. Go get some coffee. Fitting of any experimental data must be 74 resolution smeared for any meaningful fit. This makes a triple integral. 75 Very, very slow. Go get lunch! 76 77 This example dataset is produced using 200 data points, 78 *qmin* = 0.001 |Ang^-1|, *qmax* = 0.1 |Ang^-1| and the above default values. 79 80 .. image:: img/bcc_1d.jpg 58 81 59 82 *Figure. 1D plot in the linear scale using the default values (w/200 data point).* 60 83 61 The 2D (Anisotropic model) is based on the reference below where *I(q)* is approximated for 1d scattering. Thus the 62 scattering pattern for 2D may not be accurate. Note that we are not responsible for any incorrectness of the 2D model 63 computation. 84 The 2D (Anisotropic model) is based on the reference below where $I(q)$ is 85 approximated for 1d scattering. Thus the scattering pattern for 2D may not 86 be accurate. Note that we are not responsible for any incorrectness of the 2D 87 model computation. 64 88 65 .. image:: img/ image165.gif89 .. image:: img/bcc_orientation.gif 66 90 67 .. image:: img/ image171.jpg91 .. image:: img/bcc_2d.jpg 68 92 69 93 *Figure. 2D plot using the default values (w/200X200 pixels).* 70 94 71 95 REFERENCE 96 --------- 72 97 73 98 Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765 … … 87 112 assumed to be isotropic and characterized by a Gaussian distribution. 88 113 """ 114 category="shape:paracrystal" 89 115 90 116 parameters = [
Note: See TracChangeset
for help on using the changeset viewer.