FOX/ObjCryst++  2022
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
49 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
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;
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 //######################################################################
318 //######################################################################
319 class ScatteringData: virtual public RefinableObj
320 {
321  public:
322  ScatteringData();
323  ScatteringData(const ScatteringData &old);
324  ~ScatteringData();
326  virtual ScatteringData* CreateCopy()const=0;
327 
333  virtual void SetHKL( const CrystVector_REAL &h,
334  const CrystVector_REAL &k,
335  const CrystVector_REAL &l);
351  virtual void GenHKLFullSpace2(const REAL maxsithsl,
352  const bool unique=false);
371  virtual void GenHKLFullSpace(const REAL maxTheta,
372  const bool unique=false);
373 
377  virtual const Radiation& GetRadiation()const=0;
378 
382  virtual void SetCrystal(Crystal &crystal);
384  const Crystal& GetCrystal()const ;
386  Crystal& GetCrystal() ;
388  bool HasCrystal()const;
389 
391  long GetNbRefl() const;
393  const CrystVector_REAL& GetH() const;
395  const CrystVector_REAL& GetK() const;
397  const CrystVector_REAL& GetL() const;
400  const CrystVector_REAL& GetH2Pi() const;
403  const CrystVector_REAL& GetK2Pi() const;
406  const CrystVector_REAL& GetL2Pi() const;
408  const CrystVector_REAL& GetReflX() const;
410  const CrystVector_REAL& GetReflY() const;
412  const CrystVector_REAL& GetReflZ() const;
413 
416  const CrystVector_REAL& GetSinThetaOverLambda()const;
418  const CrystVector_REAL& GetTheta()const;
420  const RefinableObjClock& GetClockTheta()const;
421 
423  const CrystVector_REAL& GetFhklCalcSq() const;
424  std::map<RefinablePar*, CrystVector_REAL> & GetFhklCalcSq_FullDeriv(std::set<RefinablePar *> &vPar);
426  const CrystVector_REAL& GetFhklCalcReal() const;
428  const CrystVector_REAL& GetFhklCalcImag() const;
429 
431  const CrystVector_REAL& GetFhklObsSq() const;
434  void SetFhklObsSq(const CrystVector_REAL &obs);
435 
437  const map<const ScatteringPower*,CrystVector_REAL> &GetScatteringFactor() const;
438 
440  CrystVector_REAL GetWavelength()const;
441 
448  void SetIsIgnoringImagScattFact(const bool b);
451  bool IsIgnoringImagScattFact() const;
452  // Set an option so that only low-amgle reflections (theta < angle)
453  // are used. See DiffractionData::mUseOnlyLowAngleData
454  //virtual void SetUseOnlyLowAngleData(const bool useOnlyLowAngle,const REAL angle)=0;
458  virtual void PrintFhklCalc(ostream &os=cout)const;
463  virtual void PrintFhklCalcDetail(ostream &os=cout)const;
464 
465  virtual void BeginOptimization(const bool allowApproximations=false,
466  const bool enableRestraints=false);
467  virtual void EndOptimization();
468  virtual void SetApproximationFlag(const bool allow);
471  virtual void SetMaxSinThetaOvLambda(const REAL max);
473  REAL GetMaxSinThetaOvLambda()const;
476  virtual long GetNbReflBelowMaxSinThetaOvLambda()const;
479  protected:
485  virtual void SetHKL( const CrystVector_REAL &h,
486  const CrystVector_REAL &k,
487  const CrystVector_REAL &l) const;
503  virtual void GenHKLFullSpace2(const REAL maxsithsl,
504  const bool unique=false) const;
523  virtual void GenHKLFullSpace(const REAL maxTheta,
524  const bool unique=false) const;
527  virtual void PrepareHKLarrays() const;
531  virtual CrystVector_long SortReflectionBySinThetaOverLambda(const REAL maxSTOL=-1.) const;
539  CrystVector_long EliminateExtinctReflections();
540 
541  //The following functions are used during the calculation of structure factors,
545  virtual void CalcSinThetaLambda()const;
547  REAL CalcSinThetaLambda(REAL h, REAL k, REAL l)const;
551  virtual const CrystMatrix_REAL& GetBMatrix()const;
553  void CalcScattFactor()const;
555  void CalcTemperatureFactor()const;
559  virtual void CalcResonantScattFactor()const;
562  void CalcGlobalTemperatureFactor() const;
563 
575  void CalcStructFactor() const;
576  void CalcStructFactor_FullDeriv(std::set<RefinablePar *> &vPar);
581  void CalcGeomStructFactor() const;
582  void CalcGeomStructFactor_FullDeriv(std::set<RefinablePar*> &vPar);
587  void CalcLuzzatiFactor()const;
591  void CalcStructFactVariance()const;
592 
594  mutable long mNbRefl;
596  mutable CrystVector_REAL mH, mK, mL ;
598  mutable CrystVector_long mIntH, mIntK, mIntL ;
600  mutable CrystVector_REAL mH2Pi, mK2Pi, mL2Pi ;
602  mutable CrystVector_REAL mX, mY, mZ ;
603 
605  mutable CrystVector_int mMultiplicity ;
606 
611  mutable CrystVector_int mExpectedIntensityFactor;
612 
614  mutable CrystVector_REAL mFhklCalcReal, mFhklCalcImag ;
615  mutable std::map<RefinablePar*, CrystVector_REAL> mFhklCalcReal_FullDeriv, mFhklCalcImag_FullDeriv ;
617  mutable CrystVector_REAL mFhklCalcSq ;
618  mutable std::map<RefinablePar*, CrystVector_REAL> mFhklCalcSq_FullDeriv;
619 
626 
634  mutable CrystVector_REAL mGlobalTemperatureFactor;
635 
642 
643  //The Following members are only kept to avoid useless re-computation
644  //during global refinements. They are used \b only by CalcStructFactor()
645 
648  mutable CrystVector_REAL mSinThetaLambda;
649 
651  mutable CrystVector_REAL mTheta;
652 
657  mutable map<const ScatteringPower*,REAL> mvFprime,mvFsecond;
658 
660  mutable map<const ScatteringPower*,CrystVector_REAL> mvTemperatureFactor;
661 
663  mutable map<const ScatteringPower*,CrystVector_REAL> mvScatteringFactor;
664 
666  mutable map<const ScatteringPower*,CrystVector_REAL> mvRealGeomSF,mvImagGeomSF;
667  mutable map<RefinablePar*,map<const ScatteringPower*,CrystVector_REAL> > mvRealGeomSF_FullDeriv,mvImagGeomSF_FullDeriv;
668 
669  //Public Clocks
676  //Internal Clocks
687 
692 
706 
707  // Maximum sin(theta)/lambda
722  mutable long mNbReflUsed;
725 
726  // Maximum Likelihood
728  mutable map<const ScatteringPower*,CrystVector_REAL> mvLuzzatiFactor;
734  mutable CrystVector_REAL mFhklCalcVariance;
735  mutable RefinableObjClock mClockLuzzatiFactor;
736  mutable RefinableObjClock mClockFhklCalcVariance;
738  mutable CrystVector_REAL mFhklObsSq;
741  #ifdef __WX__CRYST__
742  //to access mMaxSinThetaOvLambda
743  friend class WXDiffractionSingleCrystal;
744  friend class WXPowderPattern;
745  #endif
746 };
747 
748 }//namespace ObjCryst
749 #endif // _OBJCRYST_SCATTERINGDATA_H_
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
Definition: doc-main.h:25
const RefParType * gpRefParTypeScattDataCorrIntPO_Direction
Parameter type for preferred orientation direction.
const RefParType * gpRefParTypeScattDataScale
Type for scattering data scale factors.
const RefParType * gpRefParTypeScattDataProfileWidth
Type for reflection profile width.
RadiationType
Type of radiation used.
Definition: General.h:96
const RefParType * gpRefParTypeScattDataCorrIntAbsorp
Parameter type for absorption correction.
WavelengthType
Incident beam characteristics : monochromatic, X-Ray tube with Alpha1 and alpha2, MAD (a few waveleng...
Definition: General.h:102
const RefParType * gpRefParTypeScattDataCorrPos
Parameter type for correction to peak positions.
const RefParType * gpRefParTypeScattDataProfile
Type for reflection profile.
const RefParType * gpRefParTypeScattDataCorrIntPO_Fraction
Parameter type for fraction of preferred orientation.
const RefParType * gpRefParTypeScattDataBackground
Parameter type for background intensity.
const RefParType * gpRefParTypeObjCryst
Top RefParType for the ObjCryst++ library.
const RefParType * gpRefParTypeScattDataCorr
Generic type for scattering data correction parameter.
const RefParType * gpRefParTypeScattDataProfileType
Type for reflection profiles type (e.g. gaussian/lorentzian mix)
const RefParType * gpRefParTypeScattDataCorrInt_Ellipsoid
Parameter type for the ellipsoid coefficient.
const RefParType * gpRefParTypeScattDataCorrIntPO_Amplitude
Parameter type for the amplitude of preferred orientation.
const RefParType * gpRefParTypeScattDataCorrInt
Generic type for correction to calculated intensities.
const RefParType * gpRefParTypeScattDataProfileAsym
Type for reflection profile asymmetry.
const RefParType * gpRefParTypeScattData
Generic type for scattering data.
const RefParType * gpRefParTypeScattDataCorrIntPolar
Parameter type for polarization correction.
const RefParType * gpRefParTypeScattDataCorrIntExtinc
Parameter type for extinction correction.
Crystal class: Unit cell, spacegroup, scatterers.
Definition: Crystal.h:98
Class to define the radiation (type, monochromaticity, wavelength(s)) of an experiment.
REAL mLinearPolarRate
Linear Polarization Rate (default:0, X-Ray tube unmonochromatized)
void Print() const
Print to screen/console the charcteristics of the radiation.
virtual void XMLOutput(ostream &os, int indent=0) const
Output to stream in well-formed XML.
CrystVector_REAL mWavelength
Wavelength of the Experiment, in Angstroems.
string mXRayTubeName
Name of the X-Ray tube used, if relevant.
RefObjOpt mRadiationType
Neutron ? X-Ray ? (Electron: unimplemented)
REAL GetXRayTubeAlpha2Alpha1Ratio() const
Get the Kalpha2/Kalpha1 ratio.
virtual void XMLInput(istream &is, const XMLCrystTag &tag)
Input From stream.
WavelengthType GetWavelengthType() const
Get the Wavelength type (monochromatic, Alpha1+Alpha2, Time Of Flight...)
REAL mXRayTubeDeltaLambda
Absolute difference between alpha1 and alpha2, in angstroems.
const CrystVector_REAL & GetWavelength() const
Get the wavelength(s) in Angstroems.
REAL mXRayTubeAlpha2Alpha1Ratio
Ratio alpha2/alpha1 (should be 0.5)
REAL GetXRayTubeDeltaLambda() const
Get the wavelength difference for Alpha1 and Alpha2.
const RefinableObjClock & GetClockWavelength() const
Last time the wavelength has been changed.
void SetRadiationType(const RadiationType)
Set the radiation type (X-Rays, Neutron)
RefObjOpt mWavelengthType
monochromatic ? Alpha1 & Alpha2 ? Multi-Wavelength ?
const RefinableObjClock & GetClockRadiation() const
Last time the nature (X-Rays/Neutron, number of wavelengths)radiation has been changed.
Radiation()
Default constructor.
void SetWavelength(const REAL)
Set the (monochromatic) wavelength of the beam.
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
void SetWavelengthType(const WavelengthType &type)
Set the Wavelength type (monochromatic, Alpha1+Alpha2, Time Of Flight...)
RadiationType GetRadiationType() const
Get the radiation type (X-Rays, Neutron)
Class to compute structure factors for a set of reflections and a Crystal.
long mNbReflUsed
Number of reflections which are below the max.
RefinableObjClock mClockNbReflUsed
Clock recording the last time the number of reflections used has increased.
virtual void SetHKL(const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l)
input H,K,L
CrystVector_REAL mSinThetaLambda
for the crystal and the reflections in ReciprSpace
const RefinableObjClock & GetClockNbReflBelowMaxSinThetaOvLambda() const
Clock the last time the number of reflections used was changed.
map< const ScatteringPower *, CrystVector_REAL > mvScatteringFactor
Scattering factors for each ScatteringPower, as vectors with NbRefl elements.
map< const ScatteringPower *, REAL > mvFprime
Anomalous X-Ray scattering term f' and f" are stored here for each ScatteringPower We store here only...
virtual const Radiation & GetRadiation() const =0
Get the radiation object for this data.
const map< const ScatteringPower *, CrystVector_REAL > & GetScatteringFactor() const
Scattering factors for each ScatteringPower, as vectors with NbRefl elements.
REAL mGlobalBiso
Global Biso, affecting the overall structure factor for all reflections (but not the structure factor...
RefinableObjClock mClockStructFactor
Clock for the structure factor.
virtual void PrintFhklCalc(ostream &os=cout) const
Print H, K, L F^2 Re(F) Im(F) theta sin(theta)/lambda for all reflections.
void CalcGeomStructFactor() const
Compute the 'Geometrical Structure Factor' for each ScatteringPower of the Crystal.
RefinableObjClock mClockFhklObsSq
Last time observed squared structure factors were altered.
RefinableObjClock mClockGlobalTemperatureFact
last time the global temperature factor was computed
const CrystVector_REAL & GetH2Pi() const
Return the 1D array of H coordinates for all reflections, multiplied by 2*pi.
RefinableObjClock mClockTheta
Clock the last time theta was computed.
const CrystVector_REAL & GetSinThetaOverLambda() const
Return an array with for all reflections.
const CrystVector_REAL & GetK() const
Return the 1D array of K coordinates for all reflections.
REAL GetMaxSinThetaOvLambda() const
Get the maximum value for sin(theta)/lambda.
bool mIgnoreImagScattFact
Ignore imaginary part of scattering factor.
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.
CrystVector_REAL GetWavelength() const
wavelength of the experiment (in Angstroems)
void CalcLuzzatiFactor() const
Calculate the Luzzati factor associated to each ScatteringPower and each reflection,...
RefinableObjClock mClockThermicFact
Clock the last time temperature factors were computed.
bool IsIgnoringImagScattFact() const
If true, then the imaginary part of the scattering factor is ignored during Structure factor computat...
virtual void PrepareHKLarrays() const
const CrystVector_REAL & GetL2Pi() const
Return the 1D array of L coordinates for all reflections, multiplied by 2*pi.
const CrystVector_REAL & GetTheta() const
Return an array with theta values for all reflections.
const CrystVector_REAL & GetReflZ() const
Return the 1D array of orthonormal z coordinates for all reflections (recipr. space)
virtual void SetMaxSinThetaOvLambda(const REAL max)
Set the maximum value for sin(theta)/lambda.
virtual void SetCrystal(Crystal &crystal)
Set the crystal for this experiment.
virtual void SetApproximationFlag(const bool allow)
Enable or disable numerical approximations.
CrystVector_REAL mFhklCalcSq
F(HKL)^2 calc for each reflection.
void CalcStructFactVariance() const
Calculate the variance associated to the calculated structure factor.
const CrystVector_REAL & GetReflX() const
Return the 1D array of orthonormal x coordinates for all reflections (recipr. space)
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 mClockStructFactorSq
Clock for the square modulus of the structure factor.
map< const ScatteringPower *, CrystVector_REAL > mvTemperatureFactor
Thermic factors for each ScatteringPower, as vectors with NbRefl elements.
const CrystVector_REAL & GetH() const
Return the 1D array of H coordinates for all reflections.
CrystVector_REAL mFhklObsSq
Observed squared structure factors (zero-sized if none)
const CrystVector_REAL & GetFhklCalcSq() const
Returns the Array of calculated |F(hkl)|^2 for all reflections.
void CalcGlobalTemperatureFactor() const
Compute the overall temperature factor affecting all reflections.
const CrystVector_REAL & GetFhklObsSq() const
Returns the vector of observed |F(hkl)|^2 for all reflections.
RadiationType GetRadiationType() const
Neutron or x-ray experiment ? Wavelength ?
bool mUseFastLessPreciseFunc
Use faster, but less precise, approximations for functions? (integer approximations to compute sin an...
virtual CrystVector_long SortReflectionBySinThetaOverLambda(const REAL maxSTOL=-1.) const
const RefinableObjClock & GetClockTheta() const
Clock the last time the sin(theta)/lambda and theta arrays were re-computed.
bool HasCrystal() const
Has a Crystal structure associated yet ?
CrystVector_int mExpectedIntensityFactor
Expected intensity factor for all reflections.
CrystVector_REAL mFhklCalcReal
real &imaginary parts of F(HKL)calc
CrystVector_REAL mFhklCalcVariance
The variance on all calculated structure factors, taking into account the positionnal errors and the ...
map< const ScatteringPower *, CrystVector_REAL > mvLuzzatiFactor
The Luzzati 'D' factor for each scattering power and each reflection.
Crystal * mpCrystal
Pointer to the crystal corresponding to this experiment.
RefinableObjClock mClockScattFactor
Clock the last time scattering factors were computed.
virtual void CalcResonantScattFactor() const
CrystVector_REAL mX
reflection coordinates in an orthonormal base
virtual ScatteringData * CreateCopy() const =0
So-called virtual copy constructor.
map< const ScatteringPower *, CrystVector_REAL > mvRealGeomSF
Geometrical Structure factor for each ScatteringPower, as vectors with NbRefl elements.
virtual void CalcSinThetaLambda() const
const CrystVector_REAL & GetL() const
Return the 1D array of L coordinates for all reflections.
RefinableObjClock mClockGlobalBiso
last time the global Biso factor was modified
void CalcStructFactor() const
Compute the overall structure factor (real and imaginary part).
long mNbRefl
Number of H,K,L reflections.
const CrystVector_REAL & GetFhklCalcImag() const
Access to imaginary part of F(hkl)calc.
virtual const CrystMatrix_REAL & GetBMatrix() const
Get access to the B matrix used to compute reflection positions.
CrystVector_REAL mH
H,K,L coordinates.
CrystVector_long mIntH
H,K,L integer coordinates.
CrystVector_long EliminateExtinctReflections()
REAL mMaxSinThetaOvLambda
Maximum sin(theta)/lambda for all calculations (10 by default).
void SetFhklObsSq(const CrystVector_REAL &obs)
Set the vector of observed |F(hkl)|^2 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 ...
RefinableObjClock mClockGeomStructFact
Clock the last time the geometrical structure factors were computed.
void SetIsIgnoringImagScattFact(const bool b)
If true, then the imaginary part of the scattering factor is ignored during Structure factor computat...
const CrystVector_REAL & GetReflY() const
Return the 1D array of orthonormal y coordinates for all reflections (recipr. space)
CrystVector_REAL mTheta
theta for the crystal and the HKL in ReciprSpace (in radians)
long GetNbRefl() const
Return the number of reflections in this experiment.
virtual long GetNbReflBelowMaxSinThetaOvLambda() const
Recalc, and get the number of reflections which should be actually used, due to the maximuml sin(thet...
CrystVector_REAL mGlobalTemperatureFactor
Global Biso factor.
const Crystal & GetCrystal() const
Const access to the data's crystal.
RefinableObjClock mClockScattFactorResonant
Clock the last time resonant scattering factors were computed.
virtual void EndOptimization()
This should be called by any optimization class at the end of an optimization.
const CrystVector_REAL & GetFhklCalcReal() const
Access to real part of F(hkl)calc.
CrystVector_REAL mH2Pi
H,K,L coordinates, multiplied by 2PI.
const CrystVector_REAL & GetK2Pi() const
Return the 1D array of K coordinates for all reflections, multiplied by 2*pi.
RefinableObjClock mClockHKL
Clock for the list of hkl.
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_int mMultiplicity
Multiplicity for each reflections (mostly for powder diffraction)
class to input or output a well-formatted xml beginning or ending tag.
class of refinable parameter types.
Definition: RefinableObj.h:80
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...
Definition: RefinableObj.h:140
Base class for options.
Definition: RefinableObj.h:552
Generic Refinable Object.
Definition: RefinableObj.h:784
Abstract base class for all objects in wxCryst.
Definition: wxCryst.h:128
WX Class for DiffractionDataSingleCrystal objects.
WX Class for PowderPattern objects.
WX Class for Radiation.
Definition: wxRadiation.h:30