jcampconverter
Advanced tools
Comparing version 7.7.0 to 7.8.0
132
CHANGELOG.md
# Changelog | ||
## [7.8.0](https://www.github.com/cheminfo/jcampconverter/compare/v7.7.0...v7.8.0) (2021-03-24) | ||
### Features | ||
* improve 2D noise detection by using the full 2D spectrum ([7607af3](https://www.github.com/cheminfo/jcampconverter/commit/7607af3940945d9e794bf926a09e2e90b4d9efdf)) | ||
### Bug Fixes | ||
* update dependencies and readme ([65d11ec](https://www.github.com/cheminfo/jcampconverter/commit/65d11eca3b79ff84f28a0e48e7270fbc24242ae1)) | ||
## [7.7.0](https://www.github.com/cheminfo/jcampconverter/compare/v7.6.6...v7.7.0) (2021-02-10) | ||
@@ -38,5 +50,5 @@ | ||
### [7.6.2](https://github.com/cheminfo-js/jcampconverter/compare/v7.6.1...v7.6.2) (2020-10-14) | ||
### [7.6.2](https://github.com/cheminfo/jcampconverter/compare/v7.6.1...v7.6.2) (2020-10-14) | ||
## [7.3.1](https://github.com/cheminfo-js/jcampconverter/compare/v7.2.0...v7.3.1) (2020-06-24) | ||
## [7.3.1](https://github.com/cheminfo/jcampconverter/compare/v7.2.0...v7.3.1) (2020-06-24) | ||
@@ -46,3 +58,3 @@ | ||
* variables has always lowercase property ([32bc505](https://github.com/cheminfo-js/jcampconverter/commit/32bc505c61645430270b2a0eb09e7bff01460bf6)) | ||
* variables has always lowercase property ([32bc505](https://github.com/cheminfo/jcampconverter/commit/32bc505c61645430270b2a0eb09e7bff01460bf6)) | ||
@@ -52,8 +64,8 @@ | ||
* add data in variables ([dcd2966](https://github.com/cheminfo-js/jcampconverter/commit/dcd2966ed0de32e6e63207593c1a52bdc5986e49)) | ||
* apply NMR conversion to ppm as a postProcessing process ([dcd0ea9](https://github.com/cheminfo-js/jcampconverter/commit/dcd0ea96b63241afb11ffc5dea779571c4e4650b)) | ||
* add data in variables ([dcd2966](https://github.com/cheminfo/jcampconverter/commit/dcd2966ed0de32e6e63207593c1a52bdc5986e49)) | ||
* apply NMR conversion to ppm as a postProcessing process ([dcd0ea9](https://github.com/cheminfo/jcampconverter/commit/dcd0ea96b63241afb11ffc5dea779571c4e4650b)) | ||
# [7.2.0](https://github.com/cheminfo-js/jcampconverter/compare/v7.1.0...v7.2.0) (2020-06-20) | ||
# [7.2.0](https://github.com/cheminfo/jcampconverter/compare/v7.1.0...v7.2.0) (2020-06-20) | ||
@@ -63,7 +75,7 @@ | ||
* change xUnits for ntuples to add varname + unit ([92eae09](https://github.com/cheminfo-js/jcampconverter/commit/92eae094aedaf911a5437c8578a76679d6bb3ae9)) | ||
* change xUnits for ntuples to add varname + unit ([92eae09](https://github.com/cheminfo/jcampconverter/commit/92eae094aedaf911a5437c8578a76679d6bb3ae9)) | ||
# [7.1.0](https://github.com/cheminfo-js/jcampconverter/compare/v7.0.0...v7.1.0) (2020-06-11) | ||
# [7.1.0](https://github.com/cheminfo/jcampconverter/compare/v7.0.0...v7.1.0) (2020-06-11) | ||
@@ -73,3 +85,3 @@ | ||
* rename xUnit and yUnit to xUnits and yUnits ([d50c6fe](https://github.com/cheminfo-js/jcampconverter/commit/d50c6feb0db96e2bd10bdae70b6fead0b30ea1c3)) | ||
* rename xUnit and yUnit to xUnits and yUnits ([d50c6fe](https://github.com/cheminfo/jcampconverter/commit/d50c6feb0db96e2bd10bdae70b6fead0b30ea1c3)) | ||
@@ -85,7 +97,7 @@ | ||
# [7.0.0](https://github.com/cheminfo-js/jcampconverter/compare/v6.0.1...v7.0.0) (2020-06-11) | ||
# [7.0.0](https://github.com/cheminfo/jcampconverter/compare/v6.0.1...v7.0.0) (2020-06-11) | ||
## [6.0.1](https://github.com/cheminfo-js/jcampconverter/compare/v6.0.0...v6.0.1) (2020-06-10) | ||
## [6.0.1](https://github.com/cheminfo/jcampconverter/compare/v6.0.0...v6.0.1) (2020-06-10) | ||
@@ -95,9 +107,9 @@ | ||
* improve 2d spectra discovery ([5a7c15a](https://github.com/cheminfo-js/jcampconverter/commit/5a7c15afbadb133d3ecb89d5e816354c0d207441)) | ||
* improve detection of 2d spectra ([02e966f](https://github.com/cheminfo-js/jcampconverter/commit/02e966f108578578fe717d259b16a7c933a0db44)) | ||
* ntuples separator must contain a comma ([3bbf182](https://github.com/cheminfo-js/jcampconverter/commit/3bbf1829acffeeed4a888fd502afdd6637d070b8)) | ||
* improve 2d spectra discovery ([5a7c15a](https://github.com/cheminfo/jcampconverter/commit/5a7c15afbadb133d3ecb89d5e816354c0d207441)) | ||
* improve detection of 2d spectra ([02e966f](https://github.com/cheminfo/jcampconverter/commit/02e966f108578578fe717d259b16a7c933a0db44)) | ||
* ntuples separator must contain a comma ([3bbf182](https://github.com/cheminfo/jcampconverter/commit/3bbf1829acffeeed4a888fd502afdd6637d070b8)) | ||
# [6.0.0](https://github.com/cheminfo-js/jcampconverter/compare/v5.0.2...v6.0.0) (2020-06-10) | ||
# [6.0.0](https://github.com/cheminfo/jcampconverter/compare/v5.0.2...v6.0.0) (2020-06-10) | ||
@@ -107,11 +119,11 @@ | ||
* add parsing of multivariable NTUPLE PEAKS ([872a43f](https://github.com/cheminfo-js/jcampconverter/commit/872a43fa9867b84247138bd939cd455c386e7e46)) | ||
* add parsing of multivariable NTUPLE PEAKS ([872a43f](https://github.com/cheminfo/jcampconverter/commit/872a43fa9867b84247138bd939cd455c386e7e46)) | ||
## [5.0.2](https://github.com/cheminfo-js/jcampconverter/compare/v5.0.1...v5.0.2) (2020-04-08) | ||
## [5.0.2](https://github.com/cheminfo/jcampconverter/compare/v5.0.1...v5.0.2) (2020-04-08) | ||
## [5.0.1](https://github.com/cheminfo-js/jcampconverter/compare/v5.0.0...v5.0.1) (2020-04-04) | ||
## [5.0.1](https://github.com/cheminfo/jcampconverter/compare/v5.0.0...v5.0.1) (2020-04-04) | ||
@@ -121,7 +133,7 @@ | ||
* 2d matrix minX / maxX ([447606d](https://github.com/cheminfo-js/jcampconverter/commit/447606df8a952d3c19dec3306d8aa2f09ee402b0)) | ||
* 2d matrix minX / maxX ([447606d](https://github.com/cheminfo/jcampconverter/commit/447606df8a952d3c19dec3306d8aa2f09ee402b0)) | ||
# [5.0.0](https://github.com/cheminfo-js/jcampconverter/compare/v4.1.1...v5.0.0) (2020-04-04) | ||
# [5.0.0](https://github.com/cheminfo/jcampconverter/compare/v4.1.1...v5.0.0) (2020-04-04) | ||
@@ -131,7 +143,7 @@ | ||
* rollup and build ([eef5d66](https://github.com/cheminfo-js/jcampconverter/commit/eef5d66dbeccdfd907dc86ce1cd8aa1429a544f3)) | ||
* rollup and build ([eef5d66](https://github.com/cheminfo/jcampconverter/commit/eef5d66dbeccdfd907dc86ce1cd8aa1429a544f3)) | ||
## [4.1.1](https://github.com/cheminfo-js/jcampconverter/compare/v4.1.0...v4.1.1) (2020-04-02) | ||
## [4.1.1](https://github.com/cheminfo/jcampconverter/compare/v4.1.0...v4.1.1) (2020-04-02) | ||
@@ -141,7 +153,7 @@ | ||
* allow jcamp with no data ([4365d79](https://github.com/cheminfo-js/jcampconverter/commit/4365d79b16fa6f1651e6a2d4a1626107d0072e8a)) | ||
* allow jcamp with no data ([4365d79](https://github.com/cheminfo/jcampconverter/commit/4365d79b16fa6f1651e6a2d4a1626107d0072e8a)) | ||
## [2.10.2](https://github.com/cheminfo-js/jcampconverter/compare/v2.10.1...v2.10.2) (2018-11-23) | ||
## [2.10.2](https://github.com/cheminfo/jcampconverter/compare/v2.10.1...v2.10.2) (2018-11-23) | ||
@@ -151,3 +163,3 @@ | ||
<a name="2.9.1"></a> | ||
## [2.9.1](https://github.com/cheminfo-js/jcampconverter/compare/v2.9.0...v2.9.1) (2017-10-19) | ||
## [2.9.1](https://github.com/cheminfo/jcampconverter/compare/v2.9.0...v2.9.1) (2017-10-19) | ||
@@ -157,3 +169,3 @@ | ||
<a name="2.9.0"></a> | ||
# [2.9.0](https://github.com/cheminfo-js/jcampconverter/compare/v2.8.0...v2.9.0) (2017-09-13) | ||
# [2.9.0](https://github.com/cheminfo/jcampconverter/compare/v2.8.0...v2.9.0) (2017-09-13) | ||
@@ -163,3 +175,3 @@ | ||
* read mestrec file ([5e485f2](https://github.com/cheminfo-js/jcampconverter/commit/5e485f2)) | ||
* read mestrec file ([5e485f2](https://github.com/cheminfo/jcampconverter/commit/5e485f2)) | ||
@@ -169,3 +181,3 @@ | ||
<a name="2.8.0"></a> | ||
# [2.8.0](https://github.com/cheminfo-js/jcampconverter/compare/v2.7.0...v2.8.0) (2017-08-09) | ||
# [2.8.0](https://github.com/cheminfo/jcampconverter/compare/v2.7.0...v2.8.0) (2017-08-09) | ||
@@ -175,3 +187,3 @@ | ||
* change newGCMS to chromatogram ([1941f48](https://github.com/cheminfo-js/jcampconverter/commit/1941f48)) | ||
* change newGCMS to chromatogram ([1941f48](https://github.com/cheminfo/jcampconverter/commit/1941f48)) | ||
@@ -181,3 +193,3 @@ | ||
<a name="2.7.0"></a> | ||
# [2.7.0](https://github.com/cheminfo-js/jcampconverter/compare/v2.6.0...v2.7.0) (2016-09-15) | ||
# [2.7.0](https://github.com/cheminfo/jcampconverter/compare/v2.6.0...v2.7.0) (2016-09-15) | ||
@@ -187,3 +199,3 @@ | ||
<a name="2.6.0"></a> | ||
# [2.6.0](https://github.com/cheminfo-js/jcampconverter/compare/v2.5.1...v2.6.0) (2016-07-11) | ||
# [2.6.0](https://github.com/cheminfo/jcampconverter/compare/v2.5.1...v2.6.0) (2016-07-11) | ||
@@ -193,3 +205,3 @@ | ||
* add noContour option ([ab5ff6b](https://github.com/cheminfo-js/jcampconverter/commit/ab5ff6b)) | ||
* add noContour option ([ab5ff6b](https://github.com/cheminfo/jcampconverter/commit/ab5ff6b)) | ||
@@ -199,3 +211,3 @@ | ||
<a name="2.5.1"></a> | ||
## [2.5.1](https://github.com/cheminfo-js/jcampconverter/compare/v2.5.0...v2.5.1) (2016-06-27) | ||
## [2.5.1](https://github.com/cheminfo/jcampconverter/compare/v2.5.0...v2.5.1) (2016-06-27) | ||
@@ -205,3 +217,3 @@ | ||
* more wantXY checks ([c87a97d](https://github.com/cheminfo-js/jcampconverter/commit/c87a97d)) | ||
* more wantXY checks ([c87a97d](https://github.com/cheminfo/jcampconverter/commit/c87a97d)) | ||
@@ -211,3 +223,3 @@ | ||
<a name="2.5.0"></a> | ||
# [2.5.0](https://github.com/cheminfo-js/jcampconverter/compare/v2.4.5...v2.5.0) (2016-06-27) | ||
# [2.5.0](https://github.com/cheminfo/jcampconverter/compare/v2.4.5...v2.5.0) (2016-06-27) | ||
@@ -217,3 +229,3 @@ | ||
<a name="2.4.5"></a> | ||
## [2.4.5](https://github.com/cheminfo-js/jcampconverter/compare/v2.4.4...v2.4.5) (2016-05-06) | ||
## [2.4.5](https://github.com/cheminfo/jcampconverter/compare/v2.4.4...v2.4.5) (2016-05-06) | ||
@@ -223,3 +235,3 @@ | ||
<a name="2.4.4"></a> | ||
## [2.4.4](https://github.com/cheminfo-js/jcampconverter/compare/v2.4.3...v2.4.4) (2016-05-06) | ||
## [2.4.4](https://github.com/cheminfo/jcampconverter/compare/v2.4.3...v2.4.4) (2016-05-06) | ||
@@ -229,3 +241,3 @@ | ||
<a name="2.4.3"></a> | ||
## [2.4.3](https://github.com/cheminfo-js/jcampconverter/compare/v2.4.2...v2.4.3) (2016-05-04) | ||
## [2.4.3](https://github.com/cheminfo/jcampconverter/compare/v2.4.2...v2.4.3) (2016-05-04) | ||
@@ -235,3 +247,3 @@ | ||
<a name="2.4.2"></a> | ||
## [2.4.2](https://github.com/cheminfo-js/jcampconverter/compare/v2.4.1...v2.4.2) (2016-05-04) | ||
## [2.4.2](https://github.com/cheminfo/jcampconverter/compare/v2.4.1...v2.4.2) (2016-05-04) | ||
@@ -241,3 +253,3 @@ | ||
<a name="2.4.1"></a> | ||
## [2.4.1](https://github.com/cheminfo-js/jcampconverter/compare/v2.4.0...v2.4.1) (2016-05-04) | ||
## [2.4.1](https://github.com/cheminfo/jcampconverter/compare/v2.4.0...v2.4.1) (2016-05-04) | ||
@@ -247,3 +259,3 @@ | ||
<a name="2.4.0"></a> | ||
# [2.4.0](https://github.com/cheminfo-js/jcampconverter/compare/v2.3.0...v2.4.0) (2016-05-04) | ||
# [2.4.0](https://github.com/cheminfo/jcampconverter/compare/v2.3.0...v2.4.0) (2016-05-04) | ||
@@ -253,3 +265,3 @@ | ||
<a name="2.3.0"></a> | ||
# [2.3.0](https://github.com/cheminfo-js/jcampconverter/compare/v2.2.2...v2.3.0) (2016-03-14) | ||
# [2.3.0](https://github.com/cheminfo/jcampconverter/compare/v2.2.2...v2.3.0) (2016-03-14) | ||
@@ -259,3 +271,3 @@ | ||
<a name="2.2.2"></a> | ||
## [2.2.2](https://github.com/cheminfo-js/jcampconverter/compare/v2.2.1...v2.2.2) (2016-03-07) | ||
## [2.2.2](https://github.com/cheminfo/jcampconverter/compare/v2.2.1...v2.2.2) (2016-03-07) | ||
@@ -265,3 +277,3 @@ | ||
<a name="2.2.1"></a> | ||
## [2.2.1](https://github.com/cheminfo-js/jcampconverter/compare/v2.2.0...v2.2.1) (2016-03-04) | ||
## [2.2.1](https://github.com/cheminfo/jcampconverter/compare/v2.2.0...v2.2.1) (2016-03-04) | ||
@@ -271,3 +283,3 @@ | ||
<a name="2.2.0"></a> | ||
# [2.2.0](https://github.com/cheminfo-js/jcampconverter/compare/v2.1.0...v2.2.0) (2016-02-25) | ||
# [2.2.0](https://github.com/cheminfo/jcampconverter/compare/v2.1.0...v2.2.0) (2016-02-25) | ||
@@ -277,3 +289,3 @@ | ||
<a name="2.1.0"></a> | ||
# [2.1.0](https://github.com/cheminfo-js/jcampconverter/compare/v2.0.9...v2.1.0) (2015-07-21) | ||
# [2.1.0](https://github.com/cheminfo/jcampconverter/compare/v2.0.9...v2.1.0) (2015-07-21) | ||
@@ -283,3 +295,3 @@ | ||
<a name="2.0.9"></a> | ||
## [2.0.9](https://github.com/cheminfo-js/jcampconverter/compare/v2.0.8...v2.0.9) (2015-05-29) | ||
## [2.0.9](https://github.com/cheminfo/jcampconverter/compare/v2.0.8...v2.0.9) (2015-05-29) | ||
@@ -289,3 +301,3 @@ | ||
<a name="2.0.8"></a> | ||
## [2.0.8](https://github.com/cheminfo-js/jcampconverter/compare/v2.0.7...v2.0.8) (2015-03-10) | ||
## [2.0.8](https://github.com/cheminfo/jcampconverter/compare/v2.0.7...v2.0.8) (2015-03-10) | ||
@@ -295,3 +307,3 @@ | ||
<a name="2.0.7"></a> | ||
## [2.0.7](https://github.com/cheminfo-js/jcampconverter/compare/v2.0.6...v2.0.7) (2015-03-06) | ||
## [2.0.7](https://github.com/cheminfo/jcampconverter/compare/v2.0.6...v2.0.7) (2015-03-06) | ||
@@ -301,3 +313,3 @@ | ||
<a name="2.0.6"></a> | ||
## [2.0.6](https://github.com/cheminfo-js/jcampconverter/compare/v2.0.5...v2.0.6) (2015-03-05) | ||
## [2.0.6](https://github.com/cheminfo/jcampconverter/compare/v2.0.5...v2.0.6) (2015-03-05) | ||
@@ -307,3 +319,3 @@ | ||
<a name="2.0.5"></a> | ||
## [2.0.5](https://github.com/cheminfo-js/jcampconverter/compare/v2.0.4...v2.0.5) (2015-02-19) | ||
## [2.0.5](https://github.com/cheminfo/jcampconverter/compare/v2.0.4...v2.0.5) (2015-02-19) | ||
@@ -313,3 +325,3 @@ | ||
<a name="2.0.4"></a> | ||
## [2.0.4](https://github.com/cheminfo-js/jcampconverter/compare/v2.0.3...v2.0.4) (2015-02-10) | ||
## [2.0.4](https://github.com/cheminfo/jcampconverter/compare/v2.0.3...v2.0.4) (2015-02-10) | ||
@@ -319,3 +331,3 @@ | ||
<a name="2.0.3"></a> | ||
## [2.0.3](https://github.com/cheminfo-js/jcampconverter/compare/v2.0.2...v2.0.3) (2015-01-23) | ||
## [2.0.3](https://github.com/cheminfo/jcampconverter/compare/v2.0.2...v2.0.3) (2015-01-23) | ||
@@ -325,3 +337,3 @@ | ||
<a name="2.0.2"></a> | ||
## [2.0.2](https://github.com/cheminfo-js/jcampconverter/compare/v2.0.1...v2.0.2) (2015-01-23) | ||
## [2.0.2](https://github.com/cheminfo/jcampconverter/compare/v2.0.1...v2.0.2) (2015-01-23) | ||
@@ -331,3 +343,3 @@ | ||
<a name="2.0.1"></a> | ||
## [2.0.1](https://github.com/cheminfo-js/jcampconverter/compare/v2.0.0...v2.0.1) (2014-10-20) | ||
## [2.0.1](https://github.com/cheminfo/jcampconverter/compare/v2.0.0...v2.0.1) (2014-10-20) | ||
@@ -337,3 +349,3 @@ | ||
<a name="2.0.0"></a> | ||
# [2.0.0](https://github.com/cheminfo-js/jcampconverter/compare/v1.0.4...v2.0.0) (2014-10-20) | ||
# [2.0.0](https://github.com/cheminfo/jcampconverter/compare/v1.0.4...v2.0.0) (2014-10-20) | ||
@@ -343,3 +355,3 @@ | ||
<a name="1.0.4"></a> | ||
## [1.0.4](https://github.com/cheminfo-js/jcampconverter/compare/v1.0.3...v1.0.4) (2014-10-16) | ||
## [1.0.4](https://github.com/cheminfo/jcampconverter/compare/v1.0.3...v1.0.4) (2014-10-16) | ||
@@ -349,3 +361,3 @@ | ||
<a name="1.0.3"></a> | ||
## [1.0.3](https://github.com/cheminfo-js/jcampconverter/compare/v1.0.2...v1.0.3) (2014-10-06) | ||
## [1.0.3](https://github.com/cheminfo/jcampconverter/compare/v1.0.2...v1.0.3) (2014-10-06) | ||
@@ -355,3 +367,3 @@ | ||
<a name="1.0.2"></a> | ||
## [1.0.2](https://github.com/cheminfo-js/jcampconverter/compare/v1.0.1...v1.0.2) (2014-10-06) | ||
## [1.0.2](https://github.com/cheminfo/jcampconverter/compare/v1.0.1...v1.0.2) (2014-10-06) | ||
@@ -361,3 +373,3 @@ | ||
<a name="1.0.1"></a> | ||
## [1.0.1](https://github.com/cheminfo-js/jcampconverter/compare/v1.0.0...v1.0.1) (2014-10-06) | ||
## [1.0.1](https://github.com/cheminfo/jcampconverter/compare/v1.0.0...v1.0.1) (2014-10-06) | ||
@@ -364,0 +376,0 @@ |
@@ -439,2 +439,12 @@ 'use strict'; | ||
const medians = []; | ||
for (let i = 0; i < z.length; i++) { | ||
const row = Float64Array.from(z[i]); | ||
for (let i = 0; i < row.length; i++) { | ||
if (row[i] < 0) row[i] = -row[i]; | ||
} | ||
medians.push(getMedian__default['default'](row)); | ||
} | ||
const median = getMedian__default['default'](medians); | ||
return { | ||
@@ -448,3 +458,3 @@ z: z, | ||
maxZ: maxZ, | ||
noise: getMedian__default['default'](z[0].map(Math.abs)), | ||
noise: median, | ||
}; | ||
@@ -451,0 +461,0 @@ } |
{ | ||
"name": "jcampconverter", | ||
"version": "7.7.0", | ||
"version": "7.8.0", | ||
"description": "Parse and convert JCAMP data", | ||
@@ -33,3 +33,3 @@ "main": "lib/index.js", | ||
"type": "git", | ||
"url": "https://github.com/cheminfo-js/jcampconverter.git" | ||
"url": "https://github.com/cheminfo/jcampconverter.git" | ||
}, | ||
@@ -43,5 +43,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/cheminfo-js/jcampconverter/issues" | ||
"url": "https://github.com/cheminfo/jcampconverter/issues" | ||
}, | ||
"homepage": "https://github.com/cheminfo-js/jcampconverter#readme", | ||
"homepage": "https://github.com/cheminfo/jcampconverter#readme", | ||
"jest": { | ||
@@ -51,10 +51,10 @@ "testEnvironment": "node" | ||
"devDependencies": { | ||
"@babel/plugin-transform-modules-commonjs": "^7.12.13", | ||
"@types/jest": "^26.0.20", | ||
"@babel/plugin-transform-modules-commonjs": "^7.13.8", | ||
"@types/jest": "^26.0.21", | ||
"benchmark": "^2.1.4", | ||
"cheminfo-build": "^1.1.9", | ||
"eslint": "^7.19.0", | ||
"eslint-config-cheminfo": "^5.2.2", | ||
"cheminfo-build": "^1.1.10", | ||
"eslint": "^7.22.0", | ||
"eslint-config-cheminfo": "^5.2.3", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jest": "^24.1.3", | ||
"eslint-plugin-jest": "^24.3.2", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
@@ -65,8 +65,8 @@ "esm": "^3.2.25", | ||
"prettier": "^2.2.1", | ||
"rollup": "^2.38.5" | ||
"rollup": "^2.42.4" | ||
}, | ||
"dependencies": { | ||
"ml-array-median": "^1.1.4", | ||
"nmr-processing": "^0.9.0" | ||
"ml-array-median": "^1.1.5", | ||
"nmr-processing": "^1.0.0" | ||
} | ||
} |
# JCAMP converter | ||
[![NPM version][npm-image]][npm-url] | ||
[![build status][travis-image]][travis-url] | ||
[![build status][ci-image]][ci-url] | ||
[![Test coverage][codecov-image]][codecov-url] | ||
[![David deps][david-image]][david-url] | ||
[![npm download][download-image]][download-url] | ||
@@ -54,6 +53,4 @@ | ||
```javascript | ||
var converter = require("jcampconverter"); | ||
var jcamp = require("fs") | ||
.readFileSync("path/to/jcamp.dx") | ||
.toString(); | ||
var converter = require('jcampconverter'); | ||
var jcamp = require('fs').readFileSync('path/to/jcamp.dx').toString(); | ||
@@ -66,3 +63,2 @@ var result = converter.convert(jcamp); | ||
// the converter will also keep the full jcamp tree | ||
``` | ||
@@ -72,3 +68,3 @@ | ||
``` | ||
```console | ||
npm install | ||
@@ -81,3 +77,3 @@ npm test | ||
``` | ||
```console | ||
npm run benchmark | ||
@@ -90,11 +86,9 @@ ``` | ||
[npm-image]: https://img.shields.io/npm/v/jcampconverter.svg?style=flat-square | ||
[npm-url]: https://www.npmjs.com/package/jcampconverter | ||
[travis-image]: https://img.shields.io/travis/cheminfo-js/jcampconverter/master.svg?style=flat-square | ||
[travis-url]: https://travis-ci.org/cheminfo-js/jcampconverter | ||
[codecov-image]: https://img.shields.io/codecov/c/github/cheminfo-js/jcampconverter.svg?style=flat-square | ||
[codecov-url]: https://codecov.io/gh/cheminfo-js/jcampconverter | ||
[david-image]: https://img.shields.io/david/cheminfo-js/jcampconverter.svg?style=flat-square | ||
[david-url]: https://david-dm.org/cheminfo-js/jcampconverter | ||
[download-image]: https://img.shields.io/npm/dm/jcampconverter.svg?style=flat-square | ||
[download-url]: https://www.npmjs.com/package/jcampconverter | ||
[npm-image]: https://img.shields.io/npm/v/jcampconverter.svg | ||
[npm-url]: https://npmjs.org/package/jcampconverter | ||
[codecov-image]: https://img.shields.io/codecov/c/github/mljs/jcampconverter.svg | ||
[codecov-url]: https://codecov.io/gh/mljs/jcampconverter | ||
[ci-image]: https://github.com/mljs/jcampconverter/workflows/Node.js%20CI/badge.svg?branch=master | ||
[ci-url]: https://github.com/mljs/jcampconverter/actions?query=workflow%3A%22Node.js+CI%22 | ||
[download-image]: https://img.shields.io/npm/dm/jcampconverter.svg | ||
[download-url]: https://npmjs.org/package/jcampconverter |
@@ -35,2 +35,12 @@ import getMedian from 'ml-array-median'; | ||
const medians = []; | ||
for (let i = 0; i < z.length; i++) { | ||
const row = Float64Array.from(z[i]); | ||
for (let i = 0; i < row.length; i++) { | ||
if (row[i] < 0) row[i] = -row[i]; | ||
} | ||
medians.push(getMedian(row)); | ||
} | ||
const median = getMedian(medians); | ||
return { | ||
@@ -44,4 +54,4 @@ z: z, | ||
maxZ: maxZ, | ||
noise: getMedian(z[0].map(Math.abs)), | ||
noise: median, | ||
}; | ||
} |
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
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
92131
2201
90
+ Addedasynckit@0.4.0(transitive)
+ Addedatom-sorter@1.2.0(transitive)
+ Addedbinary-search@1.3.6(transitive)
+ Addedcheminfo-types@1.8.1(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcross-fetch@3.2.0(transitive)
+ Addedd3-random@2.2.2(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedduplexify@4.1.3(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedensure-string@1.2.0(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedheap@0.2.7(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisutf8@4.0.1(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedml-distance-euclidean@2.0.0(transitive)
+ Addedml-distance-matrix@2.0.1(transitive)
+ Addedml-floyd-warshall@1.0.4(transitive)
+ Addedml-hash-table@1.0.0(transitive)
+ Addedml-hclust@3.1.0(transitive)
+ Addedml-matrix-convolution@1.0.0(transitive)
+ Addedml-matrix-peaks-finder@1.0.0(transitive)
+ Addedml-sparse-matrix@2.1.0(transitive)
+ Addedml-xsadd@2.0.0(transitive)
+ Addednmr-processing@1.5.2(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addednum-sort@2.1.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedopenchemlib@8.17.0(transitive)
+ Addedopenchemlib-utils@1.11.0(transitive)
+ Addedpapaparse@5.4.1(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedpumpify@2.0.1(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsdf-parser@5.0.2(transitive)
+ Addedspectrum-generator@4.8.1(transitive)
+ Addedsplit2@4.2.0(transitive)
+ Addedstream-shift@1.0.3(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedthrough2@4.0.2(transitive)
+ Addedthrough2-filter@3.1.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removed@types/estree@1.0.6(transitive)
- Removed@types/node@22.10.2(transitive)
- Removedacorn@7.4.1(transitive)
- Removedis-any-array@0.1.0(transitive)
- Removedml-matrix-convolution@0.5.2(transitive)
- Removedml-matrix-peaks-finder@0.4.0(transitive)
- Removedml-peak-shape-generator@0.14.0(transitive)
- Removedml-spectra-processing@4.12.0(transitive)
- Removedml-stat@1.3.3(transitive)
- Removednmr-processing@0.9.0(transitive)
- Removedrollup@1.32.1(transitive)
- Removedundici-types@6.20.0(transitive)
Updatedml-array-median@^1.1.5
Updatednmr-processing@^1.0.0