36 arma::vec &baseline, arma::vec &corrected,
38 const arma::uword poly_order,
39 const arma::uword max_it,
40 const double threshold);
42 double CalcDev(
const arma::vec &spectrum,
const arma::vec &fit);
43 arma::uvec
NonPeakInd(
const arma::vec &spectrum,
const double dev);
44 arma::vec
CalcPoly(
const arma::vec &coefs,
const arma::vec &x);
49 double CalcErr(
const double &dev,
const double &prev_dev);
50 VESPUCCI_EXPORT arma::vec
FitGaussian(
const arma::vec &x,
const arma::vec &y, arma::vec &fit, std::map<std::string, double> &stats);
59 #endif // LINLEASTSQ_H double CalcErr(const double &dev, const double &prev_dev)
Vespucci::Math::LinLeastSq::CalcErr Calculate the error criterion.
VESPUCCI_EXPORT arma::uword IModPoly(const arma::vec &spectrum, const arma::vec &abscissa, arma::vec &baseline, arma::vec &corrected, double &err, const arma::uword poly_order, const arma::uword max_it, const double threshold)
Vespucci::Math::LinLeastSq::IModPoly Perform the Vancouver Raman Algorithm to correct baseline...
VESPUCCI_EXPORT arma::vec FitGaussian(const arma::vec &x, const arma::vec &y, arma::vec &fit, std::map< std::string, double > &stats)
Vespucci::Math::LinLeastSq::FitGaussian.
arma::uvec NonPeakInd(const arma::vec &spectrum, const double dev)
Vespucci::Math::LinLeastSq::NonPeakInd.
arma::vec CalcPoly(const arma::vec &coefs, const arma::vec &x)
Vespucci::Math::LinLeastSq::CalcPoly Calculate the values of a polynomial.
double CalcDev(const arma::vec &spectrum, const arma::vec &fit)
Vespucci::Math::LinLeastSq::CalcDev.
VESPUCCI_EXPORT arma::mat Vandermonde(const arma::vec &x, const int poly_order)
Vespucci::Math::LinLeastSq::Vandermonde Build a Vandermonde matrix for OLS.
VESPUCCI_EXPORT arma::mat OrdinaryLeastSquares(const arma::mat &X, const arma::mat &y)
Vespucci::Math::LinLeastSq::OrdinaryLeastSquares Perform Squares.
A namespace for "global" functions, including math functions.