const { SavgolFilter } = require('js-savgol-filter'); // from Node
const { SavgolFilter } = require('./js-savgol-filter.js'); // from file
const myFilter = SavgolFilter(M,N); // windowsize=M*2+1, degree=N+1
const filteredData = myFilter.filter(data);
This is a Node.js module available through the GitHub.
git clone https://www.github.com/gorlang/js-savgol-filter
npm install ../dir/to/js-savgol-filter
Fast and accurate smoothing datasets with Savitzky-Golay filtering algorithm.
To run the test suite, first install the dependencies, then run npm test
:
$ npm install
$ npm test