[3271e20] | 1 | #bcc paracrystal model |
---|
| 2 | #note model title and parameter table are automatically inserted |
---|
| 3 | #note - calculation requires double precision |
---|
| 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. |
---|
| 8 | |
---|
| 9 | The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale. |
---|
| 10 | |
---|
| 11 | Definition |
---|
| 12 | ---------- |
---|
| 13 | |
---|
| 14 | The scattering intensity *I(q)* is calculated as |
---|
| 15 | |
---|
| 16 | .. image:: img/image167.jpg |
---|
| 17 | |
---|
| 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. |
---|
| 21 | |
---|
| 22 | Equation (1) of the 1990 reference is used to calculate *Z(q)*, using equations (29)-(31) from the 1987 paper for |
---|
| 23 | *Z1*\ , *Z2*\ , and *Z3*\ . |
---|
| 24 | |
---|
| 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 |
---|
| 27 | |
---|
| 28 | .. image:: img/image159.jpg |
---|
| 29 | |
---|
| 30 | The distortion factor (one standard deviation) of the paracrystal is included in the calculation of *Z(q)* |
---|
| 31 | |
---|
| 32 | .. image:: img/image160.jpg |
---|
| 33 | |
---|
| 34 | where *g* is a fractional distortion based on the nearest neighbor distance. |
---|
| 35 | |
---|
| 36 | The body-centered cubic lattice is |
---|
| 37 | |
---|
| 38 | .. image:: img/image168.jpg |
---|
| 39 | |
---|
| 40 | For a crystal, diffraction peaks appear at reduced q-values given by |
---|
| 41 | |
---|
| 42 | .. image:: img/image162.jpg |
---|
| 43 | |
---|
| 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) |
---|
| 46 | |
---|
| 47 | .. image:: img/image169.jpg |
---|
| 48 | |
---|
| 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! |
---|
| 53 | |
---|
| 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. |
---|
| 56 | |
---|
| 57 | .. image:: img/image170.jpg |
---|
| 58 | |
---|
| 59 | *Figure. 1D plot in the linear scale using the default values (w/200 data point).* |
---|
| 60 | |
---|
| 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. |
---|
| 64 | |
---|
| 65 | .. image:: img/image165.gif |
---|
| 66 | |
---|
| 67 | .. image:: img/image171.jpg |
---|
| 68 | |
---|
| 69 | *Figure. 2D plot using the default values (w/200X200 pixels).* |
---|
| 70 | |
---|
| 71 | REFERENCE |
---|
| 72 | |
---|
| 73 | Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765 |
---|
| 74 | (Original Paper) |
---|
| 75 | |
---|
| 76 | Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856 |
---|
| 77 | (Corrections to FCC and BCC lattice structure calculation) |
---|
| 78 | """ |
---|
| 79 | |
---|
| 80 | from numpy import pi, inf |
---|
| 81 | |
---|
| 82 | name = "BCCparacrystal" |
---|
| 83 | title = "Body-centred cubic lattic with paracrystalline distortion" |
---|
| 84 | description = """ |
---|
| 85 | Calculates the scattering from a **body-centered cubic lattice** with paracrystalline distortion. Thermal vibrations |
---|
| 86 | are considered to be negligible, and the size of the paracrystal is infinitely large. Paracrystalline distortion is |
---|
| 87 | assumed to be isotropic and characterized by a Gaussian distribution. |
---|
| 88 | """ |
---|
| 89 | |
---|
| 90 | parameters = [ |
---|
| 91 | # [ "name", "units", default, [lower, upper], "type","description" ], |
---|
| 92 | [ "dnn", "Ang", 220, [-inf,inf],"","Nearest neighbour distance"], |
---|
| 93 | [ "d_factor", "", 0.06,[-inf,inf],"","Paracrystal distortion factor" ], |
---|
| 94 | [ "radius", "Ang", 40, [0, inf], "volume","Particle radius" ], |
---|
| 95 | [ "sld", "1e-6/Ang^2", 4, [-inf,inf], "", "Particle scattering length density" ], |
---|
| 96 | [ "solvent_sld", "1e-6/Ang^2", 1, [-inf,inf], "","Solvent scattering length density" ], |
---|
| 97 | [ "theta", "degrees", 60, [-inf, inf], "orientation","In plane angle" ], |
---|
| 98 | [ "phi", "degrees", 60, [-inf, inf], "orientation","Out of plane angle" ], |
---|
| 99 | [ "psi", "degrees", 60, [-inf,inf], "orientation","Out of plane angle"] |
---|
| 100 | ] |
---|
| 101 | |
---|
| 102 | source = [ "lib/J1.c", "lib/gauss150.c", "bcc.c" ] |
---|
| 103 | |
---|
| 104 | def ER(radius, length): |
---|
| 105 | return 0 |
---|
| 106 | |
---|
| 107 | # parameters for demo |
---|
| 108 | demo = dict( |
---|
| 109 | scale=1, background=0, |
---|
| 110 | dnn=220, d_factor=0.06, sld=4, solvent_sld=1, |
---|
| 111 | radius=40, |
---|
| 112 | theta=60, phi=60, psi=60, |
---|
| 113 | radius_pd=.2, radius_pd_n=0.2, |
---|
| 114 | theta_pd=15, theta_pd_n=0, |
---|
| 115 | phi_pd=15, phi_pd_n=0, |
---|
| 116 | psi_pd=15, psi_pd_n=0, |
---|
| 117 | ) |
---|
| 118 | |
---|
| 119 | # For testing against the old sasview models, include the converted parameter |
---|
| 120 | # names and the target sasview model name. |
---|
| 121 | oldname='BCCrystalModel' |
---|
| 122 | oldpars=dict(sld='sldSph', |
---|
| 123 | solvent_sld='sldSolv') |
---|