fbgsense 0.1
Generic FBG spectrum analysis tool
Public Member Functions | Public Attributes | Friends | List of all members
savgol::SavitzkyGolayFilterConfig Struct Reference

Public Member Functions

 SavitzkyGolayFilterConfig ()
 Construct a filter with default weights.
 
 SavitzkyGolayFilterConfig (unsigned m, int t, unsigned n, unsigned s, double dt=1.)
 Construct a filter with the specified configuration. More...
 
int data_point () const
 Time at which the filter is evaluated.
 
unsigned derivation_order () const
 Derivation order.
 
unsigned order () const
 Polynomial order.
 
unsigned window_size () const
 Full size of the filter's window 2*m+1
 
double time_step () const
 Time step.
 

Public Attributes

unsigned m = 5
 Window size is 2*m+1.
 
int t = 5
 Time at which the filter is applied.
 
unsigned n = 3
 Polynomial order.
 
unsigned s = 0
 Derivation order (0 for no derivation)
 
double dt = 1
 Time step.
 

Friends

std::ostream & operator<< (std::ostream &os, const SavitzkyGolayFilterConfig &conf)
 

Constructor & Destructor Documentation

◆ SavitzkyGolayFilterConfig()

savgol::SavitzkyGolayFilterConfig::SavitzkyGolayFilterConfig ( unsigned  m,
int  t,
unsigned  n,
unsigned  s,
double  dt = 1. 
)
inline

Construct a filter with the specified configuration.

Parameters
mWindow size is 2*m+1
tTime at which the filter is applied
  • t=m for real-time filtering. This uses only past information to determine the filter value and thus does not introduce delay. However, this comes at the cost of filtering accuracy as no future information is available.
  • t=0 for smoothing. Uses both past and future information to determine the optimal filtered value
nPolynamial order
sDerivation order
  • 0: No derivation
  • 1: First order derivative
  • 2: Second order derivative
dtTime step

The documentation for this struct was generated from the following file: