/** @typedef {import('mf-parser').IsotopesInfo} IsotopesInfo */ /** @typedef {import('mf-parser').MFInfo} MFInfo */ /** @typedef {import('./IsotopicDistribution.types').XY} XY */ /** @typedef {import('./IsotopicDistribution.types').IsotopicDistributionPart} IsotopicDistributionPart */ /** @typedef {import('./IsotopicDistribution.types').IsotopicDistributionOptions} IsotopicDistributionOptions */ /** * A class that allows to manage isotopic distribution */ export class IsotopicDistribution { /** * Class that manages isotopic distribution * @param {string|Array} value - Molecular formula or an array of parts. * @param {IsotopicDistributionOptions} [options] */ constructor(value: string | Array, options?: IsotopicDistributionOptions); threshold: number | undefined; limit: number | undefined; parts: any[]; cachedDistribution: Distribution | undefined; fwhm: number; minY: number; maxLines: number; allowNeutral: boolean; /** * @returns {Array} */ getParts(): Array; /** * @return {Distribution} returns the total distribution (for all parts) */ getDistribution(): Distribution; confidence: any; /** * * @param {object} options * @param {string} [options.delimiter=', '] * @param {number} [options.numberXDecimals=4] * @param {number} [options.numberYDecimals=4] * @returns */ getCSV(options: { delimiter?: string | undefined; numberXDecimals?: number | undefined; numberYDecimals?: number | undefined; }): string; /** * * @param {object} options * @param {string} [options.delimiter='\t'] * @param {number} [options.numberXDecimals=4] * @param {number} [options.numberYDecimals=4] * @returns */ getTSV(options: { delimiter?: string | undefined; numberXDecimals?: number | undefined; numberYDecimals?: number | undefined; }): string; getTable(options?: {}): { [x: number]: any; }[]; /** * * @param {object} options * @param {string} [options.delimiter='\t'] * @param {number} [options.numberXDecimals=4] * @param {number} [options.numberYDecimals=4] * @returns */ getText(options?: { delimiter?: string | undefined; numberXDecimals?: number | undefined; numberYDecimals?: number | undefined; }): string; getMaxY(points: any): any; getSumY(points: any): number; /** * Returns the isotopic distribution as an array of peaks * @param {object} [options={}] * @param {number} [options.maxValue=100] * @param {number} [options.sumValue] // if sumValue is defined, maxValue is ignored * @return {Array<{x:number,y:number}|{x:number,y:number,label:string,shortComposition:string,shortLabel:string,deltaNeutrons:number}>} */ getPeaks(options?: { maxValue?: number | undefined; sumValue?: number | undefined; }): Array<{ x: number; y: number; } | { x: number; y: number; label: string; shortComposition: string; shortLabel: string; deltaNeutrons: number; }>; /** * Returns the isotopic distirubtion * @param {object} [options={}] * @param {number} [options.maxValue=100] * @param {number} [options.sumValue] // if sumValue is defined, maxValue is ignored * @return {{x:number[],y:number[]}|{x:number[],y:number[],label:string[],shortComposition:string[],shortLabel:string[],deltaNeutrons:[]}} */ getXY(options?: { maxValue?: number | undefined; sumValue?: number | undefined; }): { x: number[]; y: number[]; } | { x: number[]; y: number[]; label: string[]; shortComposition: string[]; shortLabel: string[]; deltaNeutrons: []; }; /** * Returns the isotopic distirubtion * @param {object} [options={}] * @param {number} [options.maxValue=100] * @param {number} [options.sumValue] // if sumValue is defined, maxValue is ignored * @return {import('cheminfo-types').MeasurementXYVariables} an object containing at least the 2 properties: x:[] and y:[] */ getVariables(options?: { maxValue?: number | undefined; sumValue?: number | undefined; }): import("cheminfo-types").MeasurementXYVariables; /** * Returns the isotopic distribution as the sum of gaussian * @param {object} [options={}] * @param {number} [options.gaussianWidth=10] // how good should look the gaussian ? By default we take 10 times the fwhm as number of points * @param {number} [options.threshold=0.00001] // minimal height to return point * @param {number} [options.maxLength=1e6] // maximal number of points; ignored when sparse is true * @param {number} [options.maxValue] // rescale Y to reach maxValue * @param {number} [options.from] // minimal x value, default to the first point - 2 * @param {number} [options.to] // maximal x value, default to the last point + 2 * @param {function} [options.peakWidthFct=(mz)=>(this.fwhm)] * @param {boolean} [options.sparse=false] // use SparseSpectrumGenerator; only generates points in peak regions, avoids maxLength limit * @return {XY} isotopic distribution as an object containing 2 properties: x:[] and y:[] */ getGaussian(options?: { gaussianWidth?: number | undefined; threshold?: number | undefined; maxLength?: number | undefined; maxValue?: number | undefined; from?: number | undefined; to?: number | undefined; peakWidthFct?: Function | undefined; sparse?: boolean | undefined; }): XY; } export type IsotopesInfo = import("mf-parser").IsotopesInfo; export type MFInfo = any; export type XY = import("./IsotopicDistribution.types").XY; export type IsotopicDistributionPart = import("./IsotopicDistribution.types").IsotopicDistributionPart; export type IsotopicDistributionOptions = import("./IsotopicDistribution.types").IsotopicDistributionOptions; import { Distribution } from './Distribution'; //# sourceMappingURL=IsotopicDistribution.d.ts.map