SavitzkyGolay Type

SavitzkyGolay implements the calculation of the Savitzky-Golay filter coefficients and their application to smoth data, and to calculate derivatives.

Ref.: "Numerical recipes in C", chapter 14.8

Constructors

Constructor Description

SavitzkyGolay(numberOfPoints, derivativeOrder, polynomialOrder)

Full Usage: SavitzkyGolay(numberOfPoints, derivativeOrder, polynomialOrder)

Parameters:
    numberOfPoints : int - Number of points. Must be an odd number, otherwise it is rounded up.
    derivativeOrder : int - Order of derivative you want to obtain. Set 0 for smothing.
    polynomialOrder : int - Order of the fitting polynomial. Usual values are 2 or 4.

This sets up a Savitzky-Golay filter.

numberOfPoints : int

Number of points. Must be an odd number, otherwise it is rounded up.

derivativeOrder : int

Order of derivative you want to obtain. Set 0 for smothing.

polynomialOrder : int

Order of the fitting polynomial. Usual values are 2 or 4.

SavitzkyGolay(parameters)

Full Usage: SavitzkyGolay(parameters)

Parameters:

This sets up a Savitzky-Golay filter.

parameters : SavitzkyGolayParameters

Set of parameters used for Savitzky-Golay filtering.

Instance members

Instance member Description

this.Apply

Full Usage: this.Apply

Parameters:
    array : float[] - The array of numbers to filter.
    result : float[] - The resulting array. Must not be identical to the input array!

This applies the set-up filter to an array of numbers. The left and right side is special treated by applying Savitzky-Golay with appropriate adjusted left and right number of points.

array : float[]

The array of numbers to filter.

result : float[]

The resulting array. Must not be identical to the input array!

this.Apply

Full Usage: this.Apply

Parameters:
    array : IReadOnlyList<float> - The array of numbers to filter.
    result : IVector<float> - The resulting array. Must not be identical to the input array!

This applies the set-up filter to an array of numbers. The left and right side is special treated by applying Savitzky-Golay with appropriate adjusted left and right number of points.

array : IReadOnlyList<float>

The array of numbers to filter.

result : IVector<float>

The resulting array. Must not be identical to the input array!

Static members

Static member Description

SavitzkyGolay.GetCoefficients(leftpoints, rightpoints, derivativeorder, polynomialorder, coefficients)

Full Usage: SavitzkyGolay.GetCoefficients(leftpoints, rightpoints, derivativeorder, polynomialorder, coefficients)

Parameters:
    leftpoints : int - Points on the left side included in the regression.
    rightpoints : int - Points to the right side included in the regression.
    derivativeorder : int - Order of derivative for which the coefficients are calculated.
    polynomialorder : int - Order of the regression polynomial.
    coefficients : IVector<float> - Output: On return, contains the calculated coefficients.

Calculate Savitzky-Golay coefficients.

leftpoints : int

Points on the left side included in the regression.

rightpoints : int

Points to the right side included in the regression.

derivativeorder : int

Order of derivative for which the coefficients are calculated.

polynomialorder : int

Order of the regression polynomial.

coefficients : IVector<float>

Output: On return, contains the calculated coefficients.