| | |
The Gaussian class provides a number of utility features for Gaussian fitting. More...
| Header: | #include <MsXpS/libXpertMassCore/Math/Gaussian.hpp> |
| std::tuple<double, double, double, double> | levenbergMarquardtFit(const pappso::Trace &input_trace, pappso::Trace &fit_trace) |
| std::tuple<double, double, double> | linearLeastSquaresFit(const pappso::Trace &input_trace, pappso::Trace &fit_trace) |
[static] std::tuple<double, double, double, double> Gaussian::levenbergMarquardtFit(const pappso::Trace &input_trace, pappso::Trace &fit_trace)Performs a Gaussian fit of the input_trace and sets the computed fit data to fit_trace.
The Gaussian fit is computed using the Levenberg-Marquardt method. The Levenberg-Marquardt functor that is used for the minimization is fed with parameters obtained from running Math::Generic::weightedCenterOfMass.
The returned tuple has four members:
If an error occurs, or if input_trace is empty or no fit could be computed, a tuple will all three members set to 0 is returned.
See also Math::Gaussian::linearLeastSquaresFit and Math::Generic::weightedCenterOfMass.
[static] std::tuple<double, double, double> Gaussian::linearLeastSquaresFit(const pappso::Trace &input_trace, pappso::Trace &fit_trace)Performs a Gaussian fit of the input_trace and sets the computed fit data to fit_trace.
The Gaussian fit is computed using the least squares method.
The returned tuple has these members:
If an error occurs, or if input_trace is empty or no fit could be computed, a tuple will all three members set to 0 is returned.