|
ObjCryst++
1.5CVS
|
Pseudo-Voigt reflection profile. More...
Public Member Functions | |
| ReflectionProfilePseudoVoigt (const ReflectionProfilePseudoVoigt &old) | |
|
virtual ReflectionProfilePseudoVoigt * | CreateCopy () const |
| 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) |
| Get the reflection profile. | |
| 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. | |
| 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.g. | |
| bool | IsAnisotropic () const |
| Is the profile anisotropic ? | |
| 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. | |
Public Member Functions inherited from ObjCryst::ReflectionProfile | |
| ReflectionProfile (const ReflectionProfile &old) | |
Public Member Functions inherited from ObjCryst::RefinableObj | |
| RefinableObj () | |
| Constructor. | |
| RefinableObj (const bool internalUseOnly) | |
| Constructor. | |
| RefinableObj (const RefinableObj &old) | |
| Defined not implemented... | |
| 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... | |
| void | PrepareForRefinement () const |
| Find which parameters are used and not fixed, for a refinement /optimization. | |
| 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. | |
| long | GetNbParNotFixed () const |
| Total number of non-fixed parameters. Is initialized by PrepareForRefinement() | |
| RefinablePar & | GetPar (const long i) |
| Access all parameters in the order they were inputted. | |
| const RefinablePar & | GetPar (const long i) const |
| Access all parameters in the order they were inputted. | |
| RefinablePar & | GetPar (const string &name) |
| Access all parameters from their name. | |
| const RefinablePar & | GetPar (const string &name) const |
| Access all parameters from their name. | |
| RefinablePar & | GetPar (const REAL *) |
| Access parameter from its adress. | |
| const RefinablePar & | GetPar (const REAL *) const |
| Access parameter from its adress. | |
| long | GetParIndex (const string &name, const bool nothrow=false) const |
| Get a parameter index (the order it was inputted) from its name. | |
| long | GetParIndex (const REAL *, const bool nothrow=false) const |
| Get a parameter index (the order it was inputted) from its adress. | |
| RefinablePar & | GetParNotFixed (const long i) |
| Access all parameters in the order they were inputted, skipping fixed parameters. | |
| const RefinablePar & | GetParNotFixed (const long i) const |
| Access all parameters in the order they were inputed, skipping fixed parameters. | |
| void | AddPar (const RefinablePar &newRefPar) |
| Add a refinable parameter. | |
| void | AddPar (RefinablePar *newRefPar) |
| Add a refinable parameter. | |
| void | AddPar (RefinableObj &newRefParList, const bool copyParam=false) |
| Add all the parameters in another RefinableObj. | |
| vector< RefinablePar * >::iterator | RemovePar (RefinablePar *refPar) |
| Remove a refinable parameter. | |
| virtual void | Print () const |
| unsigned long | CreateParamSet (const string name="") const |
| Save the current set of refined values in a new set. | |
| 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. | |
| void | RestoreParamSet (const unsigned long id) |
| Restore a saved set of values. | |
| const CrystVector_REAL & | GetParamSet (const unsigned long setId) const |
| Access one save refpar set. | |
| CrystVector_REAL & | GetParamSet (const unsigned long setId) |
| Access one save refpar set. | |
| 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. | |
| const void | EraseAllParamSet () |
| Erase all saved refpar sets. | |
| const string & | GetParamSetName (const unsigned long setId) const |
| Get the name associated to a refpar set. | |
| 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. | |
| 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). | |
| void | SetLimitsProportional (const string &parName, const REAL min, const REAL max) |
| Change the limits for a given parameter, proportionnaly to the current value. | |
| void | SetLimitsProportional (const RefParType *type, const REAL min, const REAL max) |
| Change the limits for a category of parameters, proportionnaly to their current value. | |
| 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. | |
| 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 | 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 | EndOptimization () |
| This should be called by any optimization class at the end of an optimization. | |
| virtual void | SetApproximationFlag (const bool allow) |
| Enable or disable numerical approximations. | |
| virtual void | RandomizeConfiguration () |
| Randomize Configuration (before a global optimization). | |
| virtual void | GlobalOptRandomMove (const REAL mutationAmplitude, const RefParType *type=gpRefParTypeObjCryst) |
| Make a random move of the current configuration. | |
| void | BeginGlobalOptRandomMove () |
| Raise a flag, to be sure not to make a random change more than once in each RefinableObj. | |
| virtual REAL | GetLogLikelihood () const |
| Get -log(likelihood) of the current configuration for the object. | |
| 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. | |
| void | ResetParList () |
| Re-init the list of refinable parameters, removing all parameters. | |
| 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. | |
| unsigned int | GetNbOption () const |
| Number of Options for this object. | |
| RefObjOpt & | GetOption (const unsigned int i) |
| Access to the options. | |
| const RefObjOpt & | GetOption (const unsigned int i) const |
| const access to the options | |
| virtual void | GetGeneGroup (const RefinableObj &obj, CrystVector_uint &groupIndex, unsigned int &firstGroup) const |
| Get the gene group assigned to each parameter. | |
| void | SetDeleteRefParInDestructor (const bool b) |
| Set this object not to delete its list of parameters when destroyed. | |
| const RefinableObjClock & | GetRefParListClock () const |
| What was the last time a RefinablePar was added/removed ? | |
| virtual REAL | GetRestraintCost () const |
| Get the restraint cost (overall penalty of all restraints) | |
| void | AddRestraint (Restraint *pNewRestraint) |
| Add a new restraint. | |
| vector< Restraint * >::iterator | RemoveRestraint (Restraint *pRestraint) |
| Remove a restraint from the list of known restraints. | |
| virtual void | TagNewBestConfig () const |
| During a global optimization, tells the object that the current config is the latest "best" config. | |
| const RefinableObjClock & | GetClockMaster () const |
| This clocks records any change in the object. See refinableObj::mClockMaster. | |
Private Member Functions | |
| void | InitParameters () |
| Initialize parameters. | |
Private Attributes | |
| REAL | mCagliotiU |
| FWHM parameters, following Caglioti's law. | |
| REAL | mCagliotiV |
| REAL | mCagliotiW |
| REAL | mPseudoVoigtEta0 |
| Pseudo-Voigt mixing parameter : eta=eta0 +2*theta*eta1 eta=1 -> pure Lorentzian ; eta=0 -> pure Gaussian. | |
| REAL | mPseudoVoigtEta1 |
| REAL | mAsymBerarBaldinozziA0 |
| Asymmetry parameters, following the Bérar & Baldinozzi approach ( Bérar & baldinozzi, J. | |
| REAL | mAsymBerarBaldinozziA1 |
| REAL | mAsymBerarBaldinozziB0 |
| REAL | mAsymBerarBaldinozziB1 |
| REAL | mAsym0 |
| Asymmetry parameters, following the analytical function for asymmetric pseudo-voigt given by (e.g.) Toraya in J. | |
| REAL | mAsym1 |
| REAL | mAsym2 |
Pseudo-Voigt reflection profile.
|
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::RefinableObj.
|
virtual |
Get the (approximate) full profile width at a given percentage of the profile maximum (e.g.
FWHM=GetFullProfileWidth(0.5)).
Implements ObjCryst::ReflectionProfile.
|
virtual |
Get the reflection profile.
| x,: | the vector of x coordinates (i.e. either 2theta or time-of-flight) |
| xcenter,: | coordinate (2theta, tof) of the center of the peak |
| h,k,l,: | reflection Miller indices |
Implements ObjCryst::ReflectionProfile.
| void ObjCryst::ReflectionProfilePseudoVoigt::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.
| fwhmCagliotiW,fwhmCagliotiU,fwhmCagliotiV | : these are the U,V and W parameters in the Caglioti's law : if only W is given, the width is constant |
| eta0,eta1,: | these are the mixing parameters. |
|
virtual |
Input From stream.
Implements ObjCryst::ReflectionProfile.
|
virtual |
Output to stream in well-formed XML.
Implements ObjCryst::ReflectionProfile.
|
private |
Asymmetry parameters, following the analytical function for asymmetric pseudo-voigt given by (e.g.) Toraya in J.
Appl. Cryst 23(1990),485-491
|
private |
Asymmetry parameters, following the Bérar & Baldinozzi approach ( Bérar & baldinozzi, J.
Appl. Cryst 26 (1993), 128-129)
1.8.1