You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@
7
7
8
8
Global Spectra Deconvolution + Peak optimizer
9
9
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).
11
11
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.
@@ -19,10 +19,6 @@ The second algorithm (`optimizePeaks`) will optimize the width as a FWHM to matc
19
19
20
20
Threshold to determine if a given peak should be considered as a noise, bases on its relative height compared to the highest peak.
21
21
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
-
26
22
#### noiseLevel=0 (-inf, inf)
27
23
28
24
Noise threshold in spectrum units
@@ -60,6 +56,10 @@ By default we enlarge of a factor 2 and we don't allow overlap.
60
56
61
57
### GSD.joinBroadPeaks
62
58
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
+
63
63
### GSD.optimizePeaks
64
64
65
65
## Example
@@ -79,11 +79,11 @@ let peaks = gsd(data, {
79
79
smoothY:false,
80
80
sgOptions: { windowSize:7, polynomial:3 },
81
81
});
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
83
83
// GSD
84
84
85
85
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}.
0 commit comments