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

jcampconverter

Package Overview
Dependencies
Maintainers
4
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jcampconverter - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0

2

package.json
{
"name": "jcampconverter",
"version": "2.6.0",
"version": "2.7.0",
"description": "Parse and convert JCAMP data",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -436,5 +436,13 @@ 'use strict';

function getMedian(data) {
data = data.sort(compareNumbers);
var l = data.length;
return data[Math.floor(l / 2)];
}
function compareNumbers(a, b) {
return a - b;
}
function convertTo3DZ(spectra) {
var noise = 0;
var minZ = spectra[0].data[0][0];

@@ -453,5 +461,2 @@ var maxZ = minZ;

if (value > maxZ) maxZ = value;
if (i !== 0 && j !== 0) {
noise += Math.abs(value - z[i][j - 1]) + Math.abs(value - z[i - 1][j]);
}
}

@@ -467,3 +472,3 @@ }

maxZ: maxZ,
noise: noise / ((ySize - 1) * (xSize - 1) * 2)
noise: getMedian(z[0].map(Math.abs))
};

@@ -470,0 +475,0 @@

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