This object is used to estimate the background in a powder pattern, using a Bayesian approach (David & Sivia, Acta Cryst A50 (1994), 703). More...


Public Member Functions | |
| PowderPatternBackgroundBayesianMinimiser (PowderPatternBackground &backgd) | |
| virtual const string & | GetClassName () const |
| Name for this class ("RefinableObj", "Crystal",...). This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry. | |
| virtual REAL | GetLogLikelihood () const |
| Get -log(likelihood) of the current configuration for the object. | |
Static Public Member Functions | |
| static REAL | BayesianBackgroundLogLikelihood (const REAL t) |
| Returns the log(likelihood) of a background by marginalizing the effect of Bragg peaks, following the method described by David and Sivia (J.Appl.Cryst. | |
Public Attributes | |
| PowderPatternBackground * | mpBackground |
This object is used to estimate the background in a powder pattern, using a Bayesian approach (David & Sivia, Acta Cryst A50 (1994), 703).
Definition at line 36 of file PowderPatternBackgroundBayesianMinimiser.h.
| REAL ObjCryst::PowderPatternBackgroundBayesianMinimiser::BayesianBackgroundLogLikelihood | ( | const REAL | t | ) | [static] |
Returns the log(likelihood) of a background by marginalizing the effect of Bragg peaks, following the method described by David and Sivia (J.Appl.Cryst.
34(2001), 318).
for <0
for t>0, with:
,
and A a normalizing constant so that the function is continuous for t=0 (i.e. L(0)=0).| \form::25 | For small t>0 values, L(t) behaves like a quadratic function, and for large positive values it is equivalent to . |
As the integral diverges for
, it is necessary to use a small, non-null
. The use of a smaller
changes the range over which the function behaves quadratically, as well as the maximum value (at t=0), but does not affect the asymptotic value.
See tabulated values in the source code. The function is approximated with a cubic spline until t=8, and then uses the asymptotic
value.
Definition at line 115 of file PowderPatternBackgroundBayesianMinimiser.cpp.
| REAL ObjCryst::PowderPatternBackgroundBayesianMinimiser::GetLogLikelihood | ( | ) | const [virtual] |
Get -log(likelihood) of the current configuration for the object.
By default (no likelihood evaluation available), this is equal to 0.
This call should not be recursive, it is the task of the algorithm to get the sum of likelihoods for all objects invlolved.
Reimplemented from ObjCryst::RefinableObj.
Definition at line 45 of file PowderPatternBackgroundBayesianMinimiser.cpp.
1.6.1