FOX/ObjCryst++  1.10.X (development)
ObjCryst::PowderPatternBackground Class Reference

Phase to compute a background contribution to a powder pattern using an interpolation. More...

+ Inheritance diagram for ObjCryst::PowderPatternBackground:
+ Collaboration diagram for ObjCryst::PowderPatternBackground:

Public Member Functions

 PowderPatternBackground (const PowderPatternBackground &)
 
virtual const string & GetClassName () const
 Name for this class ("RefinableObj", "Crystal",...). More...
 
virtual void SetParentPowderPattern (PowderPattern &)
 Set the PowderPattern object which uses this component. More...
 
virtual const CrystVector_REAL & GetPowderPatternCalc () const
 Get the calculated powder pattern for this component. More...
 
virtual pair< const
CrystVector_REAL *, const
RefinableObjClock * > 
GetPowderPatternIntegratedCalc () const
 Get the integrated values of the powder pattern. More...
 
void ImportUserBackground (const string &filename)
 Import background points from a file (with two columns 2theta (or tof), intensity)
 
void SetInterpPoints (const CrystVector_REAL tth, const CrystVector_REAL backgd)
 
const std::pair< const
CrystVector_REAL *, const
CrystVector_REAL * > 
GetInterpPoints () const
 
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...
 
virtual void GetGeneGroup (const RefinableObj &obj, CrystVector_uint &groupIndex, unsigned int &firstGroup) const
 Get the gene group assigned to each parameter. More...
 
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. More...
 
virtual const CrystVector_REAL & GetPowderPatternCalcVariance () const
 Get the variance associated to each point of the calculated powder pattern, for this component. More...
 
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). More...
 
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 TagNewBestConfig () const
 During a global optimization, tells the object that the current config is the latest "best" config. More...
 
void OptimizeBayesianBackground ()
 Optimize the background using a Bayesian approach. More...
 
void FixParametersBeyondMaxresolution (RefinableObj &obj)
 Fix parameters corresponding to points of the pattern that are not actually calculated. More...
 
- Public Member Functions inherited from ObjCryst::PowderPatternComponent
 PowderPatternComponent (const PowderPatternComponent &)
 
const PowderPatternGetParentPowderPattern () const
 Get the PowderPattern object which uses this component. More...
 
PowderPatternGetParentPowderPattern ()
 Get the PowderPattern object which uses this component. More...
 
virtual std::map< RefinablePar
*, CrystVector_REAL > & 
GetPowderPattern_FullDeriv (std::set< RefinablePar * > &vPar)
 
virtual std::map< RefinablePar
*, CrystVector_REAL > & 
GetPowderPatternIntegrated_FullDeriv (std::set< RefinablePar * > &vPar)
 
bool IsScalable () const
 Is this component scalable ? More...
 
const RefinableObjClockGetClockPowderPatternCalc () const
 Last time the powder pattern was calculated.
 
const list< pair< const REAL,const
string > > & 
GetPatternLabelList () const
 Get a list of labels for the pattern (usually reflection indexes). More...
 
- Public Member Functions inherited from ObjCryst::RefinableObj
 RefinableObj ()
 Constructor.
 
 RefinableObj (const bool internalUseOnly)
 Constructor. More...
 
 RefinableObj (const RefinableObj &old)
 Defined not implemented... More...
 
virtual ~RefinableObj ()
 Destructor.
 
virtual const string & GetName () const
 Name of the object.
 
virtual void SetName (const string &name)
 Name of the object.
 
void operator= (const RefinableObj &old)
 Defined not implemented... More...
 
void PrepareForRefinement () const
 Find which parameters are used and not fixed, for a refinement /optimization. More...
 
void FixAllPar ()
 Fix All parameters.
 
void UnFixAllPar ()
 UnFix All parameters.
 
void SetParIsFixed (const long parIndex, const bool fix)
 Fix/un-fix one parameter from its #.
 
void SetParIsFixed (const string &parName, const bool fix)
 Fix/un-fix one parameter from its name.
 
void SetParIsFixed (const RefParType *type, const bool fix)
 Fix/un-fix one family of parameters.
 
void SetParIsUsed (const string &parName, const bool use)
 Set whether a parameter is used.
 
void SetParIsUsed (const RefParType *type, const bool use)
 Set whether a family of parameters is used.
 
long GetNbPar () const
 Total number of refinable parameter in the object. More...
 
