Class SavitzkyGolayFilter is a correlation filter specialized for filtering with Savitzky-Golay coefficients with additional boundary options for better edge continuity. The default boundary option ShiftFilterCenter provides data smoothing all the way boundary ends.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
[SerializableAttribute]
public class SavitzkyGolayFilter : CorrelationFilter, 
	ICloneable
Visual Basic (Declaration)
<SerializableAttribute> _
Public Class SavitzkyGolayFilter _
	Inherits CorrelationFilter _
	Implements ICloneable
Visual C++
[SerializableAttribute]
public ref class SavitzkyGolayFilter : public CorrelationFilter, 
	ICloneable

Remarks

The width of the filter is: numberLeft + numberRight + 1. Note that smoothing boundaries requires significantly more computational effort than zero padding. The current boundary option can be set using the
CopyC#
BoundaryOption
property.

Examples

SavitzkyGolayFilter sgf = new SavitzkyGolayFilter(2, 2, 3, 0); // Width 5, Polynomial degree 3 sgf.BoundaryOption = SavitzkyGolayFilter.SavitzyGolayBoundaryOptions.DoNotFilterBoundaryPoints; DoubleVector x = new DoubleVector(2, 1, 1, 3, 1, 1, 2); DoubleVector z = sgf.Filter(x);

Inheritance Hierarchy

System..::.Object
  CenterSpace.NMath.Core..::.CorrelationFilter
    CenterSpace.NMath.Core..::.SavitzkyGolayFilter

See Also