SavitzkyGolayFilter

ID: Calculate/SignalAnalysis/SavitzkyGolayFilter


A Savitzky-Golay filter is a smoothing filter that can be applied to a set of signal points for the purpose of obtaining a smoothed version of the signal (DerivativeOrder = 0) or smoothed derivatives (of the order DerivativeOrder).

Note: Compared to a moving average process, in which the filtered signal is distorted by artificial damping and shifting, a Savitzky-Golay-Filter can yield more satisfactory results. The mathematical basis of this filter is a linear least squares fit of a polynomial (of degree Order) to the signal values over NumberOfPointsLeft + 1 + NumberOfPointsRight time stamps, that are assumed to be equidistant.

../../../_images/SavitzkyGolayFilter-01.jpg

Signals

Signal

Inumpy.ut signal.

  • Direction: IN

  • Optional: False

FilteredSignal

Filtered output signal.

  • Direction: OUT

  • Optional: False

Parameters

NumberOfPointsLeft

The polynomial is determined by the central point and NumberOfPointsLeft to the left and NumberOfPointsRight to the right.

  • Direction: IN

NumberOfPointsRight

Set to zero if the filter needs to be causal. The sum of the parameters NumberOfPointsLeft and NumberOfPointsRight has to be an even integer.

  • Direction: IN

Order

Degree of the polynomial used for linear least squares. For the calculation of derivatives a common choice is Order = 4 or larger.

  • Direction: IN

DerivativeOrder

Use DerivativeOrder = 0 for smoothing of the signal, DerivativeOrder = 1 to obtain a smoothed first derivative and so on.

  • Direction: IN

SuppressStepsizeError

Equidistant time stamps are assumed. An Error is caused, if this assumption is violated severely. Set to True to suppress this error (None = False). However, suppressing this error in case of non-equidistant timestamps reduces the quality of the approximation.

  • Direction: IN