# ml-spectra-processing

> Various method to process spectra

Latest version **14.35.1** (published 2026-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install ml-spectra-processing
pnpm add ml-spectra-processing
yarn add ml-spectra-processing
bun add ml-spectra-processing
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 14.35.1 |
| Published | 2026-09-14 |
| First published | 2019-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 6 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Luc Patiny |
| Maintainers | stropitek, targos, lpatiny, mljs-bot, cheminfo-bot, opatiny |

## Links

- npm: https://www.npmjs.com/package/ml-spectra-processing
- Repository: https://github.com/mljs/spectra-processing
- Homepage: https://github.com/mljs/spectra-processing#readme
- Issues: https://github.com/mljs/spectra-processing/issues
- npm.io page: https://npm.io/package/ml-spectra-processing

## Dependencies (6)

- [fft.js](https://npm.io/package/fft.js.md) ^4.0.4
- [ml-xsadd](https://npm.io/package/ml-xsadd.md) ^3.0.1
- [ml-matrix](https://npm.io/package/ml-matrix.md) ^6.14.0
- [is-any-array](https://npm.io/package/is-any-array.md) ^3.0.0
- [binary-search](https://npm.io/package/binary-search.md) ^1.3.6
- [cheminfo-types](https://npm.io/package/cheminfo-types.md) ^1.16.0

## Recent versions

- 14.35.1 (latest) — 2026-09-14
- 12.2.0-pre.1682520047 (pre) — 2023-04-26
- 14.35.0 — 2026-09-10
- 14.34.0 — 2026-08-26
- 14.33.0 — 2026-08-07
- 14.32.0 — 2026-08-04
- 14.31.0 — 2026-07-30
- 14.30.0 — 2026-07-22
- 14.29.4 — 2026-07-20
- 14.29.2 — 2026-07-03
- 14.29.1 — 2026-06-22
- 14.29.0 — 2026-05-12
- 14.28.1 — 2026-04-16
- 14.28.0 — 2026-04-15
- 14.27.0 — 2026-04-14
- … 174 more at https://npm.io/package/ml-spectra-processing/versions

## README

# ml-spectra-processing

[![NPM version](https://img.shields.io/npm/v/ml-spectra-processing.svg)](https://www.npmjs.com/package/ml-spectra-processing)
[![npm download](https://img.shields.io/npm/dm/ml-spectra-processing.svg)](https://www.npmjs.com/package/ml-spectra-processing)
[![test coverage](https://img.shields.io/codecov/c/github/mljs/spectra-processing.svg)](https://codecov.io/gh/mljs/spectra-processing)
[![license](https://img.shields.io/npm/l/ml-spectra-processing.svg)](https://github.com/mljs/spectra-processing/blob/main/LICENSE)
[![DOI](https://www.zenodo.org/badge/196417515.svg)](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:[]}`
- reimArray: functions that apply on an array of objects `{re: [], im:[]}`
- reimMatrix: functions that apply on an object of matrices `{re, im}`
- 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)

---
_Source: https://npm.io/package/ml-spectra-processing · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
