import type { Shape1DWithFWHM } from 'ml-peak-shape-generator'; import type { OptimizationOptions } from 'ml-spectra-fitting'; import type { GSDPeak } from '../GSDPeak.ts'; import type { GSDPeakOptimizedID } from './optimizePeaksWithLogs.ts'; export interface JoinBroadPeaksOptions { /** * Ratio (relative to the maximum `|ddY|`) below which a peak is treated as * part of a broad signal. * @default 0.0025 */ broadRatio?: number; /** * Maximum `x` distance between two consecutive peaks for them to still be * considered part of the same broad signal. * @default 0.25 */ broadWidth?: number; /** * Shape used for fitting the broad peak. * @default { kind: 'gaussian' } */ shape?: Shape1DWithFWHM; /** * Kind and options of the algorithm used to optimize parameters. * @default { kind: 'lm', options: { timeout: 10 } } */ optimization?: OptimizationOptions; } export type GSDPeakOptionalShape = GSDPeak & { shape?: Shape1DWithFWHM; }; /** * Join peaks that seem to belong to a broad signal into a single broad peak. * @param peakList - Detected peaks, possibly containing fragments of a broad signal. * @param options - Join options. * @returns The peak list with broad fragments fitted as a single peak. */ export declare function joinBroadPeaks(peakList: GSDPeakOptionalShape[], options?: JoinBroadPeaksOptions): GSDPeakOptimizedID[]; //# sourceMappingURL=joinBroadPeaks.d.ts.map