Click or drag to resize

SavitzkyGolay Class

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
SystemObject
  CenterSpace.NMath.CoreSavitzkyGolay

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class SavitzkyGolay : ICloneable

The SavitzkyGolay type exposes the following members.

Constructors
 NameDescription
Public methodSavitzkyGolay 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.
Public methodSavitzkyGolay(Int32, Int32, Int32) Constructs a Savitzky-Golay helper class to generate Savitzky-Golay filtering coefficients.
Top
Properties
 NameDescription
Public propertyNumberCoefficients Gets the number of Savitzky-Golay coefficients generated
Public propertyNumberLeft Gets the number of points left for the filter window.
Public propertyNumberRight Gets the number of points right for the filter window.
Public propertyPolynomialDegree Gets the fitting polynomial degree.
Top
Methods
 NameDescription
Public methodBuildBoundaryDerivatives 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.
Public methodClone Creates a deep copy of this SavitzkyGolay instance.
Public methodSavitzkyGolayFirstDerivativeCoefficients Constructs the coefficient for a Savitzky-Golay first derivative filter when used with the MovingWindowFilter class.
Public methodSavitzkyGolayNthDerivativeCoefficients 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.
Public methodSavitzkyGolaySmoothingCoefficients Constructs the coefficient vector that creates a Savitzky-Golay smoothing filter when used with the MovingWindowFilter class.
Top
Example
int nL = 2, nR = 2, m = 2; SavitzkyGolay sg = new SavitzkyGolay(nL, nR, m); DoubleVector coeffs = sg.SavitzkyGolayFirstDerivativeCoefficients();
See Also