https://github.com/mljs/signal-processing
https://github.com/mljs/signal-processing
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mljs/signal-processing
- Owner: mljs
- License: mit
- Created: 2022-03-23T12:56:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-01-10T06:22:48.000Z (6 months ago)
- Last Synced: 2026-01-11T01:50:26.254Z (6 months ago)
- Language: TypeScript
- Homepage: https://mljs.github.io/signal-processing/
- Size: 419 KB
- Stars: 2
- Watchers: 6
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ml-signal-processing
[](https://www.npmjs.com/package/ml-signal-processing)
[](https://www.npmjs.com/package/ml-signal-processing)
[](https://codecov.io/gh/mljs/signal-processing)
[](https://github.com/mljs/signal-processing/blob/main/LICENSE)
Process data in the form of {x:[], y:[]}.
## Installation
```console
npm install ml-signal-processing
```
## Usage
```js
import { filterXY } from 'ml-signal-processing';
const data = {
x: [1, 2, 3, 4, 5, 6, 7, 8, 9],
y: [1, 2, 3, 4, 5, 4, 3, 2, 1],
};
const filters = [
{ name: 'centerMedian' },
{ name: 'fromTo', options: { from: 2, to: 8 } },
];
const result = filterXY(data, filters);
/* result is
{
x: Float64Array.from([2, 3, 4, 5, 6, 7, 8]),
y: Float64Array.from([-1, 0, 1, 2, 1, 0, -1]),
}
*/
```
## License
[MIT](./LICENSE)