import type * as Filters from 'ml-signal-processing'; import type { FilterXYType } from 'ml-signal-processing'; import type { FromTo } from 'cheminfo-types'; import type { GaussianShape1D } from 'ml-peak-shape-generator'; import type { GeneralizedLorentzianShape1D } from 'ml-peak-shape-generator'; import type { Logger } from 'cheminfo-types'; import type { LorentzianShape1D } from 'ml-peak-shape-generator'; import type { NmrData1D } from 'cheminfo-types'; import type { NmrData2D } from 'cheminfo-types'; import type { NumberArray } from 'cheminfo-types'; import type { PeakXYWidth } from 'cheminfo-types'; import type { PseudoVoigtShape1D } from 'ml-peak-shape-generator'; import type { XYEquallySpacedOptions } from 'ml-spectra-processing'; import type { z } from 'zod'; import type { ZodType } from 'zod'; export declare interface AirplsOptions { algorithm: 'airpls'; lambda?: number; /** * Array of x positions (anchors) where the baseline will be estimated. * When provided only the x positions are needed; the corresponding y * values are computed internally using a median window around each x. * @default undefined */ anchors?: NumberArray; maxIterations: number; tolerance: number; autoDownsample?: boolean; } export declare interface Apodization1DFilterOptions extends BaseFilter { name: 'apodization'; value: Apodization1DOptions; } export declare type Apodization1DOptions = Shapes; export declare type Apodization2D1Options = Shapes; export declare type Apodization2D2Options = Shapes; export declare interface ApodizationDimension1Options extends BaseFilter { name: 'apodizationDimension1'; value: Apodization2D1Options; } export declare interface ApodizationDimension2Options extends BaseFilter { name: 'apodizationDimension2'; value: Apodization2D2Options; } export declare interface AutoPhaseCorrection2D { threshold?: number; } export declare interface BackwardLinearPredictionFilterOptions extends BaseFilter { name: 'backwardLinearPrediction'; value: Partial; } export declare interface BackwardLPDimension1Options extends BaseFilter { name: 'blpDimension1'; value: Partial; } export declare interface BackwardLPDimension2Options extends BaseFilter { name: 'blpDimension2'; value: Partial; } export declare interface BackwardLPOptions { /** * Number of coefficients to be calculated in the SVD. */ nbCoefficients: number; /** * Number of points used in the prediction. */ nbInputs: number; /** * Number of points to predict */ nbPoints: number; /** * Output array that could be used for in-place modification. */ output?: Float64Array; } declare interface BaseField { key: string; level: number; name: string; description: string; } export declare interface BaseFilter { enabled?: boolean; } export declare interface BaseFilterEntry extends Required { id?: string; error?: string; } export declare type BaselineAlgorithms = BaselineCorrectionOptions['algorithm']; export declare interface BaselineCorrection2DFilterOptions extends BaseFilter { name: 'baselineCorrectionTwoDimensions'; value: Record; } export declare interface BaselineCorrectionFilterOptions extends BaseFilter { name: 'baselineCorrection'; value: BaselineCorrectionOptions; } export declare type BaselineCorrectionOptions = PolynomialOptions | AirplsOptions | WhittakerOptions | BernsteinOptions | CubicOptions; export declare interface BaselineCorrectionZone { from: number; to: number; id: string; } export declare interface BasePeak { id: string; } export declare interface BaseSpectrum { id: string; selector?: NmrLoaderSelectors; meta: Metadata; customInfo: any; } export declare interface BernsteinOptions { degree: number; algorithm: 'bernstein'; /** * Array of x positions (anchors) where the baseline will be estimated. * When provided only the x positions are needed; the corresponding y * values are computed internally using a median window around each x. * @default undefined */ anchors?: NumberArray; /** * Median window size (in number of points) used to compute anchor y * values from the input `data` when `anchors` (x positions) are * provided. If omitted a sensible default is used by `getAnchors`. * @default undefined */ medianWindow?: number; /** * Maximum number of iterations to perform. * @default 100 */ maxIterations?: number; /** * Tolerance level for convergence. * The algorithm stops if the change between iterations is below this value. * @default 1e-6 */ tolerance?: number; /** * Factor to scale the residuals. * @default 1.0 */ factorStd?: number; /** * Learning rate for the iterative updates. * @default 0.01 */ learningRate?: number; /** * Logger instance for logging the progress and debug information. */ logger?: Logger; } declare interface BooleanField extends Field { type: 'boolean'; } export declare interface Color2D { positiveColor: string; negativeColor: string; } declare type CommonField = SelectField | StringField | NumberField | BooleanField | LabelField; export declare interface CubicOptions { algorithm: 'cubic'; /** * Array of x positions (anchors) where the baseline will be estimated. * When provided only the x positions are needed; the corresponding y * values are computed internally using a median window around each x. * @default [] */ anchors?: NumberArray; /** * Noise threshold multiplier. An anchor is clipped when * signal[anchor] > baseline[anchor] + noiseThreshold * σ_noise * Smaller → more aggressive clipping (may clip baseline regions too). * Larger → less clipping (may leave some signal contamination). * Default: 1.0 */ noiseThreshold?: number; /** * Maximum number of clipping iterations. * Default: 20 */ maxIterations?: number; /** * Stop iterating when RMS change in baseline between iterations * falls below tolerance * σ_noise. * Default: 0.001 */ tolerance?: number; /** * Override the automatic noise estimate with a fixed value. * Useful when you know your instrument's noise floor. */ noiseLevel?: number; /** * Percentile (0–100) used to estimate noise from |diff(signal)|. * Default: 10 (lower 10th percentile of first differences). */ noisePercentile?: number; /** Median window size (number of points) passed to `getAnchors` when * `anchors` is supplied. Default: Math.max(1, Math.floor(data.y.length/100)). */ medianWindow?: number; } export declare type DataSelectionOption = 'ft' | 'fid' | 'both' | 'preferFT' | 'preferFID'; export declare interface DigitalFilter2DOptions extends BaseFilter { name: 'digitalFilter2D'; value: DigitalFilterOptions_2; } export declare interface DigitalFilterOption extends BaseFilter { name: 'digitalFilter'; value: DigitalFilterOptions; } declare interface DigitalFilterOptions { digitalFilterValue: number; } declare interface DigitalFilterOptions_2 { digitalFilterValue?: number; } export declare interface DirectDimensionOptions { acquisitionScheme?: string; reverse?: boolean; digitalFilterValue?: number; phaseCorrection?: PhaseCorrection; } export declare interface Display { isVisible: boolean; } export declare interface Display1D extends Display { color: string; isPeaksMarkersVisible: boolean; isRealSpectrumVisible: boolean; isVisibleInDomain: boolean; } export declare interface Display2D extends Color2D, Display { isPositiveVisible: boolean; isNegativeVisible: boolean; } export declare interface DomainUpdateRules { readonly updateYDomain: boolean; readonly updateXDomain: boolean; } declare type EquallySpacedFilterOptions = Pick; export declare interface EquallySpacedOptions extends BaseFilter { name: 'equallySpaced'; value: EquallySpacedFilterOptions; } export declare interface ExclusionZone { id: string; from: number; to: number; } declare interface ExclusionZonesFilterOptions extends FromTo { id: string; } export declare interface ExclusionZonesOptions extends BaseFilter { name: 'exclusionZones'; value: ExclusionZonesFilterOptions[]; } export declare interface ExponentialOptions { /** * line broadening value in Hz, a negative value will invert the shape */ lineBroadening: number; } export declare interface FFT1DOptions extends BaseFilter { name: 'fft'; value: Record; } export declare interface FFTDimension1Options extends BaseFilter { name: 'fftDimension1'; value: DirectDimensionOptions; } export declare interface FFTDimension2Options extends BaseFilter { name: 'fftDimension2'; value: IndirectDimensionOptions; } declare interface Field extends BaseField { default: T; } export declare type Filter1DEntry = Filter1DOptions & BaseFilterEntry; export declare type Filter1DOptions = BaselineCorrectionFilterOptions | FFT1DOptions | ZeroFillingFilterOptions | SignalProcessingFilter | ShiftXFilterOptions | PhaseCorrection1DFilterOptions | ForwardLP1DOptions | ExclusionZonesOptions | EquallySpacedOptions | DigitalFilterOption | Apodization1DFilterOptions | BackwardLinearPredictionFilterOptions | TrimFilterOptions; export declare type Filter2DEntry = Filter2DOptions & BaseFilterEntry; export declare type Filter2DOptions = ApodizationDimension1Options | ApodizationDimension2Options | BaselineCorrection2DFilterOptions | BackwardLPDimension1Options | BackwardLPDimension2Options | DigitalFilter2DOptions | FFTDimension1Options | FFTDimension2Options | NUSDimension2Options | FordwardLPDimension1Options | FordwardLPDimension2Options | PhaseCorrection2DOptions | Shift2DXFilterOptions | Shift2DYFilterOptions | SymmetrizeCosyLikeOptions | ZeroFillingDimension1Options | ZeroFillingDimension2Options; declare type FilterFunction = Extract; declare type FilterOptions = Extract[1], object>; declare type FilterSymbols = (typeof Filters)[keyof typeof Filters]; export declare interface FordwardLPDimension1Options extends BaseFilter { name: 'flpDimension1'; value: Partial; } export declare interface FordwardLPDimension2Options extends BaseFilter { name: 'flpDimension2'; value: Partial; } export declare interface ForwardLP1DOptions extends BaseFilter { name: 'forwardLinearPrediction'; value: Partial; } export declare interface ForwardLPOptions { /** * Number of coefficients to be calculated in the SVD. */ nbCoefficients: number; /** * Number of points used in the prediction. */ nbInputs: number; /** * Number of points to predict */ nbPoints: number; /** * Output array that could be used for in-place modification. */ output?: Float64Array; } export declare interface GaussianOptions { /** * Inverse Exponential Width, Hz */ lineBroadening: number; /** * Location of Gauss Maximum, this value should be between 0 to 1 */ lineBroadeningCenter: number; } export declare interface GeneralLoadersSelector { /** * priories processed or raw data if both exists * @default 'both' */ dataSelection?: DataSelectionOption; /** * should we ignore 1D spectra * @default true */ keep1D?: boolean; /** * should we ignore 2D spectra * @default true */ keep2D?: boolean; /** * should we keep only real part. we will ignore keepFID * @default true */ onlyReal?: boolean; } export declare interface IndirectDimensionOptions { acquisitionScheme?: string; reverse?: boolean; phaseCorrection?: PhaseCorrection_2; } export declare interface Info { owner?: string; isFid: boolean; date?: string; localeDate?: string; epoch?: number; phc1?: number; phc0?: number; aqMod?: number; isComplex: boolean; dimension: number; isFt: boolean; experiment?: string; digitalFilter?: number; experimentNumber?: number; solvent?: string; pulseSequence?: string; name: string; spectrumSource?: SpectrumSource; } export declare interface Info1D extends Info { nucleus: string; spectralWidth: number; originFrequency: number; baseFrequency?: number; digitalFilter?: number; frequencyOffset?: number; owner?: string; reverse?: boolean; decim?: number; dspfvs?: number; lpNumberOfCoefficients?: number; tdOff?: number; spectrumSize?: number; numberOfPoints?: number; linearPredictionBin?: number; } export declare interface Info2D extends Info { nucleus: string[]; isFtDimensionOne: boolean; digitalFilter?: number; originFrequency: number[]; baseFrequency: number[]; frequencyOffset: number[]; spectralWidth: number[]; reverse?: boolean[]; lpNumberOfCoefficients?: number[]; tdOff?: number[]; spectrumSize: number[]; numberOfPoints: number[]; linearPredictionBin?: number[]; acquisitionScheme?: string; } export declare interface Integral { id: string; originalFrom: number; originalTo: number; from: number; to: number; absolute: number; integral: number; kind: SignalKind; } export declare interface Integrals { values: Integral[]; options: SumOptions; } export declare interface Jcoupling { /** * The value of the coupling in Hz */ coupling: number; atoms?: number[]; assignment?: string | string[]; diaIDs?: string[]; /** * The spin of the nucleus involved in the coupling * most of the time it is 1/2 (1H, 13C, 15N, etc.) * but typically for [2H] it is 1 */ spin?: number; /** * With how many other nuclei this coupling is observed */ nbCouplings?: number; /** * The multiplicity label associated with the coupling like "d", "t", "q", etc. */ multiplicity?: string; /** * The length of the coupling path (number of bonds) * for example for a geminal coupling it is 2 * This is important when you have 2 couplings with the same diaIDs but different path lengths * like in the case of 1,2-disubstituted benzene (same substitutant) */ pathLength?: number; } declare interface LabelField extends BaseField { type: 'label'; } declare interface ListField extends Field { type: 'list'; properties: Record; } export declare interface MatrixFilter { name: FilterXYType['name']; properties: MatrixProperties; options: Options; } export declare interface MatrixOptions { /** * Matrix generation filters * @default [] */ filters: Array>; /** * Exclusion zones * @default [] */ exclusionsZones: ExclusionZone[]; /** * range */ range: { from: number; to: number; }; /** * number of points */ numberOfPoints: number; } export declare type MatrixProperties = Record; export declare type Metadata = Record; /** * Plugins should use Declaration Merging on this interface. * `NmrLoaderSelectors` is a selector used by NMRium loaders to filter the data to load */ export declare interface NmrLoaderSelectors { /** * Read methods take a file-collection input, the root is used to call `fileCollection.subroot(selector.root)`. */ root?: string; general?: GeneralLoadersSelector; files?: string[]; } export declare interface NMRPeak1D extends PeakXYWidth { id?: string; kind?: SignalKind; shape?: NMRShape1D; originalX?: number; } export declare interface NMRRange { from: number; to: number; id?: string; pubIntegral?: number; integration?: number; multiplicity?: string; signals?: NMRSignal1D[]; } export declare type NMRShape1D = GaussianShape1D | LorentzianShape1D | PseudoVoigtShape1D | GeneralizedLorentzianShape1D; export declare interface NMRSignal1D { delta: number; id?: string; js?: Jcoupling[]; atoms?: number[]; assignment?: string; kind?: SignalKind; multiplicity?: string; diaIDs?: string[]; nbAtoms?: number; integration?: number; peaks?: NMRPeak1D[]; /** * Toggles between automatic and manual assignment mode. * where value `true` represents automatic mode and `false` represents manual mode. * * - automatic: the assignment is automatically generated and updated based on the linked atom label. * When the atom label changes, the assignment is updated everywhere. * - manual: the user enters the assignment directly, and it is not changed automatically. * * @default false */ isAutoAssignment?: boolean; } declare interface NumberField extends Field { type: 'number'; } export declare interface NUSDimension2Options extends BaseFilter { name: 'nusDimension2'; value: IndirectDimensionOptions; } declare type ObjectKeys = 'id' | 'multiplicity' | 'js'; export declare interface Peak1D extends Omit, BasePeak { originalX?: number; relativeArea?: number; } export declare interface Peak2D extends BasePeak { x: number; y: number; z: number; originalX?: number; originalY?: number; originalZ?: number; width?: number | { x: number; y: number; }; } export declare interface Peaks { values: Peak1D[]; options: any; } declare interface PhaseCorrection { mode?: string; ph0?: number; ph1?: number; } export declare interface PhaseCorrection1DFilterOptions extends BaseFilter { name: 'phaseCorrection'; value: PhaseCorrection1DOptions; } export declare interface PhaseCorrection1DOptions { absolute?: boolean; ph0?: number; ph1?: number; } export declare interface PhaseCorrection2DOptions extends BaseFilter { name: 'phaseCorrectionTwoDimensions'; value: PhaseCorrectionTwoDFilter; } declare interface PhaseCorrection_2 { mode?: string; ph0?: number; ph1?: number; } export declare interface PhaseCorrectionHorizontalOptions { ph0: number; ph1: number; reverse?: boolean; inPlace?: boolean; } export declare interface PhaseCorrectionTwoDFilter extends PhaseCorrectionTwoDOptions { automatic?: AutoPhaseCorrection2D; } export declare interface PhaseCorrectionTwoDOptions { horizontal?: PhaseCorrectionHorizontalOptions; vertical?: PhaseCorrectionVerticalOptions; } export declare interface PhaseCorrectionVerticalOptions extends PhaseCorrectionHorizontalOptions { quad?: 'imag' | 'real'; } export declare interface PolynomialOptions { /** * Array of x positions (anchors) where the baseline will be estimated. * When provided only the x positions are needed; the corresponding y * values are computed internally using a median window around each x. * @default undefined */ anchors?: NumberArray; algorithm: 'polynomial'; degree: number; } /** * Information produced by processing operators. * Plugins are able to use declaration merging on this interface. * All properties in this interface must be optional so empty object is supported. * * The purpose of this interface is to allow easier communication between processing operators, * because some operators depends on other operators (ex: fft behavior change if digitalFilter is applied or not). * Other spectrum features can depend on other operator results. * Like peak, range and integrals depends on shiftX. * * Due to immer-js behavior, structuredClone is not usable on immer proxy (draft in reducer). * So, Filters1DManagers / Filters2DManagers uses `{ ...originalProcessingInfo }` to reset. * Try as much as possible to have only one level deep properties in this interface, or provide a way to deep slice this interface in filters managers. * * nmrium-oss processings managements should not face this issue, because processing does not happen during a reducer action. * And spectrum are sliced before processing. */ export declare interface ProcessingInfo1D { /** * If this property is missing, consider the value is 0 (no shifting). * @default 0 */ shiftX?: number; /** * digitalFilter value if applied. */ digitalFilterApplied?: number; } /** * Same comment from ProcessingInfo1D apply. * @see {import('./spectrum_1d.ts').ProcessingInfo1D} */ export declare interface ProcessingInfo2D { /** * Shift on horizontal axis. * If missing, consider it is 0. */ shiftDirect?: number; /** * Shift on vertical axis. * If missing, consider it is 0. */ shiftIndirect?: number; } /** * Computed from Spectrum1DProcessingTypeRegistry and Spectrum2DProcessingTypeRegistry keys. * Ensures type-safety on operator-registration. * * If the operator is not registered in the type registries. It should not be registerable in the operator registry. */ export declare type ProcessingOperatorId = Exclude; declare type Properties = ListField | SelectField | StringField | NumberField | BooleanField | LabelField; export declare interface Range extends Omit { id: string; originalFrom?: number; originalTo?: number; absolute: number; signals: Signal1D[]; integration: number; } export declare interface Ranges { values: Range[]; options: SumOptions; } declare interface SelectField extends Field { type: 'select'; choices: any[]; } export declare type Shape1DWithFWHM = Omit & { fwhm: number; }; export declare interface Shapes { exponential?: ShapesFactory; sineBell?: ShapesFactory; sineSquare?: ShapesFactory; traf?: ShapesFactory; gaussian?: ShapesFactory; } declare interface ShapesFactory { apply: boolean; options: Options; } export declare interface Shift2DXFilterOptions extends BaseFilter { name: 'shift2DX'; value: Shift2DXOptions; } declare interface Shift2DXOptions { shift: number; } export declare interface Shift2DYFilterOptions extends BaseFilter { name: 'shift2DY'; value: Shift2DYOptions; } declare interface Shift2DYOptions { shift: number; } export declare interface ShiftXFilterOptions extends BaseFilter { name: 'shiftX'; value: ShiftXOptions; } export declare interface ShiftXOptions { shift: number; } export declare interface Signal { id: string; kind?: SignalKind; } export declare interface Signal1D extends Required>, Omit { originalDelta?: number; } export declare interface Signal2D extends Signal { sign?: number; x: SignalAxis; y: SignalAxis; peaks?: Peak2D[]; j?: { pathLength?: number | FromTo; }; } declare interface SignalAxis { delta: number; nbAtoms?: number; diaIDs?: string[]; originalDelta: number; } export declare type SignalKind = 'unspecified' | 'unknown' | 'signal' | 'residualSolvent' | 'reference' | 'nmrSolvent' | 'impurity' | 'standard' | 'artifact' | 'p1' | 'p2' | 'p3'; export declare interface SignalProcessingFilter extends BaseFilter { name: 'signalProcessing'; value: MatrixOptions; } export declare interface SineBellOptions { /** * Specifies the starting point of the sine-bell in units of pi radians. * Common values are 0.0 (for a sine window which starts height at 0.0) and * 0.5 (for a cosine window, which starts at height 1.0). * @default 0 */ offset: number; } export declare type SineSquareOptions = Omit; export declare type Spectra = Spectrum[]; export declare type Spectrum = Spectrum1D | Spectrum2D; export declare interface Spectrum1D extends BaseSpectrum { /** * Contains processed data. * * originalData -> processing pipeline -> data */ data: NmrData1D; /** * Original data extracted from the use data files like jcamp / bruker and so-on. */ originalData: NmrData1D; peaks: Peaks; display: Display1D; integrals: Integrals; ranges: Ranges; info: Info1D; originalInfo: Info1D; filters: Filter1DEntry[]; /** * EXPERIMENTAL type declaration. * Can change anytime without migration. */ processings?: Array; /** * State serialization should exclude this property. * Before processing, it should be reset to `originalProcessingInfo`. */ processingInfo: ProcessingInfo1D; /** * State serialization should exclude this property. * Before processing, it should be init to empty object. */ originalProcessingInfo: ProcessingInfo1D; } /** * Registry of all the 1d spectrum processing operations. * Each plugin adding operator for 1d spectrum processing should register their types here with declaration merging. * * Use the operatorId as the key, and SpectrumProcessingOperation as value. * * Spectrum1D type definition uses `processings?: Array;` * * @example * ```ts * declare module '@zakodium/nmr-types' { * interface Spectrum1DProcessingTypeRegistry { * 'my-package#myOperator': SpectrumProcessingOperation; * } * } * ``` */ export declare interface Spectrum1DProcessingTypeRegistry extends Record> { } export declare type Spectrum1DSource = Partial; export declare interface Spectrum2D extends BaseSpectrum { zones: Zones; /** * Contains processed data. * * originalData -> processing pipeline -> data */ data: NmrData2D; info: Info2D; originalInfo: Info2D; display: Display2D; /** * Original data extracted from the use data files like jcamp / bruker and so-on. */ originalData: NmrData2D; filters: Filter2DEntry[]; /** * EXPERIMENTAL type declaration. * Can change anytime without migration. */ processings?: Array; processingInfo: ProcessingInfo2D; originalProcessingInfo: ProcessingInfo2D; } /** * Registry of all the 2d spectrum processing operations. * Each plugin adding operator for 2d spectrum processing should register their types here with declaration merging. * * Use the operatorId as the key, and SpectrumProcessingOperation as value. * * Spectrum2D type definition uses `processings?: Array;` * * @example * ```ts * declare module '@zakodium/nmr-types' { * interface Spectrum2DProcessingTypeRegistry { * 'my-package#myOperator': SpectrumProcessingOperation; * } * } * ``` */ export declare interface Spectrum2DProcessingTypeRegistry extends Record> { } export declare type Spectrum2DSource = Partial; /** * A ProcessingOperation is a step in the processing pipeline. * A ProcessingOperation can have no options: `ProcessingOperation`. * ProcessingOperation are stored in NMRiumState spectra in the processing field. */ export declare interface SpectrumProcessingOperation { /** * Unique identifier of the operation in the pipeline. * React frontend constraint. */ uid: string; /** * `id` of the operator registered in the core processing registry. */ operatorId: ProcessingOperatorId; /** * User Parameters for the operation. */ settings: Settings; /** * Computed Parameters for the operation. * Computed from settings and the spectrum. * * If `undefined`, options should be computed. */ options: Options | undefined; /** * Whether the operation is enabled or not. */ enabled: boolean; /** * Error produced by the operation. */ error: undefined | string; } export declare interface SpectrumProcessingOperator { /** * Unique identifier (across the core operators registry) for the operation. * Developer-readable, camelCase, package name as prefix. * * @example `@zakodium/nmrium-private-plugins#baselineCorrection` */ id: ProcessingOperatorId; /** * Ensure the settings are valid for the operation. * `null` if the operation doesn't need settings. */ schemaSettings: SchemaSettings; /** * Ensure the options are valid for the operation. * `null` if the operation doesn't need options, it implies `apply` will always receive `null` as options. */ schemaOptions: SchemaOptions; /** * Each operator should define the default settings of operation. * It generally depends on spectrum. */ getDefaultSettings: (spectrum: Spectrum) => SchemaSettings extends ZodType ? z.output : null; /** * Function that takes the spectrum in the state of the current pipeline step, * the operation’s settings, and returns options to apply the operation. */ computeOptions: (spectrum: Spectrum, settings: z.output) => SchemaOptions extends ZodType ? z.output : null; /** * Returns whether the operation can be applied on given data. * * @param data */ isApplicable: (spectrum: Spectrum) => boolean; /** * Function that applies the operation to the spectrum given the options. */ apply: (spectrum: Spectrum, options: z.output) => Spectrum; /** * Hints to the caller that the operation will modify the data domain (either x, y, or both), * requiring to reset it in the UI. */ domainUpdateRules: DomainUpdateRules; } export declare interface SpectrumProcessingOperatorTypeRegistry extends Record> { } /** * Registry of all spectrum processing operations. * Use it as a getter from operator id. * * Dedicated Spectrum1DProcessingTypeRegistry and Spectrum2DProcessingTypeRegistry are needed to fulfill Spectrum1D and Spectrum2D type definition. * * Plugin developers should not use declaration merging on this interface. */ export declare interface SpectrumProcessingTypeRegistry extends Spectrum1DProcessingTypeRegistry, Spectrum2DProcessingTypeRegistry { } export declare type SpectrumSource = 'prediction' | 'database' | 'unknown'; declare interface StringField extends Field { type: 'string'; } export declare interface SumOptions { /** * @default true */ isSumConstant: boolean; /** * If you force the "sum" the mf should not be exists any more otherwise if mf is exists the "sum" must be null or undefined * @default undefined */ sum: number | undefined; /** * @default true */ sumAuto: boolean; /** * mf will be set automatically for the first time based on the first molecules unless the user change it * example 'C10H20O3' */ mf?: string; /** * key of the selected molecule */ moleculeId?: string; } export declare interface SymmetrizeCosyLikeOptions extends BaseFilter { name: 'symmetrizeCosyLike'; value: Record; } export declare interface TrafOptions { /** * line broadening value in Hz, a negative value will invert the shape */ lineBroadening: number; } export declare interface TrimFilterOptions extends BaseFilter { name: 'trim'; value: TrimOptions; } /** * Options for trimming a 1D spectrum. All properties are optional and mutually exclusive, the function keep the largest value. */ export declare interface TrimOptions { /** * Percentage (0-100) of points to trim from the left side. If undefined, no percentage-based trimming is applied to the left. * @default undefined */ leftPercentage?: number; /** * Percentage (0-100) of points to trim from the right side. If undefined, no percentage-based trimming is applied to the right. * @default undefined */ rightPercentage?: number; /** * Value of the leftmost point to keep. If set, all points to the left of this value are trimmed. * @default undefined */ leftValue?: number; /** * Value of the rightmost point to keep. If set, all points to the right of this value are trimmed. * @default undefined */ rightValue?: number; /** * Number of points to remove from the left side. If set, trims this many points from the left. * @default 0 */ leftNbPoints?: number; /** * Number of points to remove from the right side. If set, trims this many points from the right. * @default 0 */ rightNbPoints?: number; } export declare interface WhittakerOptions { algorithm: 'whittaker'; /** * Value between [0-1] that indicates how much the initial weight will be updated relative to the absolute * value of an approximation of the standard deviation of the difference between * the baseline and the original signal. * @default 0.2 */ learningRate?: number; /** * Smoothing parameter. Factor of weights matrix in -> [I + lambda D'D]z = x. * @default 2000 */ lambda?: number; /** * Maximal number of iterations if the method does not reach the stop criterion. * @default 100 */ maxIterations?: number; /** * Tolerance for convergence. The process stops if the change in baseline is less than this value. * @default 1e-3 */ tolerance?: number; /** * Array of x positions (anchors) where the baseline will be estimated. * When provided only the x positions are needed; the corresponding y * values are computed internally using a median window around each x. * @default undefined */ anchors?: NumberArray; } export declare interface ZeroFillingDimension1Options extends BaseFilter { name: 'zeroFillingDimension1'; value: ZeroFillingOptions; } export declare interface ZeroFillingDimension2Options extends BaseFilter { name: 'zeroFillingDimension2'; value: ZeroFillingOptions; } export declare interface ZeroFillingFilterOptions extends BaseFilter { name: 'zeroFilling'; value: ZeroFillingOptions; } export declare interface ZeroFillingOptions { nbPoints: number; } export declare interface Zone { id: string; x: ZoneAxis; y: ZoneAxis; signals: Signal2D[]; kind?: SignalKind; assignment?: string; /** * Toggles between automatic and manual assignment mode. * where value `true` represents automatic mode and `false` represents manual mode. * * - automatic: the assignment is automatically generated and updated based on the linked atom label. * When the atom label changes, the assignment is updated everywhere. * - manual: the user enters the assignment directly, and it is not changed automatically. * * @default false */ isAutoAssignment?: boolean; } declare interface ZoneAxis extends FromTo { nbAtoms?: number; diaIDs?: string[]; originalFrom?: number; originalTo?: number; } export declare interface Zones { values: Zone[]; options?: any; } export { }