long GetNbParNotFixed () const
 Total number of non-fixed parameters. Is initialized by PrepareForRefinement()
 
RefinableParGetPar (const long i)
 Access all parameters in the order they were inputted.
 
const RefinableParGetPar (const long i) const
 Access all parameters in the order they were inputted.
 
RefinableParGetPar (const string &name)
 Access all parameters from their name.
 
const RefinableParGetPar (const string &name) const
 Access all parameters from their name.
 
RefinableParGetPar (const REAL *)
 Access parameter from its adress.
 
const RefinableParGetPar (const REAL *) const
 Access parameter from its adress.
 
RefinableParGetParNotFixed (const long i)
 Access all parameters in the order they were inputted, skipping fixed parameters. More...
 
const RefinableParGetParNotFixed (const long i) const
 Access all parameters in the order they were inputed, skipping fixed parameters. More...
 
void AddPar (const RefinablePar &newRefPar)
 Add a refinable parameter. More...
 
void AddPar (RefinablePar *newRefPar)
 Add a refinable parameter. More...
 
void AddPar (RefinableObj &newRefParList, const bool copyParam=false)
 Add all the parameters in another RefinableObj. More...
 
vector< RefinablePar * >::iterator RemovePar (RefinablePar *refPar)
 Remove a refinable parameter. More...
 
virtual void Print () const
 
unsigned long CreateParamSet (const string name="") const
 Save the current set of refined values in a new set. More...
 
void ClearParamSet (const unsigned long id) const
 Erase the param set with the given id, releasing memory.
 
void SaveParamSet (const unsigned long id) const
 Save the current set of refined values over a previously-created set of saved values. More...
 
void RestoreParamSet (const unsigned long id)
 Restore a saved set of values. More...
 
const CrystVector_REAL & GetParamSet (const unsigned long setId) const
 Access one save refpar set. More...
 
CrystVector_REAL & GetParamSet (const unsigned long setId)
 Access one save refpar set. More...
 
REAL GetParamSet_ParNotFixedHumanValue (const unsigned long setId, const long parNumber) const
 Access the (human) value of one refined parameter in a saved set of parameters. More...
 
const void EraseAllParamSet ()
 Erase all saved refpar sets. More...
 
const string & GetParamSetName (const unsigned long setId) const
 Get the name associated to a refpar set. More...
 
void SetLimitsAbsolute (const string &parName, const REAL min, const REAL max)
 Change the limits for a given parameter, giving absolute new limits.
 
void SetLimitsAbsolute (const RefParType *type, const REAL min, const REAL max)
 Change the limits for a category of parameters, giving absolute new limits.
 
void SetLimitsRelative (const string &parName, const REAL min, const REAL max)
 Change the limits for a given parameter, giving relative new limits (eg giving -.1 and +.1 will set new limits at the current value + min and current value + max) Thus min should logically be <0 and max >0. More...
 
void SetLimitsRelative (const RefParType *type, const REAL min, const REAL max)
 Change the limits for a category of parameters, giving relative new limits (eg giving -.1 and +.1 will set new limits at the current value + min and current value + max). More...
 
void SetLimitsProportional (const string &parName, const REAL min, const REAL max)
 Change the limits for a given parameter, proportionnaly to the current value. More...
 
void SetLimitsProportional (const RefParType *type, const REAL min, const REAL max)
 Change the limits for a category of parameters, proportionnaly to their current value. More...
 
void SetGlobalOptimStep (const RefParType *type, const REAL step)
 Change the maximum step to use during Global Optimization algorithms.
 
ObjRegistry< RefinableObj > & GetSubObjRegistry ()
 Access to the registry of RefinableObj used by this object.
 
const ObjRegistry< RefinableObj > & GetSubObjRegistry () const
 Access to the registry of RefinableObj used by this object.
 
virtual void RegisterClient (RefinableObj &) const
 Register a new object using this object. More...
 
virtual void DeRegisterClient (RefinableObj &) const
 Deregister an object (which not any more) using this object.
 
virtual const ObjRegistry
< RefinableObj > & 
GetClientRegistry () const
 Get the list of clients.
 
virtual ObjRegistry
< RefinableObj > & 
GetClientRegistry ()
 Get the list of clients.
 
bool IsBeingRefined () const
 Is the object being refined ? (Can be refined by one algorithm at a time only.)
 
virtual void EndOptimization ()
 This should be called by any optimization class at the end of an optimization. More...
 
