Skip to content

omnister/savitskygolay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

// Compute the coefficients for a Savitsky-Golay filter
// based on (s=0) or its s'th derivative evaluated at order k, over 2m+1
// points, centered with offset t

    !) grampoly -?
    usage: grampoly [options]
	[-l] print MIT license statement
	[-s <smoothing>] 0=smoothing, 1=first_derivative (default 0)
	[-m <points>] width = 2*m+1 (default 3)
	[-n <order>] 2=quadratic fit (default 4)
	[-t <offset>] how to offset the estimate in window (default 0)

    !) grampoly -s0 -m2 -n2
    # s=0 m=2 n=2 t=0
    0 -0.0857143
    1 0.342857
    2 0.485714
    3 0.342857
    4 -0.0857143

These 5 example coefficients create a 2nd order convolutional smoothing
filter that emits the best quadratic fit to a sequence of data points. 

grampoly(1) is released under the MIT license.

About

compute savitsky golay filter parameters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published