![]() |
sablib
|
Baseline estimation using iterative polynomial fitting with a non-quadratic cost function(Backcor algorithm)(implementation). More...
Go to the source code of this file.
Functions | |
| const std::vector< double > | sablib::BaselineBackcor (const std::vector< double > &y, const unsigned int polyorder, const BackcorFunc func=BackcorFunc::ATQuad, const double s=1, const double alpha=0.99 *0.5, const unsigned int loop=50, const double eps=1.0e-3) |
| Performs baseline estimation using iterative polynomial fitting with a non-quadratic cost function (Backcor). | |
Baseline estimation using iterative polynomial fitting with a non-quadratic cost function(Backcor algorithm)(implementation).
Definition in file backcor.cpp.
| const std::vector< double > sablib::BaselineBackcor | ( | const std::vector< double > & | y, |
| const unsigned int | polyorder, | ||
| const BackcorFunc | func = BackcorFunc::ATQuad, | ||
| const double | s = 1, | ||
| const double | alpha = 0.99 *0.5, | ||
| const unsigned int | loop = 50, | ||
| const double | eps = 1.0e-3 ) |
Performs baseline estimation using iterative polynomial fitting with a non-quadratic cost function (Backcor).
This algorithm fits a polynomial of order polyorder to the signal y. In each iteration, the signal is modified based on the chosen cost function func to progressively estimate the background.
| y | The input data vector (signal to be processed). |
| polyorder | The order of the polynomial to be fitted. |
| func | The type of cost function to use (default: ATQuad). |
| s | Threshold parameter for the cost function (default: 1.0). |
| alpha | Control parameter for the iterative update (default: 0.99 * 0.5). Should be in range [0, 1]. |
| loop | The maximum number of iterations (default: 50). |
| eps | Convergence threshold for the relative change in the estimated baseline (default: 1.0e-3). |
| std::invalid_argument | One or more parameters are wrong. |
Definition at line 20 of file backcor.cpp.