FOX/ObjCryst++  1.10.X (development)
PowderPatternBackgroundBayesianMinimiser.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 /* PowderPatternBackgroundBayesianMinimiser.h
20 * Bayesian estimation of powder pattern background
21 *
22 */
23 #ifndef __POWDERPATTERNBACKGROUNDBAYESIANMINIMISER_H
24 #define __POWDERPATTERNBACKGROUNDBAYESIANMINIMISER_H
25 
26 #include "ObjCryst/CrystVector/CrystVector.h"
27 #include "ObjCryst/RefinableObj/RefinableObj.h"
28 #include "ObjCryst/ObjCryst/PowderPattern.h"
29 
30 namespace ObjCryst
31 {
37 {
38  public:
41  virtual const string& GetClassName()const;
42  virtual REAL GetLogLikelihood()const;
43  virtual unsigned int GetNbLSQFunction () const ;
44  virtual const CrystVector_REAL & GetLSQCalc (const unsigned int) const;
45  virtual const CrystVector_REAL & GetLSQObs (const unsigned int) const;
46  virtual const CrystVector_REAL & GetLSQWeight (const unsigned int) const;
47  //private:
73  static REAL BayesianBackgroundLogLikelihood(const REAL t);
74  PowderPatternBackground *mpBackground;
76  mutable CrystVector_REAL mBayesianCalc;
78  mutable CrystVector_REAL mBayesianObs;
80  mutable CrystVector_REAL mBayesianWeight;
81 };
82 
83 }//namespace
84 #endif //__POWDERPATTERNBACKGROUNDBAYESIANMINIMISER_H
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
Phase to compute a background contribution to a powder pattern using an interpolation.
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 & GetLSQWeight(const unsigned int) const
Get the weight values for the LSQ function.
Generic Refinable Object.
Definition: RefinableObj.h:752
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.
CrystVector_REAL mBayesianCalc
Bayesian cost (-log(likelihood)) for each point.
CrystVector_REAL mBayesianObs
Obs==0 (desired -log(likelihood))
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.
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
Definition: Atom.cpp:47
This object is used to estimate the background in a powder pattern, using a Bayesian approach (David ...