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

spectrum-generator

Package Overview
Dependencies
Maintainers
4
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spectrum-generator - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

16

lib-esm/Spectrum2DGenerator.js

@@ -127,3 +127,3 @@ import { getShape2D } from 'ml-peak-shape-generator';

for (let yIndex = firstPoint.y; yIndex < lastPoint.y; yIndex++) {
this.data.z[xIndex][yIndex] +=
this.data.z[yIndex][xIndex] +=
intensity *

@@ -142,6 +142,6 @@ this.shape.fct(this.data.x[xIndex] - position.x, this.data.y[yIndex] - position.y);

return {
minX: this.data.x[0],
maxX: this.data.x[this.nbPoints.x - 1],
maxY: this.data.y[this.nbPoints.y - 1],
minY: this.data.y[0],
minX: this.from.x,
maxX: this.to.x,
maxY: this.to.y,
minY: this.from.y,
minZ: minMaxZ.min,

@@ -194,5 +194,5 @@ maxZ: minMaxZ.max,

function createMatrix(nbPoints) {
const zMatrix = new Array(nbPoints.x);
for (let i = 0; i < nbPoints.x; i++) {
zMatrix[i] = new Float64Array(nbPoints.y);
const zMatrix = new Array(nbPoints.y);
for (let i = 0; i < nbPoints.y; i++) {
zMatrix[i] = new Float64Array(nbPoints.x);
}

@@ -199,0 +199,0 @@ return zMatrix;

@@ -130,3 +130,3 @@ "use strict";

for (let yIndex = firstPoint.y; yIndex < lastPoint.y; yIndex++) {
this.data.z[xIndex][yIndex] +=
this.data.z[yIndex][xIndex] +=
intensity *

@@ -145,6 +145,6 @@ this.shape.fct(this.data.x[xIndex] - position.x, this.data.y[yIndex] - position.y);

return {
minX: this.data.x[0],
maxX: this.data.x[this.nbPoints.x - 1],
maxY: this.data.y[this.nbPoints.y - 1],
minY: this.data.y[0],
minX: this.from.x,
maxX: this.to.x,
maxY: this.to.y,
minY: this.from.y,
minZ: minMaxZ.min,

@@ -199,5 +199,5 @@ maxZ: minMaxZ.max,

function createMatrix(nbPoints) {
const zMatrix = new Array(nbPoints.x);
for (let i = 0; i < nbPoints.x; i++) {
zMatrix[i] = new Float64Array(nbPoints.y);
const zMatrix = new Array(nbPoints.y);
for (let i = 0; i < nbPoints.y; i++) {
zMatrix[i] = new Float64Array(nbPoints.x);
}

@@ -204,0 +204,0 @@ return zMatrix;

{
"name": "spectrum-generator",
"version": "5.0.1",
"version": "5.0.2",
"description": "generate a spectrum from discrete peaks",

@@ -65,5 +65,5 @@ "main": "./lib/index.js",

"ml-array-min": "^1.2.2",
"ml-peak-shape-generator": "^2.0.1",
"ml-peak-shape-generator": "^2.0.2",
"ml-xsadd": "^2.0.0"
}
}

@@ -224,3 +224,2 @@ import { getShape2D } from 'ml-peak-shape-generator';

const position: XYNumber = { x: xPosition, y: yPosition };
if (intensity > this.maxPeakHeight) this.maxPeakHeight = intensity;

@@ -273,3 +272,3 @@

for (let yIndex = firstPoint.y; yIndex < lastPoint.y; yIndex++) {
this.data.z[xIndex][yIndex] +=
this.data.z[yIndex][xIndex] +=
intensity *

@@ -294,6 +293,6 @@ this.shape.fct(

return {
minX: this.data.x[0],
maxX: this.data.x[this.nbPoints.x - 1],
maxY: this.data.y[this.nbPoints.y - 1],
minY: this.data.y[0],
minX: this.from.x,
maxX: this.to.x,
maxY: this.to.y,
minY: this.from.y,
minZ: minMaxZ.min,

@@ -359,7 +358,7 @@ maxZ: minMaxZ.max,

function createMatrix(nbPoints: XYNumber) {
const zMatrix = new Array(nbPoints.x);
for (let i = 0; i < nbPoints.x; i++) {
zMatrix[i] = new Float64Array(nbPoints.y);
const zMatrix = new Array(nbPoints.y);
for (let i = 0; i < nbPoints.y; i++) {
zMatrix[i] = new Float64Array(nbPoints.x);
}
return zMatrix;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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