spectrum-generator
Advanced tools
Comparing version 5.0.1 to 5.0.2
@@ -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
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
109994