virtual void SetApproximationFlag (const bool allow)
 Enable or disable numerical approximations. More...
 
virtual void RandomizeConfiguration ()
 Randomize Configuration (before a global optimization). More...
 
virtual void GlobalOptRandomMove (const REAL mutationAmplitude, const RefParType *type=gpRefParTypeObjCryst)
 Make a random move of the current configuration. More...
 
void BeginGlobalOptRandomMove ()
 Raise a flag, to be sure not to make a random change more than once in each RefinableObj. More...
 
virtual REAL GetLogLikelihood () const
 Get -log(likelihood) of the current configuration for the object. More...
 
virtual unsigned int GetNbLSQFunction () const
 Number of LSQ functions.
 
virtual const CrystVector_REAL & GetLSQCalc (const unsigned int) const
 Get the current calculated value for the LSQ function.
 
virtual const CrystVector_REAL & GetLSQObs (const unsigned int) const
 Get the observed values for the LSQ function.
 
virtual const CrystVector_REAL & GetLSQWeight (const unsigned int) const
 Get the weight values for the LSQ function.
 
virtual const CrystVector_REAL & GetLSQDeriv (const unsigned int, RefinablePar &)
 Get the first derivative values for the LSQ function, for a given parameter. More...
 
virtual std::map< RefinablePar
*, CrystVector_REAL > & 
GetLSQ_FullDeriv (const unsigned int, std::set< RefinablePar * > &vPar)
 Get the first derivative for the LSQ function for each parameter supplied in a list. More...
 
void ResetParList ()
 Re-init the list of refinable parameters, removing all parameters. More...
 
virtual void UpdateDisplay () const
 If there is an interface, this should be automatically be called each time there is a 'new, significant' configuration to report. More...
 
unsigned int GetNbOption () const
 Number of Options for this object.
 
RefObjOptGetOption (const unsigned int i)
 Access to the options.
 
const RefObjOptGetOption (const unsigned int i) const
 const access to the options
 
void SetDeleteRefParInDestructor (const bool b)
 Set this object not to delete its list of parameters when destroyed. More...
 
const RefinableObjClockGetRefParListClock () const
 What was the last time a RefinablePar was added/removed ? More...
 
virtual REAL GetRestraintCost () const
 Get the restraint cost (overall penalty of all restraints) More...
 
void AddRestraint (Restraint *pNewRestraint)
 Add a new restraint. More...
 
vector< Restraint * >::iterator RemoveRestraint (Restraint *pRestraint)
 Remove a restraint from the list of known restraints. More...
 
const RefinableObjClockGetClockMaster () const
 This clocks records any change in the object. See refinableObj::mClockMaster.
 

Protected Member Functions

virtual void CalcPowderPattern () const
 Calc the powder pattern. More...
 
virtual void CalcPowderPattern_FullDeriv (std::set< RefinablePar * > &vPar)
 
virtual void CalcPowderPatternIntegrated () const
 
virtual void CalcPowderPatternIntegrated_FullDeriv (std::set< RefinablePar * > &vPar)
 Calc the integrated powder pattern. More...
 
virtual void Prepare ()
 
virtual const CrystVector_long & GetBraggLimits () const
 Get the pixel positions separating the integration intervals around reflections. More...
 
virtual void SetMaxSinThetaOvLambda (const REAL max)
 Set the maximum value for sin(theta)/lambda. More...
 
void InitRefParList ()
 
void InitOptions ()
 
void InitSpline () const
 
- Protected Member Functions inherited from ObjCryst::PowderPatternComponent
const RefinableObjClockGetClockPowderPatternCalcVariance () const
 Last time the variance on the pattern was actually calculated.
 
const RefinableObjClockGetClockBraggLimits () const
 Get last time the Bragg Limits were changed.
 
- Protected Member Functions inherited from ObjCryst::RefinableObj
long FindPar (const string &name) const
 Find a refinable parameter with a given name.
 
long FindPar (const REAL *) const
 Find a refinable parameter from the adress of its value.
 
void AddSubRefObj (RefinableObj &)
 
void RemoveSubRefObj (RefinableObj &)
 
void AddOption (RefObjOpt *opt)
 
map< unsigned long, pair
< CrystVector_REAL, string >
>::iterator 
FindParamSet (unsigned long id) const
 Find a parameter set with a given id (and check if it is there)
 

Protected Attributes

int mBackgroundNbPoint
 Number of fitting points for background.
 
