nmr-simulation
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "nmr-simulation", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Simulate NMR spectra from spin systems", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -155,3 +155,3 @@ 'use strict'; | ||
} else { | ||
addPeak(result, valFreq / count, inte * weight, from, to, nbPoints, lorentzian); | ||
addPeak(result, valFreq / count, inte * weight, from, to, nbPoints, gaussian); | ||
valFreq = frequencies[i]; | ||
@@ -162,3 +162,3 @@ inte = intensities[i]; | ||
} | ||
addPeak(result, valFreq / count, inte * weight, from, to, nbPoints, lorentzian); | ||
addPeak(result, valFreq / count, inte * weight, from, to, nbPoints, gaussian); | ||
} | ||
@@ -170,5 +170,5 @@ } | ||
function addPeak(result, freq, height, from, to, nbPoints, lorentzian) { | ||
function addPeak(result, freq, height, from, to, nbPoints, gaussian) { | ||
const center = (nbPoints * (-freq-from) / (to - from)) | 0; | ||
const lnPoints = lorentzian.length; | ||
const lnPoints = gaussian.length; | ||
var index = 0; | ||
@@ -179,3 +179,3 @@ var indexLorentz = 0; | ||
if (i >= 0 && i < nbPoints) { | ||
result[index] = result[index] + lorentzian[indexLorentz] * height; | ||
result[index] = result[index] + gaussian[indexLorentz] * height; | ||
} | ||
@@ -182,0 +182,0 @@ indexLorentz++; |
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
14131