Skip to content

Commit a57a02c

Browse files
committed
Merge pull request #2 from mljs/gsd+opt
Gsd+opt
2 parents 101921f + 227b08c commit a57a02c

File tree

16 files changed

+5354
-453
lines changed

16 files changed

+5354
-453
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
11
# global-spectral-deconvolution
2+
3+
Global Spectra Deconvolution + Peak optimizer
4+
5+
## Example
6+
```
7+
var CC = require('chemcalc');
8+
var Stat = require('ml-stat');
9+
var peakPicking = require("../src/index");
10+
11+
12+
var spectrum=CC.analyseMF("Cl2.Br2", {isotopomers:'arrayXXYY', fwhm:0.01, gaussianWidth: 11});
13+
var xy=spectrum.arrayXXYY;
14+
var x=xy[0];
15+
var y=xy[1];
16+
//Just a fake noiseLevel
17+
var noiseLevel=Stat.array.median(y.filter(function(a) {return (a>0)}))*3;
18+
19+
var result=peakPicking.gsd(x, y, {noiseLevel: noiseLevel, minMaxRatio:0, broadRatio:0,smoothY:false});
20+
result = peakPicking.optimize(result,x,y,1,"gaussian");`
21+
```

bower.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "ml-gsd",
3+
"version": "0.1.0",
4+
"description": "Global Spectra Deconvolution",
5+
"keywords": [
6+
"optimization",
7+
"curve-fitting",
8+
"gsd"
9+
],
10+
"main": [
11+
"dist/global-spectra-deconvolution.js",
12+
"dist/global-spectra-deconvolution.min.js"
13+
],
14+
"authors": [
15+
"Andres Castillo"
16+
],
17+
"homepage": "https://github.com/mljs/global-spectra-deconvolution",
18+
"license": "MIT",
19+
"moduleType": [
20+
"amd",
21+
"globals",
22+
"node"
23+
],
24+
"ignore": [
25+
"/*",
26+
"!dist/*"
27+
]
28+
}

0 commit comments

Comments
 (0)