Comparing version 11.3.0 to 12.0.0
import { sgg } from 'ml-savitzky-golay-generalized'; | ||
import { xIsEquallySpaced, xIsMonotoneIncreasing, xMinValue, xMaxValue, xNoiseStandardDeviation, } from 'ml-spectra-processing'; | ||
import { appendShapeAndFWHM } from './utils/appendShapeAndFWHM'; | ||
import { optimizeTop } from './utils/optimizeTop'; | ||
import { setShape } from './utils/setShape'; | ||
/** | ||
@@ -189,4 +189,4 @@ * Global spectra deconvolution | ||
}); | ||
return appendShapeAndFWHM(peaks, { shape }); | ||
return setShape(peaks, { shape }); | ||
} | ||
//# sourceMappingURL=gsd.js.map |
@@ -6,3 +6,4 @@ export * from './gsd'; | ||
export * from './post/broadenPeaks'; | ||
export * from './utils/appendShapeAndFWHM'; | ||
export * from './utils/setShape'; | ||
export * from './utils/addMissingShape'; | ||
export * from './GSDBroadenPeak'; | ||
@@ -9,0 +10,0 @@ export * from './GSDPeak'; |
@@ -6,3 +6,4 @@ export * from './gsd'; | ||
export * from './post/broadenPeaks'; | ||
export * from './utils/appendShapeAndFWHM'; | ||
export * from './utils/setShape'; | ||
export * from './utils/addMissingShape'; | ||
export * from './GSDBroadenPeak'; | ||
@@ -9,0 +10,0 @@ export * from './GSDPeak'; |
@@ -27,3 +27,6 @@ import type { Shape1D } from 'ml-peak-shape-generator'; | ||
*/ | ||
export declare function joinBroadPeaks(peakList: GSDPeak[], options?: JoinBroadPeaksOptions): GSDPeak[]; | ||
export interface GSDPeakWithOptionalShape extends Omit<GSDPeak, 'shape'> { | ||
shape?: Shape1D; | ||
} | ||
export declare function joinBroadPeaks(peakList: GSDPeakWithOptionalShape[], options?: JoinBroadPeaksOptions): GSDPeak[]; | ||
//# sourceMappingURL=joinBroadPeaks.d.ts.map |
@@ -1,6 +0,3 @@ | ||
import { appendShapeAndFWHM } from '../utils/appendShapeAndFWHM'; | ||
import { addMissingShape } from '../utils/addMissingShape'; | ||
import { optimizePeaks } from './optimizePeaks'; | ||
/** | ||
* This function tries to join the peaks that seems to belong to a broad signal in a single broad peak. | ||
*/ | ||
export function joinBroadPeaks(peakList, options = {}) { | ||
@@ -12,3 +9,3 @@ let { shape = { kind: 'gaussian' }, optimization = { kind: 'lm', options: { timeout: 10 } }, broadWidth = 0.25, broadRatio = 0.0025, } = options; | ||
const broadLines = []; | ||
const peaks = appendShapeAndFWHM(peakList, { shape }); | ||
const peaks = addMissingShape(peakList, { shape }); | ||
if (peaks.length < 2) | ||
@@ -15,0 +12,0 @@ return peaks; |
import { getShape1D } from 'ml-peak-shape-generator'; | ||
import { optimize } from 'ml-spectra-fitting'; | ||
import { xGetFromToIndex } from 'ml-spectra-processing'; | ||
import { appendShapeAndFWHM } from '../utils/appendShapeAndFWHM'; | ||
import { addMissingShape } from '../utils/addMissingShape'; | ||
import { groupPeaks } from '../utils/groupPeaks'; | ||
@@ -30,3 +30,3 @@ /** | ||
// In order to make optimization we will add fwhm and shape on all the peaks | ||
const peaks = appendShapeAndFWHM(peakGroup, { shape }); | ||
const peaks = addMissingShape(peakGroup, { shape }); | ||
const firstPeak = peaks[0]; | ||
@@ -33,0 +33,0 @@ const lastPeak = peaks[peaks.length - 1]; |
@@ -6,4 +6,4 @@ "use strict"; | ||
const ml_spectra_processing_1 = require("ml-spectra-processing"); | ||
const appendShapeAndFWHM_1 = require("./utils/appendShapeAndFWHM"); | ||
const optimizeTop_1 = require("./utils/optimizeTop"); | ||
const setShape_1 = require("./utils/setShape"); | ||
/** | ||
@@ -193,5 +193,5 @@ * Global spectra deconvolution | ||
}); | ||
return (0, appendShapeAndFWHM_1.appendShapeAndFWHM)(peaks, { shape }); | ||
return (0, setShape_1.setShape)(peaks, { shape }); | ||
} | ||
exports.gsd = gsd; | ||
//# sourceMappingURL=gsd.js.map |
@@ -6,3 +6,4 @@ export * from './gsd'; | ||
export * from './post/broadenPeaks'; | ||
export * from './utils/appendShapeAndFWHM'; | ||
export * from './utils/setShape'; | ||
export * from './utils/addMissingShape'; | ||
export * from './GSDBroadenPeak'; | ||
@@ -9,0 +10,0 @@ export * from './GSDPeak'; |
@@ -22,3 +22,4 @@ "use strict"; | ||
__exportStar(require("./post/broadenPeaks"), exports); | ||
__exportStar(require("./utils/appendShapeAndFWHM"), exports); | ||
__exportStar(require("./utils/setShape"), exports); | ||
__exportStar(require("./utils/addMissingShape"), exports); | ||
__exportStar(require("./GSDBroadenPeak"), exports); | ||
@@ -25,0 +26,0 @@ __exportStar(require("./GSDPeak"), exports); |
@@ -27,3 +27,6 @@ import type { Shape1D } from 'ml-peak-shape-generator'; | ||
*/ | ||
export declare function joinBroadPeaks(peakList: GSDPeak[], options?: JoinBroadPeaksOptions): GSDPeak[]; | ||
export interface GSDPeakWithOptionalShape extends Omit<GSDPeak, 'shape'> { | ||
shape?: Shape1D; | ||
} | ||
export declare function joinBroadPeaks(peakList: GSDPeakWithOptionalShape[], options?: JoinBroadPeaksOptions): GSDPeak[]; | ||
//# sourceMappingURL=joinBroadPeaks.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.joinBroadPeaks = void 0; | ||
const appendShapeAndFWHM_1 = require("../utils/appendShapeAndFWHM"); | ||
const addMissingShape_1 = require("../utils/addMissingShape"); | ||
const optimizePeaks_1 = require("./optimizePeaks"); | ||
/** | ||
* This function tries to join the peaks that seems to belong to a broad signal in a single broad peak. | ||
*/ | ||
function joinBroadPeaks(peakList, options = {}) { | ||
@@ -15,3 +12,3 @@ let { shape = { kind: 'gaussian' }, optimization = { kind: 'lm', options: { timeout: 10 } }, broadWidth = 0.25, broadRatio = 0.0025, } = options; | ||
const broadLines = []; | ||
const peaks = (0, appendShapeAndFWHM_1.appendShapeAndFWHM)(peakList, { shape }); | ||
const peaks = (0, addMissingShape_1.addMissingShape)(peakList, { shape }); | ||
if (peaks.length < 2) | ||
@@ -18,0 +15,0 @@ return peaks; |
@@ -7,3 +7,3 @@ "use strict"; | ||
const ml_spectra_processing_1 = require("ml-spectra-processing"); | ||
const appendShapeAndFWHM_1 = require("../utils/appendShapeAndFWHM"); | ||
const addMissingShape_1 = require("../utils/addMissingShape"); | ||
const groupPeaks_1 = require("../utils/groupPeaks"); | ||
@@ -34,3 +34,3 @@ /** | ||
// In order to make optimization we will add fwhm and shape on all the peaks | ||
const peaks = (0, appendShapeAndFWHM_1.appendShapeAndFWHM)(peakGroup, { shape }); | ||
const peaks = (0, addMissingShape_1.addMissingShape)(peakGroup, { shape }); | ||
const firstPeak = peaks[0]; | ||
@@ -37,0 +37,0 @@ const lastPeak = peaks[peaks.length - 1]; |
{ | ||
"name": "ml-gsd", | ||
"version": "11.3.0", | ||
"version": "12.0.0", | ||
"description": "Global Spectra Deconvolution", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -13,4 +13,4 @@ import type { DataXY } from 'cheminfo-types'; | ||
import { GSDPeak } from './GSDPeak'; | ||
import { appendShapeAndFWHM } from './utils/appendShapeAndFWHM'; | ||
import { optimizeTop } from './utils/optimizeTop'; | ||
import { setShape } from './utils/setShape'; | ||
@@ -278,3 +278,3 @@ export interface GSDOptions { | ||
return appendShapeAndFWHM(peaks, { shape }); | ||
return setShape(peaks, { shape }); | ||
} |
@@ -6,5 +6,6 @@ export * from './gsd'; | ||
export * from './post/broadenPeaks'; | ||
export * from './utils/appendShapeAndFWHM'; | ||
export * from './utils/setShape'; | ||
export * from './utils/addMissingShape'; | ||
export * from './GSDBroadenPeak'; | ||
export * from './GSDPeak'; | ||
export * from './GSDPeakOptimized'; |
@@ -6,3 +6,3 @@ import type { Shape1D } from 'ml-peak-shape-generator'; | ||
import { GSDPeakOptimized } from '../GSDPeakOptimized'; | ||
import { appendShapeAndFWHM } from '../utils/appendShapeAndFWHM'; | ||
import { addMissingShape } from '../utils/addMissingShape'; | ||
@@ -36,4 +36,7 @@ import { optimizePeaks } from './optimizePeaks'; | ||
export interface GSDPeakWithOptionalShape extends Omit<GSDPeak, 'shape'> { | ||
shape?: Shape1D; | ||
} | ||
export function joinBroadPeaks( | ||
peakList: GSDPeak[], | ||
peakList: GSDPeakWithOptionalShape[], | ||
options: JoinBroadPeaksOptions = {}, | ||
@@ -52,3 +55,3 @@ ): GSDPeak[] { | ||
const broadLines: GSDPeakOptimized[] = []; | ||
const peaks = appendShapeAndFWHM(peakList, { shape }); | ||
const peaks = addMissingShape(peakList, { shape }); | ||
@@ -55,0 +58,0 @@ if (peaks.length < 2) return peaks; |
@@ -7,3 +7,3 @@ import type { DataXY, PeakXYWidth } from 'cheminfo-types'; | ||
import { GSDPeakOptimized } from '../GSDPeakOptimized'; | ||
import { appendShapeAndFWHM } from '../utils/appendShapeAndFWHM'; | ||
import { addMissingShape } from '../utils/addMissingShape'; | ||
import { groupPeaks } from '../utils/groupPeaks'; | ||
@@ -49,3 +49,3 @@ | ||
// In order to make optimization we will add fwhm and shape on all the peaks | ||
const peaks = appendShapeAndFWHM(peakGroup, { shape }); | ||
const peaks = addMissingShape(peakGroup, { shape }); | ||
@@ -52,0 +52,0 @@ const firstPeak = peaks[0]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2632471
149
10440