![]() |
sablib
|
Smoothing using Savitzky-Golay filter. More...
#include <stdexcept>#include <vector>Go to the source code of this file.
Functions | |
| const std::vector< double > | sablib::SavitzkyGolayCoefficients (const unsigned int n, const unsigned int polyorder, const unsigned derive=0, const double delta=1) |
| Calculates the coefficients for a Savitzky-Golay filter. | |
| const std::vector< double > | sablib::SavitzkyGolay (const std::vector< double > &y, const unsigned int n, const unsigned int polyorder, const unsigned derive=0, const double delta=1) |
| Performs smoothing (and differentiation) using a Savitzky-Golay filter. | |
Smoothing using Savitzky-Golay filter.
References:
Definition in file savitzky_golay.h.
| const std::vector< double > sablib::SavitzkyGolay | ( | const std::vector< double > & | y, |
| const unsigned int | n, | ||
| const unsigned int | polyorder, | ||
| const unsigned | derive = 0, | ||
| const double | delta = 1 ) |
Performs smoothing (and differentiation) using a Savitzky-Golay filter.
| y | The input data to be filtered. |
| n | The half-width of the filter window (total window size is 2 * n + 1). |
| polyorder | The order of the polynomial used for fitting. |
| derive | The order of the derivative to compute (0 for smoothing only). |
| delta | The spacing of the samples. |
| std::invalid_argument | If the length of y is zero. |
Definition at line 72 of file savitzky_golay.cpp.
| const std::vector< double > sablib::SavitzkyGolayCoefficients | ( | const unsigned int | n, |
| const unsigned int | polyorder, | ||
| const unsigned | derive = 0, | ||
| const double | delta = 1 ) |
Calculates the coefficients for a Savitzky-Golay filter.
| n | The half-width of the filter window (total window size is 2 * n + 1). |
| polyorder | The order of the polynomial used for fitting. |
| derive | The order of the derivative to compute (0 for smoothing only). |
| delta | The spacing of the samples. |
| std::invalid_argument | One or more parameters are wrong. |
Definition at line 18 of file savitzky_golay.cpp.