CrystVector_REAL mBackgroundInterpPointX
 Vector of 2theta values for the fitting points of the background.
 
CrystVector_REAL mBackgroundInterpPointIntensity
 Values of background at interpolating points.
 
CrystVector_long mPointOrder
 Subscript of the points, sorted the correct order, taking into account the type of radiation (monochromatic/TOF). More...
 
CrystVector_REAL mvSplinePixel
 Vector of pixel values between each interval, for faster CubicSpline calculations. More...
 
CubicSpline mvSpline
 Spline used for interpolation. More...
 
RefinableObjClock mClockBackgroundPoint
 Modification of the interpolated points.
 
RefinableObjClock mClockSpline
 Initialization of the spline.
 
REAL mMaxSinThetaOvLambda
 Maximum sin(theta)/lambda for all calculations (10 by default). More...
 
REAL mModelVariance
 Constant error (sigma) on the calculated pattern, due to an incomplete model.
 
RefObjOpt mInterpolationModel
 Type of interpolation performed: linear or cubic spline.
 
- Protected Attributes inherited from ObjCryst::PowderPatternComponent
CrystVector_REAL mPowderPatternCalc
 The calculated component of a powder pattern. More...
 
CrystVector_REAL mPowderPatternIntegratedCalc
 The calculated powder pattern, integrated.
 
CrystVector_REAL mPowderPatternCalcVariance
 The variance associated to each point of the calculated powder pattern.
 
CrystVector_REAL mPowderPatternIntegratedCalcVariance
 The variance associated to each point of the calculated powder pattern, integrated.
 
CrystVector_long mIntegratedReflLimits
 Interval limits around each reflection, for integrated R-factors.
 
bool mIsScalable
 Scalable ? (crystal phase = scalable, background= not scalable)
 
RefinableObjClock mClockPowderPatternCalc
 When was the powder pattern last computed ?
 
RefinableObjClock mClockPowderPatternIntegratedCalc
 When was the 'integrated' powder pattern last computed ?
 
RefinableObjClock mClockPowderPatternVarianceCalc
 When was the powder pattern variance last computed ?
 
RefinableObjClock mClockPowderPatternIntegratedVarianceCalc
 When was the 'integrated' powder pattern variance last computed ?
 
PowderPatternmpParentPowderPattern
 The PowderPattern object in which this component is included.
 
RefinableObjClock mClockBraggLimits
 Get last time the Bragg Limits were changed.
 
list< pair< const REAL,const
string > > 
mvLabel
 The labels associated to different points of the pattern.
 
std::map< RefinablePar
*, CrystVector_REAL > 
mPowderPattern_FullDeriv
 
std::map< RefinablePar
*, CrystVector_REAL > 
mPowderPatternIntegrated_FullDeriv
 
- Protected Attributes inherited from ObjCryst::RefinableObj
string mName
 Name for this RefinableObject. Should be unique, at least in the same scope.+.
 
vector< RefinablePar * > mvpRefPar
 Vector of pointers to the refinable parameters.
 
vector< Restraint * > mvpRestraint
 Vector of pointers to the restraints for this object. More...
 
map< unsigned long, pair
< CrystVector_REAL, string > > 
mvpSavedValuesSet
 Map of (index,pointers to arrays) used to save sets of values for all parameters. More...
 
long mNbRefParNotFixed
 Total of not-fixed parameters.
 
CrystVector_long mRefparNotFixedIndex
 Index of not-fixed parameters.
 
int mOptimizationDepth
 Is the object being refined or optimized ? if mOptimizationDepth=0, no optimization is taking place. More...
 
ObjRegistry< RefinableObjmSubObjRegistry
 Registry of RefinableObject needed for this object (owned by this object or not)
 
ObjRegistry< RefinableObjmClientObjRegistry
 Registry of RefinableObject using this object. More...
 
ObjRegistry< RefObjOptmOptionRegistry
 List of options for this object. More...
 
bool mDeleteRefParInDestructor
 If true (the default), then all RefinablePar will be deleted when the the object is deleted. More...
 
RefinableObjClock mRefParListClock
 Last time the RefinableParList was modified (a parameter added or removed).
 
bool mRandomMoveIsDone
 
CrystVector_REAL mLSQDeriv
 Temporary array used to return derivative values of the LSQ function for given parameters. More...
 
