Comparing version 6.7.0 to 6.8.0
# Changelog | ||
## [6.8.0](https://www.github.com/mljs/global-spectral-deconvolution/compare/v6.7.0...v6.8.0) (2021-09-23) | ||
### Features | ||
* add types ([#55](https://www.github.com/mljs/global-spectral-deconvolution/issues/55)) ([d4f1564](https://www.github.com/mljs/global-spectral-deconvolution/commit/d4f15649572c0ec2f1142f4b3ed77655fca05a73)) | ||
## [6.7.0](https://www.github.com/mljs/global-spectral-deconvolution/compare/v6.6.3...v6.7.0) (2021-08-10) | ||
@@ -4,0 +11,0 @@ |
@@ -85,3 +85,3 @@ 'use strict'; | ||
if (smoothY) { | ||
yData = SG__default['default'](y, x[1] - x[0], { | ||
yData = SG__default["default"](y, x[1] - x[0], { | ||
windowSize, | ||
@@ -92,3 +92,3 @@ polynomial, | ||
} | ||
dY = SG__default['default'](y, x[1] - x[0], { | ||
dY = SG__default["default"](y, x[1] - x[0], { | ||
windowSize, | ||
@@ -98,3 +98,3 @@ polynomial, | ||
}); | ||
ddY = SG__default['default'](y, x[1] - x[0], { | ||
ddY = SG__default["default"](y, x[1] - x[0], { | ||
windowSize, | ||
@@ -106,3 +106,3 @@ polynomial, | ||
if (smoothY) { | ||
yData = SG__default['default'](y, x, { | ||
yData = SG__default["default"](y, x, { | ||
windowSize, | ||
@@ -113,3 +113,3 @@ polynomial, | ||
} | ||
dY = SG__default['default'](y, x, { | ||
dY = SG__default["default"](y, x, { | ||
windowSize, | ||
@@ -119,3 +119,3 @@ polynomial, | ||
}); | ||
ddY = SG__default['default'](y, x, { | ||
ddY = SG__default["default"](y, x, { | ||
windowSize, | ||
@@ -150,3 +150,2 @@ polynomial, | ||
// filter based on derivativeThreshold | ||
// console.log('pasa', y[i], dY[i], ddY[i]); | ||
if (Math.abs(dY[i]) > derivativeThreshold) { | ||
@@ -257,3 +256,3 @@ // Minimum in first derivative | ||
signals.sort(function (a, b) { | ||
signals.sort((a, b) => { | ||
return a.x - b.x; | ||
@@ -538,3 +537,3 @@ }); | ||
} | ||
peakList.sort(function (a, b) { | ||
peakList.sort((a, b) => { | ||
return a.x - b.x; | ||
@@ -541,0 +540,0 @@ }); |
{ | ||
"name": "ml-gsd", | ||
"version": "6.7.0", | ||
"version": "6.8.0", | ||
"description": "Global Spectra Deconvolution", | ||
"main": "lib/index.js", | ||
"module": "src/index.js", | ||
"types": "ml-gsd.d.ts", | ||
"files": [ | ||
@@ -8,0 +9,0 @@ "lib", |
@@ -5,5 +5,5 @@ import { readFileSync } from 'fs'; | ||
describe('Global spectra deconvolution Infrared spectra', function () { | ||
describe('Global spectra deconvolution Infrared spectra', () => { | ||
// Test case obtained from Pag 443, Chap 8. | ||
it('Should get the correct result', function () { | ||
it('Should get the correct result', () => { | ||
let spectrum = JSON.parse( | ||
@@ -10,0 +10,0 @@ readFileSync(`${__dirname}/data/infraRed.json`, 'utf-8'), |
@@ -134,3 +134,2 @@ import { getShape1D } from 'ml-peak-shape-generator'; | ||
// filter based on derivativeThreshold | ||
// console.log('pasa', y[i], dY[i], ddY[i]); | ||
if (Math.abs(dY[i]) > derivativeThreshold) { | ||
@@ -241,3 +240,3 @@ // Minimum in first derivative | ||
signals.sort(function (a, b) { | ||
signals.sort((a, b) => { | ||
return a.x - b.x; | ||
@@ -244,0 +243,0 @@ }); |
@@ -82,3 +82,3 @@ import { optimize } from 'ml-spectra-fitting'; | ||
} | ||
peakList.sort(function (a, b) { | ||
peakList.sort((a, b) => { | ||
return a.x - b.x; | ||
@@ -85,0 +85,0 @@ }); |
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
5869807
1904