ml-peak-shape-generator
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -0,1 +1,10 @@ | ||
# [0.2.0](https://github.com/cheminfo/ml-peak-shape-generator/compare/v0.1.0...v0.2.0) (2020-03-02) | ||
### Bug Fixes | ||
* final nbPoints is always fwhm * factor ([c72259b](https://github.com/cheminfo/ml-peak-shape-generator/commit/c72259be2e808754dfe8802062bcf4995bdf2313)) | ||
# [0.1.0](https://github.com/cheminfo/ml-peak-shape-generator/compare/v0.0.1...v0.1.0) (2020-03-02) | ||
@@ -2,0 +11,0 @@ |
@@ -10,3 +10,3 @@ 'use strict'; | ||
* @param {number} [options.sd] - Standard deviation, if it's defined fwhm parameter will be ignored. | ||
* @param {number} [options.factor = 3] - factor of standard deviation to increase the window size, the vector size is 2 * factor * sd | ||
* @param {number} [options.factor = 3] - factor to increase window size: nbPoints = fwhm * factor | ||
* @return {Float64Array} - array of Y points | ||
@@ -23,4 +23,7 @@ */ | ||
} | ||
const lenGaussian = 2 * parseInt(sd, 10) * factor + (fwhm % 2); | ||
const halfWidth = fwhm / 2; | ||
const lenGaussian = 2 * parseInt(halfWidth, 10) * factor + (fwhm % 2); | ||
const center = (lenGaussian - 1) / 2; | ||
const vector = new Float64Array(lenGaussian); | ||
@@ -44,3 +47,3 @@ const normalConstant = 1 / Math.sqrt(2 * Math.PI) / sd; | ||
* @param {number} [options.fwhm = 500] - number of points in Full Width at Half Maximum. | ||
* @param {number} [options.factor = 3] - factor of HWHM to increase the window size, the vector size is 2 * factor * HMHM | ||
* @param {number} [options.factor = 3] - factor to increase window size: nbPoints = fwhm * factor | ||
* @return {Float64Array} - array of Y points. | ||
@@ -74,3 +77,3 @@ */ | ||
* @param {number} [options.mu = 0.5] - fraction of lorentzian contribution. | ||
* @param {number} [options.factor] - factor of HWHM to increase the window size, the vector size is 2 * factor * HMHM | ||
* @param {number} [options.factor] - factor to increase window size: nbPoints = fwhm * factor | ||
* @return {number} | ||
@@ -77,0 +80,0 @@ */ |
{ | ||
"name": "ml-peak-shape-generator", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -6,3 +6,3 @@ /** | ||
* @param {number} [options.sd] - Standard deviation, if it's defined fwhm parameter will be ignored. | ||
* @param {number} [options.factor = 3] - factor of standard deviation to increase the window size, the vector size is 2 * factor * sd | ||
* @param {number} [options.factor = 3] - factor to increase window size: nbPoints = fwhm * factor | ||
* @return {Float64Array} - array of Y points | ||
@@ -19,4 +19,7 @@ */ | ||
} | ||
const lenGaussian = 2 * parseInt(sd, 10) * factor + (fwhm % 2); | ||
const halfWidth = fwhm / 2; | ||
const lenGaussian = 2 * parseInt(halfWidth, 10) * factor + (fwhm % 2); | ||
const center = (lenGaussian - 1) / 2; | ||
const vector = new Float64Array(lenGaussian); | ||
@@ -23,0 +26,0 @@ const normalConstant = 1 / Math.sqrt(2 * Math.PI) / sd; |
@@ -5,3 +5,3 @@ /** | ||
* @param {number} [options.fwhm = 500] - number of points in Full Width at Half Maximum. | ||
* @param {number} [options.factor = 3] - factor of HWHM to increase the window size, the vector size is 2 * factor * HMHM | ||
* @param {number} [options.factor = 3] - factor to increase window size: nbPoints = fwhm * factor | ||
* @return {Float64Array} - array of Y points. | ||
@@ -8,0 +8,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @param {number} [options.mu = 0.5] - fraction of lorentzian contribution. | ||
* @param {number} [options.factor] - factor of HWHM to increase the window size, the vector size is 2 * factor * HMHM | ||
* @param {number} [options.factor] - factor to increase window size: nbPoints = fwhm * factor | ||
* @return {number} | ||
@@ -9,0 +9,0 @@ */ |
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
13948
236