std::map< unsigned int,
std::map< RefinablePar
*, CrystVector_REAL > > 
mLSQ_FullDeriv
 Temporary map to return the derivative of the LSQ function versus a list of parameters. More...
 
RefinableObjClock mClockMaster
 Master clock, which is changed whenever the object has been altered. More...
 

Friends

class PowderPattern
 

Detailed Description

Phase to compute a background contribution to a powder pattern using an interpolation.

Currently only linear interpolation is available. (in the works: cubic spline interpolation background)

Definition at line 198 of file PowderPattern.h.

Member Function Documentation

void ObjCryst::PowderPatternBackground::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.

Note
this may be called several time for some objects which are used by several other objects, or for nested optimizations (e.g. least-squares optimizations inside a global one).
EndOptimization() must be called at the end of the optimization, the same number of time BeginOptimization() was called !
Parameters
allowApproximationsif true, then the object can use faster but less precise functions during the optimization. This is useful for global optimization not using derivatives.
enableRestraintsxrefitem deprecated 28.

Reimplemented from ObjCryst::RefinableObj.

Definition at line 329 of file PowderPattern.cpp.

void ObjCryst::PowderPatternBackground::CalcPowderPattern ( ) const
protectedvirtual

Calc the powder pattern.

As always, recomputation is only done if necessary (ie if a parameter has changed since the last computation)

Implements ObjCryst::PowderPatternComponent.

Definition at line 418 of file PowderPattern.cpp.

void ObjCryst::PowderPatternBackground::CalcPowderPatternIntegrated_FullDeriv ( std::set< RefinablePar * > &  vPar)
protectedvirtual

Calc the integrated powder pattern.

This should be optimized so that the full powder pattern is not explicitely computed.

Reimplemented from ObjCryst::PowderPatternComponent.

Definition at line 564 of file PowderPattern.cpp.

void ObjCryst::PowderPatternBackground::FixParametersBeyondMaxresolution ( RefinableObj obj)

Fix parameters corresponding to points of the pattern that are not actually calculated.

This is necessary for modelling using splines, to avoid divergence of interpolation points during least squares optimization.

Parameters
objthe object in which are parameters to be fixed. Normally this will be the PowderPatternBackground object itself, but it can also be the parameter list copied such as in a LSQNumObj.

Definition at line 406 of file PowderPattern.cpp.

const CrystVector_long & ObjCryst::PowderPatternBackground::GetBraggLimits ( ) const
protectedvirtual

Get the pixel positions separating the integration intervals around reflections.

Returns
: an array with the pixel positions, empty if this component has no peaks. The positions should be in increasing order, but could go beyond the pattern limits.

Implements ObjCryst::PowderPatternComponent.

Definition at line 610 of file PowderPattern.cpp.

const string & ObjCryst::PowderPatternBackground::GetClassName ( ) const
virtual

Name for this class ("RefinableObj", "Crystal",...).

This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry

Reimplemented from ObjCryst::PowderPatternComponent.

Definition at line 203 of file PowderPattern.cpp.

void ObjCryst::PowderPatternBackground::GetGeneGroup ( const RefinableObj obj,
CrystVector_uint &  groupIndex,
unsigned int &  firstGroup 
) const
virtual

Get the gene group assigned to each parameter.

Each parameter (a gene in terms of genetic algorithms) can be assigned to a gene group. Thus when mating two configurations, genes will be exchanged by groups. By default (in the base RefinabeObj class), each parameter is alone in its group. Derived classes can group genes for a better s** life.

The number identifying a gene group only has a meaning in a given object. It can also change on subsequent calls, and thus is not unique.

Parameters
objthe , supplied by an algorithm class (OptimizationObj,..), which contains a list of parameters, some of which (but possibly all or none) are parameters belonging to this object.
groupIndexa vector of unsigned integers, one for each parameter in the input object, giving an unsigned integer value as gene group index. At the beginning this vector should contain only zeros (no group assigned).
firstGroupthis is the number of groups which have already been assigned, plus one. The gene groups returned by this object will start from this value, and increment firstGroup for each gene group used, so that different RefinableObj cannot share a gene group.
Note
this function is not optimized, and should only be called at the beginning of a refinement.

Reimplemented from ObjCryst::RefinableObj.

Definition at line 313 of file PowderPattern.cpp.

const CrystVector_REAL & ObjCryst::PowderPatternBackground::GetPowderPatternCalc ( ) const
virtual

Get the calculated powder pattern for this component.

