Gathering detailed insights and metrics for ml-gsd
Gathering detailed insights and metrics for ml-gsd
Gathering detailed insights and metrics for ml-gsd
Gathering detailed insights and metrics for ml-gsd
npm install ml-gsd
Typescript
Module System
Node Version
NPM Version
TypeScript (99.66%)
JavaScript (0.34%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
11 Stars
310 Commits
8 Forks
11 Watchers
26 Branches
16 Contributors
Updated on Jun 13, 2025
Latest Version
12.1.8
Package Id
ml-gsd@12.1.8
Unpacked Size
155.53 kB
Size
27.59 kB
File Count
147
NPM Version
10.8.2
Node Version
20.17.0
Published on
Sep 27, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
6
gsd
is using an algorithm that is searching for inflection points to determine the position and width of peaks. The width is defined as the distance between the 2 inflection points. Depending the shape of the peak this width may differ from 'fwhm' (Full Width Half Maximum).
Preprocessing of the data involves the following parameters
maxCriteria
: search either for maxima or minima. We will invert the data and the results if searching for a minimanoiseLevel
: specifies the noise level. All the peaks bellow this value (or above in case of maxCriteria=false) are ignored. By default the noiseLevel will be set to the median + 3 x sd. This is a good value when not too many peaks are present in the spectrum.sgOptions
: Savitzky-Golay filter that is used to smooth the data for the calculation of the derivativessmoothY
: If this value is true the SG filter is not only applied during the calculation of the derivatives but also on the original dataThe result of GSD is an array of GSDPeak:
Threshold to determine if a given peak should be considered as a noise, bases on its relative height compared to the highest peak.
Peaks are local maximum(true) or minimum(false)
Select the peak intensities from a smoothed version of the independent variables?
Use a quadratic optimizations with the peak and its 3 closest neighbors to determine the true x,y values of the peak?
Savitzky-Golay parameters. windowSize should be odd; polynomial is the degree of the polynomial to use in the approximations. It should be bigger than 2.
We enlarge the peaks and add the properties from and to. By default we enlarge of a factor 2 and we don't allow overlap.
Optimize the position (x), max intensity (y), full width at half maximum (fwhm) and the ratio of gaussian contribution (mu) if it's required. It currently supports three kind of shapes: gaussian, lorentzian and pseudovoigt
1import { IsotopicDistribution } from 'mf-global'; 2import { gsd, optimizePeaks } from 'ml-gsd'; 3 4// generate a sample spectrum of the form {x:[], y:[]} 5const data = new IsotopicDistribution('C').getGaussian(); 6 7let peaks = gsd(data, { 8 minMaxRatio: 0.00025, // Threshold to determine if a given peak should be considered as a noise 9 realTopDetection: true, // Correction of the x and y coordinates using a quadratic optimizations 10 maxCriteria: true, // Are we looking for maxima or minima 11 smoothY: false, // should we smooth the spectra and return smoothed peaks ? Default false. 12 sgOptions: { windowSize: 7, polynomial: 3 }, // Savitzky-Golay smoothing parameters for first and second derivative calculation 13}); 14console.log(peaks); 15/* 16 array of peaks containing {x, y, width, ddY, inflectionPoints} 17 - width = distance between inflection points 18 - ddY = second derivative on the top of the peak 19 */ 20 21let optimized = optimizePeaks(data, peaks); 22console.log(optimized); 23/* 24[ 25 { 26 x: 11.99999999960885, 27 y: 0.9892695646808637, 28 shape: { kind: 'gaussian' }, 29 fwhm: 0.010000209455943584, 30 width: 0.008493395898379276 31 }, 32 { 33 x: 13.003354834590702, 34 y: 0.010699637653261198, 35 shape: { kind: 'gaussian' }, 36 fwhm: 0.010000226962299321, 37 width: 0.008493410766908847 38 } 39] 40*/
i
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
4 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 4
Reason
Found 11/30 approved changesets -- score normalized to 3
Reason
branch protection is not maximal on development and all release branches
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More