19 #ifndef _OBJCRYST_REFLECTIONPROFILE_H_
20 #define _OBJCRYST_REFLECTIONPROFILE_H_
23 #include "ObjCryst/CrystVector/CrystVector.h"
24 #include "ObjCryst/ObjCryst/General.h"
25 #include "ObjCryst/ObjCryst/UnitCell.h"
26 #include "ObjCryst/RefinableObj/RefinableObj.h"
37 CrystVector_REAL PowderProfileGauss (
const CrystVector_REAL theta,
38 const REAL fwhm,
const REAL center,
const REAL asym=1.0);
42 CrystVector_REAL PowderProfileLorentz(
const CrystVector_REAL theta,
43 const REAL fwhm,
const REAL center,
const REAL asym=1.0);
46 const REAL fwhm,
const REAL center,
47 const REAL A0,
const REAL A1,
48 const REAL B0,
const REAL B1);
80 virtual CrystVector_REAL
GetProfile(
const CrystVector_REAL &x,
const REAL xcenter,
81 const REAL h,
const REAL k,
const REAL l)
const=0;
85 const REAL h,
const REAL k,
const REAL l)=0;
88 virtual void XMLOutput(ostream &os,
int indent=0)
const=0;
108 CrystVector_REAL
GetProfile(
const CrystVector_REAL &x,
const REAL xcenter,
109 const REAL h,
const REAL k,
const REAL l)
const;
119 const REAL fwhmCagliotiU=0,
120 const REAL fwhmCagliotiV=0,
124 const REAL h,
const REAL k,
const REAL l);
126 virtual void XMLOutput(ostream &os,
int indent=0)
const;
142 mAsymBerarBaldinozziB0,mAsymBerarBaldinozziB1;
171 CrystVector_REAL
GetProfile(
const CrystVector_REAL &x,
const REAL xcenter,
172 const REAL h,
const REAL k,
const REAL l)
const;
182 const REAL fwhmCagliotiU=0,
183 const REAL fwhmCagliotiV=0,
184 const REAL fwhmGaussP=0,
185 const REAL fwhmLorentzX=0,
186 const REAL fwhmLorentzY=0,
187 const REAL fwhmLorentzGammaHH=0,
188 const REAL fwhmLorentzGammaKK=0,
189 const REAL fwhmLorentzGammaLL=0,
190 const REAL fwhmLorentzGammaHK=0,
191 const REAL fwhmLorentzGammaHL=0,
192 const REAL fwhmLorentzGammaKL=0,
193 const REAL pseudoVoigtEta0=0,
194 const REAL pseudoVoigtEta1=0,
200 const REAL h,
const REAL k,
const REAL l);
202 virtual void XMLOutput(ostream &os,
int indent=0)
const;
227 REAL
mCagliotiU,mCagliotiV,mCagliotiW,mScherrerP,mLorentzX,mLorentzY,
228 mLorentzGammaHH,mLorentzGammaKK,mLorentzGammaLL,mLorentzGammaHK,mLorentzGammaHL,mLorentzGammaKL;
267 CrystVector_REAL
GetProfile(
const CrystVector_REAL &x,
const REAL xcenter,
268 const REAL h,
const REAL k,
const REAL l)
const;
273 const REAL instrumentAlpha1,
274 const REAL instrumentBeta0,
275 const REAL instrumentBeta1,
276 const REAL gaussianSigma0,
277 const REAL gaussianSigma1,
278 const REAL gaussianSigma2,
279 const REAL lorentzianGamma0,
280 const REAL lorentzianGamma1,
281 const REAL lorentzianGamma2);
283 const REAL h,
const REAL k,
const REAL l);
285 virtual void XMLOutput(ostream &os,
int indent=0)
const;
294 REAL mInstrumentAlpha0;
295 REAL mInstrumentAlpha1;
296 REAL mInstrumentBeta0;
297 REAL mInstrumentBeta1;
298 REAL mGaussianSigma0;
299 REAL mGaussianSigma1;
300 REAL mGaussianSigma2;
301 REAL mLorentzianGamma0;
302 REAL mLorentzianGamma1;
303 REAL mLorentzianGamma2;
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
ObjRegistry< ReflectionProfile > gReflectionProfileRegistry("List of all ReflectionProfile types")
Global registry for all ReflectionProfile objects.
std::complex< T > ExponentialIntegral1_ExpZ(const complex< T > z)
E1(z)*exp(z)
CrystVector_REAL AsymmetryBerarBaldinozzi(const CrystVector_REAL x, const REAL fw, const REAL center, const REAL a0, const REAL a1, const REAL b0, const REAL b1)
Asymmetry function [Ref J. Appl. Cryst 26 (1993), 128-129.
std::complex< T > ExponentialIntegral1(const complex< T > z)
Complex exponential integral E1(z) (Abramowitz & Stegun, chap.
Abstract base class for reflection profiles.
virtual CrystVector_REAL GetProfile(const CrystVector_REAL &x, const REAL xcenter, const REAL h, const REAL k, const REAL l) const =0
Get the reflection profile.
virtual void XMLOutput(ostream &os, int indent=0) const =0
Output to stream in well-formed XML.
virtual bool IsAnisotropic() const
Is the profile anisotropic ?
virtual void XMLInput(istream &is, const XMLCrystTag &tag)=0
Input From stream.
virtual REAL GetFullProfileWidth(const REAL relativeIntensity, const REAL xcenter, const REAL h, const REAL k, const REAL l)=0
Get the (approximate) full profile width at a given percentage of the profile maximum (e....
Pseudo-Voigt reflection profile.
virtual void XMLOutput(ostream &os, int indent=0) const
Output to stream in well-formed XML.
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
void InitParameters()
Initialize parameters.
void SetProfilePar(const REAL fwhmCagliotiW, const REAL fwhmCagliotiU=0, const REAL fwhmCagliotiV=0, const REAL eta0=0.5, const REAL eta1=0.)
Set reflection profile parameters.
REAL mCagliotiU
FWHM parameters, following Caglioti's law.
REAL mAsym0
Asymmetry parameters, following the analytical function for asymmetric pseudo-voigt given by Toraya i...
CrystVector_REAL GetProfile(const CrystVector_REAL &x, const REAL xcenter, const REAL h, const REAL k, const REAL l) const
Get the reflection profile.
virtual REAL GetFullProfileWidth(const REAL relativeIntensity, const REAL xcenter, const REAL h, const REAL k, const REAL l)
Get the (approximate) full profile width at a given percentage of the profile maximum (e....
bool IsAnisotropic() const
Is the profile anisotropic ?
REAL mPseudoVoigtEta0
Pseudo-Voigt mixing parameter : eta=eta0 +2*theta*eta1 eta=1 -> pure Lorentzian ; eta=0 -> pure Gauss...
REAL mAsymBerarBaldinozziA0
Asymmetry parameters, following the Bérar & Baldinozzi approach ( Bérar & baldinozzi,...
virtual void XMLInput(istream &is, const XMLCrystTag &tag)
Input From stream.
Pseudo-Voigt reflection profile, with 6-parameters anisotropic Lorentzian broadening and Toraya asymm...
void InitParameters()
Initialize parameters.
virtual REAL GetFullProfileWidth(const REAL relativeIntensity, const REAL xcenter, const REAL h, const REAL k, const REAL l)
Get the (approximate) full profile width at a given percentage of the profile maximum (e....
REAL mPseudoVoigtEta0
Pseudo-Voigt mixing parameter : eta=1 -> pure Lorentzian ; eta=0 -> pure Gaussian.
REAL mCagliotiU
FWHM parameters:
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
CrystVector_REAL GetProfile(const CrystVector_REAL &x, const REAL xcenter, const REAL h, const REAL k, const REAL l) const
Get the reflection profile.
virtual void XMLInput(istream &is, const XMLCrystTag &tag)
Input From stream.
virtual void XMLOutput(ostream &os, int indent=0) const
Output to stream in well-formed XML.
void SetProfilePar(const REAL fwhmCagliotiW, const REAL fwhmCagliotiU=0, const REAL fwhmCagliotiV=0, const REAL fwhmGaussP=0, const REAL fwhmLorentzX=0, const REAL fwhmLorentzY=0, const REAL fwhmLorentzGammaHH=0, const REAL fwhmLorentzGammaKK=0, const REAL fwhmLorentzGammaLL=0, const REAL fwhmLorentzGammaHK=0, const REAL fwhmLorentzGammaHL=0, const REAL fwhmLorentzGammaKL=0, const REAL pseudoVoigtEta0=0, const REAL pseudoVoigtEta1=0, const REAL asymA0=0, const REAL asymA1=0, const REAL asymA2=0)
Set reflection profile parameters.
REAL mAsym0
Asymmetry parameters, following the analytical function for asymmetric pseudo-voigt given by Toraya i...
bool IsAnisotropic() const
Is the profile anisotropic ?
Double-Exponential Pseudo-Voigt profile for TOF.
void SetProfilePar(const REAL instrumentAlpha0, const REAL instrumentAlpha1, const REAL instrumentBeta0, const REAL instrumentBeta1, const REAL gaussianSigma0, const REAL gaussianSigma1, const REAL gaussianSigma2, const REAL lorentzianGamma0, const REAL lorentzianGamma1, const REAL lorentzianGamma2)
Set reflection profile parameters.
bool IsAnisotropic() const
Is the profile anisotropic ?
virtual void XMLOutput(ostream &os, int indent=0) const
Output to stream in well-formed XML.
void InitParameters()
Initialize parameters.
CrystVector_REAL GetProfile(const CrystVector_REAL &x, const REAL xcenter, const REAL h, const REAL k, const REAL l) const
Get the reflection profile.
virtual void XMLInput(istream &is, const XMLCrystTag &tag)
Input From stream.
void SetUnitCell(const UnitCell &cell)
Set unit cell.
virtual REAL GetFullProfileWidth(const REAL relativeIntensity, const REAL xcenter, const REAL h, const REAL k, const REAL l)
Get the (approximate) full profile width at a given percentage of the profile maximum (e....
ReflectionProfileDoubleExponentialPseudoVoigt()
Constructor, without unit cell.
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
Unit Cell class: Unit cell with spacegroup information.
class to input or output a well-formatted xml beginning or ending tag.
Generic Refinable Object.
Abstract base class for all objects in wxCryst.