Comparing version 12.1.0 to 12.1.1-pre.1663815504
import type { DataXY } from 'cheminfo-types'; | ||
import { Shape1D } from 'ml-peak-shape-generator'; | ||
import { SGGOptions } from 'ml-savitzky-golay-generalized'; | ||
import { GSDPeak } from './GSDPeak'; | ||
import { MakeMandatory } from './utils/MakeMandatory'; | ||
import { MakeOptional } from './utils/MakeOptional'; | ||
export interface GSDOptions { | ||
@@ -40,10 +38,4 @@ /** | ||
realTopDetection?: boolean; | ||
/** | ||
* Shape used to add FWHM property in the peaks | ||
* @default {kind:'gaussian'} | ||
*/ | ||
shape?: Shape1D; | ||
} | ||
export declare type GSDPeakID = MakeMandatory<GSDPeak, 'id'>; | ||
export declare type GSDPeakIDOptionalShape = MakeOptional<GSDPeak, 'shape'>; | ||
/** | ||
@@ -50,0 +42,0 @@ * Global spectra deconvolution |
@@ -5,3 +5,2 @@ import { v4 as generateID } from '@lukeed/uuid'; | ||
import { optimizeTop } from './utils/optimizeTop'; | ||
import { setShape } from './utils/setShape'; | ||
/** | ||
@@ -18,3 +17,3 @@ * Global spectra deconvolution | ||
polynomial: 3, | ||
}, shape, noiseLevel, smoothY = false, maxCriteria = true, minMaxRatio = 0.00025, realTopDetection = false, } = options; | ||
}, noiseLevel, smoothY = false, maxCriteria = true, minMaxRatio = 0.00025, realTopDetection = false, } = options; | ||
let { x, y } = data; | ||
@@ -193,4 +192,4 @@ if (!xIsMonotoneIncreasing(x)) { | ||
}); | ||
return setShape(peaks, { shape }); | ||
return peaks; | ||
} | ||
//# sourceMappingURL=gsd.js.map |
@@ -1,2 +0,1 @@ | ||
import { Shape1D } from 'ml-peak-shape-generator'; | ||
export interface GSDPeak { | ||
@@ -19,3 +18,2 @@ id?: string; | ||
ddY: number; | ||
shape: Shape1D; | ||
inflectionPoints: { | ||
@@ -22,0 +20,0 @@ from: { |
import { Shape1D } from 'ml-peak-shape-generator'; | ||
import { GSDBroadenPeak } from '../GSDBroadenPeak'; | ||
import { GSDPeak } from '../GSDPeak'; | ||
import { MakeOptional } from '../utils/MakeOptional'; | ||
declare type GSDPeakOptionalShape = MakeOptional<GSDPeak, 'shape'>; | ||
declare type GSDPeakOptionalShape = GSDPeak & { | ||
shape?: Shape1D; | ||
}; | ||
declare type GSDBroadenPeakWithID = GSDBroadenPeak & { | ||
@@ -7,0 +8,0 @@ id: string; |
import type { Shape1D } from 'ml-peak-shape-generator'; | ||
import { OptimizationOptions } from 'ml-spectra-fitting'; | ||
import { GSDPeak } from '../GSDPeak'; | ||
import { MakeOptional } from '../utils/MakeOptional'; | ||
import { GSDPeakOptimizedID } from './optimizePeaksWithLogs'; | ||
@@ -29,4 +28,6 @@ export interface JoinBroadPeaksOptions { | ||
*/ | ||
export declare type GSDPeakOptionalShape = MakeOptional<GSDPeak, 'shape'>; | ||
export declare type GSDPeakOptionalShape = GSDPeak & { | ||
shape?: Shape1D; | ||
}; | ||
export declare function joinBroadPeaks<T extends GSDPeakOptionalShape>(peakList: T[], options?: JoinBroadPeaksOptions): GSDPeakOptimizedID[]; | ||
//# sourceMappingURL=joinBroadPeaks.d.ts.map |
import type { DataXY } from 'cheminfo-types'; | ||
import { Shape1D } from 'ml-peak-shape-generator'; | ||
import { SGGOptions } from 'ml-savitzky-golay-generalized'; | ||
import { GSDPeak } from './GSDPeak'; | ||
import { MakeMandatory } from './utils/MakeMandatory'; | ||
import { MakeOptional } from './utils/MakeOptional'; | ||
export interface GSDOptions { | ||
@@ -40,10 +38,4 @@ /** | ||
realTopDetection?: boolean; | ||
/** | ||
* Shape used to add FWHM property in the peaks | ||
* @default {kind:'gaussian'} | ||
*/ | ||
shape?: Shape1D; | ||
} | ||
export declare type GSDPeakID = MakeMandatory<GSDPeak, 'id'>; | ||
export declare type GSDPeakIDOptionalShape = MakeOptional<GSDPeak, 'shape'>; | ||
/** | ||
@@ -50,0 +42,0 @@ * Global spectra deconvolution |
@@ -8,3 +8,2 @@ "use strict"; | ||
const optimizeTop_1 = require("./utils/optimizeTop"); | ||
const setShape_1 = require("./utils/setShape"); | ||
/** | ||
@@ -21,3 +20,3 @@ * Global spectra deconvolution | ||
polynomial: 3, | ||
}, shape, noiseLevel, smoothY = false, maxCriteria = true, minMaxRatio = 0.00025, realTopDetection = false, } = options; | ||
}, noiseLevel, smoothY = false, maxCriteria = true, minMaxRatio = 0.00025, realTopDetection = false, } = options; | ||
let { x, y } = data; | ||
@@ -196,5 +195,5 @@ if (!(0, ml_spectra_processing_1.xIsMonotoneIncreasing)(x)) { | ||
}); | ||
return (0, setShape_1.setShape)(peaks, { shape }); | ||
return peaks; | ||
} | ||
exports.gsd = gsd; | ||
//# sourceMappingURL=gsd.js.map |
@@ -1,2 +0,1 @@ | ||
import { Shape1D } from 'ml-peak-shape-generator'; | ||
export interface GSDPeak { | ||
@@ -19,3 +18,2 @@ id?: string; | ||
ddY: number; | ||
shape: Shape1D; | ||
inflectionPoints: { | ||
@@ -22,0 +20,0 @@ from: { |
import { Shape1D } from 'ml-peak-shape-generator'; | ||
import { GSDBroadenPeak } from '../GSDBroadenPeak'; | ||
import { GSDPeak } from '../GSDPeak'; | ||
import { MakeOptional } from '../utils/MakeOptional'; | ||
declare type GSDPeakOptionalShape = MakeOptional<GSDPeak, 'shape'>; | ||
declare type GSDPeakOptionalShape = GSDPeak & { | ||
shape?: Shape1D; | ||
}; | ||
declare type GSDBroadenPeakWithID = GSDBroadenPeak & { | ||
@@ -7,0 +8,0 @@ id: string; |
import type { Shape1D } from 'ml-peak-shape-generator'; | ||
import { OptimizationOptions } from 'ml-spectra-fitting'; | ||
import { GSDPeak } from '../GSDPeak'; | ||
import { MakeOptional } from '../utils/MakeOptional'; | ||
import { GSDPeakOptimizedID } from './optimizePeaksWithLogs'; | ||
@@ -29,4 +28,6 @@ export interface JoinBroadPeaksOptions { | ||
*/ | ||
export declare type GSDPeakOptionalShape = MakeOptional<GSDPeak, 'shape'>; | ||
export declare type GSDPeakOptionalShape = GSDPeak & { | ||
shape?: Shape1D; | ||
}; | ||
export declare function joinBroadPeaks<T extends GSDPeakOptionalShape>(peakList: T[], options?: JoinBroadPeaksOptions): GSDPeakOptimizedID[]; | ||
//# sourceMappingURL=joinBroadPeaks.d.ts.map |
{ | ||
"name": "ml-gsd", | ||
"version": "12.1.0", | ||
"version": "12.1.1-pre.1663815504", | ||
"description": "Global Spectra Deconvolution", | ||
@@ -13,5 +13,2 @@ "main": "./lib/index.js", | ||
], | ||
"env": { | ||
"jest": true | ||
}, | ||
"scripts": { | ||
@@ -47,3 +44,3 @@ "build": "npm run tsc-esm && cheminfo-build --entry lib-esm/index.js --root GSD", | ||
"Miguel Asencio <maasencioh@gmail.com> (https://github.com/maasencioh)", | ||
"Alejandro Bolaños <jose.bolanos@correounivalle.edu.co> (https://github.com/jobo322)" | ||
"J. Alejandro Bolaños A. <jose.bolanos@correounivalle.edu.co> (https://github.com/jobo322)" | ||
], | ||
@@ -50,0 +47,0 @@ "license": "MIT", |
@@ -52,3 +52,2 @@ import type { DataXY } from 'cheminfo-types'; | ||
width: 0.1, | ||
shape: { kind: 'gaussian', fwhm: 0.11774128880591818 }, | ||
}, | ||
@@ -59,3 +58,2 @@ { | ||
width: 0.1, | ||
shape: { kind: 'gaussian', fwhm: 0.11774128880591818 }, | ||
}, | ||
@@ -62,0 +60,0 @@ ]); |
@@ -42,6 +42,2 @@ import type { DataXY } from 'cheminfo-types'; | ||
index: 25, | ||
shape: { | ||
fwhm: 0.09419280180123805, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -59,6 +55,2 @@ from: { x: -0.54, index: 23 }, | ||
index: 75, | ||
shape: { | ||
fwhm: 0.09419280180123805, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -65,0 +57,0 @@ from: { x: 0.46, index: 73 }, |
@@ -41,6 +41,2 @@ import type { DataXY } from 'cheminfo-types'; | ||
index: 25, | ||
shape: { | ||
fwhm: 0.09419280180123805, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -57,6 +53,2 @@ from: { index: 23, x: -0.54 }, | ||
index: 75, | ||
shape: { | ||
fwhm: 0.09419280180123805, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -81,6 +73,2 @@ from: { index: 73, x: 0.46 }, | ||
index: 25, | ||
shape: { | ||
fwhm: 0.09419280180123805, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -97,6 +85,2 @@ from: { index: 23, x: -0.54 }, | ||
index: 75, | ||
shape: { | ||
fwhm: 0.09419280180123805, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -124,6 +108,2 @@ from: { index: 73, x: 0.46 }, | ||
index: 25, | ||
shape: { | ||
fwhm: 0.09419280180123805, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -140,6 +120,2 @@ from: { index: 23, x: -0.54 }, | ||
index: 75, | ||
shape: { | ||
fwhm: 0.09419280180123805, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -168,6 +144,2 @@ from: { index: 73, x: 0.46 }, | ||
index: 25, | ||
shape: { | ||
fwhm: 0.09419280180123805, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -184,6 +156,2 @@ from: { index: 23, x: -0.54 }, | ||
index: 75, | ||
shape: { | ||
fwhm: 0.09419280180123805, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -190,0 +158,0 @@ from: { index: 73, x: 0.46 }, |
@@ -60,6 +60,2 @@ import type { DataXY } from 'cheminfo-types'; | ||
ddY: -33832.03463203485, | ||
shape: { | ||
fwhm: 0.35322300675464324, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -88,6 +84,2 @@ from: { x: 4.85, index: 97 }, | ||
ddY: 800, | ||
shape: { | ||
fwhm: 0.05887050112577352, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -105,6 +97,2 @@ from: { x: 4.4, index: 88 }, | ||
ddY: -44914.28571428623, | ||
shape: { | ||
fwhm: 0.2354820045030941, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -122,6 +110,2 @@ from: { x: 4.9, index: 98 }, | ||
ddY: 800, | ||
shape: { | ||
fwhm: 0.05887050112577352, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -128,0 +112,0 @@ from: { x: 5.55, index: 111 }, |
@@ -33,6 +33,2 @@ import { readFileSync } from 'fs'; | ||
index: 11, | ||
shape: { | ||
fwhm: 0.0028493322544883375, | ||
kind: 'gaussian', | ||
}, | ||
inflectionPoints: { | ||
@@ -39,0 +35,0 @@ from: { x: 200.054133, index: 9 }, |
import { v4 as generateID } from '@lukeed/uuid'; | ||
import type { DataXY } from 'cheminfo-types'; | ||
import { Shape1D } from 'ml-peak-shape-generator'; | ||
import { sgg, SGGOptions } from 'ml-savitzky-golay-generalized'; | ||
@@ -15,5 +14,3 @@ import { | ||
import { MakeMandatory } from './utils/MakeMandatory'; | ||
import { MakeOptional } from './utils/MakeOptional'; | ||
import { optimizeTop } from './utils/optimizeTop'; | ||
import { setShape } from './utils/setShape'; | ||
@@ -53,10 +50,5 @@ export interface GSDOptions { | ||
realTopDetection?: boolean; | ||
/** | ||
* Shape used to add FWHM property in the peaks | ||
* @default {kind:'gaussian'} | ||
*/ | ||
shape?: Shape1D; | ||
} | ||
export type GSDPeakID = MakeMandatory<GSDPeak, 'id'>; | ||
export type GSDPeakIDOptionalShape = MakeOptional<GSDPeak, 'shape'>; | ||
/** | ||
@@ -76,3 +68,2 @@ * Global spectra deconvolution | ||
}, | ||
shape, | ||
noiseLevel, | ||
@@ -227,3 +218,3 @@ smoothY = false, | ||
const peaks: GSDPeakIDOptionalShape[] = []; | ||
const peaks: GSDPeakID[] = []; | ||
for (const minddYIndex of minddY) { | ||
@@ -286,3 +277,3 @@ let deltaX = x[minddYIndex]; | ||
return setShape(peaks, { shape }) as GSDPeakID[]; | ||
return peaks; | ||
} |
@@ -1,3 +0,1 @@ | ||
import { Shape1D } from 'ml-peak-shape-generator'; | ||
export interface GSDPeak { | ||
@@ -21,4 +19,2 @@ id?: string; | ||
shape: Shape1D; | ||
inflectionPoints: { | ||
@@ -25,0 +21,0 @@ from: { x: number; index: number }; |
@@ -5,5 +5,4 @@ import { getShape1D, Shape1D } from 'ml-peak-shape-generator'; | ||
import { GSDPeak } from '../GSDPeak'; | ||
import { MakeOptional } from '../utils/MakeOptional'; | ||
type GSDPeakOptionalShape = MakeOptional<GSDPeak, 'shape'>; | ||
type GSDPeakOptionalShape = GSDPeak & { shape?: Shape1D }; | ||
@@ -10,0 +9,0 @@ type GSDBroadenPeakWithID = GSDBroadenPeak & { id: string }; |
@@ -7,3 +7,2 @@ import { v4 as generateID } from '@lukeed/uuid'; | ||
import { GSDPeakOptimized } from '../GSDPeakOptimized'; | ||
import { MakeOptional } from '../utils/MakeOptional'; | ||
import { addMissingIDs } from '../utils/addMissingIDs'; | ||
@@ -40,3 +39,3 @@ import { addMissingShape } from '../utils/addMissingShape'; | ||
export type GSDPeakOptionalShape = MakeOptional<GSDPeak, 'shape'>; | ||
export type GSDPeakOptionalShape = GSDPeak & { shape?: Shape1D }; | ||
@@ -43,0 +42,0 @@ export function joinBroadPeaks<T extends GSDPeakOptionalShape>( |
@@ -25,3 +25,2 @@ import { getShape1D, Shape1D } from 'ml-peak-shape-generator'; | ||
let shapeInstance = getShape1D(shape); | ||
return output.map((peak) => ({ | ||
@@ -28,0 +27,0 @@ ...peak, |
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2647453
10634
1