UNPKG

ml-gsd

Version:
23 lines 1.19 kB
import type { DataXY, PeakXYWidth } from 'cheminfo-types'; import type { GSDPeakOptimized } from '../GSDPeakOptimized.ts'; import type { MakeMandatory } from '../utils/MakeMandatory.ts'; import type { OptimizePeaksOptions } from './optimizePeaks.ts'; export interface Peak extends PeakXYWidth { id?: string; } export type GSDPeakOptimizedID = MakeMandatory<GSDPeakOptimized, 'id'>; type GSDPeakOptimizedIDOrNot<T extends Peak> = T extends { id: string; } ? GSDPeakOptimizedID : GSDPeakOptimized; /** * 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 * @param data - An object containing the x and y data to be fitted. * @param peakList - A list of initial parameters to be optimized. e.g. coming from a peak picking [{x, y, width}]. */ export declare function optimizePeaksWithLogs<T extends Peak>(data: DataXY, peakList: T[], options?: OptimizePeaksOptions): { logs: any[]; optimizedPeaks: Array<GSDPeakOptimizedIDOrNot<T>>; }; export {}; //# sourceMappingURL=optimizePeaksWithLogs.d.ts.map