import type { DataXY } from 'cheminfo-types'; import { BaseSpectrumGenerator } from './BaseSpectrumGenerator.ts'; import type { NumToNumFn, OptionsSG1D, PeakOptions } from './BaseSpectrumGenerator.ts'; import type { Peak1D, PeakSeries } from './types/Peaks1D.ts'; export interface SparseSpectrumOptions { /** * Function to add a baseline to the spectrum. */ baseline?: NumToNumFn; /** * Options for peak shapes and widths. */ peakOptions?: PeakOptions; /** * Threshold relative to the normalized shape value (1 at peak centre) used * to determine how far each peak's x interval extends. Points where * `shape.fct(x − x₀) < threshold` are excluded. * @default 1e-7 */ threshold?: number; } export declare class SparseSpectrumGenerator extends BaseSpectrumGenerator { constructor(options?: OptionsSG1D); /** * Generates a sparse spectrum containing only x values where at least one * peak contributes above the threshold. No dense array is allocated: * intervals are computed per peak first, then y is evaluated only for the * merged set of required x values. * @param peaks - List of peaks to include. * @param options - Options for sparse spectrum generation. * @returns Sparse spectrum data with x and y arrays covering only peak regions. */ generateSparseSpectrum(peaks: Peak1D[] | PeakSeries, options?: SparseSpectrumOptions): DataXY; } //# sourceMappingURL=SparseSpectrumGenerator.d.ts.map