Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "ml-gsd", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Global Spectra Deconvolution", | ||
@@ -16,3 +16,3 @@ "main": "src/index.js", | ||
"type": "git", | ||
"url": "https://github.com/mljs/global-spectra-deconvolution.git" | ||
"url": "https://github.com/mljs/global-spectral-deconvolution.git" | ||
}, | ||
@@ -29,5 +29,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/mljs/global-spectra-deconvolution/issues" | ||
"url": "https://github.com/mljs/global-spectral-deconvolution/issues" | ||
}, | ||
"homepage": "https://github.com/mljs/global-spectra-deconvolution", | ||
"homepage": "https://github.com/mljs/global-spectral-deconvolution", | ||
"devDependencies": { | ||
@@ -38,5 +38,3 @@ "cheminfo-tools": "^1.0.2", | ||
"should": "^7.0.2", | ||
"xy-parser": "^1.0.0", | ||
"chemcalc": "^3.0.1", | ||
"ml-stat": "^1.0.1" | ||
"chemcalc": "^3.0.1" | ||
}, | ||
@@ -47,5 +45,5 @@ "dependencies": { | ||
"xy-parser": "^1.1.0", | ||
"ml-savitzky-golay-generalized": "1.0.0", | ||
"ml-savitzky-golay-generalized": "1.0.3", | ||
"extend": "3.0.0" | ||
} | ||
} |
@@ -42,4 +42,4 @@ # global-spectral-deconvolution | ||
var result=peakPicking.gsd(x, y, {noiseLevel: noiseLevel, minMaxRatio:0, broadRatio:0,smoothY:false}); | ||
result = peakPicking.optimize(result,x,y,1,"gaussian");` | ||
var result=peakPicking.gsd(x, y, {noiseLevel: noiseLevel, minMaxRatio:0, broadRatio:0,smoothY:false,realTopDetection:true}); | ||
result = peakPicking.post.optimizePeaks(result,x,y,1,"gaussian"); | ||
``` |
@@ -7,3 +7,3 @@ var Opt = require("ml-optimize-lorentzian"); | ||
var sgDefOptions = { | ||
windowSize: 5, | ||
windowSize: 9, | ||
polynomial: 3 | ||
@@ -57,4 +57,6 @@ }; | ||
//If the max difference between delta x is less than 5%, then, we can assume it to be equally spaced variable | ||
var Y = y; | ||
if((maxDx-minDx)/maxDx<0.05){ | ||
var Y = SG(y, x[1]-x[0], {windowSize:sgOptions.windowSize, polynomial:sgOptions.polynomial,derivative:0}); | ||
if(options.smoothY) | ||
Y = SG(y, x[1]-x[0], {windowSize:sgOptions.windowSize, polynomial:sgOptions.polynomial,derivative:0}); | ||
var dY = SG(y, x[1]-x[0], {windowSize:sgOptions.windowSize, polynomial:sgOptions.polynomial,derivative:1}); | ||
@@ -64,3 +66,4 @@ var ddY = SG(y, x[1]-x[0], {windowSize:sgOptions.windowSize, polynomial:sgOptions.polynomial,derivative:2}); | ||
else{ | ||
var Y = SG(y, x, {windowSize:sgOptions.windowSize, polynomial:sgOptions.polynomial,derivative:0}); | ||
if(options.smoothY) | ||
Y = SG(y, x, {windowSize:sgOptions.windowSize, polynomial:sgOptions.polynomial,derivative:0}); | ||
var dY = SG(y, x, {windowSize:sgOptions.windowSize, polynomial:sgOptions.polynomial,derivative:1}); | ||
@@ -177,2 +180,5 @@ var ddY = SG(y, x, {windowSize:sgOptions.windowSize, polynomial:sgOptions.polynomial,derivative:2}); | ||
function realTopDetection(peakList, x, y){ | ||
//console.log(peakList); | ||
//console.log(x); | ||
//console.log(y); | ||
var listP = []; | ||
@@ -179,0 +185,0 @@ var alpha, beta, gamma, p,currentPoint; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
763587
5
6275
0
0
+ Addedml-savitzky-golay-generalized@1.0.3(transitive)
- Removedml-savitzky-golay-generalized@1.0.0(transitive)