https://github.com/mljs/spectra-processing
Various methods to help spectra processing
https://github.com/mljs/spectra-processing
hacktoberfest
Last synced: 4 months ago
JSON representation
Various methods to help spectra processing
- Host: GitHub
- URL: https://github.com/mljs/spectra-processing
- Owner: mljs
- License: mit
- Created: 2019-07-11T15:09:54.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2026-03-03T08:36:11.000Z (4 months ago)
- Last Synced: 2026-03-03T12:07:54.718Z (4 months ago)
- Language: TypeScript
- Homepage: https://mljs.github.io/spectra-processing/
- Size: 7.21 MB
- Stars: 9
- Watchers: 8
- Forks: 13
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# ml-spectra-processing
[](https://www.npmjs.com/package/ml-spectra-processing)
[](https://www.npmjs.com/package/ml-spectra-processing)
[](https://codecov.io/gh/mljs/spectra-processing)
[](https://github.com/mljs/spectra-processing/blob/main/LICENSE)
[](https://www.zenodo.org/badge/latestdoi/196417515)
Various functions to process spectra. Those are `pure` functions.
They are sorted in various categories:
- matrix: functions on ml-matrix instances (or array of arrays)
- x: functions that apply on a 1D array
- xy: functions that apply on an object `{x: [], y:[]}`
- xy2: functions that apply on an array of arrays of 2 numbers `[[x,y], [x,y]]`
- xyArray: functions that apply on an array of objects `{x: [], y:[]}`
- xyObject: functions that apply on an array of point `[{x,y}]`
- xreim: functions that apply on an object `{x: [], re:[], im:[]}`
- reim: functions that apply on an object `{re: [], im:[]}`
- zone: functions that apply on a zone `{from,to}`
- zones: functions that apply on an array of zone `[{from,to}]`
The name of the functions start with the first argument on which they apply.
## Installation
```console
npm install ml-spectra-processing
```
## Usage
```js
import { xAdd } from 'ml-spectra-processing';
const array = [1, 2, 3];
const result = xAdd(array, 5);
console.log(result);
```
## [API Documentation](https://mljs.github.io/spectra-processing/)
## License
[MIT](./LICENSE)