NMath Reference Guide

## Savitzky |

Class generates the Savitzy-Golay filter coefficients for smoothing data
or computing smoothed derivatives. Smoothed derivatives can be found
up to the order of the fitting polynomial.

Inheritance Hierarchy

Syntax

The SavitzkyGolay type exposes the following members.

Constructors

Name | Description | |
---|---|---|

SavitzkyGolay | Constructs a SavitzkyGolay classes to generate Savitzky-Golay derived coefficients. Number of points to the left and right both default to two. The fitting polynomial degree defaults to three. | |

SavitzkyGolay(Int32, Int32, Int32) | Constructs a Savitzky-Golay helper class to generate Savitzky-Golay filtering coefficients. |

Properties

Name | Description | |
---|---|---|

NumberCoefficients | Gets the number of Savitzky-Golay coefficients generated | |

NumberLeft | Gets the number of points left for the filter window. | |

NumberRight | Gets the number of points right for the filter window. | |

PolynomialDegree | Gets the fitting polynomial degree. |

Methods

Name | Description | |
---|---|---|

BuildBoundaryDerivatives | Builds the boundary points derivatives by sliding the center point of the filter towards each end of the data vectors. The filter length and polynomial degree are maintained. | |

Clone | Creates a deep copy of this SavitzkyGolay instance. | |

SavitzkyGolayFirstDerivativeCoefficients | Constructs the coefficient for a Savitzky-Golay first derivative filter when used with the MovingWindowFilter class. | |

SavitzkyGolayNthDerivativeCoefficients | Constructs the coefficient for the Savitzky-Golay Nth derivative filter when used with the MovingWindowFilter class. The order must be less than or equal to the polynomial degree. | |

SavitzkyGolaySmoothingCoefficients | Constructs the coefficient vector that creates a Savitzky-Golay smoothing filter when used with the MovingWindowFilter class. |

Example

int nL = 2, nR = 2, m = 2;
SavitzkyGolay sg = new SavitzkyGolay(nL, nR, m);
DoubleVector coeffs = sg.SavitzkyGolayFirstDerivativeCoefficients();

See Also