Inheritance diagram for ObjCryst::ScatteringData:
Public Methods | |
virtual ScatteringData * | CreateCopy () const=0 |
So-called virtual copy constructor. | |
virtual void | SetHKL (const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l) |
input H,K,L | |
virtual void | GenHKLFullSpace (const REAL maxTheta, const bool useMultiplicity=false) |
Generate a list of h,k,l to describe a full reciprocal space, up to a given maximum theta value. | |
RadiationType | GetRadiationType () const |
Neutron or x-ray experiment ? Wavelength ? | |
virtual const Radiation & | GetRadiation () const=0 |
Get the radiation object for this data. | |
virtual void | SetCrystal (Crystal &crystal) |
Set the crystal for this experiment. | |
const Crystal & | GetCrystal () const |
Const access to the data's crystal. | |
Crystal & | GetCrystal () |
Access to the data's crystal. | |
long | GetNbRefl () const |
Return the number of reflections in this experiment. | |
const CrystVector_REAL & | GetH () const |
Return the 1D array of H coordinates for all reflections. | |
const CrystVector_REAL & | GetK () const |
Return the 1D array of K coordinates for all reflections. | |
const CrystVector_REAL & | GetL () const |
Return the 1D array of L coordinates for all reflections. | |
const CrystVector_REAL & | GetH2Pi () const |
Return the 1D array of H coordinates for all reflections, multiplied by 2*pi. | |
const CrystVector_REAL & | GetK2Pi () const |
Return the 1D array of K coordinates for all reflections, multiplied by 2*pi. | |
const CrystVector_REAL & | GetL2Pi () const |
Return the 1D array of L coordinates for all reflections, multiplied by 2*pi. | |
const CrystVector_REAL & | GetReflX () const |
Return the 1D array of orthonormal x coordinates for all reflections (recipr. space). | |
const CrystVector_REAL & | GetReflY () const |
Return the 1D array of orthonormal y coordinates for all reflections (recipr. space). | |
const CrystVector_REAL & | GetReflZ () const |
Return the 1D array of orthonormal z coordinates for all reflections (recipr. space). | |
const CrystVector_REAL & | GetSinThetaOverLambda () const |
Return an array with ![]() | |
const CrystVector_REAL & | GetTheta () const |
Return an array with theta values for all reflections. | |
const RefinableObjClock & | GetClockTheta () const |
Clock the last time the sin(theta)/lambda and theta arrays were re-computed. | |
const CrystVector_REAL & | GetFhklCalcSq () const |
Returns the Array of calculated |F(hkl)|^2 for all reflections. | |
const CrystVector_REAL & | GetFhklCalcReal () const |
Access to real part of F(hkl)calc. | |
const CrystVector_REAL & | GetFhklCalcImag () const |
Access to imaginary part of F(hkl)calc. | |
CrystVector_REAL | GetWavelength () const |
wavelength of the experiment (in Angstroems) | |
void | SetIsIgnoringImagScattFact (const bool b) |
If true, then the imaginary part of the scattering factor is ignored during Structure factor computation. | |
bool | IsIgnoringImagScattFact () const |
If true, then the imaginary part of the scattering factor is ignored during Structure factor computation. | |
virtual void | PrintFhklCalc (ostream &os=cout) const |
Print H, K, L F^2 Re(F) Im(F) theta sin(theta)/lambda for all reflections. | |
virtual void | PrintFhklCalcDetail (ostream &os=cout) const |
Print H, K, L sin(theta)/lambda theta F^2 Re(F) Im(F) [Re(F) Im(F)]_i, where [Re(F) Im(F)]_i are the real and imaginary contribution of the different scattering powers to the overall structure factor. | |
virtual void | BeginOptimization (const bool allowApproximations=false, const bool enableRestraints=false) |
This should be called by any optimization class at the begining of an optimization. | |
virtual void | EndOptimization () |
This should be called by any optimization class at the end of an optimization. | |
virtual void | SetMaxSinThetaOvLambda (const REAL max) |
Set the maximum value for sin(theta)/lambda. | |
REAL | GetMaxSinThetaOvLambda () const |
Get the maximum value for sin(theta)/lambda. | |
long | GetNbReflBelowMaxSinThetaOvLambda () const |
Recalc, and get the number of reflections which should be actually used, due to the maximuml sin(theta)/lambda value set. | |
const RefinableObjClock & | GetClockNbReflBelowMaxSinThetaOvLambda () const |
Clock the last time the number of reflections used was changed. | |
Protected Methods | |
virtual void | PrepareHKLarrays () |
virtual CrystVector_long | SortReflectionByTheta (const REAL maxTheta=-1.) |
CrystVector_long | EliminateExtinctReflections () |
virtual void | PrepareCalcStructFactor () const |
virtual void | CalcSinThetaLambda () const |
void | CalcScattFactor () const |
Get scattering factors for all ScatteringPower & reflections. | |
void | CalcTemperatureFactor () const |
Compute thermic factors for all ScatteringPower & reflections. | |
virtual void | CalcResonantScattFactor () const |
void | CalcGlobalTemperatureFactor () const |
Compute the overall temperature factor affecting all reflections. | |
void | CalcStructFactor () const |
Compute the overall structure factor (real and imaginary part). This function is optimized for speed (geometrical structure factors are computed for all atoms and all reflections in two loops, avoiding re-calculation). So use this function for repetitive calculations. | |
void | CalcGeomStructFactor (const ScatteringComponentList &scattCompList, const SpaceGroup &spg, const CrystVector_long &structFactorIndex, CrystVector_REAL *rsf2, CrystVector_REAL *isf2, bool useFastTabulatedTrigFunctions=false) const |
Compute the 'Geometrical Structure Factor' for each ScatteringPower of the Crystal. | |
void | CalcLuzzatiFactor () const |
Calculate the Luzzati factor associated to each ScatteringPower and each reflection, for maximum likelihood optimization. | |
void | CalcStructFactVariance () const |
Calculate the variance associated to the calculated structure factor. | |
Protected Attributes | |
long | mNbRefl |
Number of H,K,L reflections. | |
CrystVector_REAL | mH |
H,K,L coordinates. | |
CrystVector_REAL | mK |
H,K,L coordinates. | |
CrystVector_REAL | mL |
H,K,L coordinates. | |
CrystVector_long | mIntH |
H,K,L integer coordinates. | |
CrystVector_long | mIntK |
H,K,L integer coordinates. | |
CrystVector_long | mIntL |
H,K,L integer coordinates. | |
CrystVector_REAL | mH2Pi |
H,K,L coordinates, multiplied by 2PI. | |
CrystVector_REAL | mK2Pi |
H,K,L coordinates, multiplied by 2PI. | |
CrystVector_REAL | mL2Pi |
H,K,L coordinates, multiplied by 2PI. | |
CrystVector_REAL | mX |
reflection coordinates in an orthonormal base | |
CrystVector_REAL | mY |
reflection coordinates in an orthonormal base | |
CrystVector_REAL | mZ |
reflection coordinates in an orthonormal base | |
CrystVector_int | mMultiplicity |
Multiplicity for each reflections (mostly for powder diffraction). | |
CrystVector_int | mExpectedIntensityFactor |
Expected intensity factor for all reflections. | |
CrystVector_REAL | mFhklCalcReal |
real &imaginary parts of F(HKL)calc | |
CrystVector_REAL | mFhklCalcImag |
real &imaginary parts of F(HKL)calc | |
CrystVector_REAL | mFhklCalcSq |
F(HKL)^2 calc for each reflection. | |
Crystal * | mpCrystal |
Pointer to the crystal corresponding to this experiment. | |
REAL | mGlobalBiso |
Global Biso, affecting the overall structure factor for all reflections (but not the structure factors of individual atoms or type of atomes). | |
CrystVector_REAL | mGlobalTemperatureFactor |
Global Biso factor. | |
bool | mUseFastLessPreciseFunc |
Use faster, but less precise, approximations for functions? (integer approximations to compute sin and cos in structure factors, and also to compute interatomic distances). | |
CrystVector_REAL | mSinThetaLambda |
![]() | |
CrystVector_REAL | mTheta |
theta for the crystal and the HKL in ReciprSpace (in radians) | |
CrystVector_REAL | mFprime |
Anomalous X-Ray scattering term f' and f" are stored here for each ScatteringPower We assume yet that data is monochromatic, but this could be specialized. | |
CrystVector_REAL | mFsecond |
Anomalous X-Ray scattering term f' and f" are stored here for each ScatteringPower We assume yet that data is monochromatic, but this could be specialized. | |
CrystVector_REAL * | mpTemperatureFactor |
Thermic factors as mNbScatteringPower vectors with NbRefl elements. | |
CrystVector_REAL * | mpScatteringFactor |
Scattering factors as mNbScatteringPower vectors with NbRefl elements. | |
CrystVector_REAL * | mpRealGeomSF |
Geometrical Structure factor for all reflection and ScatteringPower. | |
CrystVector_REAL * | mpImagGeomSF |
Geometrical Structure factor for all reflection and ScatteringPower. | |
RefinableObjClock | mClockHKL |
Clock for the list of hkl. | |
RefinableObjClock | mClockStructFactor |
Clock for the structure factor. | |
RefinableObjClock | mClockStructFactorSq |
Clock for the square modulus of the structure factor. | |
RefinableObjClock | mClockTheta |
Clock the last time theta was computed. | |
RefinableObjClock | mClockScattFactor |
Clock the last time scattering factors were computed. | |
RefinableObjClock | mClockScattFactorResonant |
Clock the last time resonant scattering factors were computed. | |
RefinableObjClock | mClockGeomStructFact |
Clock the last time the geometrical structure factors were computed. | |
RefinableObjClock | mClockThermicFact |
Clock the last time temperature factors were computed. | |
RefinableObjClock | mClockGlobalBiso |
last time the global Biso factor was modified | |
RefinableObjClock | mClockGlobalTemperatureFact |
last time the global temperature factor was computed | |
const ScatteringComponentList * | mpScattCompList |
Pointer to the ScatteringComponentList of the crystal. | |
CrystVector_long | mScatteringPowerIndex |
Index of the storage for scattering information. | |
CrystVector_long | mScatteringPowerIndex2 |
This is the reverse index. KLUDGEEEEEEEE !!! | |
long | mNbScatteringPower |
Total number os ScatteringPower used for this DiffractionData. | |
bool | mIgnoreImagScattFact |
Ignore imaginary part of scattering factor. | |
REAL | mMaxSinThetaOvLambda |
Maximum sin(theta)/lambda for all calculations (10 by default). | |
long | mNbReflUsed |
Number of reflections which are below the max. | |
RefinableObjClock | mClockNbReflUsed |
Clock recording the last time the number of reflections used has increased. | |
vector< CrystVector_REAL > | mvLuzzatiFactor |
The Luzzati 'D' factor for each scattering power and each reflection. | |
CrystVector_REAL | mFhklCalcVariance |
The variance on all calculated structure factors, taking into account the positionnal errors and the expected intensity factor. |
This class only computes structure factor, but no intensity. i.e. it does not include any correction such as absorption, Lorentz or Polarization.
Does this really need to be a RefinableObj ?
a lot of cleaning is necessary in the computing of structure factors, for (1) the 'preparation' part (deciding what needs to be recomputed) and (2) to allow anisotropic temperature factors (or other anisotropic parts)
|
This should be called by any optimization class at the begining of an optimization. This will also check that everything is ready, eg call the RefinableObj::Prepare() function. This also affects all sub-objects.
Reimplemented from ObjCryst::RefinableObj. Reimplemented in ObjCryst::PowderPatternDiffraction. |
|
For internal use only. get f' and f" for ScatteringPower of the crystal, at the exp. wavelength This could be specialized for multi-wavelength experiments... |
|
Get scattering factors for all ScatteringPower & reflections.
For internal use only.
|
|
For internal use only. Compute sin(theta)/lambda as well a orthonormal coordinates for all reflections. theta and tan(theta), are also re-computed, provided a wavelength has been supplied. |
|
Compute the overall structure factor (real and imaginary part). This function is optimized for speed (geometrical structure factors are computed for all atoms and all reflections in two loops, avoiding re-calculation). So use this function for repetitive calculations. This function recognizes the type of radiation (XRay or neutron) and uses the corresponding scattering factor/length.
|
|
Compute thermic factors for all ScatteringPower & reflections.
For internal use only.
|
|
For internal use only. Get rid of extinct reflections. Useful after GenHKLFullSpace(). Do not use this if you have a list of observed reflections ! Currently done using (brute-force) numerical evaluation. Should rather use SpaceGroup info... To do !
|
|
This should be called by any optimization class at the end of an optimization. This also affects all sub-objects.
Reimplemented from ObjCryst::RefinableObj. Reimplemented in ObjCryst::PowderPatternDiffraction. |
|
Generate a list of h,k,l to describe a full reciprocal space, up to a given maximum theta value.
|
|
Return the 1D array of H coordinates for all reflections, multiplied by 2*pi.
For internal use only. Should be private |
|
Return the 1D array of K coordinates for all reflections, multiplied by 2*pi.
For internal use only. Should be private |
|
Return the 1D array of L coordinates for all reflections, multiplied by 2*pi.
For internal use only. Should be private |
|
For internal use only. Get the list of scattering components, and check what needs to be recomputed to get the new structure factors. No calculation is made in this function. Just getting prepared...
Currently using flags to decide what should be recomputed, whereas Clocks should be used. a LOT of cleaning is necessary |
|
For internal use only. This function is called after H,K and L arrays have been initialized or modified. |
|
input H,K,L
|
|
If true, then the imaginary part of the scattering factor is ignored during Structure factor computation. (default value=false)
|
|
Set the maximum value for sin(theta)/lambda. All data (reflections,..) still exist but are ignored for all calculations. Reimplemented in ObjCryst::PowderPatternDiffraction. |
|
For internal use only. sort reflections by theta values (also get rid of [0,0,0] if present) If maxTheta >0, then only reflections where theta<maxTheta are kept
Reimplemented in ObjCryst::DiffractionDataSingleCrystal. |
|
Expected intensity factor for all reflections. |
|
The variance on all calculated structure factors, taking into account the positionnal errors and the expected intensity factor. Actually this is the variance on both real and imaginary parts. |
|
Ignore imaginary part of scattering factor. This can be used either to speed up computation, or when f" has a small effect on calculated intensities, mostly for powder diffraction (GenHKLFullSpace will not generate Friedel pairs, reducing the number of reflections by a factor up to 2 for some structures). Practically this makes f"=0 during computation. The real resonant contribution (f') is not affected. This may be removed later on... |
|
Maximum sin(theta)/lambda for all calculations (10 by default). This keeps all data in memory, but only the part which is below the max is calculated. This affects the computing of structure factors, intensities (for single crystal and powder patterns), R and Rw. The reflections must be sorted by increasing sin(theta)/lambda for this to work correctly. |
|
Number of reflections which are below the max. This is updated automatically from ScatteringData::mMaxSinThetaOvLambda |
|
Pointer to the crystal corresponding to this experiment. This gives an access to the UB matrix for the crystal, as well as to the list of Scatterer. |
|
Index of the storage for scattering information. This array as the same size as the total number of ScatteringPower, and for each we give the index of where their scattering, temperature and resonant factors are stored. THIS IS AWFULLY KLUDGE-ESQUE !!! |
|
Use faster, but less precise, approximations for functions? (integer approximations to compute sin and cos in structure factors, and also to compute interatomic distances). This is activated by global optimization algortithms, only during the optimization. |