sablib
Loading...
Searching...
No Matches
imodpoly.cpp File Reference

Baseline estimation using Improved Modified Polynomial(IModPoly) method(implementation). More...

#include <cmath>
#include <limits>
#include "../misc/polyfit.h"
#include "imodpoly.h"

Go to the source code of this file.

Functions

const BaselineResult sablib::BaselineIModPoly (const std::vector< double > &y, const unsigned int polyorder, const double k=1, const unsigned int loop=50, const double eps=1.0e-3)
 Estimates the baseline using the Improved Modified Polynomial (IModPoly) method.

Detailed Description

Baseline estimation using Improved Modified Polynomial(IModPoly) method(implementation).

Author
Izadori

Definition in file imodpoly.cpp.

Function Documentation

◆ BaselineIModPoly()

SABLIB_EXPORT const BaselineResult sablib::BaselineIModPoly ( const std::vector< double > & y,
const unsigned int polyorder,
const double k = 1,
const unsigned int loop = 50,
const double eps = 1.0e-3 )

Estimates the baseline using the Improved Modified Polynomial (IModPoly) method.

Parameters
yThe input data points to be processed.
polyorderThe order of the polynomial to fit.
kScaling factor for the standard deviation threshold (default is 1.0).
loopThe maximum number of iterations (default is 50).
epsThe convergence tolerance based on the standard deviation change (default is 1.0e-3).
Returns
The estimated baseline and baseline-corrected data.
Exceptions
std::invalid_argumentOne or more parameters are wrong.

Definition at line 19 of file imodpoly.cpp.

References sablib::BaselineResult::baseline, and sablib::BaselineResult::corrected.