Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ObjCryst::PowderPatternDiffraction Class Reference

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

#include <PowderPattern.h>

Inheritance diagram for ObjCryst::PowderPatternDiffraction::

ObjCryst::PowderPatternComponent ObjCryst::ScatteringData ObjCryst::RefinableObj ObjCryst::RefinableObj List of all members.

Public Methods

 PowderPatternDiffraction ()
 PowderPatternDiffraction (const PowderPatternDiffraction &)
virtual ~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 (const PowderPattern &)
  Set the PowderPattern object which uses this component. This sets all necessary spectrum parameters (2theta range, wavelength, radiation type...) accordingly.

virtual const CrystVector_double & GetPowderPatternCalc () const
 Get the calculated powder spectrum for this component. Note that the spectrum is not scaled.

void SetReflectionProfilePar (const ReflectionProfileType prof, const double fwhmCagliotiW, const double fwhmCagliotiU=0, const double fwhmCagliotiV=0, const double eta0=0.5, const double eta1=0.)
 Set reflection profile parameters. More...

void SetUseFastLessPreciseFunc (const bool useItOrNot)
 Use faster, less precise functions ? Good for global optimizations. Currently does nothing.

virtual void SetUseOnlyLowAngleData (const bool useOnlyLowAngle, const double angle=0)
 Set an option so that only low-angle reflections (theta < angle) are used. See DiffractionData::mUseOnlyLowAngleData
Deprecated:
Do not use, as this will probably be removed eventually.


virtual void GenHKLFullSpace ()
virtual void XMLOutput (ostream &os, int indent=0) const
 Output to stream in well-formed XML. More...

virtual void XMLInput (istream &is, const XMLCrystTag &tag)
 Input From stream. More...


Protected Methods

virtual void CalcPowderPattern () const
 Calc the powder spectrum. As always, recomputation is only done if necessary (ie if a parameter has changed since the last computation).

void CalcPowderReflProfile () const
  Calc reflection profiles for ALL reflections (powder diffraction).

void CalcLorentzPolarCorr () const
  Calc Lorentz-Polarisation-APerture correction.

virtual void CalcIhkl () const
  Compute the intensity for all reflections (taking into account corrections, but not the multiplicity).

virtual void SetRadiation (const Radiation &rad)
  Set the radiation. This is called by PowderPattern.

virtual void Prepare ()
  This will be called by the parent PowderPattern object, before calculating the first powder spectrum. Or maybe it should be called automatically by the object itself...

virtual void InitOptions ()

Protected Attributes

RefinableObjClock mClockProfilePar
 Last time the reflection parameters were changed.

RefinableObjClock mClockLorentzPolarSlitCorrPar
 Last time the.

RefinableObjClock mClockLorentzPolarSlitCorrCalc
 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.

RefObjOpt mReflectionProfileType
 Gaussian ? Lorentzian ? Pseudo-Voigt ?

double mFullProfileWidthFactor
 The 'full' profile of each reflection os taken equal to the FWHM, multiplied by this factor.

double mCagliotiU
 FWHM parameters, following Caglioti's law.

double mCagliotiV
 FWHM parameters, following Caglioti's law.

double mCagliotiW
 FWHM parameters, following Caglioti's law.

double mPseudoVoigtEta0
 Pseudo-Voigt mixing parameter : eta=eta0 +2*theta*eta1 eta=1 -> pure Lorentzian ; eta=0 -> pure Gaussian.

double mPseudoVoigtEta1
 Pseudo-Voigt mixing parameter : eta=eta0 +2*theta*eta1 eta=1 -> pure Lorentzian ; eta=0 -> pure Gaussian.

bool mUseAsymmetricProfile
 Use asymmetric profiles ? (unused yet).

CrystVector_double mLorentzPolarSlitCorr
 Calculated corrections for all reflections. Calc F^2 must be multiplied by this factor to yield intensities. More...

bool mNeedLorentzCorr
 Need to apply Lorentz correction ?

bool mNeedPolarCorr
 Need to apply Polarization correction ? This should be false for (unpolarized) neutrons.

bool mNeedSlitApertureCorr
 Need to apply Slit aperture correction ?

double mPolarAfactor
 the A factor in the polarization correction. Default value=1, corresponding to an X-Ray tube without monochromator.

CrystVector_double mIhklCalc
 Computed intensities for all reflections.

CrystMatrix_double mSavedPowderReflProfile
 Reflection profiles for ALL reflections during the last powder spectrum generation.

long mSavedPowderReflProfileNbPoint
  Number of points used to describe each individual profile.

CrystVector_long mReflectionProfileFirstPixel
  The 1st pixel for each reflection.

bool mUseOnlyLowAngleData
 Flag forcing the use of only low-angle reflections. More...

double mUseOnlyLowAngleDataLimit
 Limit (theta angle, in radian) for the above option. TO BE REMOVED.

CrystVector_long mUseOnlyLowAngleData_SavedH
 Saved H, K and L arrays when using only low-angle data TO BE REMOVED.

CrystVector_long mUseOnlyLowAngleData_SavedK
 Saved H, K and L arrays when using only low-angle data TO BE REMOVED.

CrystVector_long mUseOnlyLowAngleData_SavedL
 Saved H, K and L arrays when using only low-angle data TO BE REMOVED.


Detailed Description

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


Member Function Documentation

void SetReflectionProfilePar const ReflectionProfileType    prof,
const double    fwhmCagliotiW,
const double    fwhmCagliotiU = 0,
const double    fwhmCagliotiV = 0,
const double    eta0 = 0.5,
const double    eta1 = 0.
 

Set reflection profile parameters.

:TODO: assymmetric profiles

Parameters:
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.

virtual void XMLInput istream &    is,
const XMLCrystTag   tag
[virtual]
 

Input From stream.

Todo:
Add an bool XMLInputTag(is,tag) function to recognize all the tags from the stream. So that each inherited class can use the XMLInputTag function from its parent (ie take advantage of inheritance). The children class would first try to interpret the tag, then if unsuccessful would pass it to its parent (thus allowing overloading), etc...

Reimplemented from ObjCryst::RefinableObj.

virtual void XMLOutput ostream &    os,
int    indent = 0
const [virtual]
 

Output to stream in well-formed XML.

Todo:
Use inheritance.. as for XMLInputTag()...

Reimplemented from ObjCryst::RefinableObj.


Member Data Documentation

CrystVector_double mLorentzPolarSlitCorr [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.

bool mUseOnlyLowAngleData [protected]
 

Flag forcing the use of only low-angle reflections.

Mainly for use during global optimizations, or more generally when the program is far from the real structure. In this case high-angle reflection are not significant and only lead to slower calculations and also in fooling the optimization (bad agreement at low angle and good with the more numerous high-angle reflections). By default this is set to false.

Practically, this means that any reflections below DiffractionData::mLowAngleReflectionLimit is simply ignored, not calculated, not taken into account in statistics. TO BE REMOVED


The documentation for this class was generated from the following file:
Generated on Wed Nov 14 19:48:37 2001 for ObjCryst++ by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001