Skip to content

mljs/spectra-processing

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

273f5c1 · Aug 12, 2024
Feb 26, 2024
Aug 12, 2024
Sep 27, 2023
Dec 13, 2021
Jul 11, 2019
Oct 28, 2021
Jul 30, 2024
Jul 11, 2019
Feb 7, 2023
Aug 12, 2024
Aug 12, 2024
Mar 23, 2024
Dec 13, 2021
Aug 12, 2024
Mar 23, 2024
Mar 23, 2024

Repository files navigation

ml-spectra-processing

NPM version build status Test coverage npm download DOI

Various functions to process spectra. Those are pure functions.

They are sorted in various categories:

  • matrix: functions on ml-matrix instances (or array or array)
  • 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 array 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

$ npm i ml-spectra-processing

Usage

import { xAdd } from 'ml-spectra-processing';

const array = [1, 2, 3];
const result = xAdd(array, 5);
console.log(result);

License

MIT