Changeset 3c56da87 in sasmodels for sasmodels/models/fcc.py
- Timestamp:
- Mar 5, 2015 12:55:38 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:
- 3a45c2c
- Parents:
- b89f519
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/fcc.py
r9890053 r3c56da87 3 3 #note - calculation requires double precision 4 4 r""" 5 Calculates the scattering from a **face-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 **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. 8 10 9 11 The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale. … … 16 18 .. image:: img/image158.jpg 17 19 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 face-centered cubic structure. 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. 21 24 22 Equation (1) of the 1990 reference is used to calculate *Z(q)*, using equations (23)-(25) from the 1987 paper for23 *Z1*\ , *Z2*\ , and *Z3*\ .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*\ . 24 27 25 The lattice correction (the occupied volume of the lattice) for a face-centered cubic structure of particles of radius 26 *R* and nearest neighbor separation *D* is 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 27 31 28 32 .. image:: img/image159.jpg 29 33 30 The distortion factor (one standard deviation) of the paracrystal is included in the calculation of *Z(q)* 34 The distortion factor (one standard deviation) of the paracrystal is 35 included in the calculation of *Z(q)* 31 36 32 37 .. image:: img/image160.jpg … … 42 47 .. image:: img/image162.jpg 43 48 44 where for a face-centered cubic lattice *h*\ , *k*\ , *l* all odd or all even are allowed and reflections where 45 *h*\ , *k*\ , *l* are mixed odd/even are forbidden. Thus the peak positions correspond to (just the first 5) 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) 46 52 47 53 .. image:: img/image163.jpg 48 54 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! 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! 53 61 54 This example dataset is produced using 200 data points, *qmin* = 0.01 |Ang^-1|, *qmax* = 0.1 |Ang^-1| and the above55 default values.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. 56 64 57 65 .. image:: img/image164.jpg … … 59 67 *Figure. 1D plot in the linear scale using the default values (w/200 data point).* 60 68 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. 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. 64 73 65 74 .. image:: img/image165.gif … … 78 87 """ 79 88 80 from numpy import pi,inf89 from numpy import inf 81 90 82 91 name = "fcc_paracrystal" … … 118 127 # names and the target sasview model name. 119 128 oldname='FCCrystalModel' 120 oldpars=dict(sld='sldSph', 121 solvent_sld='sldSolv') 129 oldpars=dict(sld='sldSph', solvent_sld='sldSolv')
Note: See TracChangeset
for help on using the changeset viewer.