libXpertMassCore and libXpertMassGui Developer Documentation
  • libXpertMassCore
  • Gaussian
  • MsXpS::libXpertMassCore::Math::Gaussian Class

    class MsXpS::libXpertMassCore::Math::Gaussian

    The Gaussian class provides a number of utility features for Gaussian fitting. More...

    Header: #include <MsXpS/libXpertMassCore/Math/Gaussian.hpp>

    Static Public Members

    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)

    Detailed Description

    Member Function Documentation

    [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.