Note that the pattern is not scaled.

Implements ObjCryst::PowderPatternComponent.

Definition at line 219 of file PowderPattern.cpp.

const CrystVector_REAL & ObjCryst::PowderPatternBackground::GetPowderPatternCalcVariance ( ) const
virtual

Get the variance associated to each point of the calculated powder pattern, for this component.

Warning
: this is experimental, with the aim of using Maximum Likelihood to improve structure determination.

Implements ObjCryst::PowderPatternComponent.

Definition at line 335 of file PowderPattern.cpp.

pair< const CrystVector_REAL *, const RefinableObjClock * > ObjCryst::PowderPatternBackground::GetPowderPatternIntegratedCalc ( ) const
virtual

Get the integrated values of the powder pattern.

Note
: the integration intervals are those given by the parent PowderPattern, so that all PowderPatternComponent's intervals are taken into account

This avoids explicitely calculating the full profile powder pattern.

Implements ObjCryst::PowderPatternComponent.

Definition at line 226 of file PowderPattern.cpp.

pair< const CrystVector_REAL *, const RefinableObjClock * > ObjCryst::PowderPatternBackground::GetPowderPatternIntegratedCalcVariance ( ) const
virtual

Get the variance associated to each point of the calculated powder pattern, for this component (integrated version).

Warning
: this is experimental, with the aim of using Maximum Likelihood to improve structure determination.

Implements ObjCryst::PowderPatternComponent.

Definition at line 342 of file PowderPattern.cpp.

void ObjCryst::PowderPatternBackground::OptimizeBayesianBackground ( )

Optimize the background using a Bayesian approach.

The background parameters must be un-fixed before.

The minimization will a maximum of 50 Simplex runs (see the SimplexObj documentation), each with 200 cycles.

See the class documentation for PowderPatternBackgroundBayesianMinimiser.

Definition at line 362 of file PowderPattern.cpp.

void ObjCryst::PowderPatternBackground::Prepare ( )
protectedvirtual

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 607 of file PowderPattern.cpp.

void ObjCryst::PowderPatternBackground::SetMaxSinThetaOvLambda ( const REAL  max)
protectedvirtual

Set the maximum value for sin(theta)/lambda.

All data above still exist but are ignored for all calculations.

Implements ObjCryst::PowderPatternComponent.

Definition at line 617 of file PowderPattern.cpp.

void ObjCryst::PowderPatternBackground::SetParentPowderPattern ( PowderPattern )
virtual

Set the PowderPattern object which uses this component.

This sets all necessary pattern parameters (2theta/tof range, wavelength, radiation type...) accordingly.

Implements ObjCryst::PowderPatternComponent.

Definition at line 209 of file PowderPattern.cpp.

void ObjCryst::PowderPatternBackground::TagNewBestConfig ( ) const
virtual

During a global optimization, tells the object that the current config is the latest "best" config.

This can be used by the object to make more intellingent random moves (use with caution: highly experimental !).

Reimplemented from ObjCryst::RefinableObj.

Definition at line 358 of file PowderPattern.cpp.

void ObjCryst::PowderPatternBackground::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.

Definition at line 1534 of file ObjCryst/IO.cpp.

void ObjCryst::PowderPatternBackground::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.

Definition at line 1488 of file ObjCryst/IO.cpp.

Member Data Documentation

REAL ObjCryst::PowderPatternBackground::mMaxSinThetaOvLambda
protected

Maximum sin(theta)/lambda for all calculations (10 by default).

This keeps all data in memory, but only the part which is below the max is calculated.

Definition at line 283 of file PowderPattern.h.

CrystVector_long ObjCryst::PowderPatternBackground::mPointOrder
mutableprotected

Subscript of the points, sorted the correct order, taking into account the type of radiation (monochromatic/TOF).

Definition at line 264 of file PowderPattern.h.

CubicSpline ObjCryst::PowderPatternBackground::mvSpline
mutableprotected

Spline used for interpolation.

Mutable since it copies information from mBackgroundInterpPointX and mBackgroundInterpPointIntensity.

Definition at line 271 of file PowderPattern.h.

CrystVector_REAL ObjCryst::PowderPatternBackground::mvSplinePixel
mutableprotected

Vector of pixel values between each interval, for faster CubicSpline calculations.

Mutable since it copies information from mBackgroundInterpPointX.

Definition at line 267 of file PowderPattern.h.


The documentation for this class was generated from the following files: