Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions

GaussFitter Class Reference
[Math]

Implements a fitter for gaussian functions. More...

#include <OpenMS/MATH/STATISTICS/GaussFitter.h>

List of all members.

Classes

struct  GaussFitResult
 struct of parameters of a gaussian distribution More...

Public Member Functions

 GaussFitter ()
 Default constructor.
virtual ~GaussFitter ()
 Destructor.
void setInitialParameters (const GaussFitResult &result)
 sets the initial parameters used by the fit method as inital guess for the gaussian
GaussFitResult fit (std::vector< DPosition< 2 > > &points)
 Fits a gaussian distribution to the given data points.
const StringgetGnuplotFormula () const
 return the gnuplot formula of the gaussian

Protected Member Functions

void printState_ (size_t iter, gsl_multifit_fdfsolver *s)

Static Protected Member Functions

static int gaussFitterf_ (const gsl_vector *x, void *params, gsl_vector *f)
static int gaussFitterdf_ (const gsl_vector *x, void *params, gsl_matrix *J)
static int gaussFitterfdf_ (const gsl_vector *x, void *params, gsl_vector *f, gsl_matrix *J)

Protected Attributes

GaussFitResult init_param_
String gnuplot_formula_

Private Member Functions

 GaussFitter (const GaussFitter &rhs)
 Copy constructor (not implemented).
GaussFitteroperator= (const GaussFitter &rhs)
 Assignment operator (not implemented).

Detailed Description

Implements a fitter for gaussian functions.

This class fits a gaussian distribution to a number of data points. The results as well as the initial guess are specified using the struct GaussFitResult.

The complete gaussian formula with the fitted parameters can be transformed into a gnuplot formula using getGnuplotFormula after fitting.

The fitting is implemented using GSL fitting algorithms.


Constructor & Destructor Documentation

GaussFitter (  ) 

Default constructor.

virtual ~GaussFitter (  )  [virtual]

Destructor.

GaussFitter ( const GaussFitter rhs  )  [private]

Copy constructor (not implemented).


Member Function Documentation

GaussFitResult fit ( std::vector< DPosition< 2 > > &  points  ) 

Fits a gaussian distribution to the given data points.

Parameters:
points the data points used for the gaussian fitting
Exceptions:
Exception::UnableToFit is thrown if fitting cannot be performed
static int gaussFitterdf_ ( const gsl_vector *  x,
void *  params,
gsl_matrix *  J 
) [static, protected]
static int gaussFitterf_ ( const gsl_vector *  x,
void *  params,
gsl_vector *  f 
) [static, protected]
static int gaussFitterfdf_ ( const gsl_vector *  x,
void *  params,
gsl_vector *  f,
gsl_matrix *  J 
) [static, protected]
const String& getGnuplotFormula (  )  const

return the gnuplot formula of the gaussian

GaussFitter& operator= ( const GaussFitter rhs  )  [private]

Assignment operator (not implemented).

void printState_ ( size_t  iter,
gsl_multifit_fdfsolver *  s 
) [protected]
void setInitialParameters ( const GaussFitResult result  ) 

sets the initial parameters used by the fit method as inital guess for the gaussian


Member Data Documentation

String gnuplot_formula_ [protected]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:43:00 using doxygen 1.7.1