Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nmr-processing

Package Overview
Dependencies
Maintainers
4
Versions
268
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nmr-processing - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

7

CHANGELOG.md
# Changelog
## [0.5.0](https://www.github.com/cheminfo/nmr-processing/compare/v0.4.0...v0.5.0) (2020-12-16)
### Features
* by default filter solvent and impurity in rangesToACS ([319e595](https://www.github.com/cheminfo/nmr-processing/commit/319e595462a17c834699249dea8757bd87008dca))
## [0.4.0](https://www.github.com/cheminfo/nmr-processing/compare/v0.3.1...v0.4.0) (2020-11-16)

@@ -4,0 +11,0 @@

20

package.json
{
"name": "nmr-processing",
"version": "0.4.0",
"version": "0.5.0",
"description": "",

@@ -43,24 +43,24 @@ "main": "lib/index.js",

"@babel/plugin-transform-modules-commonjs": "^7.12.1",
"@types/jest": "^26.0.15",
"@types/jest": "^26.0.19",
"cheminfo-build": "^1.1.8",
"eslint": "^7.12.1",
"eslint": "^7.15.0",
"eslint-config-cheminfo": "^5.2.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-prettier": "^3.3.0",
"esm": "^3.2.25",
"jest": "^26.6.1",
"jest": "^26.6.3",
"jest-matcher-deep-close-to": "^2.0.1",
"ml-array-median": "^1.1.4",
"nmr-xy-testdata": "^0.2.1",
"prettier": "^2.1.2",
"rollup": "^2.32.1"
"prettier": "^2.2.1",
"rollup": "^2.35.1"
},
"dependencies": {
"ml-gsd": "^6.1.1",
"ml-gsd": "^6.3.0",
"ml-matrix-convolution": "^0.5.2",
"ml-matrix-peaks-finder": "^0.3.2",
"ml-simple-clustering": "^0.1.0",
"ml-spectra-processing": "^4.5.1"
"ml-spectra-processing": "^4.10.0"
}
}

@@ -25,2 +25,12 @@ import { signalJoinCouplings } from '../signal/signalJoinCouplings';

/**
*
* @param {array} ranges
* @param {object} [options={}]
* @param {boolean} [options.filter=true] remove annotated signals as solvent and impurities
* @param {number} [options.nucleus]
* @param {number} [options.nbDecimalDelta] default value depends of nucleus
* @param {number} [options.nbDecimalJ] default value depends of nucleus
* @param {number} [options.observedFrequency] default value depends of nucleus 1H: 400MHz
*/
export function rangesToACS(ranges, options = {}) {

@@ -57,2 +67,3 @@ if (!options.nucleus) options.nucleus = '1H';

for (let range of ranges) {
if (uselessKind(range.kind, options.filter)) continue;
pushDelta(range, acsRanges, options);

@@ -88,2 +99,9 @@ }

let fromTo = [range.from, range.to];
if (Array.isArray(range.signal)) {
range.signal = range.signal.filter(
(signal) => !uselessKind(signal.kind, options.filter),
);
}
if (Array.isArray(range.signal) && range.signal.length > 0) {

@@ -227,1 +245,7 @@ let signals = range.signal;

}
function uselessKind(kind = '', filter = true) {
kind = kind.toLowerCase();
if (filter && (kind === 'impurity' || kind === 'solvent')) return true;
return false;
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc