nmr-processing 18.1.0 → 19.0.1

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.
@@ -1,80 +1,124 @@
1
1
  import type { AnalizeMultipletOptions } from 'multiplet-analysis';
2
+ import type { Apodization1DFilterOptions } from '@zakodium/nmr-types';
3
+ import type { Apodization1DOptions } from '@zakodium/nmr-types';
4
+ import type { Apodization2D1Options } from '@zakodium/nmr-types';
5
+ import type { Apodization2D2Options } from '@zakodium/nmr-types';
6
+ import type { ApodizationDimension1Options } from '@zakodium/nmr-types';
7
+ import type { ApodizationDimension2Options } from '@zakodium/nmr-types';
8
+ import type { AutoPhaseCorrection2D } from '@zakodium/nmr-types';
9
+ import type { BackwardLinearPredictionFilterOptions } from '@zakodium/nmr-types';
10
+ import type { BackwardLPDimension1Options } from '@zakodium/nmr-types';
11
+ import type { BackwardLPDimension2Options } from '@zakodium/nmr-types';
12
+ import type { BackwardLPOptions } from '@zakodium/nmr-types';
13
+ import type { BaselineCorrection2DFilterOptions } from '@zakodium/nmr-types';
14
+ import type { BaselineCorrectionFilterOptions } from '@zakodium/nmr-types';
15
+ import type { BaselineCorrectionOptions } from '@zakodium/nmr-types';
16
+ import type { BaselineCorrectionZone } from '@zakodium/nmr-types';
2
17
  import { BaseRegression } from 'ml-regression-base';
3
18
  import type { DataReIm } from 'ml-spectra-processing';
4
19
  import type { DataXReIm } from 'ml-spectra-processing';
5
20
  import { DataXY } from 'cheminfo-types';
21
+ import type { DigitalFilter2DOptions } from '@zakodium/nmr-types';
22
+ import type { DigitalFilterOption } from '@zakodium/nmr-types';
23
+ import type { DirectDimensionOptions } from '@zakodium/nmr-types';
24
+ import type { DirectOptions } from 'ml-direct';
6
25
  import type { DoubleArray } from 'cheminfo-types';
26
+ import type { EquallySpacedOptions } from '@zakodium/nmr-types';
27
+ import type { ExclusionZonesOptions } from '@zakodium/nmr-types';
28
+ import type { ExponentialOptions } from '@zakodium/nmr-types';
7
29
  import { ExponentialRegression } from 'ml-regression-exponential';
8
- import type { FilterXYType } from 'ml-signal-processing';
30
+ import type { FFT1DOptions } from '@zakodium/nmr-types';
31
+ import type { FFTDimension1Options } from '@zakodium/nmr-types';
32
+ import type { FFTDimension2Options } from '@zakodium/nmr-types';
33
+ import type { Filter1DEntry } from '@zakodium/nmr-types';
34
+ import type { Filter1DOptions } from '@zakodium/nmr-types';
35
+ import type { Filter2DEntry } from '@zakodium/nmr-types';
36
+ import type { Filter2DOptions } from '@zakodium/nmr-types';
37
+ import * as Filters from 'ml-signal-processing';
38
+ import type { FordwardLPDimension1Options } from '@zakodium/nmr-types';
39
+ import type { FordwardLPDimension2Options } from '@zakodium/nmr-types';
40
+ import type { ForwardLP1DOptions } from '@zakodium/nmr-types';
41
+ import type { ForwardLPOptions } from '@zakodium/nmr-types';
9
42
  import { FromTo } from 'cheminfo-types';
43
+ import type { GaussianOptions } from '@zakodium/nmr-types';
44
+ import { GeneralAssignment as GeneralAssignment_2 } from './utils/generalAssignment/buildAssignments.js';
10
45
  import type { GenerateSpectrumOptions } from 'spectrum-generator';
11
46
  import type { GroupedDiaID } from 'openchemlib-utils';
12
47
  import type { GSDOptions } from 'ml-gsd';
13
48
  import { GSDPeakOptimized } from 'ml-gsd';
14
49
  import { GSDPeakOptimizedID } from 'ml-gsd';
15
- import { Jcoupling as Jcoupling_2 } from './Jcoupling.js';
50
+ import type { IndirectDimensionOptions } from '@zakodium/nmr-types';
51
+ import type { Info1D } from '@zakodium/nmr-types';
52
+ import type { Info2D } from '@zakodium/nmr-types';
53
+ import type { Integral } from '@zakodium/nmr-types';
54
+ import type { Integrals } from '@zakodium/nmr-types';
55
+ import { Jcoupling } from '@zakodium/nmr-types';
16
56
  import type { JoinBroadPeaksOptions } from 'ml-gsd';
57
+ import type { LevenbergMarquardtOptions } from 'ml-levenberg-marquardt';
17
58
  import type { LightLogger } from 'cheminfo-types';
18
59
  import type { Logger } from 'cheminfo-types';
19
- import { MatchingMultiplicity as MatchingMultiplicity_2 } from '../index.js';
60
+ import { MatchingMultiplicity as MatchingMultiplicity_2 } from '../index.ts';
20
61
  import { Matrix } from 'ml-matrix';
62
+ import type { MatrixOptions } from '@zakodium/nmr-types';
21
63
  import type { Molecule } from 'openchemlib';
22
64
  import type { NmrData1D } from 'cheminfo-types';
23
65
  import type { NmrData2D } from 'cheminfo-types';
24
66
  import type { NmrData2DContent } from 'cheminfo-types';
25
67
  import type { NmrData2DFt } from 'cheminfo-types';
26
- import { NMRRange as NMRRange_2 } from './NMRRange.js';
68
+ import type { NMRPeak1D } from '@zakodium/nmr-types';
69
+ import { NMRRange } from '@zakodium/nmr-types';
70
+ import type { NMRSignal1D } from '@zakodium/nmr-types';
71
+ import { NMRZoneWithID as NMRZoneWithID_2 } from './xyzAutoZonesPicking.ts';
27
72
  import type { NumberArray } from 'cheminfo-types';
73
+ import type { NUSDimension2Options } from '@zakodium/nmr-types';
28
74
  import type { OCLMolecule } from 'cheminfo-types';
75
+ import { OneDimensionalAssignment as OneDimensionalAssignment_2 } from './utils/oneDimensionalAssignment/buildAssignments.js';
76
+ import { OneDimensionalAssignment as OneDimensionalAssignment_3 } from '../index.js';
29
77
  import { OneLetterMultiplet as OneLetterMultiplet_2 } from './MultiplicityPatterns.js';
30
78
  import type { OptimizePeaksOptions } from 'ml-gsd';
31
79
  import type { OptionsSG1D } from 'spectrum-generator';
32
- import type { Peak2D as Peak2D_2 } from 'ml-matrix-peaks-finder';
80
+ import type { Peak1D } from '@zakodium/nmr-types';
81
+ import { Peak2D } from 'ml-matrix-peaks-finder';
82
+ import type { Peaks } from '@zakodium/nmr-types';
33
83
  import type { PeakXYWidth } from 'cheminfo-types';
84
+ import type { PhaseCorrection1DFilterOptions } from '@zakodium/nmr-types';
85
+ import type { PhaseCorrection1DOptions } from '@zakodium/nmr-types';
86
+ import type { PhaseCorrection2DOptions } from '@zakodium/nmr-types';
87
+ import type { PhaseCorrectionTwoDFilter } from '@zakodium/nmr-types';
88
+ import type { PhaseCorrectionTwoDOptions } from '@zakodium/nmr-types';
34
89
  import { PointXY } from 'cheminfo-types';
90
+ import type { Range } from '@zakodium/nmr-types';
91
+ import type { Ranges } from '@zakodium/nmr-types';
35
92
  import type { Shape1D } from 'ml-peak-shape-generator';
36
- import { SpectraDataWithIds as SpectraDataWithIds_2 } from './nmrAssigment.js';
93
+ import type { Shapes } from '@zakodium/nmr-types';
94
+ import type { Shift2DXFilterOptions } from '@zakodium/nmr-types';
95
+ import type { Shift2DYFilterOptions } from '@zakodium/nmr-types';
96
+ import type { ShiftXFilterOptions } from '@zakodium/nmr-types';
97
+ import type { ShiftXOptions } from '@zakodium/nmr-types';
98
+ import type { SignalProcessingFilter } from '@zakodium/nmr-types';
99
+ import type { SineBellOptions } from '@zakodium/nmr-types';
100
+ import type { SymmetrizeCosyLikeOptions } from '@zakodium/nmr-types';
37
101
  import type { TopicMolecule } from 'openchemlib-utils';
