FOX/ObjCryst++  1.10.X (development)
ScatteringData.h
1 /* ObjCryst++ Object-Oriented Crystallographic Library
2  (c) 2000-2002 Vincent Favre-Nicolin vincefn@users.sourceforge.net
3  2000-2001 University of Geneva (Switzerland)
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 #ifndef _OBJCRYST_SCATTERINGDATA_H_
20 #define _OBJCRYST_SCATTERINGDATA_H_
21 
22 #include "ObjCryst/CrystVector/CrystVector.h"
23 
24 #include "ObjCryst/ObjCryst/General.h"
25 
26 #include "ObjCryst/ObjCryst/SpaceGroup.h"
27 #include "ObjCryst/ObjCryst/ScatteringPower.h"
28 #include "ObjCryst/ObjCryst/Scatterer.h"
29 #include "ObjCryst/ObjCryst/Crystal.h"
30 
31 //#include <stdlib.h>
32 #include <string>
33 //#include <iomanip>
34 //#include <cmath>
35 //#include <typeinfo>
36 //#include <fstream>
37 //#include <ctime>
38 
39 namespace ObjCryst
40 {
41 #ifndef HAVE_SSE_MATHFUN
42 //initialize tabulated values of cosine
43 void InitLibCrystTabulCosine();
44 void DeleteLibCrystTabulCosine();
45 void InitLibCrystTabulExp();
46 void DeleteLibCrystTabulExp();
47 #endif
48 extern const RefParType *gpRefParTypeScattData;
51 extern const RefParType *gpRefParTypeScattDataScale;
53 extern const RefParType *gpRefParTypeScattDataProfile;
55 extern const RefParType *gpRefParTypeScattDataProfileType;
57 extern const RefParType *gpRefParTypeScattDataProfileWidth;
59 extern const RefParType *gpRefParTypeScattDataProfileAsym;
61 extern const RefParType *gpRefParTypeScattDataCorr;
63 extern const RefParType *gpRefParTypeScattDataCorrInt;
65 extern const RefParType *gpRefParTypeScattDataCorrIntPO_Direction;
67 extern const RefParType *gpRefParTypeScattDataCorrIntPO_Fraction;
69 extern const RefParType *gpRefParTypeScattDataCorrIntPO_Amplitude;
71 extern const RefParType *gpRefParTypeScattDataCorrInt_Ellipsoid;
73 extern const RefParType *gpRefParTypeScattDataCorrIntAbsorp;
75 extern const RefParType *gpRefParTypeScattDataCorrIntPolar;
77 extern const RefParType *gpRefParTypeScattDataCorrIntExtinc;
79 extern const RefParType *gpRefParTypeScattDataCorrPos;
81 extern const RefParType *gpRefParTypeScattDataBackground;
82 
83 extern const RefParType *gpRefParTypeRadiation;
84 extern const RefParType *gpRefParTypeRadiationWavelength;
85 
87 {
88  public:
90  {
91  if (mCount++ == 0)
92  {
93  #ifndef HAVE_SSE_MATHFUN
94  InitLibCrystTabulCosine();
95  InitLibCrystTabulExp();
96  #endif
97  gpRefParTypeScattData= new RefParType(gpRefParTypeObjCryst,"Scattering Data");
98  gpRefParTypeScattDataScale= new RefParType(gpRefParTypeObjCryst,"Scale Factor");
99  gpRefParTypeScattDataProfile= new RefParType(gpRefParTypeScattData,"Profile");
100  gpRefParTypeScattDataProfileType= new RefParType(gpRefParTypeScattDataProfile,"Type");
101  gpRefParTypeScattDataProfileWidth= new RefParType(gpRefParTypeScattDataProfile,"Width");
102  gpRefParTypeScattDataProfileAsym= new RefParType(gpRefParTypeScattDataProfile,"Asymmetry");
103  gpRefParTypeScattDataCorr= new RefParType(gpRefParTypeScattData,"Correction");
104  gpRefParTypeScattDataCorrInt= new RefParType(gpRefParTypeScattDataCorr,"Intensities");
105  gpRefParTypeScattDataCorrIntPO_Direction= new RefParType(gpRefParTypeScattDataCorrIntPO_Direction,"Preferred orientation direction");
106  gpRefParTypeScattDataCorrIntPO_Fraction= new RefParType(gpRefParTypeScattDataCorrIntPO_Fraction,"Preferred orientation fraction");
107  gpRefParTypeScattDataCorrIntPO_Amplitude= new RefParType(gpRefParTypeScattDataCorrIntPO_Amplitude,"Preferred orientation amplitude");
108  gpRefParTypeScattDataCorrInt_Ellipsoid= new RefParType(gpRefParTypeScattDataCorrInt_Ellipsoid,"Preferred orientation ellipsoid");
109  gpRefParTypeScattDataCorrIntAbsorp= new RefParType(gpRefParTypeScattDataCorrInt,"Absorption");
110  gpRefParTypeScattDataCorrIntPolar= new RefParType(gpRefParTypeScattDataCorrInt,"Polarization");
111  gpRefParTypeScattDataCorrIntExtinc= new RefParType(gpRefParTypeScattDataCorrInt,"Extinction");
112  gpRefParTypeScattDataCorrPos= new RefParType(gpRefParTypeScattDataCorr,"Reflections Positions");
113  gpRefParTypeScattDataBackground= new RefParType(gpRefParTypeScattData,"Background");
114  gpRefParTypeRadiation= new RefParType(gpRefParTypeObjCryst,"Radiation");
115  gpRefParTypeRadiationWavelength= new RefParType(gpRefParTypeRadiation,"Wavelength");
116  }
117  }
119  {
120  if (--mCount == 0)
121  {
122  #ifndef HAVE_SSE_MATHFUN
123  DeleteLibCrystTabulCosine();
124  DeleteLibCrystTabulExp();
125  #endif
126  delete gpRefParTypeScattData;
139  delete gpRefParTypeRadiation;
140  delete gpRefParTypeRadiationWavelength;
141  gpRefParTypeScattData=0;
142  gpRefParTypeScattDataScale=0;
143  gpRefParTypeScattDataProfile=0;
144  gpRefParTypeScattDataProfileType=0;
145  gpRefParTypeScattDataProfileWidth=0;
146  gpRefParTypeScattDataProfileAsym=0;
147  gpRefParTypeScattDataCorr=0;
148  gpRefParTypeScattDataCorrInt=0;
149  gpRefParTypeScattDataCorrIntAbsorp=0;
150  gpRefParTypeScattDataCorrIntPolar=0;
151  gpRefParTypeScattDataCorrIntExtinc=0;
152  gpRefParTypeScattDataCorrPos=0;
153  gpRefParTypeScattDataBackground=0;
154  gpRefParTypeRadiation=0;
155  gpRefParTypeRadiationWavelength=0;
156  }
157  }
158  private:
159  static long mCount;
160 };
161 static NiftyStaticGlobalObjectsInitializer_ScatteringData NiftyStaticGlobalObjectsInitializer_ScatteringData_counter;
162 //######################################################################
173 //######################################################################
174 class Radiation: public RefinableObj
175 {
176  public:
178  Radiation();
185  Radiation(const RadiationType rad,const REAL wavelength);
204  Radiation(const string &XRayTubeElementName,const REAL alpha2Alpha2ratio=0.5);
206  Radiation(const Radiation&);
207  ~Radiation();
208  virtual const string& GetClassName() const;
209 
210  void operator=(const Radiation&);
211 
215  void SetRadiationType(const RadiationType);
217  void SetWavelengthType(const WavelengthType &type);
223  const CrystVector_REAL& GetWavelength()const;
225  void SetWavelength(const REAL );
244  void SetWavelength(const string &XRayTubeElementName,const REAL alpha2Alpha2ratio=0.5);
245 
247  REAL GetXRayTubeDeltaLambda()const;
249  REAL GetXRayTubeAlpha2Alpha1Ratio()const;
250 
252  const RefinableObjClock& GetClockWavelength()const ;
254  const RefinableObjClock& GetClockRadiation()const ;
255  virtual void XMLOutput(ostream &os,int indent=0)const;
256  virtual void XMLInput(istream &is,const XMLCrystTag &tag);
257  //virtual void XMLInputOld(istream &is,const IOCrystTag &tag);
259  void Print()const;
260  REAL GetLinearPolarRate()const;
261  void SetLinearPolarRate(const REAL f);
262  private:
263  void InitOptions();
269  CrystVector_REAL mWavelength;
277  //Clocks
278  RefinableObjClock mClockWavelength;
279  RefinableObjClock mClockRadiation;
282  #ifdef __WX__CRYST__
283  public:
284  virtual WXCrystObjBasic* WXCreate(wxWindow*);
285  friend class WXRadiation;
286  #endif
287 };
288 
289 //######################################################################
304 //######################################################################
305 class ScatteringData: virtual public RefinableObj
306 {
307  public:
308  ScatteringData();
309  ScatteringData(const ScatteringData &old);
310  ~ScatteringData();
312  virtual ScatteringData* CreateCopy()const=0;
313 
319  virtual void SetHKL( const CrystVector_REAL &h,
320  const CrystVector_REAL &k,
321  const CrystVector_REAL &l);
337  virtual void GenHKLFullSpace2(const REAL maxsithsl,
338  const bool unique=false);
357  virtual void GenHKLFullSpace(const REAL maxTheta,
358  const bool unique=false);
359 
363  virtual const Radiation& GetRadiation()const=0;
364 
368  virtual void SetCrystal(Crystal &crystal);
370  const Crystal& GetCrystal()const ;
372  Crystal& GetCrystal() ;
374  bool HasCrystal()const;
375 
377  long GetNbRefl() const;
379  const CrystVector_REAL& GetH() const;
381  const CrystVector_REAL& GetK() const;
383  const CrystVector_REAL& GetL() const;
386  const CrystVector_REAL& GetH2Pi() const;
389  const CrystVector_REAL& GetK2Pi() const;
392  const CrystVector_REAL& GetL2Pi() const;
394  const CrystVector_REAL& GetReflX() const;
396  const CrystVector_REAL& GetReflY() const;
398  const CrystVector_REAL& GetReflZ() const;
399 
402  const CrystVector_REAL& GetSinThetaOverLambda()const;
404  const CrystVector_REAL& GetTheta()const;
406  const RefinableObjClock& GetClockTheta()const;
407 
409  const CrystVector_REAL& GetFhklCalcSq() const;
410  std::map<RefinablePar*, CrystVector_REAL> & GetFhklCalcSq_FullDeriv(std::set<RefinablePar *> &vPar);
412  const CrystVector_REAL& GetFhklCalcReal() const;
414  const CrystVector_REAL& GetFhklCalcImag() const;
415 
417  const CrystVector_REAL& GetFhklObsSq() const;
418 
420  const map<const ScatteringPower*,CrystVector_REAL> &GetScatteringFactor() const;
421 
423  CrystVector_REAL GetWavelength()const;
424 
431  void SetIsIgnoringImagScattFact(const bool b);
434  bool IsIgnoringImagScattFact() const;
435  // Set an option so that only low-amgle reflections (theta < angle)
436  // are used. See DiffractionData::mUseOnlyLowAngleData
437  //virtual void SetUseOnlyLowAngleData(const bool useOnlyLowAngle,const REAL angle)=0;
441  virtual void PrintFhklCalc(ostream &os=cout)const;
446  virtual void PrintFhklCalcDetail(ostream &os=cout)const;
447 
448  virtual void BeginOptimization(const bool allowApproximations=false,
449  const bool enableRestraints=false);
450  virtual void EndOptimization();
451  virtual void SetApproximationFlag(const bool allow);
454  virtual void SetMaxSinThetaOvLambda(const REAL max);
456  REAL GetMaxSinThetaOvLambda()const;
459  virtual long GetNbReflBelowMaxSinThetaOvLambda()const;
462  protected:
465  virtual void PrepareHKLarrays() ;
469  virtual CrystVector_long SortReflectionBySinThetaOverLambda(const REAL maxSTOL=-1.);
477  CrystVector_long EliminateExtinctReflections();
478 
479  //The following functions are used during the calculation of structure factors,
483  virtual void CalcSinThetaLambda()const;
485  REAL CalcSinThetaLambda(REAL h, REAL k, REAL l)const;
489  virtual const CrystMatrix_REAL& GetBMatrix()const;
491  void CalcScattFactor()const;
493  void CalcTemperatureFactor()const;
497  virtual void CalcResonantScattFactor()const;
500  void CalcGlobalTemperatureFactor() const;
501 
513  void CalcStructFactor() const;
514  void CalcStructFactor_FullDeriv(std::set<RefinablePar *> &vPar);
519  void CalcGeomStructFactor() const;
520  void CalcGeomStructFactor_FullDeriv(std::set<RefinablePar*> &vPar);
525  void CalcLuzzatiFactor()const;
529  void CalcStructFactVariance()const;
530 
532  long mNbRefl;
534  CrystVector_REAL mH, mK, mL ;
536  mutable CrystVector_long mIntH, mIntK, mIntL ;
538  mutable CrystVector_REAL mH2Pi, mK2Pi, mL2Pi ;
540  mutable CrystVector_REAL mX, mY, mZ ;
541 
543  CrystVector_int mMultiplicity ;
544 
549  CrystVector_int mExpectedIntensityFactor;
550 
552  mutable CrystVector_REAL mFhklCalcReal, mFhklCalcImag ;
553  mutable std::map<RefinablePar*, CrystVector_REAL> mFhklCalcReal_FullDeriv, mFhklCalcImag_FullDeriv ;
555  mutable CrystVector_REAL mFhklCalcSq ;
556  mutable std::map<RefinablePar*, CrystVector_REAL> mFhklCalcSq_FullDeriv;
557 
564 
572  mutable CrystVector_REAL mGlobalTemperatureFactor;
573 
580 
581  //The Following members are only kept to avoid useless re-computation
582  //during global refinements. They are used \b only by CalcStructFactor()
583 
586  mutable CrystVector_REAL mSinThetaLambda;
587 
589  mutable CrystVector_REAL mTheta;
590 
595  mutable map<const ScatteringPower*,REAL> mvFprime,mvFsecond;
596 
598  mutable map<const ScatteringPower*,CrystVector_REAL> mvTemperatureFactor;
599 
601  mutable map<const ScatteringPower*,CrystVector_REAL> mvScatteringFactor;
602 
604  mutable map<const ScatteringPower*,CrystVector_REAL> mvRealGeomSF,mvImagGeomSF;
605  mutable map<RefinablePar*,map<const ScatteringPower*,CrystVector_REAL> > mvRealGeomSF_FullDeriv,mvImagGeomSF_FullDeriv;
606 
607  //Public Clocks
614  //Internal Clocks
625 
630 
644 
645  // Maximum sin(theta)/lambda
660  mutable long mNbReflUsed;
663 
664  // Maximum Likelihood
666  mutable map<const ScatteringPower*,CrystVector_REAL> mvLuzzatiFactor;
672  mutable CrystVector_REAL mFhklCalcVariance;
673  mutable RefinableObjClock mClockLuzzatiFactor;
674  mutable RefinableObjClock mClockFhklCalcVariance;
676  CrystVector_REAL mFhklObsSq;
679  #ifdef __WX__CRYST__
680  //to access mMaxSinThetaOvLambda
681  friend class WXDiffractionSingleCrystal;
682  friend class WXPowderPattern;
683  #endif
684 };
685 
686 }//namespace ObjCryst
687 #endif // _OBJCRYST_SCATTERINGDATA_H_
const RefinableObjClock & GetClockNbReflBelowMaxSinThetaOvLambda() const
Clock the last time the number of reflections used was changed.
const CrystVector_REAL & GetH() const
Return the 1D array of H coordinates for all reflections.
void Print() const
Print to screen/console the charcteristics of the radiation.
const CrystVector_REAL & GetFhklCalcImag() const
Access to imaginary part of F(hkl)calc.
map< const ScatteringPower *, CrystVector_REAL > mvRealGeomSF
Geometrical Structure factor for each ScatteringPower, as vectors with NbRefl elements.
virtual long GetNbReflBelowMaxSinThetaOvLambda() const
Recalc, and get the number of reflections which should be actually used, due to the maximuml sin(thet...
RefinableObjClock mClockGeomStructFact
Clock the last time the geometrical structure factors were computed.
map< const ScatteringPower *, REAL > mvFprime
Anomalous X-Ray scattering term f' and f" are stored here for each ScatteringPower We store here only...
bool mIgnoreImagScattFact
Ignore imaginary part of scattering factor.
REAL mXRayTubeDeltaLambda
Absolute difference between alpha1 and alpha2, in angstroems.
RefinableObjClock mClockHKL
Clock for the list of hkl.
RadiationType GetRadiationType() const
Neutron or x-ray experiment ? Wavelength ?
const CrystVector_REAL & GetSinThetaOverLambda() const
Return an array with for all reflections.
RefObjOpt mWavelengthType
monochromatic ? Alpha1 & Alpha2 ? Multi-Wavelength ?
void CalcGlobalTemperatureFactor() const
Compute the overall temperature factor affecting all reflections.
WX Class for Radiation.
Definition: wxRadiation.h:29
const RefParType * gpRefParTypeScattDataCorrInt
Generic type for correction to calculated intensities.
RefinableObjClock mClockNbReflUsed
Clock recording the last time the number of reflections used has increased.
const CrystVector_REAL & GetTheta() const
Return an array with theta values for all reflections.
virtual void PrepareHKLarrays()
const RefParType * gpRefParTypeScattDataCorrPos
Parameter type for correction to peak positions.
virtual void XMLInput(istream &is, const XMLCrystTag &tag)
Input From stream.
RefinableObjClock mClockScattFactor
Clock the last time scattering factors were computed.
CrystVector_REAL mGlobalTemperatureFactor
Global Biso factor.
REAL mMaxSinThetaOvLambda
Maximum sin(theta)/lambda for all calculations (10 by default).
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...
Definition: RefinableObj.h:138
virtual void CalcSinThetaLambda() 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.
CrystVector_REAL GetWavelength() const
wavelength of the experiment (in Angstroems)
REAL mLinearPolarRate
Linear Polarization Rate (default:0, X-Ray tube unmonochromatized)
REAL GetMaxSinThetaOvLambda() const
Get the maximum value for sin(theta)/lambda.
CrystVector_REAL mFhklCalcVariance
The variance on all calculated structure factors, taking into account the positionnal errors and the ...
virtual void CalcResonantScattFactor() const
bool HasCrystal() const
Has a Crystal structure associated yet ?
REAL mXRayTubeAlpha2Alpha1Ratio
Ratio alpha2/alpha1 (should be 0.5)
const RefinableObjClock & GetClockRadiation() const
Last time the nature (X-Rays/Neutron, number of wavelengths)radiation has been changed.
RefinableObjClock mClockStructFactor
Clock for the structure factor.
const RefParType * gpRefParTypeScattDataCorrInt_Ellipsoid
Parameter type for the ellipsoid coefficient.
string mXRayTubeName
Name of the X-Ray tube used, if relevant.
long mNbRefl
Number of H,K,L 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 ...
virtual void SetCrystal(Crystal &crystal)
Set the crystal for this experiment.
CrystVector_REAL mWavelength
Wavelength of the Experiment, in Angstroems.
const RefParType * gpRefParTypeScattDataProfile
Type for reflection profile.
map< const ScatteringPower *, CrystVector_REAL > mvTemperatureFactor
Thermic factors for each ScatteringPower, as vectors with NbRefl elements.
const RefParType * gpRefParTypeScattDataProfileAsym
Type for reflection profile asymmetry.
RadiationType GetRadiationType() const
Get the radiation type (X-Rays, Neutron)
CrystVector_REAL mH2Pi
H,K,L coordinates, multiplied by 2PI.
Class to compute structure factors for a set of reflections and a Crystal.
virtual const Radiation & GetRadiation() const =0
Get the radiation object for this data.
const RefinableObjClock & GetClockWavelength() const
Last time the wavelength has been changed.
Radiation()
Default constructor.
const CrystVector_REAL & GetL() const
Return the 1D array of L coordinates for all reflections.
Generic Refinable Object.
Definition: RefinableObj.h:752
const RefParType * gpRefParTypeScattDataScale
Type for scattering data scale factors.
CrystVector_int mMultiplicity
Multiplicity for each reflections (mostly for powder diffraction)
virtual void GenHKLFullSpace2(const REAL maxsithsl, const bool unique=false)
Generate a list of h,k,l to describe a full reciprocal space, up to a given maximum theta value...
RefinableObjClock mClockTheta
Clock the last time theta was computed.
void CalcGeomStructFactor() const
Compute the 'Geometrical Structure Factor' for each ScatteringPower of the Crystal.
map< const ScatteringPower *, CrystVector_REAL > mvLuzzatiFactor
The Luzzati 'D' factor for each scattering power and each reflection.
const CrystVector_REAL & GetReflZ() const
Return the 1D array of orthonormal z coordinates for all reflections (recipr. space) ...
virtual void GenHKLFullSpace(const REAL maxTheta, const bool unique=false)
Generate a list of h,k,l to describe a full reciprocal space, up to a given maximum theta value...
virtual CrystVector_long SortReflectionBySinThetaOverLambda(const REAL maxSTOL=-1.)
const RefParType * gpRefParTypeScattDataBackground
Parameter type for background intensity.
Abstract base class for all objects in wxCryst.
Definition: wxCryst.h:127
REAL GetXRayTubeDeltaLambda() const
Get the wavelength difference for Alpha1 and Alpha2.
CrystVector_REAL mTheta
theta for the crystal and the HKL in ReciprSpace (in radians)
WX Class for PowderPattern objects.
const RefParType * gpRefParTypeScattDataCorrIntPO_Amplitude
Parameter type for the amplitude of preferred orientation.
RefinableObjClock mClockThermicFact
Clock the last time temperature factors were computed.
Base class for options.
Definition: RefinableObj.h:550
void CalcStructFactor() const
Compute the overall structure factor (real and imaginary part).
CrystVector_REAL mH
H,K,L coordinates.
virtual const CrystMatrix_REAL & GetBMatrix() const
Get access to the B matrix used to compute reflection positions.
const map< const ScatteringPower *, CrystVector_REAL > & GetScatteringFactor() const
Scattering factors for each ScatteringPower, as vectors with NbRefl elements.
void CalcLuzzatiFactor() const
Calculate the Luzzati factor associated to each ScatteringPower and each reflection, for maximum likelihood optimization.
WavelengthType GetWavelengthType() const
Get the Wavelength type (monochromatic, Alpha1+Alpha2, Time Of Flight...)
CrystVector_long mIntH
H,K,L integer coordinates.
CrystVector_REAL mSinThetaLambda
for the crystal and the reflections in ReciprSpace
const CrystVector_REAL & GetK2Pi() const
Return the 1D array of K coordinates for all reflections, multiplied by 2*pi.
void SetIsIgnoringImagScattFact(const bool b)
If true, then the imaginary part of the scattering factor is ignored during Structure factor computat...
void SetWavelength(const REAL)
Set the (monochromatic) wavelength of the beam.
const CrystVector_REAL & GetReflY() const
Return the 1D array of orthonormal y coordinates for all reflections (recipr. space) ...
const CrystVector_REAL & GetFhklCalcSq() const
Returns the Array of calculated |F(hkl)|^2 for all reflections.
const CrystVector_REAL & GetReflX() const
Return the 1D array of orthonormal x coordinates for all reflections (recipr. space) ...
virtual void SetMaxSinThetaOvLambda(const REAL max)
Set the maximum value for sin(theta)/lambda.
WavelengthType
Incident beam characteristics : monochromatic, X-Ray tube with Alpha1 and alpha2, MAD (a few waveleng...
Definition: General.h:100
const CrystVector_REAL & GetFhklObsSq() const
Returns the Array of observed |F(hkl)|^2 for all reflections.
RefinableObjClock mClockScattFactorResonant
Clock the last time resonant scattering factors were computed.
RefObjOpt mRadiationType
Neutron ? X-Ray ? (Electron: unimplemented)
const RefParType * gpRefParTypeScattDataProfileWidth
Type for reflection profile width.
REAL mGlobalBiso
Global Biso, affecting the overall structure factor for all reflections (but not the structure factor...
const RefParType * gpRefParTypeScattDataCorrIntAbsorp
Parameter type for absorption correction.
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
void SetRadiationType(const RadiationType)
Set the radiation type (X-Rays, Neutron)
CrystVector_REAL mFhklObsSq
Observed squared structure factors (zero-sized if none)
const CrystVector_REAL & GetWavelength() const
Get the wavelength(s) in Angstroems.
const Crystal & GetCrystal() const
Const access to the data's crystal.
const RefParType * gpRefParTypeScattDataProfileType
Type for reflection profiles type (e.g. gaussian/lorentzian mix)
const CrystVector_REAL & GetFhklCalcReal() const
Access to real part of F(hkl)calc.
CrystVector_REAL mFhklCalcSq
F(HKL)^2 calc for each reflection.
WX Class for DiffractionDataSingleCrystal objects.
virtual ScatteringData * CreateCopy() const =0
So-called virtual copy constructor.
const RefParType * gpRefParTypeScattDataCorrIntPolar
Parameter type for polarization correction.
long mNbReflUsed
Number of reflections which are below the max.
CrystVector_long EliminateExtinctReflections()
const CrystVector_REAL & GetL2Pi() const
Return the 1D array of L coordinates for all reflections, multiplied by 2*pi.
map< const ScatteringPower *, CrystVector_REAL > mvScatteringFactor
Scattering factors for each ScatteringPower, as vectors with NbRefl elements.
Crystal * mpCrystal
Pointer to the crystal corresponding to this experiment.
const RefParType * gpRefParTypeScattDataCorr
Generic type for scattering data correction parameter.
CrystVector_int mExpectedIntensityFactor
Expected intensity factor for all reflections.
void CalcTemperatureFactor() const
long GetNbRefl() const
Return the number of reflections in this experiment.
const RefinableObjClock & GetClockTheta() const
Clock the last time the sin(theta)/lambda and theta arrays were re-computed.
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
Definition: Atom.cpp:47
REAL GetXRayTubeAlpha2Alpha1Ratio() const
Get the Kalpha2/Kalpha1 ratio.
const RefParType * gpRefParTypeScattDataCorrIntPO_Direction
Parameter type for preferred orientation direction.
RefinableObjClock mClockStructFactorSq
Clock for the square modulus of the structure factor.
RefinableObjClock mClockFhklObsSq
Last time observed squared structure factors were altered.
RefinableObjClock mClockGlobalBiso
last time the global Biso factor was modified
virtual void PrintFhklCalc(ostream &os=cout) const
Print H, K, L F^2 Re(F) Im(F) theta sin(theta)/lambda for all reflections.
bool mUseFastLessPreciseFunc
Use faster, but less precise, approximations for functions? (integer approximations to compute sin an...
RefinableObjClock mClockGlobalTemperatureFact
last time the global temperature factor was computed
virtual void SetApproximationFlag(const bool allow)
Enable or disable numerical approximations.
virtual void SetHKL(const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l)
input H,K,L
const RefParType * gpRefParTypeScattDataCorrIntExtinc
Parameter type for extinction correction.
RadiationType
Type of radiation used.
Definition: General.h:94
virtual void EndOptimization()
This should be called by any optimization class at the end of an optimization.
const RefParType * gpRefParTypeScattDataCorrIntPO_Fraction
Parameter type for fraction of preferred orientation.
Crystal class: Unit cell, spacegroup, scatterers.
Definition: Crystal.h:97
void SetWavelengthType(const WavelengthType &type)
Set the Wavelength type (monochromatic, Alpha1+Alpha2, Time Of Flight...)
virtual void XMLOutput(ostream &os, int indent=0) const
Output to stream in well-formed XML.
class to input or output a well-formatted xml beginning or ending tag.
class of refinable parameter types.
Definition: RefinableObj.h:78
void CalcStructFactVariance() const
Calculate the variance associated to the calculated structure factor.
const CrystVector_REAL & GetK() const
Return the 1D array of K coordinates for all reflections.
const RefParType * gpRefParTypeScattData
Generic type for scattering data.
CrystVector_REAL mFhklCalcReal
real &imaginary parts of F(HKL)calc
Class to define the radiation (type, monochromaticity, wavelength(s)) of an experiment.
const CrystVector_REAL & GetH2Pi() const
Return the 1D array of H coordinates for all reflections, multiplied by 2*pi.
const RefParType * gpRefParTypeObjCryst
Top RefParType for the ObjCryst++ library.
bool IsIgnoringImagScattFact() const
If true, then the imaginary part of the scattering factor is ignored during Structure factor computat...
CrystVector_REAL mX
reflection coordinates in an orthonormal base