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'; import type { NoiseOptions } from './util/addNoise.ts'; export type { NumToNumFn, OptionsSG1D, PeakOptions, ResolvedPeak, } from './BaseSpectrumGenerator.ts'; export { BaseSpectrumGenerator } from './BaseSpectrumGenerator.ts'; export interface SpectrumOptions { /** * Function to generate or add a baseline. */ baseline?: NumToNumFn; /** * Options to add noise to the spectrum. */ noise?: NoiseOptions; /** * Options for peak shapes and widths. */ peakOptions?: PeakOptions; /** * Minimum intensity value. * @default 0 */ threshold?: number; } export interface GetSpectrumOptions { /** * generate a copy of the current data * @default true */ copy?: boolean; /** * minimum intensity value * @default 0 */ threshold?: number; } export declare class SpectrumGenerator extends BaseSpectrumGenerator { private maxPeakHeight; private data; constructor(options?: OptionsSG1D); /** * Generates a spectrum from a list of peaks and returns it. * @param peaks - List of peaks to add. * @param options - Options for spectrum generation. * @returns The generated spectrum data. */ generateSpectrum(peaks: Peak1D[] | PeakSeries, options?: SpectrumOptions): DataXY>; /** * Add a series of peaks to the spectrum. * @param peaks - Peaks to add. * @param options - Options for adding peaks. * @returns The generator instance. */ addPeaks(peaks: Peak1D[] | PeakSeries, options?: PeakOptions): this; /** * Add a single peak to the spectrum. * A peak may be either defined as [x,y,fwhm,...] or as {x, y, shape} * @param peak - The peak to add, defined as array or object. * @param options - Options for adding the peak. * @returns The generator instance. */ addPeak(peak: Peak1D, options?: PeakOptions): this; /** * Add a baseline to the spectrum. * @param baselineFct - Mathematical function producing the baseline you want. * @returns The generator instance. */ addBaseline(baselineFct: (x: number) => number): this; /** * Add noise to the spectrum. * @param options - Configuration for noise generation. * @returns The generator instance. */ addNoise(options?: NoiseOptions): this; /** * Get the generated spectrum. * @param options - Options for getting the spectrum. * @returns The generated spectrum data. */ getSpectrum(options?: GetSpectrumOptions | boolean): DataXY>; /** * Resets the generator with an empty spectrum. * @returns The generator instance. */ reset(): this; } //# sourceMappingURL=SpectrumGenerator.d.ts.map