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

ObjCryst::TextureMarchDollase Class Reference

Texture correction using the March-Dollase model. More...

Inheritance diagram for ObjCryst::TextureMarchDollase:

Inheritance graph
[legend]
Collaboration diagram for ObjCryst::TextureMarchDollase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TextureMarchDollase (const ScatteringData &data)
virtual ~TextureMarchDollase ()
virtual const string & GetName () const
 Get the name of this object.

virtual const string & GetClassName () const
 Get the name of the class.

void AddPhase (const REAL fraction, const REAL coeffMarch, const REAL h, const REAL k, const REAL l)
void SetPhasePar (const unsigned int i, const REAL fraction, const REAL coeffMarch, const REAL h, const REAL k, const REAL l)
void DeletePhase (const unsigned int i)
unsigned int GetNbPhase () const
REAL GetFraction (const unsigned int i) const
REAL GetMarchCoeff (const unsigned int i) const
REAL GetPhaseH (const unsigned int i) const
REAL GetPhaseK (const unsigned int i) const
REAL GetPhaseL (const unsigned int i) const
virtual void GlobalOptRandomMove (const REAL mutationAmplitude, const RefParType *type=gpRefParTypeObjCryst)
 Make a random move of the current configuration.

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

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

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.

virtual void TagNewBestConfig () const
 During a global optimization, tells the object that the current config is the latest "best" config.


Protected Member Functions

virtual void CalcCorr () const
 Do the computation of corrected intensities.

void DeleteAllPhase ()

Protected Attributes

ObjRegistry< TexturePhaseMarchDollasemPhaseRegistry
RefinableObjClock mClockTexturePar
unsigned long mNbReflUsed
 Number of reflexion for which the calculation is actually done.


Detailed Description

Texture correction using the March-Dollase model.

This can include several phases.


Constructor & Destructor Documentation

ObjCryst::TextureMarchDollase::TextureMarchDollase const ScatteringData data  ) 
 

virtual ObjCryst::TextureMarchDollase::~TextureMarchDollase  )  [virtual]
 


Member Function Documentation

void ObjCryst::TextureMarchDollase::AddPhase const REAL  fraction,
const REAL  coeffMarch,
const REAL  h,
const REAL  k,
const REAL  l
 

virtual void ObjCryst::TextureMarchDollase::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.
Parameters:
allowApproximations: if true, then the object can use faster but less precise functions during the optimization. This is useful for global optimization not using derivatives.
enableRestraints: if true, then restrained parameters will be allowed to go beyond theur hard limits. This implies that the algorithm will take into account the cost (penalty) related to the restraints. Objects which do not use restraints will simply ignore this. WARNING: this parameter may be removed with the new likelihood scheme.

Reimplemented from ObjCryst::RefinableObj.

virtual void ObjCryst::TextureMarchDollase::CalcCorr  )  const [protected, virtual]
 

Do the computation of corrected intensities.

Implements ObjCryst::ScatteringCorr.

void ObjCryst::TextureMarchDollase::DeleteAllPhase  )  [protected]
 

void ObjCryst::TextureMarchDollase::DeletePhase const unsigned int  i  ) 
 

virtual REAL ObjCryst::TextureMarchDollase::GetBiasingCost  )  const [virtual]
 

virtual const string& ObjCryst::TextureMarchDollase::GetClassName  )  const [virtual]
 

Get the name of the class.

Implements ObjCryst::ScatteringCorr.

REAL ObjCryst::TextureMarchDollase::GetFraction const unsigned int  i  )  const
 

REAL ObjCryst::TextureMarchDollase::GetMarchCoeff const unsigned int  i  )  const
 

virtual const string& ObjCryst::TextureMarchDollase::GetName  )  const [virtual]
 

Get the name of this object.

Implements ObjCryst::ScatteringCorr.

unsigned int ObjCryst::TextureMarchDollase::GetNbPhase  )  const
 

REAL ObjCryst::TextureMarchDollase::GetPhaseH const unsigned int  i  )  const
 

REAL ObjCryst::TextureMarchDollase::GetPhaseK const unsigned int  i  )  const
 

REAL ObjCryst::TextureMarchDollase::GetPhaseL const unsigned int  i  )  const
 

virtual void ObjCryst::TextureMarchDollase::GlobalOptRandomMove const REAL  mutationAmplitude,
const RefParType type = gpRefParTypeObjCryst
[virtual]
 

Make a random move of the current configuration.

This is for global optimization algorithms. the moves for each parameter are less than their global optimization step, multiplied by the mutation amplitude.

Warning:
: this makes a random move for the parameter declared for this object, and it is the duty of the object to decide whether the included objects should be moved and how. (eg an algorithm should only call for a move with the top object, and this object decides how he and his sub-objects moves). By default (RefinableObj implementation) all included objects are moved recursively.
RefinableObj::
Parameters:
mutationAmplitude: multiplier for the maximum move amplitude, for all parameters
type: restrain the change exclusively to parameters of a given type (same type or descendant from this RefParType).

Reimplemented from ObjCryst::RefinableObj.

void ObjCryst::TextureMarchDollase::SetPhasePar const unsigned int  i,
const REAL  fraction,
const REAL  coeffMarch,
const REAL  h,
const REAL  k,
const REAL  l
 

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

virtual void ObjCryst::TextureMarchDollase::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 ObjCryst::TextureMarchDollase::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

RefinableObjClock ObjCryst::TextureMarchDollase::mClockTexturePar [protected]
 

unsigned long ObjCryst::TextureMarchDollase::mNbReflUsed [mutable, protected]
 

Number of reflexion for which the calculation is actually done.

This is automaticaly updated during CalcCorr, from the parent ScatteringData::GetMaxSinThetaOvLambda()

ObjRegistry<TexturePhaseMarchDollase> ObjCryst::TextureMarchDollase::mPhaseRegistry [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 15:05:00 2006 for ObjCryst++ by doxygen 1.3.6