JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1880
  • Score
    100M100P100Q138798F
  • License MIT

Savitzky–Golay filter in Javascript

Package Exports

  • ml-savitzky-golay

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ml-savitzky-golay) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

SavitzkyGolay

NPM version build status David deps npm download

Savitzky–Golay filter in Javascript

This code is based in the article: Savitzky, A., & Golay, M. J. E. (1964). Smoothing and Differentiation of Data by Simplified Least Squares Procedures. Analytical Chemistry, 36(8), 1627–1639.

Installation

npm install ml-savitzky-golay

Methods

new SavitzkyGolay(data, dx)

Creates a new Savitzky-Golay filter based in the array of y values(data) and the difference between x dots(dx).

calc([options])

Applies the filter using the current options.

Options

  • windSize: The amount of dots used to make the filtering evaluation, the default value is 5.
  • deriv: The grade for the derivative, the default value is 1.
  • pol: The grade of the polynomial function to use for calculation, the default value is 2.

Test

$ npm install
$ npm test

Authors

License

MIT