nmr-processing 19.5.2 → 20.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,7 +81,7 @@ import type { PhaseCorrection2DOptions } from '@zakodium/nmr-types';
81
81
  import type { PhaseCorrectionTwoDFilter } from '@zakodium/nmr-types';
82
82
  import type { PhaseCorrectionTwoDOptions } from '@zakodium/nmr-types';
83
83
  import { PointXY } from 'cheminfo-types';
84
- import type { Range } from '@zakodium/nmr-types';
84
+ import type { Range as Range_2 } from '@zakodium/nmr-types';
85
85
  import type { Ranges } from '@zakodium/nmr-types';
86
86
  import type { Shape1D } from 'ml-peak-shape-generator';
87
87
  import type { Shapes } from '@zakodium/nmr-types';
@@ -89,6 +89,7 @@ import type { Shift2DXFilterOptions } from '@zakodium/nmr-types';
89
89
  import type { Shift2DYFilterOptions } from '@zakodium/nmr-types';
90
90
  import type { ShiftXFilterOptions } from '@zakodium/nmr-types';
91
91
  import type { ShiftXOptions } from '@zakodium/nmr-types';
92
+ import { SignalKind } from '@zakodium/nmr-types';
92
93
  import type { SignalProcessingFilter } from '@zakodium/nmr-types';
93
94
  import type { SineBellOptions } from '@zakodium/nmr-types';
94
95
  import type { SymmetrizeCosyLikeOptions } from '@zakodium/nmr-types';
@@ -103,8 +104,6 @@ import type { ZeroFillingOptions } from '@zakodium/nmr-types';
103
104
  import type { Zone } from '@zakodium/nmr-types';
104
105
  import type { Zones } from '@zakodium/nmr-types';
105
106
 
106
- declare function addDefaultSignal(range: Range): void;
107
-
108
107
  declare type Apodization1D = FilterFactory<Entry1D, Apodization1DOptions> & Pick<Apodization1DFilterOptions, 'name'>;
109
108
 
110
109
  declare type ApodizationDimension1 = FilterFactory<Entry2D, Apodization2D1Options> & Pick<ApodizationDimension1Options, 'name'>;
@@ -326,10 +325,14 @@ declare interface CalculateT1OptionsOptimization {
326
325
  options?: Partial<LevenbergMarquardtOptionsDefault> & LevenbergMarquardtOptionsOverride;
327
326
  }
328
327
 
328
+ /**
329
+ * Common laboratory solvents database (carbon).
330
+ * @see https://doi.org/10.1021/jo971176v
331
+ */
329
332
  export declare const carbonImpurities: DatabaseNMREntry[];
330
333
 
331
334
  /**
332
- * check whether integral based on its kind can be included in another operation or not
335
+ * Check whether integral based on its kind can be included in another operation or not.
333
336
  * @param integral - integral
334
337
  * @returns
335
338
  */
@@ -337,9 +340,7 @@ export declare function checkIntegralKind(integral: Integral): boolean;
337
340
 
338
341
  export declare function checkMultiplicity(multiplicity: string, rejected?: OneLetterMultiplet[]): boolean;
339
342
 
340
- declare function checkRangeKind(range: Range): boolean;
341
-
342
- declare function checkSignalKinds(range: Range, kinds: string[]): boolean;
343
+ declare function checkSignalKinds(range: Range_2, kinds: ReadonlySet<SignalKind>): boolean;
343
344
 
