Skip to content

Commit e396489

Browse files
committed
chore: update README
1 parent 84902a6 commit e396489

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
Global Spectra Deconvolution + Peak optimizer
99

10-
`gsd`is using an algorithm that is searching for inflection points to determine the position of peaks and the width of the peaks are between the 2 inflection points. The result of GSD yield to an array of object containing {x, y and width}. However this width is based on the inflection point and may be different from the 'fwhm' (Full Width Half Maximum).
10+
`gsd`is using an algorithm that is searching for inflection points to determine the position of peaks and the width of the peaks are between the 2 inflection points. The result of GSD yield to an array of object containing {x, y fwhm and width}. However this width is based on the inflection point and may be different from the 'fwhm' (Full Width Half Maximum).
1111

12-
The second algorithm (`optimizePeaks`) will optimize the width as a FWHM to match the original peak. After optimization the width with therefore be always FWHM whichever is the function used.
12+
The second algorithm (`optimizePeaks`) will optimize the width and FWHM to match the original peak.
1313

1414
## [API documentation](http://mljs.github.io/global-spectral-deconvolution/)
1515

@@ -19,10 +19,6 @@ The second algorithm (`optimizePeaks`) will optimize the width as a FWHM to matc
1919

2020
Threshold to determine if a given peak should be considered as a noise, bases on its relative height compared to the highest peak.
2121

22-
#### broadRatio=0.00 (0-1)
23-
24-
If `broadRatio` is higher than 0, then all the peaks which second derivative smaller than `broadRatio * maxAbsSecondDerivative` will be marked with the soft mask equal to true.
25-
2622
#### noiseLevel=0 (-inf, inf)
2723

2824
Noise threshold in spectrum units
@@ -60,6 +56,10 @@ By default we enlarge of a factor 2 and we don't allow overlap.
6056

6157
### GSD.joinBroadPeaks
6258

59+
#### broadRatio=0.00 (0-1)
60+
61+
If `broadRatio` is higher than 0, then all the peaks which second derivative smaller than `broadRatio * maxAbsSecondDerivative` will be marked with the soft mask equal to true.
62+
6363
### GSD.optimizePeaks
6464

6565
## Example
@@ -79,11 +79,11 @@ let peaks = gsd(data, {
7979
smoothY: false,
8080
sgOptions: { windowSize: 7, polynomial: 3 },
8181
});
82-
console.log(peaks); // array of peaks {x,y,width}, width = distance between inflection points
82+
console.log(peaks); // array of peaks {x, y, width, fwhw}, width = distance between inflection points
8383
// GSD
8484

8585
let optimized = optimizePeaks(data, peaks);
86-
console.log(optimized); // array of peaks {x,y,width}, width = FWHM
86+
console.log(optimized); // array of peaks {x, y, width, fwhm}.
8787
```
8888

8989
## License

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"eslint-config-cheminfo-typescript": "^10.2.4",
6666
"eslint-plugin-jest": "^25.3.0",
6767
"esm": "^3.2.25",
68-
"jest": "^27.3.1",
68+
"jest": "^27.4.0",
6969
"jest-matcher-deep-close-to": "^3.0.2",
7070
"mf-global": "^1.4.7",
7171
"ml-stat": "^1.3.3",

0 commit comments

Comments
 (0)