Class to compute the contribution to a powder pattern from a crystalline phase. More...


Classes | |
| struct | ReflProfile |
| Profile of a single reflection. More... | |
Public Member Functions | |
| PowderPatternDiffraction (const PowderPatternDiffraction &) | |
| virtual PowderPatternDiffraction * | CreateCopy () const |
| So-called virtual copy constructor. | |
| virtual const string & | GetClassName () const |
| Name for this class ("RefinableObj", "Crystal",...). This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry. | |
| virtual void | SetParentPowderPattern (PowderPattern &) |
| Set the PowderPattern object which uses this component. This sets all necessary pattern parameters (2theta/tof range, wavelength, radiation type...) accordingly. | |
| virtual const CrystVector_REAL & | GetPowderPatternCalc () const |
| Get the calculated powder pattern for this component. Note that the pattern is not scaled. | |
| virtual pair< const CrystVector_REAL *, const RefinableObjClock * > | GetPowderPatternIntegratedCalc () const |
| Get the integrated values of the powder pattern. | |
| void | SetReflectionProfilePar (const ReflectionProfileType prof, const REAL fwhmCagliotiW, const REAL fwhmCagliotiU=0, const REAL fwhmCagliotiV=0, const REAL eta0=0.5, const REAL eta1=0.) |
| Set reflection profile parameters. | |
| void | SetProfile (ReflectionProfile *prof) |
| Assign a new profile. | |
| const ReflectionProfile & | GetProfile () const |
| Get reflection profile. | |
| ReflectionProfile & | GetProfile () |
| Get reflection profile. | |
| virtual void | GenHKLFullSpace () |
| virtual void | XMLOutput (ostream &os, int indent=0) const |
| Output to stream in well-formed XML. | |
| virtual void | XMLInput (istream &is, const XMLCrystTag &tag) |
| Input From stream. | |
| virtual void | GetGeneGroup (const RefinableObj &obj, CrystVector_uint &groupIndex, unsigned int &firstGroup) const |
| 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 | SetApproximationFlag (const bool allow) |
| Enable or disable numerical approximations. | |
| virtual const Radiation & | GetRadiation () const |
| Get the radiation object for this data. | |
| virtual const CrystVector_REAL & | GetPowderPatternCalcVariance () const |
| Get the variance associated to each point of the calculated powder pattern, for this component. | |
| virtual pair< const CrystVector_REAL *, const RefinableObjClock * > | GetPowderPatternIntegratedCalcVariance () const |
| Get the variance associated to each point of the calculated powder pattern, for this component (integrated version). | |
| virtual bool | HasPowderPatternCalcVariance () const |
| Does this component have a variance associated with each calculated point ? i.e., do we use maximum likelihood to take into account incomplete models ? | |
| virtual void | SetCrystal (Crystal &crystal) |
| Set the crystal for this experiment. | |
| void | SetExtractionMode (const bool extract=true, const bool init=false) |
| Prepare intensity extraction (Le Bail or Pawley). | |
| bool | GetExtractionMode () const |
| Return true if in extraction mode, i.e. using extracted intensities instead of computed structure factors. | |
| void | ExtractLeBail (unsigned int nbcycle=1) |
| Extract intensities using Le Bail method. | |
| virtual long | GetNbReflBelowMaxSinThetaOvLambda () const |
| Recalc, and get the number of reflections which should be actually used, due to the maximuml sin(theta)/lambda value set. | |
Protected Member Functions | |
| virtual void | CalcPowderPattern () const |
| Calc the powder pattern. As always, recomputation is only done if necessary (ie if a parameter has changed since the last computation). | |
| virtual void | CalcPowderPatternIntegrated () const |
| Calc the integrated powder pattern. This should be optimized so that the full powder pattern is not explicitely computed. | |
| void | CalcPowderReflProfile () const |
| void | CalcIntensityCorr () const |
| virtual void | CalcIhkl () const |
| virtual void | Prepare () |
| virtual void | InitOptions () |
| virtual const CrystVector_long & | GetBraggLimits () const |
| Get the pixel positions separating the integration intervals around reflections. | |
| virtual void | SetMaxSinThetaOvLambda (const REAL max) |
| Set the maximum value for sin(theta)/lambda. All data above still exist but are ignored for all calculations. | |
| void | PrepareIntegratedProfile () const |
Protected Attributes | |
| RefinableObjClock | mClockProfilePar |
| Last time the reflection parameters were changed. | |
| RefinableObjClock | mClockLorentzPolarSlitCorrPar |
| Last time the. | |
| RefinableObjClock | mClockIntensityCorr |
| Last time the Lorentz-Polar-Slit correction was computed. | |
| RefinableObjClock | mClockProfileCalc |
| Last time the reflection profiles were computed. | |
| RefinableObjClock | mClockIhklCalc |
| Last time intensities were computed. | |
| ReflectionProfile * | mpReflectionProfile |
| Profile. | |
| CrystVector_REAL | mIntensityCorr |
| Calculated corrections for all reflections. | |
| LorentzCorr | mCorrLorentz |
| Lorentz correction. | |
| PolarizationCorr | mCorrPolar |
| Polarization correction. | |
| PowderSlitApertureCorr | mCorrSlitAperture |
| Slit aperture correction. | |
| TextureMarchDollase | mCorrTextureMarchDollase |
| Preferred orientation (texture) correction following the March-Dollase model. | |
| TOFCorr | mCorrTOF |
| Time-Of-Flight intensity correction. | |
| CrystVector_REAL | mIhklCalc |
| Computed intensities for all reflections. | |
| CrystVector_REAL | mIhklCalcVariance |
| Variance on computed intensities for all reflections. | |
| vector< ReflProfile > | mvReflProfile |
| Reflection profiles for ALL reflections during the last powder pattern generation. | |
| vector< pair< unsigned long, CrystVector_REAL > > | mIntegratedProfileFactor |
| For each reflection, store the integrated value of the normalized profile over all integration intervals. | |
| RefinableObjClock | mClockIntegratedProfileFactor |
| Last time the integrated values of normalized profiles was calculated. | |
| bool | mExtractionMode |
| DiffractionDataSingleCrystal * | mpLeBailData |
| Single crystal data extracted from the powder pattern. | |
Class to compute the contribution to a powder pattern from a crystalline phase.
Definition at line 300 of file PowderPattern.h.
| void ObjCryst::PowderPatternDiffraction::BeginOptimization | ( | const bool | allowApproximations = false, |
|
| const bool | enableRestraints = false | |||
| ) | [virtual] |
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.
| allowApproximations,: | if true, then the object can use faster but less precise functions during the optimization. This is useful for global optimization not using derivatives. | |
| enableRestraints,: |
Reimplemented from ObjCryst::ScatteringData.
Definition at line 724 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::CalcIhkl | ( | ) | const [protected, virtual] |
For internal use only.
Compute the intensity for all reflections (taking into account corrections, but not the multiplicity)
Definition at line 1408 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::CalcIntensityCorr | ( | ) | const [protected] |
For internal use only.
Calc Lorentz-Polarisation-APerture correction
Definition at line 1357 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::CalcPowderReflProfile | ( | ) | const [protected] |
For internal use only.
Calc reflection profiles for ALL reflections (powder diffraction)
Definition at line 1182 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::EndOptimization | ( | ) | [virtual] |
This should be called by any optimization class at the end of an optimization.
This also affects all sub-objects.
Reimplemented from ObjCryst::ScatteringData.
Definition at line 738 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::ExtractLeBail | ( | unsigned int | nbcycle = 1 |
) |
Extract intensities using Le Bail method.
| nbcycle,: | number of cycles |
Definition at line 870 of file PowderPattern.cpp.
| const CrystVector_long & ObjCryst::PowderPatternDiffraction::GetBraggLimits | ( | ) | const [protected, virtual] |
Get the pixel positions separating the integration intervals around reflections.
Implements ObjCryst::PowderPatternComponent.
Definition at line 1534 of file PowderPattern.cpp.
| const CrystVector_REAL & ObjCryst::PowderPatternDiffraction::GetPowderPatternCalcVariance | ( | ) | const [virtual] |
Get the variance associated to each point of the calculated powder pattern, for this component.
Implements ObjCryst::PowderPatternComponent.
Definition at line 789 of file PowderPattern.cpp.
| pair< const CrystVector_REAL *, const RefinableObjClock * > ObjCryst::PowderPatternDiffraction::GetPowderPatternIntegratedCalc | ( | ) | const [virtual] |
Get the integrated values of the powder pattern.
This avoids explicitely calculating the full profile powder pattern.
Implements ObjCryst::PowderPatternComponent.
Definition at line 666 of file PowderPattern.cpp.
| pair< const CrystVector_REAL *, const RefinableObjClock * > ObjCryst::PowderPatternDiffraction::GetPowderPatternIntegratedCalcVariance | ( | ) | const [virtual] |
Get the variance associated to each point of the calculated powder pattern, for this component (integrated version).
Implements ObjCryst::PowderPatternComponent.
Definition at line 796 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::Prepare | ( | ) | [protected, virtual] |
For internal use only.
This will be called by the parent PowderPattern object, before calculating the first powder pattern. Or maybe it should be called automatically by the object itself...
Implements ObjCryst::PowderPatternComponent.
Definition at line 1504 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::SetApproximationFlag | ( | const bool | allow | ) | [virtual] |
Enable or disable numerical approximations.
This can be used for global optimization to get faster calculations. Depending on the type of object, this may do something or not (it does not do anything in a base RefinableObj, except calling this function for all sub-objects).
Also see:
Reimplemented from ObjCryst::ScatteringData.
Definition at line 755 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::SetCrystal | ( | Crystal & | crystal | ) | [virtual] |
Set the crystal for this experiment.
Reimplemented from ObjCryst::ScatteringData.
Definition at line 808 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::SetExtractionMode | ( | const bool | extract = true, |
|
| const bool | init = false | |||
| ) |
Prepare intensity extraction (Le Bail or Pawley).
| extract,: | if true, begin extraction mode, else enable structure factor calculations | |
| init,: | if true and extract=true, intensities are set to 100 |
Definition at line 827 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::SetProfile | ( | ReflectionProfile * | prof | ) |
Assign a new profile.
Definition at line 682 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::SetReflectionProfilePar | ( | const ReflectionProfileType | prof, | |
| const REAL | fwhmCagliotiW, | |||
| const REAL | fwhmCagliotiU = 0, |
|||
| const REAL | fwhmCagliotiV = 0, |
|||
| const REAL | eta0 = 0.5, |
|||
| const REAL | eta1 = 0. | |||
| ) |
Set reflection profile parameters.
:TODO: assymmetric profiles
| fwhmCagliotiW,fwhmCagliotiU,fwhmCagliotiV | : these are the U,V and W parameters in the Caglioti's law : if only W is given, the width is constant | |
| eta0,eta1,: | these are the mixing parameters in the case of a pseudo-Voigt function. |
Definition at line 672 of file PowderPattern.cpp.
| void ObjCryst::PowderPatternDiffraction::XMLInput | ( | istream & | is, | |
| const XMLCrystTag & | tag | |||
| ) | [virtual] |
Input From stream.
Reimplemented from ObjCryst::RefinableObj.
Definition at line 1577 of file ObjCryst/IO.cpp.
| void ObjCryst::PowderPatternDiffraction::XMLOutput | ( | ostream & | os, | |
| int | indent = 0 | |||
| ) | const [virtual] |
Output to stream in well-formed XML.
Reimplemented from ObjCryst::RefinableObj.
Definition at line 1522 of file ObjCryst/IO.cpp.
vector< pair<unsigned long, CrystVector_REAL> > ObjCryst::PowderPatternDiffraction::mIntegratedProfileFactor [mutable, protected] |
For each reflection, store the integrated value of the normalized profile over all integration intervals.
The first field is the first integration interval to which the reflection contributes, and the second field is a vector with all the integrated values for the intervals, listed in ascending 2theta(tof) order.
Definition at line 461 of file PowderPattern.h.
CrystVector_REAL ObjCryst::PowderPatternDiffraction::mIntensityCorr [mutable, protected] |
Calculated corrections for all reflections.
Calc F^2 must be multiplied by this factor to yield intensities.
Thus we have : 
with
(Lorentz factor).
(Polarization factor), with
, where f is the polarization rate of the incident beam in the plane which (i) includes the incident beam, and (ii) is perpendicular to the diffracting plane. For an X-Ray Tube without monochromator, A=1, and if there is a monochromator :
The factor
takes into account the fraction of the diffracted cone which falls in the detector slit.
If there is prefereed orientation, this also holds the associated correction.
Definition at line 422 of file PowderPattern.h.
1.6.1