344
345
  declare interface CompilePatternOptions {
345
346
  observedFrequencies?: number[] | Float64Array;
@@ -488,11 +489,6 @@ export declare interface DataResurrect {
488
489
 
489
490
  export declare type DataXReOptionalIm = Omit<DataXReIm, 'im'> & Partial<Pick<DataXReIm, 'im'>>;
490
491
 
491
- export declare const DatumKind: {
492
- signal: string;
493
- mixed: string;
494
- };
495
-
496
492
  export declare const default1DApodization: Shapes;
497
493
 
498
494
  declare const defaultDirectOptimizationOptions: {
@@ -557,6 +553,11 @@ declare interface EnableFilterOptions {
557
553
  logger?: Logger;
558
554
  }
559
555
 
556
+ /**
557
+ * Takes a potentially invalid signal kind and makes sure a valid kind is returned.
558
+ */
559
+ export declare function ensureValidSignalKind(kind: string | undefined): SignalKind;
560
+
560
561
  declare interface Entry1D {
561
562
  id?: string;
562
563
  data: NmrData1D;
@@ -941,8 +942,6 @@ export declare function getDatabase(url?: string, options?: {
941
942
  format?: 'tsv' | 'json';
942
943
  }): Promise<DatabaseNMREntry[]>;
943
944
 
944
- declare function getDiaIDs(range: Range): string[];
945
-
946
945
  /**
947
946
  * @deprecated use getRelativeFrequency instead
948
947
  */
@@ -956,8 +955,6 @@ declare interface GetKernelOptions {
956
955
 
957
956
  declare function getLineShapes(l: LineShapeData[]): LineShapeResult[];
958
957
 
959
- declare function getNbAtoms(range: Range, signalIndex?: number): number;
960
-
961
958
  export declare function getPeakDelta(peak: Peak1D | NMRPeak1D, shiftTarget: ShiftTarget, shift: number): {
962
959
  originalX: number;
963
960
  x: number;
@@ -1038,22 +1035,11 @@ declare interface HOSEPrediction {
1038
1035
 
1039
1036
  declare type ID = string;
1040
1037
 
1041
- export declare const impurities: SolventImpurities;
1042
-
1043
- export declare type Impurity = Record<string, ImpuritySignal[]>;
1044
-
1045
- export declare interface ImpuritySignal {
1046
- proton: string;
1047
- coupling: number;
1048
- multiplicity: string;
1049
- shift: number;
1050
- }
1051
-
1052
1038
  export declare function isEmptyMolecule(molecule: Molecule): boolean;
1053
1039
 
1054
1040
  export declare function isMolfileNotEmpty(molFile?: string): molFile is string;
1055
1041
 
1056
- export declare function isRangeExists(range: Pick<Range, 'from' | 'to'>, spectrum: Entry1D, error: number): boolean;
1042
+ export declare function isRangeExists(range: Pick<Range_2, 'from' | 'to'>, spectrum: Entry1D, error: number): boolean;
1057
1043
 
1058
1044
  export declare function isZoneExists(zone: Pick<Zone, 'x' | 'y'>, spectrum: Entry2D, error: Zone2DError): boolean;
1059
1045
 
@@ -1113,16 +1099,7 @@ declare type MakeMandatory<T, K extends keyof T> = T & {
1113
1099
  [P in K]-?: T[P];
1114
1100
  };
1115
1101
 
1116
- export declare function mapIntegrals(integrals: Integral[], spectrum: Entry1D, shiftTarget?: ShiftTarget): {
1117
- absolute: number;
1118
- originalFrom: number;
1119
- originalTo: number;
1120
- from: number;
1121
- to: number;
1122
- id: string;
1123
- integral: number;
1124
- kind: string;
1125
- }[];
1102
+ export declare function mapIntegrals(integrals: Integral[], spectrum: Entry1D, shiftTarget?: ShiftTarget): Integral[];
1126
1103
 
1127
1104
  declare interface MapOptions {
1128
1105
  checkIsExisting?: boolean;
@@ -1131,7 +1108,7 @@ declare interface MapOptions {
1131
1108
 
1132
1109
  export declare function mapPeaks(peaks: Peak1D[], spectrum: Entry1D, options?: MapOptions): Peak1D[];
1133
1110
 
1134
- export declare function mapRanges(ranges: Range[] | NMRRange[], spectrum: Entry1D, options?: MapOptions): Range[];
1111
+ export declare function mapRanges(ranges: Range_2[] | NMRRange[], spectrum: Entry1D, options?: MapOptions): Range_2[];
1135
1112
 
1136
1113
  export declare function mapZones(zones: Zone[], datum: Entry2D, options?: MapOptions): {
1137
1114
  signals: {
@@ -1149,7 +1126,7 @@ export declare function mapZones(zones: Zone[], datum: Entry2D, options?: MapOpt
1149
1126
  };
1150
1127
  }[] | undefined;
1151
1128
  id: string;
1152
- kind: string;
1129
+ kind: SignalKind;
1153
1130
  x: {
1154
1131
  originalDelta: number;
1155
1132
  delta: number;
@@ -1167,7 +1144,7 @@ export declare function mapZones(zones: Zone[], datum: Entry2D, options?: MapOpt
1167
1144
  pathLength?: number | FromTo;
1168
1145
  };
1169
1146
  }[];
1170
- kind: string;
1147
+ kind: SignalKind;
1171
1148
  x: {
1172
1149
  from: number;
1173
1150
  to: number;
@@ -1280,7 +1257,7 @@ export declare interface NMRSignal2D<T extends Peak2D = Peak2D> {
1280
1257
  };
1281
1258
  id?: string;
1282
1259
  peaks?: T[];
1283
- kind?: string;
1260
+ kind?: SignalKind;
1284
1261
  }
1285
1262
 
1286
1263
  export declare type NMRSignal2DWithID<T extends Peak2D = Peak2D> = MakeMandatory<NMRSignal2D<T>, 'id'>;
@@ -1380,28 +1357,6 @@ declare interface OptimizeSignalsOptionsLevenbergMarquardtOptimization {
1380
1357
 
1381
1358
  export declare type OptimizeSignalsOptionsOptimization = OptimizeSignalsOptionsDirectOptimization | OptimizeSignalsOptionsLevenbergMarquardtOptimization;
1382
1359
 
1383
- export declare interface OptionsPeaksFilterImpurities {
1384
- /**
1385
- * Frequency of the spectrometer to convert peak width from Hz to ppm
1386
- * @default 400
1387
- */
1388
- frequency?: number;
1389
- /**
1390
- * Solvent name.
1391
- */
1392
- solvent?: string;
1393
- /**
1394
- * tolerance in ppm to assign a impurity.
1395
- * @default 0.025
1396
- */
1397
- error?: number;
1398
- /**
1399
- * If it is true, it remove the peaks otherwise it assigns the kind of the signal with the name of the impurity
1400
- * @default false
1401
- */
1402
- remove?: boolean;
1403
- }
1404
-
1405
1360
  declare interface OptionsPeaksToRanges {
1406
1361
  /**
1407
1362
  * Number of hydrogens or some number to normalize the integration data. If it's zero return the absolute integration value
@@ -1531,7 +1486,7 @@ export declare interface OptionsXYAutoPeaksPicking extends Partial<GetPeakListOp
1531
1486
 
1532
1487
  declare interface OptionsXYAutoRangesPicking {
1533
1488
  peakPicking: OptionsXYAutoPeaksPicking;
1534
- impurities?: OptionsPeaksFilterImpurities;
1489
+ impurities?: PeaksMarkProtonLabSolventsOptions;
1535
1490
  ranges?: OptionsPeaksToRanges;
1536
1491
  logger?: Logger;
1537
1492
  }
@@ -1579,14 +1534,22 @@ export declare interface Peak2DSeries {
1579
1534
  z: number[];
1580
1535
  }
1581
1536
 
1582
- /**
1583
- * Filters impurities from a list of NMR peaks based on the specified options.
1584
- * @template T - The type of NMR peaks.
1585
- * @param peaks - The list of NMR peaks to be filtered.
1586
- * @param [options={}] - The options for filtering impurities.
1587
- * @returns The filtered list of NMR peaks.
1588
- */
1589
- export declare function peaksFilterImpurities<T extends NMRPeak1D>(peaks: T[], options?: OptionsPeaksFilterImpurities): T[];
1537
+ declare interface PeaksMarkProtonLabSolventsOptions {
1538
+ /**
1539
+ * Frequency of the spectrometer to convert peak width from Hz to ppm
1540
+ * @default 400
1541
+ */
1542
+ frequency?: number;
1543
+ /**
1544
+ * Solvent name.
1545
+ */
1546
+ solvent?: string;
1547
+ /**
1548
+ * tolerance in ppm to assign an impurity.
1549
+ * @default 0.025
1550
+ */
1551
+ error?: number;
1552
+ }
1590
1553
 
1591
1554
  /**
1592
1555
  * Generates an NMR Free Induction Decay (FID) signal from a list of peaks.
@@ -1952,6 +1915,10 @@ export declare interface PredictSpectraResult {
1952
1915
  }>;
1953
1916
  }
1954
1917
 
1918
+ /**
1919
+ * Common laboratory solvents database (proton).
1920
+ * @see https://doi.org/10.1021/jo971176v
1921
+ */
1955
1922
  export declare const protonImpurities: DatabaseNMREntry[];
1956
1923
 
1957
1924
  export declare function rangeFromSignal(signal: NMRSignal1D, options?: RangeFromSignalOptions): {
@@ -2098,13 +2065,6 @@ export declare interface RangeToXYOptions {
2098
2065
 
2099
2066
  export declare namespace RangeUtilities {
2100
2067
  export {
2101
- getDiaIDs,
2102
- getNbAtoms,
2103
- setNbAtoms,
2104
- resetDiaIDs,
2105
- unlink,
2106
- addDefaultSignal,
2107
- checkRangeKind,
2108
2068
  checkSignalKinds
2109
2069
  }
2110
2070
  }
@@ -2124,8 +2084,6 @@ export declare function reimComplexBackwardLinearPrediction(data: DataReIm, opti
2124
2084
  im: Float64Array<ArrayBuffer>;
2125
2085
  };
2126
2086
 
2127
- declare function resetDiaIDs(range: Range): void;
2128
-
2129
2087
  declare interface RestrictionByCS {
2130
2088
  chemicalShiftRestriction: boolean;
2131
2089
  tolerance: Record<string, number>;
@@ -2144,8 +2102,6 @@ export declare interface ResurrectOptions {
2144
2102
  logger?: Logger;
2145
2103
  }
2146
2104
 
2147
- declare function setNbAtoms(range: Range, signalIndex?: number): void;
2148
-
2149
2105
  declare type Shape1DWithFWHM = Omit<Shape1D, 'fwhm'> & {
2150
2106
  fwhm: number;
2151
2107
  };
@@ -2249,12 +2205,9 @@ export declare interface SignalJoinCouplingsOptions {
2249
2205
  ignoreDiaIDs?: boolean;
2250
2206
  }
2251
2207
 
2252
- export declare const SignalKinds: Array<{
2253
- label: string;
2254
- value: string;
2255
- }>;
2208
+ export declare const signalKindLabelMapping: Readonly<Record<SignalKind, string>>;
2256
2209
 
2257
- export declare const SignalKindsToInclude: string[];
2210
+ export declare const signalKindsToInclude: ReadonlySet<SignalKind>;
2258
2211
 
2259
2212
  /**
2260
2213
  * Return
@@ -2474,8 +2427,6 @@ declare interface SineSquare<ShapeOption = SineBellOptions> {
2474
2427
  options: ShapeOption;
2475
2428
  }
2476
2429
 
2477
- export declare type SolventImpurities = Record<string, Impurity>;
2478
-
2479
2430
  export declare function solventSuppression<T extends NMRPeak1D>(peakList: T[], solvent: NMRSignal1D[], options?: {
2480
2431
  markSolventPeaks?: boolean;
2481
2432
  solventZoneExtension?: number;
@@ -2616,301 +2567,286 @@ declare interface TwoDOptions {
2616
2567
  };
2617
2568
  }
2618
2569
 
2619
- declare function unlink(range: Range, options?: UnlinkOptions): Range;
2570
+ export declare function updateIntegralsRelativeValues(spectrum: Entry1D, forceCalculateIntegral?: boolean): void;
2571
+
2572
+ export declare function updateRanges(spectrum: Entry1D): void;
2573
+
2574
+ export declare function updateRangesRelativeValues(spectrum: Entry1D, forceCalculateIntegral?: boolean): void;
2575
+
2576
+ export declare type WindowFunctions = Exponential | SineBell | SineSquare | Traf | Gaussian;
2620
2577
 
2621
2578
  /**
2622
- *
2623
- * @param {object} range
2624
- * @param {String('both' | 'range' | 'signal')} unlinkType
2625
- * @param {object} options
2626
- * @param {number} [options.signalIndex]
2627
- * @returns {object}
2628
- */
2629
- declare interface UnlinkOptions {
2630
- unlinkType?: 'both' | 'range' | 'signal';
2631
- signalIndex?: number;
2632
- }
2633
-
2634
- export declare function updateIntegralsRelativeValues(spectrum: Entry1D, forceCalculateIntegral?: boolean): void;
2635
-
2636
- export declare function updateRanges(spectrum: Entry1D): void;
2637
-
2638
- export declare function updateRangesRelativeValues(spectrum: Entry1D, forceCalculateIntegral?: boolean): void;
2639
-
2640
- export declare type WindowFunctions = Exponential | SineBell | SineSquare | Traf | Gaussian;
2641
-
2642
- /**
2643
- * Predict back points by singular value decomposition.
2644
- * to append the predicted points is it needed to append nbPoints zeros at the beginning of input data.
2645
- * @param data
2646
- * @param options
2647
- */
2648
- export declare function xBackwardLinearPrediction(data: DoubleArray, options: BackwardLPOptions): {
2649
- output: Float64Array<ArrayBufferLike>;
2650
- predicted: Float64Array<ArrayBuffer>;
2651
- };
2652
-
2653
- /**
2654
- * Predict back points by singular value decomposition.
2655
- * to append the predicted points is it needed to append nbPoints zeros at the beginning of input data.
2656
- * @param data
2657
- * @param options
2658
- */
2659
- export declare function xForwardLinearPrediction(data: DoubleArray, options: ForwardLPOptions): {
2660
- output: Float64Array<ArrayBufferLike>;
2661
- predicted: Float64Array<ArrayBuffer>;
2662
- };
2663
-
2664
- export declare interface XreimMultipletAnalysis {
2665
- analyzer?: AnalizeMultipletOptions;
2666
- autoPhase?: boolean;
2667
- }
2668
-
2669
- /**
2670
- * Determination of J couplings by recursive deconvolution in the frequency domain,
2671
- * it use the method published by Damien Jeannerat and Geoffrey Bodenhausen @link{https://doi.org/10.1006/jmre.1999.1845}
2672
- * @param data
2673
- * @param options
2674
- */
2675
- export declare function xreimMultipletAnalysis(
2676
- /**
2677
- * Imaginary data is optional for auto phase correction of the region before the analysis.
2678
- */
2679
- data: DataXReOptionalIm, options?: XreimMultipletAnalysis): any;
2680
-
2681
- export declare function xyAutoPeaksPicking(data: DataXY<Float64Array>, options: OptionsXYAutoPeaksPicking): NMRPeak1DWithShapeID[];
2682
-
2683
- /**
2684
- * error for default windowSize computation
2685
- * out in data, all data relative to the computation
2686
- */
2687
- export declare class XYAutoPeaksPickingWindowSizeError extends Error {
2688
- data: Record<string, unknown>;
2689
- constructor(data: Record<string, unknown>);
2690
- }
2691
-
2692
- /**
2693
- * Detect peaks, optimize parameters and compile multiplicity if required.
2694
- * @param data
2695
- * @param options
2696
- */
2697
- export declare function xyAutoRangesPicking(data: DataXY<Float64Array>, options: OptionsXYAutoRangesPicking): NMRRange[];
2698
-
2699
- /**
2700
- * Estimate the diffusion coefficient of an independent component by fitting of imput data with the Stejskal–Tanner equation.
2701
- * @param data
2702
- * @param options
2703
- */
2704
- export declare function xyCalculateDiffussionCoefficient(
2705
- /**
2706
- * x is the amplitude of the pulse field gradient
2707
- * y is the exponential decay signal.
2708
- */
2709
- data: DataXY, options: CalculateDiffussionCoefficientOptions): {
2710
- regression: DiffusionRegression;
2711
- coefficient: number;
2712
- signalAbsenseDiffussion: number;
2713
- };
2714
-
2715
- export declare function xyCalculateT1(data: DataXY, options?: CalculateT1Options): XYCalculateT1Return;
2716
-
2717
- declare interface XYCalculateT1Return {
2718
- relaxationT1: number;
2719
- fullMagnetization: number;
2720
- regression: T1Regression;
2721
- }
2722
-
2723
- export declare function xyGetPivot(data: DataXY<Float64Array>, options?: {
2724
- thresholdFactor?: number;
2725
- frequency?: number;
2726
- }): PointXY;
2727
-
2728
- export declare function xyKineticFirstOrder(data: DataXY): {
2729
- regression: ExponentialRegression;
2730
- rateConstant: number;
2731
- initialConcentration: number;
2732
- };
2733
-
2734
- declare interface XYObjectSidePointOptions {
2735
- minX: number;
2736
- maxX: number;
2737
- thresholdFactor?: number;
2738
- }
2739
-
2740
- export declare function xyPeaksOptimization<T extends PeakXYWidth>(data: DataXY, peaks: T[], options: XYPeaksOptimizationOptions): (T extends {
2741
- id: string;
2742
- } ? GSDPeakOptimizedID : GSDPeakOptimized)[];
2743
-
2744
- export declare interface XYPeaksOptimizationOptions extends OptimizePeaksOptions {
2745
- /**
2746
- * frequency to convert width and fwhm to ppm.
2747
- */
2748
- frequency: number;
2749
- }
2750
-
2751
- /**
2752
- * Bidimensional automatic phase correction, based in the idea to see the spectrum as a bitmap,
2753
- * where the number of white pixels will be bigger in a phased spectrum (whitening concept). Further information can be found in the
2754
- * publication of Balacco and Cobas (DOI: {@link https://doi.org/10.1002/mrc.2394}). This method use a incremental search instead of simplex algorithm.
2755
- * @param data
2756
- * @param options
2757
- */
2758
- export declare function xyzAutoPhaseCorrection(data: NmrData2DFt, options?: AutoPhaseCorrection2D): Required<PhaseCorrectionTwoDOptions>;
2759
-
2760
- export declare function xyzAutoSignalsPicking(spectraData: NmrData2DContent, options: XYZAutoSignalsPickingOptions): NMRSignal2DWithID<Peak2D & {
2761
- id: string;
2762
- }>[];
2763
-
2764
- export declare interface XYZAutoSignalsPickingOptions {
2765
- /**
2766
- * max number of points in any dimension to pad the input data, this is needed to avoid lost peaks when the input matrix is too small.
2767
- * @default 14
2768
- */
2769
- sizeToPad?: number;
2770
- /**
2771
- * If it's true, try to find the real maximum for each bidimensional peak.
2772
- * @default true
2773
- */
2774
- realTopDetection?: boolean;
2775
- /**
2776
- * positive value filter small peaks by intensity
2777
- * @default 0.5
2778
- */
2779
- thresholdFactor?: number;
2780
- /**
2781
- * specify the nuclei of each dimension
2782
- * @default ['1H','1H']
2783
- */
2784
- nuclei?: string[];
2785
- /**
2786
- * specify the frequency for each dimension.
2787
- */
2788
- observedFrequencies: number[] | Float64Array;
2789
- /**
2790
- * If it's true, it try to ajust the shift and add missing cross peaks, useful only for homonuclear data.
2791
- * @default false
2792
- */
2793
- enhanceSymmetry?: boolean;
2794
- /**
2795
- * If it's true, peaks with less than a specific percentage (maxPercentCutOff) of the maximum intensity will be removed.
2796
- * @default true;
2797
- */
2798
- clean?: boolean;
2799
- /**
2800
- * percentage of maximum intensity as cutoff for small peaks.
2801
- * @default 0.03
2802
- */
2803
- maxPercentCutOff?: number;
2804
- /**
2805
- * Specify the minimum distance in Hz for each dimension to join peaks in a signal.
2806
- * @default [24,24]
2807
- */
2808
- tolerances?: number[];
2809
- /**
2810
- * If it is true, the convolution will be forced by FFT
2811
- * @default true
2812
- */
2813
- convolutionByFFT?: boolean;
2814
- /**
2815
- * kernel options to calculate a laplacianOfGaussian kernel with a specify size.
2816
- */
2817
- kernel?: GetKernelOptions;
2818
- }
2819
-
2820
- export declare function xyzAutoZonesPicking(spectraData: NmrData2DContent, options: XYZAutoZonesPickingOptions): NMRZoneWithID[];
2821
-
2822
- export declare interface XYZAutoZonesPickingOptions {
2823
- /**
2824
- * max number of points in any dimension to pad the input data, this is needed to avoid lost peaks when the input matrix is too small.
2825
- * @default 14
2826
- */
2827
- sizeToPad?: number;
2828
- /**
2829
- * If it's true, try to find the real maximum for each bidimensional peak.
2830
- * @default true
2831
- */
2832
- realTopDetection?: boolean;
2833
- /**
2834
- * positive value filter small peaks by intensity
2835
- * @default 0.5
2836
- */
2837
- thresholdFactor?: number;
2838
- /**
2839
- * specify the nuclei of each dimension
2840
- * @default ['1H','1H']
2841
- */
2842
- nuclei?: string[];
2843
- /**
2844
- * specify the frequency for each dimension.
2845
- */
2846
- observedFrequencies: number[] | Float64Array;
2847
- /**
2848
- * If it's true, it try to ajust the shift and add missing cross peaks, useful only for homonuclear data.
2849
- * @default false
2850
- */
2851
- enhanceSymmetry?: boolean;
2852
- /**
2853
- * If it's true, peaks with less than a specific percentage (maxPercentCutOff) of the maximum intensity will be removed.
2854
- * @default true;
2855
- */
2856
- clean?: boolean;
2857
- /**
2858
- * percentage of maximum intensity as cutoff for small peaks.
2859
- * @default 0.03
2860
- */
2861
- maxPercentCutOff?: number;
2862
- /**
2863
- * Specify the minimum distance in Hz for each dimension to join peaks in a signal.
2864
- * @default [24,24]
2865
- */
2866
- tolerances?: number[];
2867
- /**
2868
- * If it is true, the convolution will be forced by FFT
2869
- * @default true
2870
- */
2871
- convolutionByFFT?: boolean;
2872
- /**
2873
- * kernel options to calculate a laplacianOfGaussian kernel with a specify size.
2874
- */
2875
- kernel?: GetKernelOptions;
2876
- }
2877
-
2878
- export declare function xyzJResAnalyzer(signals: NMRSignal2D[], options?: XYZJResAnalyzerOptions): NMRZoneWithID[] | (NMRSignal2D<Peak2D> & {
2879
- id: string;
2880
- })[];
2881
-
2882
- declare interface XYZJResAnalyzerOptions extends CompilePatternOptions {
2883
- /**
2884
- * maximum difference in Hz to discard if the signal is symmetric.
2885
- * @default 0.08
2886
- */
2887
- referenceMaxShiftError?: number;
2888
- /**
2889
- * reference value in Hz
2890
- * @default 0
2891
- */
2892
- reference?: number;
2893
- /**
2894
- * if it is true returns zones instead of signals 2D
2895
- * @default false
2896
- */
2897
- getZones?: boolean;
2898
- }
2899
-
2900
- export declare function xyzPhaseCorrection(data: NmrData2DFt, options: PhaseCorrectionTwoDOptions): NmrData2DFt;
2901
-
2902
- declare type ZeroFilling = FilterFactory<Entry1D, ZeroFillingOptions> & Pick<ZeroFillingFilterOptions, 'name'>;
2903
-
2904
- declare type ZeroFillingDimension1 = FilterFactory<Entry2D, ZeroFillingOptions> & Pick<ZeroFillingDimension1Options, 'name'>;
2905
-
2906
- declare type ZeroFillingDimension2 = FilterFactory<Entry2D, ZeroFillingOptions> & Pick<ZeroFillingDimension2Options, 'name'>;
2907
-
2908
- export declare interface Zone2DError {
2909
- x: number;
2910
- y: number;
2911
- }
2912
-
2913
-
2914
- export * from "gyromagnetic-ratio";
2915
-
2916
- export { }
2579
+ * Predict back points by singular value decomposition.
2580
+ * to append the predicted points is it needed to append nbPoints zeros at the beginning of input data.
2581
+ * @param data
2582
+ * @param options
2583
+ */
2584
+ export declare function xBackwardLinearPrediction(data: DoubleArray, options: BackwardLPOptions): {
2585
+ output: Float64Array<ArrayBufferLike>;
2586
+ predicted: Float64Array<ArrayBuffer>;
2587
+ };
2588
+
2589
+ /**
2590
+ * Predict back points by singular value decomposition.
2591
+ * to append the predicted points is it needed to append nbPoints zeros at the beginning of input data.
2592
+ * @param data
2593
+ * @param options
2594
+ */
2595
+ export declare function xForwardLinearPrediction(data: DoubleArray, options: ForwardLPOptions): {
2596
+ output: Float64Array<ArrayBufferLike>;
2597
+ predicted: Float64Array<ArrayBuffer>;
2598
+ };
2599
+
2600
+ export declare interface XreimMultipletAnalysis {
2601
+ analyzer?: AnalizeMultipletOptions;
2602
+ autoPhase?: boolean;
2603
+ }
2604
+
2605
+ /**
2606
+ * Determination of J couplings by recursive deconvolution in the frequency domain,
2607
+ * it use the method published by Damien Jeannerat and Geoffrey Bodenhausen @link{https://doi.org/10.1006/jmre.1999.1845}
2608
+ * @param data
2609
+ * @param options
2610
+ */
2611
+ export declare function xreimMultipletAnalysis(
2612
+ /**
2613
+ * Imaginary data is optional for auto phase correction of the region before the analysis.
2614
+ */
2615
+ data: DataXReOptionalIm, options?: XreimMultipletAnalysis): any;
2616
+
2617
+ export declare function xyAutoPeaksPicking(data: DataXY<Float64Array>, options: OptionsXYAutoPeaksPicking): NMRPeak1DWithShapeID[];
2618
+
2619
+ /**
2620
+ * error for default windowSize computation
2621
+ * out in data, all data relative to the computation
2622
+ */
2623
+ export declare class XYAutoPeaksPickingWindowSizeError extends Error {
2624
+ data: Record<string, unknown>;
2625
+ constructor(data: Record<string, unknown>);
2626
+ }
2627
+
2628
+ /**
2629
+ * Detect peaks, optimize parameters and compile multiplicity if required.
2630
+ * @param data
2631
+ * @param options
2632
+ */
2633
+ export declare function xyAutoRangesPicking(data: DataXY<Float64Array>, options: OptionsXYAutoRangesPicking): NMRRange[];
2634
+
2635
+ /**
2636
+ * Estimate the diffusion coefficient of an independent component by fitting of imput data with the Stejskal–Tanner equation.
2637
+ * @param data
2638
+ * @param options
2639
+ */
2640
+ export declare function xyCalculateDiffussionCoefficient(
2641
+ /**
2642
+ * x is the amplitude of the pulse field gradient
2643
+ * y is the exponential decay signal.
2644
+ */
2645
+ data: DataXY, options: CalculateDiffussionCoefficientOptions): {
2646
+ regression: DiffusionRegression;
2647
+ coefficient: number;
2648
+ signalAbsenseDiffussion: number;
2649
+ };
2650
+
2651
+ export declare function xyCalculateT1(data: DataXY, options?: CalculateT1Options): XYCalculateT1Return;
2652
+
2653
+ declare interface XYCalculateT1Return {
2654
+ relaxationT1: number;
2655
+ fullMagnetization: number;
2656
+ regression: T1Regression;
2657
+ }
2658
+
2659
+ export declare function xyGetPivot(data: DataXY<Float64Array>, options?: {
2660
+ thresholdFactor?: number;
2661
+ frequency?: number;
2662
+ }): PointXY;
2663
+
2664
+ export declare function xyKineticFirstOrder(data: DataXY): {
2665
+ regression: ExponentialRegression;
2666
+ rateConstant: number;
2667
+ initialConcentration: number;
2668
+ };
2669
+
2670
+ declare interface XYObjectSidePointOptions {
2671
+ minX: number;
2672
+ maxX: number;
2673
+ thresholdFactor?: number;
2674
+ }
2675
+
2676
+ export declare function xyPeaksOptimization<T extends PeakXYWidth>(data: DataXY, peaks: T[], options: XYPeaksOptimizationOptions): (T extends {
2677
+ id: string;
2678
+ } ? GSDPeakOptimizedID : GSDPeakOptimized)[];
2679
+
2680
+ export declare interface XYPeaksOptimizationOptions extends OptimizePeaksOptions {
2681
+ /**
2682
+ * frequency to convert width and fwhm to ppm.
2683
+ */
2684
+ frequency: number;
2685
+ }
2686
+
2687
+ /**
2688
+ * Bidimensional automatic phase correction, based in the idea to see the spectrum as a bitmap,
2689
+ * where the number of white pixels will be bigger in a phased spectrum (whitening concept). Further information can be found in the
2690
+ * publication of Balacco and Cobas (DOI: {@link https://doi.org/10.1002/mrc.2394}). This method use a incremental search instead of simplex algorithm.
2691
+ * @param data
2692
+ * @param options
2693
+ */
2694
+ export declare function xyzAutoPhaseCorrection(data: NmrData2DFt, options?: AutoPhaseCorrection2D): Required<PhaseCorrectionTwoDOptions>;
2695
+
2696
+ export declare function xyzAutoSignalsPicking(spectraData: NmrData2DContent, options: XYZAutoSignalsPickingOptions): NMRSignal2DWithID<Peak2D & {
2697
+ id: string;
2698
+ }>[];
2699
+
2700
+ export declare interface XYZAutoSignalsPickingOptions {
2701
+ /**
2702
+ * max number of points in any dimension to pad the input data, this is needed to avoid lost peaks when the input matrix is too small.
2703
+ * @default 14
2704
+ */
2705
+ sizeToPad?: number;
2706
+ /**
2707
+ * If it's true, try to find the real maximum for each bidimensional peak.
2708
+ * @default true
2709
+ */
2710
+ realTopDetection?: boolean;
2711
+ /**
2712
+ * positive value filter small peaks by intensity
2713
+ * @default 0.5
2714
+ */
2715
+ thresholdFactor?: number;
2716
+ /**
2717
+ * specify the nuclei of each dimension
2718
+ * @default ['1H','1H']
2719
+ */
2720
+ nuclei?: string[];
2721
+ /**
2722
+ * specify the frequency for each dimension.
2723
+ */
2724
+ observedFrequencies: number[] | Float64Array;
2725
+ /**
2726
+ * If it's true, it try to ajust the shift and add missing cross peaks, useful only for homonuclear data.
2727
+ * @default false
2728
+ */
2729
+ enhanceSymmetry?: boolean;
2730
+ /**
2731
+ * If it's true, peaks with less than a specific percentage (maxPercentCutOff) of the maximum intensity will be removed.
2732
+ * @default true;
2733
+ */
2734
+ clean?: boolean;
2735
+ /**
2736
+ * percentage of maximum intensity as cutoff for small peaks.
2737
+ * @default 0.03
2738
+ */
2739
+ maxPercentCutOff?: number;
2740
+ /**
2741
+ * Specify the minimum distance in Hz for each dimension to join peaks in a signal.
2742
+ * @default [24,24]
2743
+ */
2744
+ tolerances?: number[];
2745
+ /**
2746
+ * If it is true, the convolution will be forced by FFT
2747
+ * @default true
2748
+ */
2749
+ convolutionByFFT?: boolean;
2750
+ /**
2751
+ * kernel options to calculate a laplacianOfGaussian kernel with a specify size.
2752
+ */
2753
+ kernel?: GetKernelOptions;
2754
+ }
2755
+
2756
+ export declare function xyzAutoZonesPicking(spectraData: NmrData2DContent, options: XYZAutoZonesPickingOptions): NMRZoneWithID[];
2757
+
2758
+ export declare interface XYZAutoZonesPickingOptions {
2759
+ /**
2760
+ * max number of points in any dimension to pad the input data, this is needed to avoid lost peaks when the input matrix is too small.
2761
+ * @default 14
2762
+ */
2763
+ sizeToPad?: number;
2764
+ /**
2765
+ * If it's true, try to find the real maximum for each bidimensional peak.
2766
+ * @default true
2767
+ */
2768
+ realTopDetection?: boolean;
2769
+ /**
2770
+ * positive value filter small peaks by intensity
2771
+ * @default 0.5
2772
+ */
2773
+ thresholdFactor?: number;
2774
+ /**
2775
+ * specify the nuclei of each dimension
2776
+ * @default ['1H','1H']
2777
+ */
2778
+ nuclei?: string[];
2779
+ /**
2780
+ * specify the frequency for each dimension.
2781
+ */
2782
+ observedFrequencies: number[] | Float64Array;
2783
+ /**
2784
+ * If it's true, it try to ajust the shift and add missing cross peaks, useful only for homonuclear data.
2785
+ * @default false
2786
+ */
2787
+ enhanceSymmetry?: boolean;
2788
+ /**
2789
+ * If it's true, peaks with less than a specific percentage (maxPercentCutOff) of the maximum intensity will be removed.
2790
+ * @default true;
2791
+ */
2792
+ clean?: boolean;
2793
+ /**
2794
+ * percentage of maximum intensity as cutoff for small peaks.
2795
+ * @default 0.03
2796
+ */
2797
+ maxPercentCutOff?: number;
2798
+ /**
2799
+ * Specify the minimum distance in Hz for each dimension to join peaks in a signal.
2800
+ * @default [24,24]
2801
+ */
2802
+ tolerances?: number[];
2803
+ /**
2804
+ * If it is true, the convolution will be forced by FFT
2805
+ * @default true
2806
+ */
2807
+ convolutionByFFT?: boolean;
2808
+ /**
2809
+ * kernel options to calculate a laplacianOfGaussian kernel with a specify size.
2810
+ */
2811
+ kernel?: GetKernelOptions;
2812
+ }
2813
+
2814
+ export declare function xyzJResAnalyzer(signals: NMRSignal2D[], options?: XYZJResAnalyzerOptions): NMRZoneWithID[] | (NMRSignal2D<Peak2D> & {
2815
+ id: string;
2816
+ })[];
2817
+
2818
+ declare interface XYZJResAnalyzerOptions extends CompilePatternOptions {
2819
+ /**
2820
+ * maximum difference in Hz to discard if the signal is symmetric.
2821
+ * @default 0.08
2822
+ */
2823
+ referenceMaxShiftError?: number;
2824
+ /**
2825
+ * reference value in Hz
2826
+ * @default 0
2827
+ */
2828
+ reference?: number;
2829
+ /**
2830
+ * if it is true returns zones instead of signals 2D
2831
+ * @default false
2832
+ */
2833
+ getZones?: boolean;
2834
+ }
2835
+
2836
+ export declare function xyzPhaseCorrection(data: NmrData2DFt, options: PhaseCorrectionTwoDOptions): NmrData2DFt;
2837
+
2838
+ declare type ZeroFilling = FilterFactory<Entry1D, ZeroFillingOptions> & Pick<ZeroFillingFilterOptions, 'name'>;
2839
+
2840
+ declare type ZeroFillingDimension1 = FilterFactory<Entry2D, ZeroFillingOptions> & Pick<ZeroFillingDimension1Options, 'name'>;
2841
+
2842
+ declare type ZeroFillingDimension2 = FilterFactory<Entry2D, ZeroFillingOptions> & Pick<ZeroFillingDimension2Options, 'name'>;
2843
+
2844
+ export declare interface Zone2DError {
2845
+ x: number;
2846
+ y: number;
2847
+ }
2848
+
2849
+
2850
+ export * from "gyromagnetic-ratio";
2851
+
2852
+ export { }