ms-spectrum
Advanced tools
Comparing version 1.2.14 to 1.2.15
{ | ||
"name": "ms-spectrum", | ||
"version": "1.2.14", | ||
"version": "1.2.15", | ||
"description": "A mass spectrum", | ||
@@ -21,3 +21,3 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"emdb": "^1.4.6", | ||
"emdb": "^1.4.7", | ||
"ml-array-max": "^1.2.0", | ||
@@ -31,3 +31,3 @@ "ml-array-min": "^1.2.0", | ||
}, | ||
"gitHead": "ab8aa074d6827c3fa13e229b5729b9997b948e5c" | ||
"gitHead": "15bb104b9804b584a53cb93b31a33852d5c368a8" | ||
} |
'use strict'; | ||
const max = require('ml-array-max'); | ||
const max = require('ml-array-max/lib/index'); | ||
/** | ||
@@ -13,3 +13,3 @@ * When a spectrum is continous ? | ||
* @param {number} [options.minLength=100] | ||
* @param {number} [options.ignoreRelativeHeight=0.001] | ||
* @param {number} [options.relativeHeightThreshold=0.001] // Under this value the | ||
* @param {number} [options.maxDeltaRatio=3] | ||
@@ -22,5 +22,5 @@ */ | ||
maxDeltaRatio = 3, | ||
ignoreRelativeHeight = 0.001, | ||
relativeHeightThreshold = 0.001, | ||
} = options; | ||
const minHeight = max(spectrum.data.y) * ignoreRelativeHeight; | ||
const minHeight = max(spectrum.data.y) * relativeHeightThreshold; | ||
const minRadio = 1 / maxDeltaRatio; | ||
@@ -27,0 +27,0 @@ const maxRatio = 1 * maxDeltaRatio; |
5327608
Updatedemdb@^1.4.7