spectra-processor

3.0.0 • Public • Published

spectra-processor

NPM version build status Test coverage npm download

Introduction

This package allows to store spectra in an object and make many processing on them

It should be able to deal with large amount of large files and will automatically reduce the data size in order to keep reasonable size. This reduction of data is based on normalization parameters that includes:

  • from / to
  • normalization filters
  • final number of points
  • exclusion zones

The package will try by default to have less than 64 Mb of memory used and if the presence of original data yield to a higher amount it will remove the original data. This will have as consequence that you will not be able to change the normalization parameters.

Practically this means that if you have 1024 spectra of 65536 points and you normalize the data to 4096 points it can still be kept in memory.

  • Memory for spectra: 1024 * 65536 * 8 (double): over 64 Mb, original spectra will be removed
  • Memory for normalized: 1024 * 4k * 8: 32 Mb: can be processed further

Installation

$ npm install --save spectra-processor

Usage

import SpectraProcessor from 'spectra-processor';

let spectrum = SpectraProcessor.addFromJcamp(jcamp);

API Documentation

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i spectra-processor

Weekly Downloads

2

Version

3.0.0

License

MIT

Unpacked Size

5.4 MB

Total Files

76

Last publish

Collaborators

  • targos
  • lpatiny
  • cheminfo-bot
  • stropitek