102
+ import type { TrafOptions } from '@zakodium/nmr-types';
38
103
  import type { XDistributionStats } from 'ml-spectra-processing';
39
104
  import type { XRobustDistributionStats } from 'ml-spectra-processing';
40
- import type { XYEquallySpacedOptions } from 'ml-spectra-processing';
41
105
  import type { XYNumber } from 'spectrum-generator';
106
+ import type { ZeroFillingDimension1Options } from '@zakodium/nmr-types';
107
+ import type { ZeroFillingDimension2Options } from '@zakodium/nmr-types';
108
+ import type { ZeroFillingFilterOptions } from '@zakodium/nmr-types';
109
+ import type { ZeroFillingOptions } from '@zakodium/nmr-types';
110
+ import type { Zone } from '@zakodium/nmr-types';
111
+ import type { Zones } from '@zakodium/nmr-types';
42
112
 
43
- declare function addDefaultSignal(range: Range_2): void;
113
+ declare function addDefaultSignal(range: Range): void;
44
114
 
45
- export declare interface AirplsOptions {
46
- zones: BaselineCorrectionZone[];
47
- algorithm: 'airpls';
48
- maxIterations: number;
49
- tolerance: number;
50
- }
51
-
52
- declare type Apodization1D = FilterFactory<Entry1D, Apodization2DOptions> & Pick<Apodization1DFilterOptions, 'name'>;
53
-
54
- declare interface Apodization1DFilterOptions extends BaseFilter {
55
- name: 'apodization';
56
- value: Apodization2DOptions;
57
- }
115
+ declare type Apodization1D = FilterFactory<Entry1D, Apodization1DOptions> & Pick<Apodization1DFilterOptions, 'name'>;
58
116
 
59
- declare type Apodization2DOptions = Shapes;
60
- export { Apodization2DOptions as Apodization1DOptions }
61
- export { Apodization2DOptions }
117
+ declare type ApodizationDimension1 = FilterFactory<Entry2D, Apodization2D1Options> & Pick<ApodizationDimension1Options, 'name'>;
62
118
 
63
- declare type ApodizationDimension1 = FilterFactory<Entry2D, Apodization2DOptions> & Pick<ApodizationDimension1Options, 'name'>;
64
-
65
- declare interface ApodizationDimension1Options extends BaseFilter {
66
- name: 'apodizationDimension1';
67
- value: Apodization2DOptions;
68
- }
69
-
70
- declare type ApodizationDimension2 = FilterFactory<Entry2D, Apodization2DOptions> & Pick<ApodizationDimension2Options, 'name'>;
71
-
72
- declare interface ApodizationDimension2Options extends BaseFilter {
73
- name: 'apodizationDimension2';
74
- value: Apodization2DOptions;
75
- }
119
+ declare type ApodizationDimension2 = FilterFactory<Entry2D, Apodization2D2Options> & Pick<ApodizationDimension2Options, 'name'>;
76
120
 
