import type { Shape1D, Shape1DInstance } from 'ml-peak-shape-generator'; import type { Peak1D } from './types/Peaks1D.ts'; export type NumToNumFn = (x: number) => number; export interface OptionsSG1D { /** * First x value (inclusive). * @default 0 */ from?: number; /** * Last x value (inclusive). * @default 1000 */ to?: number; /** * Number of points in the final spectrum. * @default 10001 */ nbPoints?: number; /** * Function that returns the width of a peak depending the x value. * @default "() => 5" */ peakWidthFct?: NumToNumFn; /** * Define the shape of the peak. * @default "{kind: 'gaussian'}" */ shape?: Shape1D; } export interface PeakOptions { /** * Half-height width. * @default `peakWidthFct(value)` */ width?: number; /** * Half-height width left (asymmetric peak). * @default `fwhm` */ widthLeft?: number; /** * Half-height width right (asymmetric peak). * @default `fwhm` */ widthRight?: number; /** * Shape options */ shape?: Shape1D; /** * Number of times of fwhm to calculate length. * @default 'covers 99.99 % of surface' */ factor?: number; } export interface ResolvedPeak { x0: number; intensity: number; shapeLeft: Shape1DInstance; shapeRight: Shape1DInstance; widthLeft: number; widthRight: number; factor: number; } export declare class BaseSpectrumGenerator { protected from: number; protected to: number; protected nbPoints: number; interval: number; protected peakWidthFct: NumToNumFn | undefined; protected shape: Shape1DInstance; constructor(options?: OptionsSG1D); /** * Resolves a peak to its canonical parameters, cloning and configuring * separate shape instances for the left and right halves. */ protected resolvePeak(peak: Peak1D, options: PeakOptions): ResolvedPeak; } //# sourceMappingURL=BaseSpectrumGenerator.d.ts.map