nmr-simulation
Advanced tools
Comparing version
{ | ||
"name": "nmr-simulation", | ||
"version": "1.0.7", | ||
"version": "1.0.9", | ||
"description": "Simulate NMR spectra from spin systems", | ||
@@ -33,8 +33,7 @@ "main": "src/index.js", | ||
"ml-sparse-matrix": "^0.2.1", | ||
"new-array": "^1.0.0", | ||
"num-sort": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"nmr-predictor": "^1.1.0" | ||
"nmr-predictor": "^1.1.2" | ||
} | ||
} |
@@ -7,3 +7,2 @@ 'use strict'; | ||
const sortAsc = require('num-sort').asc; | ||
const newArray = require('new-array'); | ||
@@ -16,9 +15,13 @@ const getPauli = require('./pauli'); | ||
var i, j; | ||
const frequencyMHz = (options.frequency || 400); | ||
const from = (options.from || 0) * frequencyMHz; | ||
const { | ||
lineWidth = 1, | ||
nbPoints = 1024, | ||
maxClusterSize = 10, | ||
output = 'y', | ||
frequency: frequencyMHz = 400, | ||
noiseFactor = 1 | ||
} = options; | ||
const from = options.from * frequencyMHz || 0; | ||
const to = (options.to || 10) * frequencyMHz; | ||
const lineWidth = options.lineWidth || 1; | ||
const nbPoints = options.nbPoints || 1024; | ||
const maxClusterSize = options.maxClusterSize || 10; | ||
const output = options.output || 'y'; | ||
@@ -41,3 +44,3 @@ const chemicalShifts = spinSystem.chemicalShifts.slice(); | ||
const result = new newArray(nbPoints, 0); | ||
var result = options.withNoise ? [...new Array(nbPoints)].map(() => Math.random() * noiseFactor) : new Array(nbPoints).fill(0); | ||
@@ -44,0 +47,0 @@ const multiplicity = spinSystem.multiplicity; |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
6
-14.29%633
0.32%0
-100%27061
-0.13%- Removed