77
- export declare function apodizationXReIm(data: Required<NmrData1D>, options: Apodization2DOptions): {
121
+ export declare function apodizationXReIm(data: Required<NmrData1D>, options: Apodization1DOptions): {
78
122
  x: Float64Array<ArrayBufferLike>;
79
123
  re: Float64Array<ArrayBufferLike>;
80
124
  im: Float64Array<ArrayBufferLike>;
@@ -179,10 +223,6 @@ declare interface AtomOutput {
179
223
 
180
224
  declare type AtomTypes = 'H' | 'C';
181
225
 
182
- export declare interface AutoPhaseCorrection2D {
183
- threshold?: number;
184
- }
185
-
186
226
  export declare interface AutoPhaseCorrectionOptions {
187
227
  minRegSize?: number;
188
228
  maxDistanceToJoin?: number;
@@ -193,84 +233,14 @@ export declare interface AutoPhaseCorrectionOptions {
193
233
 
194
234
  declare type BackwardLinearPrediction1D = FilterFactory<Entry1D, Partial<BackwardLPOptions>> & Pick<BackwardLinearPredictionFilterOptions, 'name'>;
195
235
 
196
- declare interface BackwardLinearPredictionFilterOptions extends BaseFilter {
197
- name: 'backwardLinearPrediction';
198
- value: Partial<BackwardLPOptions>;
199
- }
200
-
201
236
  declare type BackwardLPDimension1 = FilterFactory<Entry2D, Partial<BackwardLPOptions>> & Pick<BackwardLPDimension1Options, 'name'>;
202
237
 
203
- declare interface BackwardLPDimension1Options extends BaseFilter {
204
- name: 'blpDimension1';
205
- value: Partial<BackwardLPOptions>;
206
- }
207
-
208
238
  declare type BackwardLPDimension2 = FilterFactory<Entry2D, Partial<BackwardLPOptions>> & Pick<BackwardLPDimension2Options, 'name'>;
209
239
 
210
- declare interface BackwardLPDimension2Options extends BaseFilter {
211
- name: 'blpDimension2';
212
- value: Partial<BackwardLPOptions>;
213
- }
214
-
215
- export declare interface BackwardLPOptions {
216
- /**
217
- * Number of coefficients to be calculated in the SVD.
218
- */
219
- nbCoefficients: number;
220
- /**
221
- * Number of points used in the prediction.
222
- */
223
- nbInputs: number;
224
- /**
225
- * Number of points to predict
226
- */
227
- nbPoints: number;
228
- /**
229
- * Output array that could be used for in-place modification.
230
- */
231
- output?: Float64Array;
232
- }
233
-
234
- declare interface BaseField {
235
- key: string;
236
- level: number;
237
- name: string;
238
- description: string;
239
- }
240
-
241
- declare interface BaseFilter {
242
- enabled?: boolean;
243
- }
244
-
245
- declare interface BaseFilterEntry extends Required<BaseFilter> {
246
- id?: string;
247
- error?: string;
248
- }
249
-
250
- export declare type BaselineAlgorithms = 'airpls' | 'polynomial';
251
-
252
240
  declare type BaselineCorrection1D = FilterFactory<Entry1D, BaselineCorrectionOptions> & Pick<BaselineCorrectionFilterOptions, 'name'>;
253
241
 
254
242
  declare type BaselineCorrection2D = FilterFactory<Entry2D, Record<string, never>> & Pick<BaselineCorrection2DFilterOptions, 'name'>;
255
243
 
256
- declare interface BaselineCorrection2DFilterOptions extends BaseFilter {
257
- name: 'baselineCorrectionTwoDimensions';
258
- value: Record<string, never>;
259
- }
260
-
261
- declare interface BaselineCorrectionFilterOptions extends BaseFilter {
262
- name: 'baselineCorrection';
263
- value: BaselineCorrectionOptions;
264
- }
265
-
266
- export declare type BaselineCorrectionOptions = PolynomialOptions | AirplsOptions;
267
-
268
- export declare interface BaselineCorrectionZone {
269
- from: number;
270
- to: number;
271
- id: string;
272
- }
273
-
274
244
  export declare interface BaselineZoneOptions {
275
245
  /**
276
246
  * The width factor to use to enlarge the peaks width
@@ -306,10 +276,6 @@ declare interface BaselineZoneOptionsDietrich extends BaselineZoneOptions {
306
276
  maxDistanceToJoin?: number;
307
277
  }
308
278
 
309
- declare interface BasePeak {
310
- id: string;
311
- }
312
-
313
279
  declare interface BondInput {
314
280
  id: ID;
315
281
  b: number;
@@ -326,10 +292,6 @@ declare interface BondOutput {
326
292
  atoms: [ID, ID];
327
293
  }
328
294
 
329
- declare interface BooleanField extends Field<boolean> {
330
- type: 'boolean';
331
- }
332
-
333
295
  declare type CacheResult = EmptyValue | PredictionBase1D | Promise<EmptyValue | PredictionBase1D>;
334
296
 
335
297
  export declare interface CalculateDiffussionCoefficientOptions {
@@ -348,7 +310,12 @@ export declare interface CalculateDiffussionCoefficientOptions {
348
310
  }
349
311
 
350
312
  declare interface CalculateT1Options {
351
- optimization?: any;
313
+ optimization?: CalculateT1OptionsOptimization;
314
+ }
315
+
316
+ declare interface CalculateT1OptionsOptimization {
317
+ shapeFunc?: (parameters: number[]) => (x: number) => number;
318
+ options?: Partial<LevenbergMarquardtOptionsDefault> & LevenbergMarquardtOptionsOverride;
352
319
  }
353
320
 
354
321
  export declare const carbonImpurities: DatabaseNMREntry[];
@@ -362,11 +329,9 @@ export declare function checkIntegralKind(integral: Integral): boolean;
362
329
 
363
330
  export declare function checkMultiplicity(multiplicity: string, rejected?: OneLetterMultiplet[]): boolean;
364
331
 
365
- declare function checkRangeKind(range: Range_2): boolean;
366
-
367
- declare function checkSignalKinds(range: Range_2, kinds: string[]): boolean;
332
+ declare function checkRangeKind(range: Range): boolean;
368
333
 
369
- declare type CommonField = SelectField | StringField | NumberField | BooleanField | LabelField;
334
+ declare function checkSignalKinds(range: Range, kinds: string[]): boolean;
370
335
 
371
336
  declare interface CompilePatternOptions {
372
337
  observedFrequencies?: number[] | Float64Array;
@@ -528,6 +493,22 @@ export declare const DatumKind: {
528
493
 
529
494
  export declare const default1DApodization: Shapes;
530
495
 
496
+ declare const defaultDirectOptimizationOptions: {
497
+ iterations: number;
498
+ };
499
+
500
+ declare const defaultLMOptimizationOptions: {
501
+ damping: number;
502
+ maxIterations: number;
503
+ errorTolerance: number;
504
+ };
505
+
506
+ declare const defaultLMOptimizationOptions_2: {
507
+ damping: number;
508
+ maxIterations: number;
509
+ errorTolerance: number;
510
+ };
511
+
531
512
  declare function deleteFilter(datum: Entry1D, id?: string, logger?: Logger): void;
532
513
 
533
514
  declare function deleteFilter_2(datum: Entry2D, id?: string, logger?: Logger): void;
@@ -546,30 +527,17 @@ declare type DigitalFilter = FilterFactory<Entry1D, DigitalFilterOptions> & Pick
546
527
 
547
528
  declare type DigitalFilter2D = FilterFactory<Entry2D, DigitalFilterOptions_2> & Pick<DigitalFilter2DOptions, 'name'>;
548
529
 
549
- declare interface DigitalFilter2DOptions extends BaseFilter {
550
- name: 'digitalFilter2D';
551
- value: DigitalFilterOptions_2;
552
- }
530
+ declare type DigitalFilterOptions = DigitalFilterOption['value'];
553
531
 
554
- declare interface DigitalFilterOption extends BaseFilter {
555
- name: 'digitalFilter';
556
- value: DigitalFilterOptions;
557
- }
532
+ declare type DigitalFilterOptions_2 = DigitalFilter2DOptions['value'];
558
533
 
559
- declare interface DigitalFilterOptions {
560
- digitalFilterValue: number;
534
+ declare interface DirectOptimizationOptions extends DirectOptions {
535
+ directOptions?: DirectOptions;
536
+ minValues: ArrayLike<number>;
537
+ maxValues: ArrayLike<number>;
561
538
  }
562
539
 
563
- declare interface DigitalFilterOptions_2 {
564
- digitalFilterValue?: number;
565
- }
566
-
567
- export declare interface DirectDimensionOptions {
568
- acquisitionScheme?: string;
569
- reverse?: boolean;
570
- digitalFilterValue?: number;
571
- phaseCorrection?: PhaseCorrection;
572
- }
540
+ declare type DirectOptimizationOptionsDefaultsKeys = Extract<'minValues' | 'maxValues' | 'initialValues' | 'gradientDifference' | keyof typeof defaultDirectOptimizationOptions, keyof DirectOptimizationOptions>;
573
541
 
574
542
  declare type EmptyValue = void | undefined | null;
575
543
 
@@ -612,63 +580,23 @@ declare interface Entry2D<T extends NmrData2D = NmrData2D> {
612
580
 
613
581
  declare type EquallySpaced = FilterFactory<Entry1D, EquallySpacedFilterOptions> & Pick<EquallySpacedOptions, 'name'>;
614
582
 
615
- declare type EquallySpacedFilterOptions = Pick<XYEquallySpacedOptions, 'from' | 'to' | 'numberOfPoints' | 'exclusions'>;
616
-
617
- declare interface EquallySpacedOptions extends BaseFilter {
618
- name: 'equallySpaced';
619
- value: EquallySpacedFilterOptions;
620
- }
621
-
622
- declare interface ExclusionZone {
623
- id: string;
624
- from: number;
625
- to: number;
626
- }
583
+ declare type EquallySpacedFilterOptions = EquallySpacedOptions['value'];
627
584
 
628
585
  declare type ExclusionZones = FilterFactory<Entry1D, ExclusionZonesFilterOptions[]> & Pick<ExclusionZonesOptions, 'name'>;
629
586
 
630
- declare interface ExclusionZonesFilterOptions extends FromTo {
631
- id: string;
632
- }
633
-
634
- declare interface ExclusionZonesOptions extends BaseFilter {
635
- name: 'exclusionZones';
636
- value: ExclusionZonesFilterOptions[];
637
- }
587
+ declare type ExclusionZonesFilterOptions = ExclusionZonesOptions['value'][number];
638
588
 
639
589
  declare interface Exponential<ShapeOption = ExponentialOptions> {
640
590
  kind: 'exponential';
641
591
  options: ShapeOption;
642
592
  }
643
593
 
644
- declare interface ExponentialOptions {
645
- /**
646
- * line broadening value in Hz, a negative value will invert the shape
647
- */
648
- lineBroadening: number;
649
- }
650
-
651
594
  declare type FFT1D = FilterFactory<Entry1D, Record<string, never>> & Pick<FFT1DOptions, 'name'>;
652
595
 
653
- declare interface FFT1DOptions extends BaseFilter {
654
- name: 'fft';
655
- value: Record<string, never>;
656
- }
657
-
658
596
  declare type FFTDimension1 = FilterFactory<Entry2D, DirectDimensionOptions> & Pick<FFTDimension1Options, 'name'>;
659
597
 
660
- declare interface FFTDimension1Options extends BaseFilter {
661
- name: 'fftDimension1';
662
- value: DirectDimensionOptions;
663
- }
664
-
665
598
  declare type FFTDimension2 = FilterFactory<Entry2D, IndirectDimensionOptions> & Pick<FFTDimension2Options, 'name'>;
666
599
 
667
- declare interface FFTDimension2Options extends BaseFilter {
668
- name: 'fftDimension2';
669
- value: IndirectDimensionOptions;
670
- }
671
-
672
600
  export declare function fftDirectDimension(data: {
673
601
  re: DoubleArray[];
674
602
  im: DoubleArray[];
@@ -682,22 +610,10 @@ export declare function fftIndirectDimension(data: {
682
610
  im: DoubleArray[] | Matrix;
683
611
  }, options: IndirectDimensionOptions): Record<string, Matrix>;
684
612
 
685
- declare interface Field<T> extends BaseField {
686
- default: T;
687
- }
688
-
689
613
  export declare type Filter1D = FFT1D | BaselineCorrection1D | BackwardLinearPrediction1D | Apodization1D | DigitalFilter | EquallySpaced | ExclusionZones | ForwardLP1D | PhaseCorrection1D | ShiftX | SignalProcessing | ZeroFilling;
690
614
 
691
- export declare type Filter1DEntry = Filter1DOptions & BaseFilterEntry;
692
-
693
- export declare type Filter1DOptions = BaselineCorrectionFilterOptions | FFT1DOptions | ZeroFillingFilterOptions | SignalProcessingFilter | ShiftXFilterOptions | PhaseCorrection1DFilterOptions | ForwardLP1DOptions | ExclusionZonesOptions | EquallySpacedOptions | DigitalFilterOption | Apodization1DFilterOptions | BackwardLinearPredictionFilterOptions;
694
-
695
615
  export declare type Filter2D = ApodizationDimension1 | ApodizationDimension2 | BaselineCorrection2D | BackwardLPDimension1 | BackwardLPDimension2 | NUSDimension2 | FFTDimension1 | FFTDimension2 | FordwardLPDimension1 | FordwardLPDimension2 | DigitalFilter2D | PhaseCorrection2D | ZeroFillingDimension1 | ZeroFillingDimension2 | SymmetrizeCosyLike | Shift2DX | Shift2DY;
696
616
 
697
- export declare type Filter2DEntry = Filter2DOptions & BaseFilterEntry;
698
-
699
- export declare type Filter2DOptions = ApodizationDimension1Options | ApodizationDimension2Options | BaselineCorrection2DFilterOptions | BackwardLPDimension1Options | BackwardLPDimension2Options | DigitalFilter2DOptions | FFTDimension1Options | NUSDimension2Options | FFTDimension2Options | FordwardLPDimension1Options | FordwardLPDimension2Options | PhaseCorrection2DOptions | Shift2DXFilterOptions | Shift2DYFilterOptions | SymmetrizeCosyLikeOptions | ZeroFillingDimension1Options | ZeroFillingDimension2Options;
700
-
701
617
  export declare interface FilterDomainUpdateRules {
702
618
  updateYDomain: boolean;
703
619
  updateXDomain: boolean;
@@ -728,6 +644,10 @@ declare interface FilterFactory<EntryType, OptionsType> {
728
644
  domainUpdateRules: Readonly<FilterDomainUpdateRules>;
729
645
  }
730
646
 
647
+ declare type FilterFunction = Extract<FilterSymbols, Function>;
648
+
649
+ declare type FilterOptions = Extract<Parameters<FilterFunction>[1], object>;
650
+
731
651
  export declare const Filters1D: {
732
652
  [K in Filter1D['name']]: Extract<Filter1D, {
733
653
  name: K;
@@ -760,6 +680,8 @@ export declare namespace Filters2DManager {
760
680
  }
761
681
  }
762
682
 
683
+ declare type FilterSymbols = (typeof Filters)[keyof typeof Filters];
684
+
763
685
  /**
764
686
  * Look for a multiplet based on the pattern name or abbreviation.
765
687
  * @param name - pattern name or abbreviation.
@@ -779,64 +701,21 @@ export declare function findPivot(peaks: PointXY[], options: XYObjectSidePointOp
779
701
 
780
702
  declare type FordwardLPDimension1 = FilterFactory<Entry2D, Partial<BackwardLPOptions>> & Pick<FordwardLPDimension1Options, 'name'>;
781
703
 
782
- declare interface FordwardLPDimension1Options extends BaseFilter {
783
- name: 'flpDimension1';
784
- value: Partial<BackwardLPOptions>;
785
- }
786
-
787
704
  declare type FordwardLPDimension2 = FilterFactory<Entry2D, Partial<BackwardLPOptions>> & Pick<FordwardLPDimension2Options, 'name'>;
788
705
 
789
- declare interface FordwardLPDimension2Options extends BaseFilter {
790
- name: 'flpDimension2';
791
- value: Partial<BackwardLPOptions>;
792
- }
793
-
794
706
  declare type ForwardLP1D = FilterFactory<Entry1D, Partial<ForwardLPOptions>> & Pick<ForwardLP1DOptions, 'name'>;
795
707
 
796
- declare interface ForwardLP1DOptions extends BaseFilter {
797
- name: 'forwardLinearPrediction';
798
- value: Partial<ForwardLPOptions>;
799
- }
800
-
801
- export declare interface ForwardLPOptions {
802
- /**
803
- * Number of coefficients to be calculated in the SVD.
804
- */
805
- nbCoefficients: number;
806
- /**
807
- * Number of points used in the prediction.
808
- */
809
- nbInputs: number;
810
- /**
811
- * Number of points to predict
812
- */
813
- nbPoints: number;
814
- /**
815
- * Output array that could be used for in-place modification.
816
- */
817
- output?: Float64Array;
818
- }
819
-
820
708
  declare interface Gaussian<ShapeOption = GaussianOptions> {
821
709
  kind: 'gaussian';
822
710
  options: ShapeOption;
823
711
  }
824
712
 
825
- declare interface GaussianOptions {
826
- /**
827
- * Inverse Exponential Width, Hz
828
- */
829
- lineBroadening: number;
830
- /**
831
- * Location of Gauss Maximum, this value should be between 0 to 1
832
- */
833
- lineBroadeningCenter: number;
713
+ export declare interface GeneralAssignment {
714
+ score: number;
715
+ assignment: SpectraDataWithIds[];
834
716
  }
835
717
 
836
- export declare function get13CAssignments(ranges: NMRRange[], molecule: Molecule, options?: Get13CAssignmentsOptions): Promise<{
837
- score: any;
838
- assignment: NMRRangeWithIntegration[];
839
- }[]>;
718
+ export declare function get13CAssignments(ranges: NMRRange[], molecule: Molecule, options?: Get13CAssignmentsOptions): Promise<OneDimensionalAssignment_3[]>;
840
719
 
841
720
  export declare interface Get13CAssignmentsOptions {
842
721
  restrictionByCS?: Partial<RestrictionByCS1D>;
@@ -868,10 +747,7 @@ export declare interface Get13CAssignmentsOptions {
868
747
 
869
748
  export declare function get1DErrorFactor(spectrum: Entry1D): number;
870
749
 
871
- export declare function get1HAssignments(ranges: NMRRange[], molecule: Molecule, options?: Get1HAssignmentsOptions): Promise<{
872
- score: any;
873
- assignment: NMRRangeWithIntegration[];
874
- }[]>;
750
+ export declare function get1HAssignments(ranges: NMRRange[], molecule: Molecule, options?: Get1HAssignmentsOptions): Promise<OneDimensionalAssignment_2[]>;
875
751
 
876
752
  export declare interface Get1HAssignmentsOptions {
877
753
  restrictionByCS?: Partial<RestrictionByCS1D>;
@@ -903,10 +779,7 @@ export declare interface Get1HAssignmentsOptions {
903
779
 
904
780
  export declare function get2DErrorFactor(spectrum: Entry2D): Zone2DError;
905
781
 
906
- export declare function getAssignments(input: GetAutoAssignmentInput, options?: GetAssignmentsOptions): Promise<{
907
- score: any;
908
- assignment: SpectraDataWithIds_2[];
909
- }[]>;
782
+ export declare function getAssignments(input: GetAutoAssignmentInput, options?: GetAssignmentsOptions): Promise<GeneralAssignment_2[]>;
910
783
 
911
784
  export declare interface GetAssignmentsOptions {
912
785
  justAssign?: AtomTypes[][];
@@ -1015,7 +888,7 @@ export declare function getDatabase(url?: string, options?: {
1015
888
  format?: 'tsv' | 'json';
1016
889
  }): Promise<DatabaseNMREntry[]>;
1017
890
 
1018
- declare function getDiaIDs(range: Range_2): string[];
891
+ declare function getDiaIDs(range: Range): string[];
1019
892
 
1020
893
  /**
1021
894
  * calculate the frequency of a nucleus with respect to a reference nucleus
@@ -1036,7 +909,7 @@ declare interface GetKernelOptions {
1036
909
 
1037
910
  declare function getLineShapes(l: LineShapeData[]): LineShapeResult[];
1038
911
 
1039
- declare function getNbAtoms(range: Range_2, signalIndex?: number): number;
912
+ declare function getNbAtoms(range: Range, signalIndex?: number): number;
1040
913
 
1041
914
  export declare function getPeakDelta(peak: Peak1D | NMRPeak1D, shiftTarget: ShiftTarget, shift: number): {
1042
915
  originalX: number;
@@ -1117,87 +990,11 @@ export declare interface ImpuritySignal {
1117
990
  shift: number;
1118
991
  }
1119
992
 
1120
- export declare interface IndirectDimensionOptions {
1121
- acquisitionScheme?: string;
1122
- reverse?: boolean;
1123
- phaseCorrection?: PhaseCorrection_2;
1124
- }
1125
-
1126
- declare interface Info {
1127
- owner?: string;
1128
- isFid: boolean;
1129
- date?: string;
1130
- localeDate?: string;
1131
- epoch?: number;
1132
- phc1?: number;
1133
- phc0?: number;
1134
- aqMod?: number;
1135
- isComplex: boolean;
1136
- dimension: number;
1137
- isFt: boolean;
1138
- experiment?: any;
1139
- digitalFilter?: number;
1140
- experimentNumber?: number;
1141
- solvent?: string;
1142
- pulseSequence?: string;
1143
- name: string;
1144
- }
1145
-
1146
- export declare interface Info1D extends Info {
1147
- nucleus: string;
1148
- spectralWidth: number;
1149
- originFrequency: number;
1150
- baseFrequency?: number;
1151
- digitalFilter?: number;
1152
- frequencyOffset?: number;
1153
- owner?: string;
1154
- reverse?: boolean;
1155
- decim?: number;
1156
- dspfvs?: number;
1157
- lpNumberOfCoefficients?: number;
1158
- tdOff?: number;
1159
- spectrumSize?: number;
1160
- numberOfPoints?: number;
1161
- linearPredictionBin?: number;
1162
- }
1163
-
1164
- export declare interface Info2D extends Info {
1165
- nucleus: string[];
1166
- isFtDimensionOne: boolean;
1167
- digitalFilter?: number;
1168
- originFrequency: number[];
1169
- baseFrequency: number[];
1170
- frequencyOffset: number[];
1171
- spectralWidth: number[];
1172
- reverse?: boolean[];
1173
- lpNumberOfCoefficients?: number[];
1174
- tdOff?: number[];
1175
- spectrumSize: number[];
1176
- numberOfPoints: number[];
1177
- linearPredictionBin?: number[];
1178
- }
1179
-
1180
- export declare interface Integral {
1181
- id: string;
1182
- originalFrom: number;
1183
- originalTo: number;
1184
- from: number;
1185
- to: number;
1186
- absolute: number;
1187
- integral: number;
1188
- kind: string;
1189
- }
1190
-
1191
- export declare interface Integrals {
1192
- values: Integral[];
1193
- options: SumOptions;
1194
- }
1195
-
1196
993
  export declare function isEmptyMolecule(molecule: Molecule): boolean;
1197
994
 
1198
995
  export declare function isMolfileNotEmpty(molFile?: string): molFile is string;
1199
996
 
1200
- export declare function isRangeExists(range: Pick<Range_2, 'from' | 'to'>, spectrum: Entry1D, error: number): true | undefined;
997
+ export declare function isRangeExists(range: Pick<Range, 'from' | 'to'>, spectrum: Entry1D, error: number): boolean;
1201
998
 
1202
999
  export declare function isZoneExists(zone: Pick<Zone, 'x' | 'y'>, spectrum: Entry2D, error: Zone2DError): boolean;
1203
1000
 
@@ -1207,20 +1004,15 @@ declare interface JAxisKeys {
1207
1004
  intensity: string;
1208
1005
  }
1209
1006
 
1210
- export declare interface Jcoupling {
1211
- coupling: number;
1212
- atoms?: number[];
1213
- assignment?: string | string[];
1214
- diaIDs?: string[];
1215
- multiplicity?: string;
1216
- pathLength?: number;
1217
- }
1218
-
1219
1007
  declare type JcouplingFromPrediction = MakeMandatory<Jcoupling, 'multiplicity' | 'diaIDs' | 'pathLength'>;
1220
1008
 
1221
- declare interface LabelField extends BaseField {
1222
- type: 'label';
1223
- }
1009
+ declare type LevenbergMarquardtOptimizationOptionsDefaultsKeys = Extract<'minValues' | 'maxValues' | 'initialValues' | 'gradientDifference' | keyof typeof defaultLMOptimizationOptions, keyof LevenbergMarquardtOptions>;
1010
+
1011
+ declare type LevenbergMarquardtOptionsDefault = Pick<LevenbergMarquardtOptions, LevenbergMarquardtOptionsWithDefaultKeys>;
1012
+
1013
+ declare type LevenbergMarquardtOptionsOverride = Omit<LevenbergMarquardtOptions, LevenbergMarquardtOptionsWithDefaultKeys>;
1014
+
1015
+ declare type LevenbergMarquardtOptionsWithDefaultKeys = 'initialValues' | 'minValues' | 'maxValues' | keyof typeof defaultLMOptimizationOptions_2;
1224
1016
 
1225
1017
  declare interface LineShapeData {
1226
1018
  id: string;
@@ -1258,11 +1050,6 @@ declare interface LineShapeResult {
1258
1050
  };
1259
1051
  }
1260
1052
 
1261
- declare interface ListField extends Field<string[]> {
1262
- type: 'list';
1263
- properties: Record<string, CommonField>;
1264
- }
1265
-
1266
1053
  declare type MakeMandatory<T, K extends keyof T> = T & {
1267
1054
  [P in K]-?: T[P];
1268
1055
  };
@@ -1285,7 +1072,7 @@ declare interface MapOptions {
1285
1072
 
1286
1073
  export declare function mapPeaks(peaks: Peak1D[], spectrum: Entry1D, options?: MapOptions): Peak1D[];
1287
1074
 
1288
- export declare function mapRanges(ranges: Range_2[] | NMRRange[], spectrum: Entry1D, options?: MapOptions): Range_2[];
1075
+ export declare function mapRanges(ranges: Range[] | NMRRange[], spectrum: Entry1D, options?: MapOptions): Range[];
1289
1076
 
1290
1077
  export declare function mapZones(zones: Zone[], datum: Entry2D, options?: MapOptions): {
1291
1078
  signals: {
@@ -1357,40 +1144,6 @@ export declare type MatchingMultiplicity = MultipletDefinition & {
1357
1144
  isBroad: boolean;
1358
1145
  };
1359
1146
 
1360
- declare interface MatrixFilter {
1361
- name: FilterXYType['name'];
1362
- properties: MatrixProperties;
1363
- options: any;
1364
- }
1365
-
1366
- export declare interface MatrixOptions {
1367
- /**
1368
- * Matrix generation filters
1369
- * @default []
1370
- */
1371
- filters: Array<MatrixFilter & {
1372
- options: object;
1373
- }>;
1374
- /**
1375
- * Exclusion zones
1376
- * @default []
1377
- */
1378
- exclusionsZones: ExclusionZone[];
1379
- /**
1380
- * range
1381
- */
1382
- range: {
1383
- from: number;
1384
- to: number;
1385
- };
1386
- /**
1387
- * number of points
1388
- */
1389
- numberOfPoints: number;
1390
- }
1391
-
1392
- declare type MatrixProperties = Record<string, Properties>;
1393
-
1394
1147
  export declare function matrixToBoxPlot(input: NumberArray[], options?: {
1395
1148
  colors?: string[];
1396
1149
  }): {
@@ -1436,13 +1189,6 @@ export declare interface MultipletDefinition {
1436
1189
 
1437
1190
  export declare const MultiplicityPatterns: MultipletDefinition[];
1438
1191
 
1439
- export declare interface NMRPeak1D extends PeakXYWidth {
1440
- id?: string;
1441
- kind?: string;
1442
- shape?: Shape1D;
1443
- originalX?: number;
1444
- }
1445
-
1446
1192
  export declare interface NMRPeak1DFull extends NMRPeak1D {
1447
1193
  id: string;
1448
1194
  shape: Shape1DWithFWHM;
@@ -1451,19 +1197,6 @@ export declare interface NMRPeak1DFull extends NMRPeak1D {
1451
1197
 
1452
1198
  export declare type NMRPeak1DWithShapeID = MakeMandatory<NMRPeak1D, 'id' | 'shape'>;
1453
1199
 
1454
- export declare interface NMRRange {
1455
- from: number;
1456
- to: number;
1457
- id?: string;
1458
- assignment?: string;
1459
- diaIDs?: string[];
1460
- kind?: string;
1461
- pubIntegral?: number;
1462
- integration?: number;
1463
- multiplicity?: string;
1464
- signals?: NMRSignal1D[];
1465
- }
1466
-
1467
1200
  declare interface NMRRangeWithIds extends Omit<NMRRange, 'id' | 'signals'> {
1468
1201
  id: string;
1469
1202
  signals: NMRSignal1DWithId[];
@@ -1471,20 +1204,6 @@ declare interface NMRRangeWithIds extends Omit<NMRRange, 'id' | 'signals'> {
1471
1204
 
1472
1205
  export declare type NMRRangeWithIntegration = MakeMandatory<NMRRange, 'integration'>;
1473
1206
 
1474
- export declare interface NMRSignal1D {
1475
- delta: number;
1476
- id?: string;
1477
- js?: Jcoupling[];
1478
- atoms?: number[];
1479
- assignment?: string;
1480
- kind?: string;
1481
- multiplicity?: string;
1482
- diaIDs?: string[];
1483
- nbAtoms?: number;
1484
- integration?: number;
1485
- peaks?: NMRPeak1D[];
1486
- }
1487
-
1488
1207
  export declare type NMRSignal1DFromPrediction = MakeMandatory<NMRSignal1D, 'nbAtoms' | 'atoms' | 'diaIDs'> & {
1489
1208
  statistics?: XRobustDistributionStats;
1490
1209
  metadata?: HOSEPrediction;
@@ -1494,7 +1213,7 @@ export declare type NMRSignal1DWithAtomsAndDiaIDs = MakeMandatory<NMRSignal1D, '
1494
1213
 
1495
1214
  export declare type NMRSignal1DWithId = MakeMandatory<NMRSignal1D, 'id'>;
1496
1215
 
1497
- export declare interface NMRSignal2D<T extends Peak2D_2 = Peak2D_2> {
1216
+ export declare interface NMRSignal2D<T extends Peak2D = Peak2D> {
1498
1217
  x: Signal2DProjection;
1499
1218
  y: Signal2DProjection;
1500
1219
  j?: {
@@ -1505,7 +1224,7 @@ export declare interface NMRSignal2D<T extends Peak2D_2 = Peak2D_2> {
1505
1224
  kind?: string;
1506
1225
  }
1507
1226
 
1508
- export declare type NMRSignal2DWithID<T extends Peak2D_2 = Peak2D_2> = MakeMandatory<NMRSignal2D<T>, 'id'>;
1227
+ export declare type NMRSignal2DWithID<T extends Peak2D = Peak2D> = MakeMandatory<NMRSignal2D<T>, 'id'>;
1509
1228
 
1510
1229
  export declare type NMRSignal2DWithId = MakeMandatory<NMRSignal2D, 'id'>;
1511
1230
 
@@ -1534,21 +1253,10 @@ declare interface NucleusType {
1534
1253
  isotope: number;
1535
1254
  }
1536
1255
 
1537
- declare interface NumberField extends Field<number> {
1538
- type: 'number';
1539
- }
1540
-
1541
1256
  declare type NumToNumFn = (x: number) => number;
1542
1257
 
1543
1258
  declare type NUSDimension2 = FilterFactory<Entry2D, IndirectDimensionOptions> & Pick<NUSDimension2Options, 'name'>;
1544
1259
 
1545
- declare interface NUSDimension2Options extends BaseFilter {
1546
- name: 'nusDimension2';
1547
- value: IndirectDimensionOptions;
1548
- }
1549
-
1550
- declare type ObjectKeys = 'id' | 'multiplicity' | 'js';
1551
-
1552
1260
  export declare interface ObservedNucleusData {
1553
1261
  /**
1554
1262
  * nucleus to use as reference in the calculation of frequency
@@ -1560,6 +1268,11 @@ export declare interface ObservedNucleusData {
1560
1268
  frequency: number;
1561
1269
  }
1562
1270
 
1271
+ export declare interface OneDimensionalAssignment {
1272
+ score: number;
1273
+ assignment: NMRRangeWithIntegration[];
1274
+ }
1275
+
1563
1276
  declare interface OneDOptions {
1564
1277
  proton: FromTo;
1565
1278
  carbon: FromTo;
@@ -1571,7 +1284,7 @@ export declare type OneLetterMultiplet = 's' | 'd' | 't' | 'q' | 'i' | 'h' | 'p'
1571
1284
 
1572
1285
  export declare function optimizeSignals(data: DataXY, signals: Signal[], options: OptimizeSignalsOptions): {
1573
1286
  delta: number;
1574
- js: Jcoupling_2[];
1287
+ js: Jcoupling[];
1575
1288
  shape: {
1576
1289
  kind: "gaussian" | "lorentzian" | "pseudoVoigt" | "generalizedLorentzian";
1577
1290
  fwhm: number;
@@ -1592,10 +1305,22 @@ export declare interface OptimizeSignalsOptions {
1592
1305
  baseline?: number;
1593
1306
  shape?: Shape1D;
1594
1307
  parameters?: ParametersFromOptions;
1595
- optimization?: any;
1308
+ optimization?: OptimizeSignalsOptionsOptimization;
1596
1309
  simulation: SignalsToPointXYOptions;
1597
1310
  }
1598
1311
 
1312
+ declare interface OptimizeSignalsOptionsDirectOptimization {
1313
+ kind: 'direct';
1314
+ options: Partial<Pick<DirectOptimizationOptions, DirectOptimizationOptionsDefaultsKeys>> & Omit<DirectOptimizationOptions, DirectOptimizationOptionsDefaultsKeys>;
1315
+ }
1316
+
1317
+ declare interface OptimizeSignalsOptionsLevenbergMarquardtOptimization {
1318
+ kind: 'lm';
1319
+ options: Partial<Pick<LevenbergMarquardtOptions, LevenbergMarquardtOptimizationOptionsDefaultsKeys>> & Omit<LevenbergMarquardtOptions, LevenbergMarquardtOptimizationOptionsDefaultsKeys>;
1320
+ }
1321
+
1322
+ export declare type OptimizeSignalsOptionsOptimization = OptimizeSignalsOptionsDirectOptimization | OptimizeSignalsOptionsLevenbergMarquardtOptimization;
1323
+
1599
1324
  export declare interface OptionsPeaksFilterImpurities {
1600
1325
  /**
1601
1326
  * Solvent name.
@@ -1777,34 +1502,12 @@ declare interface ParsedShift {
1777
1502
  value: number;
1778
1503
  }
1779
1504
 
1780
- export declare interface Peak1D extends Omit<NMRPeak1D, 'id'>, BasePeak {
1781
- originalX?: number;
1782
- }
1783
-
1784
- export declare interface Peak2D extends BasePeak {
1785
- x: number;
1786
- y: number;
1787
- z: number;
1788
- originalX?: number;
1789
- originalY?: number;
1790
- originalZ?: number;
1791
- width?: number | {
1792
- x: number;
1793
- y: number;
1794
- };
1795
- }
1796
-
1797
1505
  export declare interface Peak2DSeries {
1798
1506
  x: number[];
1799
1507
  y: number[];
1800
1508
  z: number[];
1801
1509
  }
1802
1510
 
1803
- export declare interface Peaks {
1804
- values: Peak1D[];
1805
- options: any;
1806
- }
1807
-
1808
1511
  /**
1809
1512
  * Filters impurities from a list of NMR peaks based on the specified options.
1810
1513
  * @template T - The type of NMR peaks.
@@ -1864,62 +1567,10 @@ export declare interface PeaksToXYOptions extends OptionsSG1D {
1864
1567
 
1865
1568
  export declare function peakToXY(peak: NMRPeak1D, options: PeaksToXYOptions): DataXY<Float64Array<ArrayBufferLike>>;
1866
1569
 
1867
- declare interface PhaseCorrection {
1868
- mode?: string;
1869
- ph0?: number;
1870
- ph1?: number;
1871
- }
1872
-
1873
1570
  declare type PhaseCorrection1D = FilterFactory<Entry1D, PhaseCorrection1DOptions> & Pick<PhaseCorrection1DFilterOptions, 'name'>;
1874
1571
 
1875
- declare interface PhaseCorrection1DFilterOptions extends BaseFilter {
1876
- name: 'phaseCorrection';
1877
- value: PhaseCorrection1DOptions;
1878
- }
1879
-
1880
- export declare interface PhaseCorrection1DOptions {
1881
- absolute?: boolean;
1882
- ph0?: number;
1883
- ph1?: number;
1884
- }
1885
-
1886
1572
  declare type PhaseCorrection2D = FilterFactory<Entry2D, PhaseCorrectionTwoDFilter> & Pick<PhaseCorrection2DOptions, 'name'>;
1887
1573
 
1888
- declare interface PhaseCorrection2DOptions extends BaseFilter {
1889
- name: 'phaseCorrectionTwoDimensions';
1890
- value: PhaseCorrectionTwoDFilter;
1891
- }
1892
-
1893
- declare interface PhaseCorrection_2 {
1894
- mode?: string;
1895
- ph0?: number;
1896
- ph1?: number;
1897
- }
1898
-
1899
- declare interface PhaseCorrectionHorizontalOptions {
1900
- ph0: number;
1901
- ph1: number;
1902
- }
1903
-
1904
- declare interface PhaseCorrectionTwoDFilter extends PhaseCorrectionTwoDOptions {
1905
- automatic?: AutoPhaseCorrection2D;
1906
- }
1907
-
1908
- export declare interface PhaseCorrectionTwoDOptions {
1909
- horizontal?: PhaseCorrectionHorizontalOptions;
1910
- vertical?: PhaseCorrectionVerticalOptions;
1911
- }
1912
-
1913
- declare type PhaseCorrectionVerticalOptions = PhaseCorrectionHorizontalOptions & {
1914
- quad?: 'imag' | 'real';
1915
- };
1916
-
1917
- export declare interface PolynomialOptions {
1918
- zones: BaselineCorrectionZone[];
1919
- algorithm: 'polynomial';
1920
- degree: number;
1921
- }
1922
-
1923
1574
  declare interface PopulationInput {
1924
1575
  id: ID;
1925
1576
  pid: ID;
@@ -2227,21 +1878,8 @@ declare interface PredictSpectraResult {
2227
1878
  }>;
2228
1879
  }
2229
1880
 
2230
- declare type Properties = ListField | SelectField | StringField | NumberField | BooleanField | LabelField;
2231
-
2232
1881
  export declare const protonImpurities: DatabaseNMREntry[];
2233
1882
 
2234
- declare interface Range_2 extends Omit<NMRRange, 'signals' | 'id'> {
2235
- id: string;
2236
- originalFrom?: number;
2237
- originalTo?: number;
2238
- absolute: number;
2239
- signals: Signal1D[];
2240
- integration: number;
2241
- nbAtoms?: number;
2242
- }
2243
- export { Range_2 as Range }
2244
-
2245
1883
  export declare function rangeFromSignal(signal: NMRSignal1D, options?: RangeFromSignalOptions): {
2246
1884
  from: number;
2247
1885
  to: number;
@@ -2266,11 +1904,6 @@ export declare interface RangeFromSignalOptions {
2266
1904
 
2267
1905
  declare type RangeFullfiled = MakeMandatory<NMRRange, 'integration' | 'signals' | 'id'>;
2268
1906
 
2269
- export declare interface Ranges {
2270
- values: Range_2[];
2271
- options: SumOptions;
2272
- }
2273
-
2274
1907
  export declare function rangesToACS(ranges: NMRRange[], options?: RangesToACSOptions): string;
2275
1908
 
2276
1909
  export declare interface RangesToACSOptions {
@@ -2387,7 +2020,7 @@ export declare function reimComplexBackwardLinearPrediction(data: DataReIm, opti
2387
2020
  im: Float64Array<ArrayBuffer>;
2388
2021
  };
2389
2022
 
2390
- declare function resetDiaIDs(range: Range_2): void;
2023
+ declare function resetDiaIDs(range: Range): void;
2391
2024
 
2392
2025
  declare interface RestrictionByCS {
2393
2026
  chemicalShiftRestriction: boolean;
@@ -2407,51 +2040,19 @@ export declare interface ResurrectOptions {
2407
2040
  logger?: Logger;
2408
2041
  }
2409
2042
 
2410
- declare interface SelectField extends Field<any> {
2411
- type: 'select';
2412
- choices: any[];
2413
- }
2414
-
2415
- declare function setNbAtoms(range: Range_2, signalIndex?: number): void;
2043
+ declare function setNbAtoms(range: Range, signalIndex?: number): void;
2416
2044
 
2417
2045
  declare type Shape1DWithFWHM = Omit<Shape1D, 'fwhm'> & {
2418
2046
  fwhm: number;
2419
2047
  };
2420
2048
 
2421
- export declare interface Shapes {
2422
- exponential?: ShapesFactory<ExponentialOptions>;
2423
- sineBell?: ShapesFactory<SineBellOptions>;
2424
- sineSquare?: ShapesFactory<SineSquareOptions>;
2425
- traf?: ShapesFactory<TrafOptions>;
2426
- gaussian?: ShapesFactory<GaussianOptions>;
2427
- }
2428
-
2429
- declare interface ShapesFactory<Options> {
2430
- apply: boolean;
2431
- options: Options;
2432
- }
2433
-
2434
2049
  declare type Shift2DX = FilterFactory<Entry2D, Shift2DXOptions> & Pick<Shift2DXFilterOptions, 'name'>;
2435
2050
 
2436
- declare interface Shift2DXFilterOptions extends BaseFilter {
2437
- name: 'shift2DX';
2438
- value: Shift2DXOptions;
2439
- }
2440
-
2441
- declare interface Shift2DXOptions {
2442
- shift: number;
2443
- }
2051
+ declare type Shift2DXOptions = Shift2DXFilterOptions['value'];
2444
2052
 
2445
2053
  declare type Shift2DY = FilterFactory<Entry2D, Shift2DYOptions> & Pick<Shift2DYFilterOptions, 'name'>;
2446
2054
 
2447
- declare interface Shift2DYFilterOptions extends BaseFilter {
2448
- name: 'shift2DY';
2449
- value: Shift2DYOptions;
2450
- }
2451
-
2452
- declare interface Shift2DYOptions {
2453
- shift: number;
2454
- }
2055
+ declare type Shift2DYOptions = Shift2DYFilterOptions['value'];
2455
2056
 
2456
2057
  declare interface ShiftGroupEntry {
2457
2058
  id: string;
@@ -2497,41 +2098,18 @@ declare type ShiftTarget = 'origin' | 'current';
2497
2098
 
2498
2099
  declare type ShiftX = FilterFactory<Entry1D, ShiftXOptions> & Pick<ShiftXFilterOptions, 'name'>;
2499
2100
 
2500
- declare interface ShiftXFilterOptions extends BaseFilter {
2501
- name: 'shiftX';
2502
- value: ShiftXOptions;
2503
- }
2504
-
2505
- declare interface ShiftXOptions {
2506
- shift: number;
2507
- }
2508
-
2509
2101
  export declare interface Signal extends NMRSignal1D {
2510
2102
  intensity?: number;
2511
2103
  shape?: Shape1D;
2512
2104
  parameters?: ParametersFromSignal;
2513
2105
  }
2514
2106
 
2515
- export declare interface Signal1D extends Required<Pick<NMRSignal1D, ObjectKeys>>, Omit<NMRSignal1D, ObjectKeys> {
2516
- originalDelta?: number;
2517
- }
2518
-
2519
2107
  declare type Signal1DWidthDiaID = MakeMandatory<NMRSignal1D, 'diaIDs'>;
2520
2108
 
2521
2109
  declare type Signal1DWidthJsAndDiaID = Omit<Signal1DWidthDiaID, 'js'> & {
2522
2110
  js: JcouplingFromPrediction[];
2523
2111
  };
2524
2112
 
2525
- export declare interface Signal2D extends Signal_2 {
2526
- sign?: number;
2527
- x: SignalAxis;
2528
- y: SignalAxis;
2529
- peaks?: Peak2D[];
2530
- j?: {
2531
- pathLength?: number | FromTo;
2532
- };
2533
- }
2534
-
2535
2113
  export declare interface Signal2DProjection {
2536
2114
  nucleus?: string;
2537
2115
  delta: number;
@@ -2540,18 +2118,6 @@ export declare interface Signal2DProjection {
2540
2118
  diaIDs?: string[];
2541
2119
  }
2542
2120
 
2543
- declare interface Signal_2 {
2544
- id: string;
2545
- kind?: string;
2546
- }
2547
-
2548
- declare interface SignalAxis {
2549
- delta: number;
2550
- nbAtoms?: number;
2551
- diaIDs?: string[];
2552
- originalDelta: number;
2553
- }
2554
-
2555
2121
  /**
2556
2122
  * Join couplings smaller than a defined tolerance.
2557
2123
  * The resulting coupling should be an average of the existing one.
@@ -2596,12 +2162,7 @@ export declare function signalMultiplicityPattern(signal: NMRSignal1D, options?:
2596
2162
  acsFormat?: boolean;
2597
2163
  }): string;
2598
2164
 
2599
- declare type SignalProcessing = FilterFactory<Entry1D, MatrixOptions> & Pick<SignalProcessingFilter, 'name'>;
2600
-
2601
- declare interface SignalProcessingFilter extends BaseFilter {
2602
- name: 'signalProcessing';
2603
- value: MatrixOptions;
2604
- }
2165
+ declare type SignalProcessing = FilterFactory<Entry1D, MatrixOptions<FilterOptions>> & Pick<SignalProcessingFilter, 'name'>;
2605
2166
 
2606
2167
  export declare function signals2DToZ(signals: NMRSignal2D[], options?: Signals2DToZOptions): {
2607
2168
  minX: number;
@@ -2799,23 +2360,11 @@ declare interface SineBell<ShapeOption = SineBellOptions> {
2799
2360
  options: ShapeOption;
2800
2361
  }
2801
2362
 
2802
- declare interface SineBellOptions {
2803
- /**
2804
- * Specifies the starting point of the sine-bell in units of pi radians.
2805
- * Common values are 0.0 (for a sine window which starts height at 0.0) and
2806
- * 0.5 (for a cosine window, which starts at height 1.0).
2807
- * @default 0
2808
- */
2809
- offset: number;
2810
- }
2811
-
2812
2363
  declare interface SineSquare<ShapeOption = SineBellOptions> {
2813
2364
  kind: 'sineSquare';
2814
2365
  options: ShapeOption;
2815
2366
  }
2816
2367
 
2817
- declare type SineSquareOptions = Omit<SineBellOptions, 'exponent'>;
2818
-
2819
2368
  export declare type SolventImpurities = Record<string, Impurity>;
2820
2369
 
2821
2370
  export declare function solventSuppression<T extends NMRPeak1D>(peakList: T[], solvent: NMRSignal1D[], options?: {
@@ -2911,42 +2460,8 @@ export declare interface SplitSpinSystemOptions {
2911
2460
  maxClusterSize?: number;
2912
2461
  }
2913
2462
 
2914
- declare interface StringField extends Field<string> {
2915
- type: 'string';
2916
- }
2917
-
2918
- export declare interface SumOptions {
2919
- /**
2920
- * @default true
2921
- */
2922
- isSumConstant: boolean;
2923
- /**
2924
- * 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
2925
- * @default undefined
2926
- */
2927
- sum: number | undefined;
2928
- /**
2929
- * @default true
2930
- */
2931
- sumAuto: boolean;
2932
- /**
2933
- * mf will be set automatically for the first time based on the first molecules unless the user change it
2934
- * example 'C10H20O3'
2935
- */
2936
- mf?: string;
2937
- /**
2938
- * key of the selected molecule
2939
- */
2940
- moleculeId?: string;
2941
- }
2942
-
2943
2463
  declare type SymmetrizeCosyLike = FilterFactory<Entry2D, Record<string, never>> & Pick<SymmetrizeCosyLikeOptions, 'name'>;
2944
2464
 
2945
- declare interface SymmetrizeCosyLikeOptions extends BaseFilter {
2946
- name: 'symmetrizeCosyLike';
2947
- value: Record<string, never>;
2948
- }
2949
-
2950
2465
  declare class T1Regression extends BaseRegression {
2951
2466
  fullMagnetization: number;
2952
2467
  relaxationT1: number;
@@ -2961,13 +2476,6 @@ declare interface Traf<ShapeOption = TrafOptions> {
2961
2476
  options: ShapeOption;
2962
2477
  }
2963
2478
 
2964
- declare interface TrafOptions {
2965
- /**
2966
- * line broadening value in Hz, a negative value will invert the shape
2967
- */
2968
- lineBroadening: number;
2969
- }
2970
-
2971
2479
  /**
2972
2480
  * convert from pattern name to only one letter abbreviation or any supported abbreviation to pattern name.
2973
2481
  * @param name - pattern name or abbreviation.
@@ -2981,7 +2489,7 @@ declare interface TwoDOptions {
2981
2489
  nbPoints: PointXY;
2982
2490
  }
2983
2491
 
2984
- declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
2492
+ declare function unlink(range: Range, options?: UnlinkOptions): Range;
2985
2493
 
2986
2494
  /**
2987
2495
  *
@@ -3059,7 +2567,7 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
3059
2567
  * @param data
3060
2568
  * @param options
3061
2569
  */
3062
- export declare function xyAutoRangesPicking(data: DataXY<Float64Array>, options: OptionsXYAutoRangesPicking): NMRRange_2[];
2570
+ export declare function xyAutoRangesPicking(data: DataXY<Float64Array>, options: OptionsXYAutoRangesPicking): NMRRange[];
3063
2571
 
3064
2572
  /**
3065
2573
  * Estimate the diffusion coefficient of an independent component by fitting of imput data with the Stejskal–Tanner equation.
@@ -3077,11 +2585,13 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
3077
2585
  signalAbsenseDiffussion: number;
3078
2586
  };
3079
2587
 
3080
- export declare function xyCalculateT1(data: DataXY, options?: CalculateT1Options): {
2588
+ export declare function xyCalculateT1(data: DataXY, options?: CalculateT1Options): XYCalculateT1Return;
2589
+
2590
+ declare interface XYCalculateT1Return {
3081
2591
  relaxationT1: number;
3082
2592
  fullMagnetization: number;
3083
2593
  regression: T1Regression;
3084
- };
2594
+ }
3085
2595
 
3086
2596
  export declare function xyGetPivot(data: DataXY<Float64Array>, options?: {
3087
2597
  thresholdFactor?: number;
@@ -3120,7 +2630,7 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
3120
2630
  */
3121
2631
  export declare function xyzAutoPhaseCorrection(data: NmrData2DFt, options?: AutoPhaseCorrection2D): Required<PhaseCorrectionTwoDOptions>;
3122
2632
 
3123
- export declare function xyzAutoSignalsPicking(spectraData: NmrData2DContent, options: XYZAutoSignalsPickingOptions): NMRSignal2DWithID<Peak2D_2 & {
2633
+ export declare function xyzAutoSignalsPicking(spectraData: NmrData2DContent, options: XYZAutoSignalsPickingOptions): NMRSignal2DWithID<Peak2D & {
3124
2634
  id: string;
3125
2635
  }>[];
3126
2636
 
@@ -3238,7 +2748,9 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
3238
2748
  kernel?: GetKernelOptions;
3239
2749
  }
3240
2750
 
3241
- export declare function xyzJResAnalyzer(signals: NMRSignal2D[], options?: XYZJResAnalyzerOptions): any[];
2751
+ export declare function xyzJResAnalyzer(signals: NMRSignal2D[], options?: XYZJResAnalyzerOptions): NMRZoneWithID_2[] | (NMRSignal2D<Peak2D> & {
2752
+ id: string;
2753
+ })[];
3242
2754
 
3243
2755
  declare interface XYZJResAnalyzerOptions extends CompilePatternOptions {
3244
2756
  /**
@@ -3264,53 +2776,13 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
3264
2776
 
3265
2777
  declare type ZeroFillingDimension1 = FilterFactory<Entry2D, ZeroFillingOptions> & Pick<ZeroFillingDimension1Options, 'name'>;
3266
2778
 
3267
- declare interface ZeroFillingDimension1Options extends BaseFilter {
3268
- name: 'zeroFillingDimension1';
3269
- value: ZeroFillingOptions;
3270
- }
3271
-
3272
2779
  declare type ZeroFillingDimension2 = FilterFactory<Entry2D, ZeroFillingOptions> & Pick<ZeroFillingDimension2Options, 'name'>;
3273
2780
 
3274
- declare interface ZeroFillingDimension2Options extends BaseFilter {
3275
- name: 'zeroFillingDimension2';
3276
- value: ZeroFillingOptions;
3277
- }
3278
-
3279
- declare interface ZeroFillingFilterOptions extends BaseFilter {
3280
- name: 'zeroFilling';
3281
- value: ZeroFillingOptions;
3282
- }
3283
-
3284
- export declare interface ZeroFillingOptions {
3285
- nbPoints: number;
3286
- }
3287
-
3288
- export declare interface Zone {
3289
- id: string;
3290
- x: ZoneAxis;
3291
- y: ZoneAxis;
3292
- signals: Signal2D[];
3293
- kind?: string;
3294
- assignment?: string;
3295
- }
3296
-
3297
2781
  export declare interface Zone2DError {
3298
2782
  x: number;
3299
2783
  y: number;
3300
2784
  }
3301
2785
 
3302
- declare interface ZoneAxis extends FromTo {
3303
- nbAtoms?: number;
3304
- diaIDs?: string[];
3305
- originalFrom?: number;
3306
- originalTo?: number;
3307
- }
3308
-
3309
- export declare interface Zones {
3310
- values: Zone[];
3311
- options?: any;
3312
- }
3313
-
3314
2786
 
3315
2787
  export * from "gyromagnetic-ratio";
3316
2788