nmr-processing 13.0.1 → 13.0.3-pre.1730476792
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.
- package/nmr-processing.cjs +3 -3
- package/nmr-processing.d.ts +431 -123
- package/nmr-processing.mjs +3 -3
- package/package.json +19 -19
package/nmr-processing.d.ts
CHANGED
|
@@ -30,17 +30,11 @@ import { PointXY } from 'cheminfo-types';
|
|
|
30
30
|
import { Shape1D } from 'ml-peak-shape-generator';
|
|
31
31
|
import { Spectrum2D } from 'spectrum-generator';
|
|
32
32
|
import { TopicMolecule } from 'openchemlib-utils';
|
|
33
|
+
import { XYEquallySpacedOptions } from 'ml-spectra-processing';
|
|
33
34
|
import type { XYNumber } from 'spectrum-generator';
|
|
34
35
|
|
|
35
36
|
declare function addDefaultSignal(range: Range_2): void;
|
|
36
37
|
|
|
37
|
-
declare function addFilter(datum: Entry1D | Entry2D, filterOptions: FilterOption, options?: AddFilterOptions): void;
|
|
38
|
-
|
|
39
|
-
declare interface AddFilterOptions {
|
|
40
|
-
filterIndex?: number;
|
|
41
|
-
isDeleteAllow?: boolean;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
38
|
export declare interface AirplsOptions {
|
|
45
39
|
zones: BaselineCorrectionZone[];
|
|
46
40
|
algorithm: 'airpls';
|
|
@@ -48,64 +42,83 @@ export declare interface AirplsOptions {
|
|
|
48
42
|
tolerance: number;
|
|
49
43
|
}
|
|
50
44
|
|
|
51
|
-
|
|
52
|
-
windowData: Float64Array;
|
|
53
|
-
x: DoubleArray;
|
|
54
|
-
re: DoubleArray;
|
|
55
|
-
im: DoubleArray;
|
|
56
|
-
} | {
|
|
57
|
-
windowData: Float64Array;
|
|
58
|
-
/** Array of re values */
|
|
59
|
-
re: DoubleArray;
|
|
60
|
-
/** Array of im values */
|
|
61
|
-
im: DoubleArray;
|
|
62
|
-
};
|
|
45
|
+
declare type Apodization1D = Filter1DInterface<'apodization', 'Apodization', Apodization2DOptions>;
|
|
63
46
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
47
|
+
declare interface Apodization1DFilterOptions extends BaseFilter {
|
|
48
|
+
name: 'apodization';
|
|
49
|
+
value: Apodization2DOptions;
|
|
67
50
|
}
|
|
68
51
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
52
|
+
declare type Apodization2DOptions = Shapes<FlexibleWindowFunctions>;
|
|
53
|
+
export { Apodization2DOptions as Apodization1DOptions }
|
|
54
|
+
export { Apodization2DOptions }
|
|
55
|
+
|
|
56
|
+
declare type ApodizationDimension1 = Filter2DInterface<'apodizationDimension1', 'Apodization on Dimension 1', Apodization2DOptions>;
|
|
57
|
+
|
|
58
|
+
declare interface ApodizationDimension1Options extends BaseFilter {
|
|
59
|
+
name: 'apodizationDimension1';
|
|
60
|
+
value: Apodization2DOptions;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare type ApodizationDimension2 = Filter2DInterface<'apodizationDimension2', 'Apodization on Dimension 2', Apodization2DOptions>;
|
|
64
|
+
|
|
65
|
+
declare interface ApodizationDimension2Options extends BaseFilter {
|
|
66
|
+
name: 'apodizationDimension2';
|
|
67
|
+
value: Apodization2DOptions;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export declare function apodizationXReIm(data: Required<NmrData1D>, options: Apodization2DOptions): {
|
|
71
|
+
x: Float64Array;
|
|
72
|
+
re: Float64Array;
|
|
73
|
+
im: Float64Array;
|
|
72
74
|
};
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
/**
|
|
77
|
+
* pure function that applies a window function to the input data.
|
|
78
|
+
*/
|
|
79
|
+
export declare function apodize(data: DoubleArray, options: ApplyWindowOptions): Float64Array;
|
|
80
|
+
|
|
81
|
+
declare interface ApplyFilterOptions {
|
|
75
82
|
/**
|
|
76
|
-
*
|
|
77
|
-
* @default 0
|
|
83
|
+
* reapply all the filters using the original data, even if there is a previous filter applied.
|
|
78
84
|
*/
|
|
79
|
-
|
|
80
|
-
compose?: Partial<ShapeOptions<FlexibleWindowFunctions>>;
|
|
85
|
+
forceReapply?: boolean;
|
|
81
86
|
/**
|
|
82
|
-
*
|
|
83
|
-
* @default true
|
|
87
|
+
* filter position at the moment to add a new filter
|
|
84
88
|
*/
|
|
85
|
-
|
|
86
|
-
windowData?: Float64Array;
|
|
89
|
+
filterIndex?: number;
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
|
|
92
|
+
declare interface ApplyFilterOptions_2 {
|
|
90
93
|
/**
|
|
91
|
-
*
|
|
92
|
-
* @default true
|
|
94
|
+
* reapply all the filters using the original data, even if there is a previous filter applied.
|
|
93
95
|
*/
|
|
94
|
-
|
|
96
|
+
forceReapply?: boolean;
|
|
95
97
|
/**
|
|
96
|
-
*
|
|
98
|
+
* filter position at the moment to add a new filter
|
|
97
99
|
*/
|
|
98
|
-
|
|
100
|
+
filterIndex?: number;
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
/***
|
|
102
104
|
* @param {object} Filters [{name:'',options:{}},{...}]
|
|
103
105
|
*/
|
|
104
|
-
declare function
|
|
106
|
+
declare function applyFilters(datum: Entry1D, filters?: Filter1DOptions[], options?: ApplyFilterOptions): void;
|
|
105
107
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
/***
|
|
109
|
+
* @param {object} Filters [{name:'',options:{}},{...}]
|
|
110
|
+
*/
|
|
111
|
+
declare function applyFilters_2(datum: Entry2D, filters?: Filter2DOptions[], options?: ApplyFilterOptions_2): void;
|
|
112
|
+
|
|
113
|
+
export declare interface ApplyWindowOptions {
|
|
114
|
+
/**
|
|
115
|
+
* data of a window function it should be scaled to max = 1 to ensure compatibility with new apodizations.
|
|
116
|
+
*/
|
|
117
|
+
windowData: DoubleArray;
|
|
118
|
+
/**
|
|
119
|
+
* output array
|
|
120
|
+
*/
|
|
121
|
+
output?: DoubleArray;
|
|
109
122
|
}
|
|
110
123
|
|
|
111
124
|
declare type AtomTypes = 'H' | 'C';
|
|
@@ -122,6 +135,27 @@ export declare interface AutoPhaseCorrectionOptions {
|
|
|
122
135
|
reverse?: boolean;
|
|
123
136
|
}
|
|
124
137
|
|
|
138
|
+
declare type BackwardLinearPrediction1D = Filter1DInterface<'backwardLinearPrediction', 'Backward Linear Prediction Filter', Partial<BackwardLPOptions>>;
|
|
139
|
+
|
|
140
|
+
declare interface BackwardLinearPredictionFilterOptions extends BaseFilter {
|
|
141
|
+
name: 'backwardLinearPrediction';
|
|
142
|
+
value: Partial<BackwardLPOptions>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare type BackwardLPDimension1 = Filter2DInterface<'blpDimension1', 'Backward-LP Dimension 1', Partial<BackwardLPOptions>>;
|
|
146
|
+
|
|
147
|
+
declare interface BackwardLPDimension1Options extends BaseFilter {
|
|
148
|
+
name: 'blpDimension1';
|
|
149
|
+
value: Partial<BackwardLPOptions>;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
declare type BackwardLPDimension2 = Filter2DInterface<'blpDimension2', 'Backward-LP Dimension 2', Partial<BackwardLPOptions>>;
|
|
153
|
+
|
|
154
|
+
declare interface BackwardLPDimension2Options extends BaseFilter {
|
|
155
|
+
name: 'blpDimension2';
|
|
156
|
+
value: Partial<BackwardLPOptions>;
|
|
157
|
+
}
|
|
158
|
+
|
|
125
159
|
export declare interface BackwardLPOptions {
|
|
126
160
|
/**
|
|
127
161
|
* Number of coefficients to be calculated in the SVD.
|
|
@@ -148,9 +182,7 @@ declare interface BaseField {
|
|
|
148
182
|
description: string;
|
|
149
183
|
}
|
|
150
184
|
|
|
151
|
-
|
|
152
|
-
name: string;
|
|
153
|
-
value: any;
|
|
185
|
+
declare interface BaseFilter {
|
|
154
186
|
isDeleteAllow?: boolean;
|
|
155
187
|
flag?: boolean | null;
|
|
156
188
|
label?: string;
|
|
@@ -158,6 +190,20 @@ export declare interface BaseFilter {
|
|
|
158
190
|
|
|
159
191
|
export declare type BaselineAlgorithms = 'airpls' | 'polynomial';
|
|
160
192
|
|
|
193
|
+
declare type BaselineCorrection1D = Filter1DInterface<'baselineCorrection', 'Baseline correction', BaselineCorrectionOptions>;
|
|
194
|
+
|
|
195
|
+
declare type BaselineCorrection2D = Filter2DInterface<'baselineCorrectionTwoDimensions', 'Baseline correction', Record<string, never>>;
|
|
196
|
+
|
|
197
|
+
declare interface BaselineCorrection2DFilterOptions extends BaseFilter {
|
|
198
|
+
name: 'baselineCorrectionTwoDimensions';
|
|
199
|
+
value: Record<string, never>;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare interface BaselineCorrectionFilterOptions extends BaseFilter {
|
|
203
|
+
name: 'baselineCorrection';
|
|
204
|
+
value: BaselineCorrectionOptions;
|
|
205
|
+
}
|
|
206
|
+
|
|
161
207
|
export declare type BaselineCorrectionOptions = PolynomialOptions | AirplsOptions;
|
|
162
208
|
|
|
163
209
|
export declare interface BaselineCorrectionZone {
|
|
@@ -257,6 +303,11 @@ export declare const couplingACSPatterns: string[];
|
|
|
257
303
|
|
|
258
304
|
export declare const couplingPatterns: string[];
|
|
259
305
|
|
|
306
|
+
export declare function createApodizationWindowData(options: {
|
|
307
|
+
shapes?: Shapes;
|
|
308
|
+
length: number;
|
|
309
|
+
}): Float64Array;
|
|
310
|
+
|
|
260
311
|
/**
|
|
261
312
|
* This function converts a set of 2D-peaks in 2D-signals. Each signal could be composed
|
|
262
313
|
* of many 2D-peaks, and it has some additional information related to the NMR spectrum.
|
|
@@ -307,13 +358,6 @@ export declare interface DatabaseNMREntry {
|
|
|
307
358
|
|
|
308
359
|
export declare type DataBaseStructure = DataBaseLevelStructure[];
|
|
309
360
|
|
|
310
|
-
export declare interface DataReIm {
|
|
311
|
-
/** Array of re values */
|
|
312
|
-
re: DoubleArray;
|
|
313
|
-
/** Array of im values */
|
|
314
|
-
im: DoubleArray;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
361
|
export declare interface DataResurrect {
|
|
318
362
|
info: {
|
|
319
363
|
solvent?: string;
|
|
@@ -332,7 +376,31 @@ export declare const DatumKind: {
|
|
|
332
376
|
mixed: string;
|
|
333
377
|
};
|
|
334
378
|
|
|
335
|
-
declare function deleteFilter(datum: Entry1D
|
|
379
|
+
declare function deleteFilter(datum: Entry1D, id?: string): void;
|
|
380
|
+
|
|
381
|
+
declare function deleteFilter_2(datum: Entry2D, id?: string): void;
|
|
382
|
+
|
|
383
|
+
declare type DigitalFilter = Filter1DInterface<'digitalFilter', 'Digital Filter', DigitalFilterOptions>;
|
|
384
|
+
|
|
385
|
+
declare type DigitalFilter2D = Filter2DInterface<'digitalFilter2D', 'Digital filter on Dimension 1', DigitalFilterOptions_2>;
|
|
386
|
+
|
|
387
|
+
declare interface DigitalFilter2DOptions extends BaseFilter {
|
|
388
|
+
name: 'digitalFilter2D';
|
|
389
|
+
value: DigitalFilterOptions_2;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
declare interface DigitalFilterOption extends BaseFilter {
|
|
393
|
+
name: 'digitalFilter';
|
|
394
|
+
value: DigitalFilterOptions;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
declare interface DigitalFilterOptions {
|
|
398
|
+
digitalFilterValue: number;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
declare interface DigitalFilterOptions_2 {
|
|
402
|
+
digitalFilterValue?: number;
|
|
403
|
+
}
|
|
336
404
|
|
|
337
405
|
export declare interface DirectDimensionOptions {
|
|
338
406
|
acquisitionScheme?: string;
|
|
@@ -343,9 +411,14 @@ export declare interface DirectDimensionOptions {
|
|
|
343
411
|
|
|
344
412
|
declare type EmptyValue = void | undefined | null;
|
|
345
413
|
|
|
346
|
-
declare function enableFilter(datum: Entry1D
|
|
414
|
+
declare function enableFilter(datum: Entry1D, id: string | null, checked: boolean | null, filters?: Filter1DOptions[]): void;
|
|
347
415
|
|
|
348
|
-
declare
|
|
416
|
+
declare function enableFilter_2(datum: Entry2D, id: string | null, checked: boolean | null, filters?: Filter2DOptions[]): void;
|
|
417
|
+
|
|
418
|
+
export declare function ensureShapesOptions(data: DataXReIm, shapes?: Partial<Shapes<FlexibleWindowFunctions>>): {
|
|
419
|
+
shapes: Partial<Record<"exponential" | "gaussian" | "lorentzToGauss" | "modifiedGaussian" | "sineBell" | "sineSquare" | "traf", ShapeToAdd<WindowFunctions>>>;
|
|
420
|
+
length: number;
|
|
421
|
+
};
|
|
349
422
|
|
|
350
423
|
declare interface Entry1D {
|
|
351
424
|
id?: string;
|
|
@@ -356,14 +429,9 @@ declare interface Entry1D {
|
|
|
356
429
|
ranges: Ranges;
|
|
357
430
|
info: Info1D;
|
|
358
431
|
originalInfo?: Info1D;
|
|
359
|
-
filters:
|
|
432
|
+
filters: Filter1D[];
|
|
360
433
|
}
|
|
361
434
|
|
|
362
|
-
declare type Entry1DApodizationFilter = Partial<Omit<Entry1D, 'info'>> & {
|
|
363
|
-
info: Partial<Info1D>;
|
|
364
|
-
data: Required<NmrData1D>;
|
|
365
|
-
};
|
|
366
|
-
|
|
367
435
|
declare interface Entry2D<T extends NmrData2D = NmrData2D> {
|
|
368
436
|
id?: string;
|
|
369
437
|
zones: Zones;
|
|
@@ -372,7 +440,16 @@ declare interface Entry2D<T extends NmrData2D = NmrData2D> {
|
|
|
372
440
|
originalInfo?: Record<string, any>;
|
|
373
441
|
data: T;
|
|
374
442
|
originalData?: T;
|
|
375
|
-
filters:
|
|
443
|
+
filters: Filter2D[];
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
declare type EquallySpaced = Filter1DInterface<'equallySpaced', 'Equally spaced', EquallySpacedFilterOptions>;
|
|
447
|
+
|
|
448
|
+
declare type EquallySpacedFilterOptions = Pick<XYEquallySpacedOptions, 'from' | 'to' | 'numberOfPoints' | 'exclusions'>;
|
|
449
|
+
|
|
450
|
+
declare interface EquallySpacedOptions extends BaseFilter {
|
|
451
|
+
name: 'equallySpaced';
|
|
452
|
+
value: EquallySpacedFilterOptions;
|
|
376
453
|
}
|
|
377
454
|
|
|
378
455
|
declare interface ExclusionZone {
|
|
@@ -381,6 +458,13 @@ declare interface ExclusionZone {
|
|
|
381
458
|
to: number;
|
|
382
459
|
}
|
|
383
460
|
|
|
461
|
+
declare type ExclusionZones = Filter1DInterface<'exclusionZones', 'Exclusion zones', FromTo[]>;
|
|
462
|
+
|
|
463
|
+
declare interface ExclusionZonesOptions extends BaseFilter {
|
|
464
|
+
name: 'exclusionZones';
|
|
465
|
+
value: FromTo[];
|
|
466
|
+
}
|
|
467
|
+
|
|
384
468
|
declare interface Exponential<ShapeOption = ExponentialOptions> {
|
|
385
469
|
kind: 'exponential';
|
|
386
470
|
options: ShapeOption;
|
|
@@ -398,6 +482,27 @@ declare interface ExponentialOptions {
|
|
|
398
482
|
dw: number;
|
|
399
483
|
}
|
|
400
484
|
|
|
485
|
+
declare type FFT1D = Filter1DInterface<'fft', 'FFT', Record<string, never>>;
|
|
486
|
+
|
|
487
|
+
declare interface FFT1DOptions extends BaseFilter {
|
|
488
|
+
name: 'fft';
|
|
489
|
+
value: Record<string, never>;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
declare type FFTDimension1 = Filter2DInterface<'fftDimension1', 'FFT Dimension 1', DirectDimensionOptions>;
|
|
493
|
+
|
|
494
|
+
declare interface FFTDimension1Options extends BaseFilter {
|
|
495
|
+
name: 'fftDimension1';
|
|
496
|
+
value: DirectDimensionOptions;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
declare type FFTDimension2 = Filter2DInterface<'fftDimension2', 'FFT Dimension 2', IndirectDimensionOptions>;
|
|
500
|
+
|
|
501
|
+
declare interface FFTDimension2Options extends BaseFilter {
|
|
502
|
+
name: 'fftDimension2';
|
|
503
|
+
value: IndirectDimensionOptions;
|
|
504
|
+
}
|
|
505
|
+
|
|
401
506
|
export declare function fftDirectDimension(data: {
|
|
402
507
|
re: DoubleArray[];
|
|
403
508
|
im: DoubleArray[];
|
|
@@ -415,50 +520,128 @@ declare interface Field<T> extends BaseField {
|
|
|
415
520
|
default: T;
|
|
416
521
|
}
|
|
417
522
|
|
|
418
|
-
|
|
419
|
-
id
|
|
523
|
+
declare interface Filter extends Required<BaseFilter> {
|
|
524
|
+
id?: string;
|
|
420
525
|
error?: string;
|
|
421
526
|
}
|
|
422
527
|
|
|
423
|
-
declare
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
528
|
+
export declare type Filter1D = Filter1DOptions & Filter;
|
|
529
|
+
|
|
530
|
+
declare type Filter1DContent = FFT1D | BaselineCorrection1D | BackwardLinearPrediction1D | Apodization1D | DigitalFilter | EquallySpaced | ExclusionZones | ForwardLP1D | PhaseCorrection1D | ShiftX | SignalProcessing | ZeroFilling;
|
|
531
|
+
|
|
532
|
+
declare interface Filter1DInterface<ID extends string, Name extends string, Options extends object> {
|
|
533
|
+
/**
|
|
534
|
+
* this will help at the moment to identify filters.
|
|
535
|
+
*/
|
|
536
|
+
id: ID;
|
|
537
|
+
/**
|
|
538
|
+
* name of the filter to be presented in the GUI.
|
|
539
|
+
*/
|
|
540
|
+
name: Name;
|
|
541
|
+
isApplicable: (datum1D: Entry1D) => boolean;
|
|
542
|
+
/**
|
|
543
|
+
* Filter function that process the data in place.
|
|
544
|
+
*/
|
|
545
|
+
apply: (datum1D: Entry1D, options: Options) => void;
|
|
546
|
+
/** This function is called when the same filter had been applied
|
|
547
|
+
* it returns the value should be applied to the filter (reduce) and
|
|
548
|
+
*/
|
|
549
|
+
reduce: (previousValue: Options, newValue: Options) => {
|
|
550
|
+
/**
|
|
551
|
+
* if it is true and there is only one filter to be applied
|
|
552
|
+
* FiltersManager will applied the filter on the processed data.
|
|
553
|
+
*/
|
|
554
|
+
once: boolean;
|
|
555
|
+
/**
|
|
556
|
+
* reduced value of the filter to be applied.
|
|
557
|
+
*/
|
|
558
|
+
reduce: Options;
|
|
559
|
+
};
|
|
429
560
|
DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules>;
|
|
430
561
|
}
|
|
431
562
|
|
|
563
|
+
export declare type Filter1DOptions = BaselineCorrectionFilterOptions | FFT1DOptions | ZeroFillingFilterOptions | SignalProcessingFilter | ShiftXFilterOptions | PhaseCorrection1DFilterOptions | ForwardLP1DOptions | ExclusionZonesOptions | EquallySpacedOptions | DigitalFilterOption | Apodization1DFilterOptions | BackwardLinearPredictionFilterOptions;
|
|
564
|
+
|
|
565
|
+
export declare type Filter2D = Filter2DOptions & Filter;
|
|
566
|
+
|
|
567
|
+
declare type Filter2DContent = ApodizationDimension1 | ApodizationDimension2 | BaselineCorrection2D | BackwardLPDimension1 | BackwardLPDimension2 | FFTDimension1 | FFTDimension2 | FordwardLPDimension1 | FordwardLPDimension2 | DigitalFilter2D | PhaseCorrection2D | ZeroFillingDimension1 | ZeroFillingDimension2 | SymmetrizeCosyLike | Shift2DX | Shift2DY;
|
|
568
|
+
|
|
569
|
+
declare interface Filter2DInterface<ID extends string, Name extends string, Options extends object> {
|
|
570
|
+
/**
|
|
571
|
+
* this will help at the moment to identify filters.
|
|
572
|
+
*/
|
|
573
|
+
id: ID;
|
|
574
|
+
/**
|
|
575
|
+
* name of the filter to be presented in the GUI.
|
|
576
|
+
*/
|
|
577
|
+
name: Name;
|
|
578
|
+
isApplicable: (datum1D: Entry2D) => boolean;
|
|
579
|
+
/**
|
|
580
|
+
* Filter function that process the data in place.
|
|
581
|
+
*/
|
|
582
|
+
apply: (datum1D: Entry2D, options: Options) => void;
|
|
583
|
+
/** This function is called when the same filter had been applied
|
|
584
|
+
* it returns the value should be applied to the filter (reduce) and
|
|
585
|
+
*/
|
|
586
|
+
reduce: (previousValue: Options, newValue: Options) => {
|
|
587
|
+
/**
|
|
588
|
+
* if it is true and there is only one filter to be applied
|
|
589
|
+
* FiltersManager will applied the filter on the processed data.
|
|
590
|
+
*/
|
|
591
|
+
once: boolean;
|
|
592
|
+
/**
|
|
593
|
+
* reduced value of the filter to be applied.
|
|
594
|
+
*/
|
|
595
|
+
reduce: Options;
|
|
596
|
+
};
|
|
597
|
+
DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules_2>;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export declare type Filter2DOptions = ApodizationDimension1Options | ApodizationDimension2Options | BaselineCorrection2DFilterOptions | BackwardLPDimension1Options | BackwardLPDimension2Options | DigitalFilter2DOptions | FFTDimension1Options | FFTDimension2Options | FordwardLPDimension1Options | FordwardLPDimension2Options | PhaseCorrection2DOptions | Shift2DXFilterOptions | Shift2DYFilterOptions | SymmetrizeCosyLikeOptions | ZeroFillingDimension1Options | ZeroFillingDimension2Options;
|
|
601
|
+
|
|
432
602
|
declare interface FilterDomainUpdateRules {
|
|
433
603
|
updateYDomain: boolean;
|
|
434
604
|
updateXDomain: boolean;
|
|
435
605
|
}
|
|
436
606
|
|
|
437
|
-
declare interface
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
value: any;
|
|
607
|
+
declare interface FilterDomainUpdateRules_2 {
|
|
608
|
+
updateYDomain: boolean;
|
|
609
|
+
updateXDomain: boolean;
|
|
441
610
|
}
|
|
442
611
|
|
|
443
|
-
export declare const
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
612
|
+
export declare const Filters1D: {
|
|
613
|
+
[K in Filter1DContent['id']]: Extract<Filter1DContent, {
|
|
614
|
+
id: K;
|
|
615
|
+
}>;
|
|
616
|
+
};
|
|
448
617
|
|
|
449
|
-
declare namespace
|
|
618
|
+
declare namespace Filters1DManager {
|
|
450
619
|
export {
|
|
451
|
-
|
|
452
|
-
lookupForFilter,
|
|
620
|
+
applyFilters,
|
|
453
621
|
reapplyFilters,
|
|
454
622
|
enableFilter,
|
|
455
623
|
deleteFilter,
|
|
456
|
-
|
|
457
|
-
FilterDomainUpdateRules,
|
|
458
|
-
Entry
|
|
624
|
+
FilterDomainUpdateRules
|
|
459
625
|
}
|
|
460
626
|
}
|
|
461
|
-
export {
|
|
627
|
+
export { Filters1DManager }
|
|
628
|
+
|
|
629
|
+
export declare const Filters2D: {
|
|
630
|
+
[K in Filter2DContent['id']]: Extract<Filter2DContent, {
|
|
631
|
+
id: K;
|
|
632
|
+
}>;
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
declare namespace Filters2DManager {
|
|
636
|
+
export {
|
|
637
|
+
applyFilters_2 as applyFilters,
|
|
638
|
+
reapplyFilters_2 as reapplyFilters,
|
|
639
|
+
enableFilter_2 as enableFilter,
|
|
640
|
+
deleteFilter_2 as deleteFilter,
|
|
641
|
+
FilterDomainUpdateRules_2 as FilterDomainUpdateRules
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
export { Filters2DManager }
|
|
462
645
|
|
|
463
646
|
/**
|
|
464
647
|
* look for a multiplet based on the pattern name or abbreviation.
|
|
@@ -466,7 +649,28 @@ export { FiltersManager }
|
|
|
466
649
|
*/
|
|
467
650
|
export declare function findMultiplet(name: string): MultipletDefinition | undefined;
|
|
468
651
|
|
|
469
|
-
export declare type FlexibleWindowFunctions = Exponential<Partial<ExponentialOptions>> | LorentToGauss<Partial<LorentzToGaussOptions>> | SineBell<Partial<SineBellOptions>> | SineSquare<Partial<
|
|
652
|
+
export declare type FlexibleWindowFunctions = Exponential<Partial<ExponentialOptions>> | LorentToGauss<Partial<LorentzToGaussOptions>> | SineBell<Partial<SineBellOptions>> | SineSquare<Partial<SineSquareOptions>> | Traf<Partial<TrafOptions>> | ModifiedGaussian<Partial<ModifiedGaussianOptions>> | Gaussian<Partial<GaussianOptions>>;
|
|
653
|
+
|
|
654
|
+
declare type FordwardLPDimension1 = Filter2DInterface<'flpDimension1', 'Fordward-LP Dimension 1', Partial<BackwardLPOptions>>;
|
|
655
|
+
|
|
656
|
+
declare interface FordwardLPDimension1Options extends BaseFilter {
|
|
657
|
+
name: 'flpDimension1';
|
|
658
|
+
value: Partial<BackwardLPOptions>;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
declare type FordwardLPDimension2 = Filter2DInterface<'flpDimension2', 'Fordward-LP Dimension 2', Partial<BackwardLPOptions>>;
|
|
662
|
+
|
|
663
|
+
declare interface FordwardLPDimension2Options extends BaseFilter {
|
|
664
|
+
name: 'flpDimension2';
|
|
665
|
+
value: Partial<BackwardLPOptions>;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
declare type ForwardLP1D = Filter1DInterface<'forwardLinearPrediction', 'Forward Linear Prediction Filter', Partial<ForwardLPOptions>>;
|
|
669
|
+
|
|
670
|
+
declare interface ForwardLP1DOptions extends BaseFilter {
|
|
671
|
+
name: 'forwardLinearPrediction';
|
|
672
|
+
value: Partial<ForwardLPOptions>;
|
|
673
|
+
}
|
|
470
674
|
|
|
471
675
|
export declare interface ForwardLPOptions {
|
|
472
676
|
/**
|
|
@@ -487,6 +691,32 @@ export declare interface ForwardLPOptions {
|
|
|
487
691
|
output?: Float64Array;
|
|
488
692
|
}
|
|
489
693
|
|
|
694
|
+
declare interface Gaussian<ShapeOption = GaussianOptions> {
|
|
695
|
+
kind: 'gaussian';
|
|
696
|
+
options: ShapeOption;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
declare interface GaussianOptions {
|
|
700
|
+
/**
|
|
701
|
+
* size of the shape function
|
|
702
|
+
*/
|
|
703
|
+
length: number;
|
|
704
|
+
/**
|
|
705
|
+
* increment value in time or the independent value
|
|
706
|
+
*/
|
|
707
|
+
dw: number;
|
|
708
|
+
/**
|
|
709
|
+
* Inverse Exponential Width, Hz
|
|
710
|
+
* @default 0
|
|
711
|
+
*/
|
|
712
|
+
lineBroadening?: number;
|
|
713
|
+
/**
|
|
714
|
+
* Location of Gauss Maximum, this value should be between 0 to 1
|
|
715
|
+
* @default 1
|
|
716
|
+
*/
|
|
717
|
+
lineBroadeningCenter?: number;
|
|
718
|
+
}
|
|
719
|
+
|
|
490
720
|
export declare function get13CAssignments(ranges: NMRRange[], molecule: Molecule, options?: Get13CAssignmentsOptions): Promise<{
|
|
491
721
|
score: any;
|
|
492
722
|
assignment: unknown[];
|
|
@@ -2305,8 +2535,6 @@ declare interface ListField extends Field<string[]> {
|
|
|
2305
2535
|
properties: Record<string, CommonField>;
|
|
2306
2536
|
}
|
|
2307
2537
|
|
|
2308
|
-
declare function lookupForFilter(datum: Entry1D | Entry2D, filterName: string): Filter | undefined;
|
|
2309
|
-
|
|
2310
2538
|
declare interface LorentToGauss<ShapeOption = LorentzToGaussOptions> {
|
|
2311
2539
|
kind: 'lorentzToGauss';
|
|
2312
2540
|
options: ShapeOption;
|
|
@@ -2657,7 +2885,7 @@ export declare function normalizeNucleus(nucleus: string): string;
|
|
|
2657
2885
|
|
|
2658
2886
|
export { Nuclei }
|
|
2659
2887
|
|
|
2660
|
-
export declare type Nucleus = Nuclei | `${Nuclei},${Nuclei}` | (string &
|
|
2888
|
+
export declare type Nucleus = Nuclei | `${Nuclei},${Nuclei}` | (string & Record<never, never>);
|
|
2661
2889
|
|
|
2662
2890
|
declare type Nucleus_2 = Nuclei | (string & Record<never, never>);
|
|
2663
2891
|
|
|
@@ -2946,6 +3174,36 @@ declare interface PhaseCorrection {
|
|
|
2946
3174
|
ph1?: number;
|
|
2947
3175
|
}
|
|
2948
3176
|
|
|
3177
|
+
declare type PhaseCorrection1D = Filter1DInterface<'phaseCorrection', 'Phase correction', PhaseCorrection1DOptions>;
|
|
3178
|
+
|
|
3179
|
+
declare interface PhaseCorrection1DFilterOptions extends BaseFilter {
|
|
3180
|
+
name: 'phaseCorrection';
|
|
3181
|
+
value: PhaseCorrection1DOptions;
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3184
|
+
export declare interface PhaseCorrection1DOptions {
|
|
3185
|
+
absolute?: boolean;
|
|
3186
|
+
ph0?: number;
|
|
3187
|
+
ph1?: number;
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
declare interface PhaseCorrection2D {
|
|
3191
|
+
id: 'phaseCorrectionTwoDimensions';
|
|
3192
|
+
name: 'Phase correction';
|
|
3193
|
+
isApplicable: (datum2D: Entry2D, options: PhaseCorrectionTwoDFilter) => boolean;
|
|
3194
|
+
apply: (datum2D: Entry2D, options: PhaseCorrectionTwoDFilter) => void;
|
|
3195
|
+
reduce: (previousValue: PhaseCorrectionTwoDFilter, newValue: PhaseCorrectionTwoDFilter) => {
|
|
3196
|
+
once: boolean;
|
|
3197
|
+
reduce: PhaseCorrectionTwoDFilter;
|
|
3198
|
+
};
|
|
3199
|
+
DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules_2>;
|
|
3200
|
+
}
|
|
3201
|
+
|
|
3202
|
+
declare interface PhaseCorrection2DOptions extends BaseFilter {
|
|
3203
|
+
name: 'phaseCorrectionTwoDimensions';
|
|
3204
|
+
value: PhaseCorrectionTwoDFilter;
|
|
3205
|
+
}
|
|
3206
|
+
|
|
2949
3207
|
declare interface PhaseCorrection_2 {
|
|
2950
3208
|
mode?: string;
|
|
2951
3209
|
ph0?: number;
|
|
@@ -2957,10 +3215,8 @@ declare interface PhaseCorrectionHorizontalOptions {
|
|
|
2957
3215
|
ph1: number;
|
|
2958
3216
|
}
|
|
2959
3217
|
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
ph1: number;
|
|
2963
|
-
absolute: boolean;
|
|
3218
|
+
declare interface PhaseCorrectionTwoDFilter extends PhaseCorrectionTwoDOptions {
|
|
3219
|
+
automatic?: AutoPhaseCorrection2D;
|
|
2964
3220
|
}
|
|
2965
3221
|
|
|
2966
3222
|
export declare interface PhaseCorrectionTwoDOptions {
|
|
@@ -3367,7 +3623,9 @@ declare namespace RangeUtilities {
|
|
|
3367
3623
|
}
|
|
3368
3624
|
export { RangeUtilities }
|
|
3369
3625
|
|
|
3370
|
-
declare function reapplyFilters(datum: Entry1D
|
|
3626
|
+
declare function reapplyFilters(datum: Entry1D, filters?: Filter1DOptions[]): void;
|
|
3627
|
+
|
|
3628
|
+
declare function reapplyFilters_2(datum: Entry2D, filters?: Filter2DOptions[]): void;
|
|
3371
3629
|
|
|
3372
3630
|
declare function resetDiaIDs(range: Range_2): void;
|
|
3373
3631
|
|
|
@@ -3400,37 +3658,55 @@ declare type Shape1DWithFWHM = Omit<Shape1D, 'fwhm'> & {
|
|
|
3400
3658
|
fwhm: number;
|
|
3401
3659
|
};
|
|
3402
3660
|
|
|
3403
|
-
declare
|
|
3404
|
-
/**
|
|
3405
|
-
* length of the window shape
|
|
3406
|
-
*/
|
|
3407
|
-
length: number;
|
|
3408
|
-
/**
|
|
3409
|
-
* parameters of the shape plus the kind of shape to identify
|
|
3410
|
-
*/
|
|
3411
|
-
shapes?: Shapes<ShapeWindow>;
|
|
3412
|
-
}
|
|
3413
|
-
|
|
3414
|
-
declare type Shapes<ShapeWindow = WindowFunctions> = Partial<Record<WindowFunctions['kind'], ShapeToAdd<ShapeWindow>>>;
|
|
3661
|
+
export declare type Shapes<ShapeWindow = WindowFunctions> = Partial<Record<WindowFunctions['kind'], ShapeToAdd<ShapeWindow>>>;
|
|
3415
3662
|
|
|
3416
|
-
declare interface ShapeToAdd<ShapeWindows = WindowFunctions> {
|
|
3663
|
+
export declare interface ShapeToAdd<ShapeWindows = WindowFunctions> {
|
|
3417
3664
|
/**
|
|
3418
3665
|
* if it is false the shape is not included in the apodization
|
|
3419
3666
|
* @default true
|
|
3420
3667
|
*/
|
|
3421
3668
|
apply?: boolean;
|
|
3422
|
-
/**
|
|
3423
|
-
* Start Location for Applying Apodize Window
|
|
3424
|
-
*/
|
|
3425
|
-
start?: number;
|
|
3426
3669
|
/**
|
|
3427
3670
|
* parameters of the shape plus the kind of shape to identify
|
|
3428
3671
|
*/
|
|
3429
3672
|
shape: ShapeWindows;
|
|
3430
3673
|
}
|
|
3431
3674
|
|
|
3675
|
+
declare type Shift2DX = Filter2DInterface<'shift2DX', 'Shift 2D X', Shift2DXOptions>;
|
|
3676
|
+
|
|
3677
|
+
declare interface Shift2DXFilterOptions extends BaseFilter {
|
|
3678
|
+
name: 'shift2DX';
|
|
3679
|
+
value: Shift2DXOptions;
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
declare interface Shift2DXOptions {
|
|
3683
|
+
shift: number;
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3686
|
+
declare type Shift2DY = Filter2DInterface<'shift2DY', 'Shift 2D Y', Shift2DYOptions>;
|
|
3687
|
+
|
|
3688
|
+
declare interface Shift2DYFilterOptions extends BaseFilter {
|
|
3689
|
+
name: 'shift2DY';
|
|
3690
|
+
value: Shift2DYOptions;
|
|
3691
|
+
}
|
|
3692
|
+
|
|
3693
|
+
declare interface Shift2DYOptions {
|
|
3694
|
+
shift: number;
|
|
3695
|
+
}
|
|
3696
|
+
|
|
3432
3697
|
declare type ShiftTarget = 'origin' | 'current';
|
|
3433
3698
|
|
|
3699
|
+
declare type ShiftX = Filter1DInterface<'shiftX', 'Shift X', ShiftXOptions>;
|
|
3700
|
+
|
|
3701
|
+
declare interface ShiftXFilterOptions extends BaseFilter {
|
|
3702
|
+
name: 'shiftX';
|
|
3703
|
+
value: ShiftXOptions;
|
|
3704
|
+
}
|
|
3705
|
+
|
|
3706
|
+
declare interface ShiftXOptions {
|
|
3707
|
+
shift: number;
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3434
3710
|
export declare interface Signal extends NMRSignal1D {
|
|
3435
3711
|
intensity?: number;
|
|
3436
3712
|
shape?: Shape1D;
|
|
@@ -3517,6 +3793,13 @@ export declare function signalMultiplicityPattern(signal: NMRSignal1D, options?:
|
|
|
3517
3793
|
acsFormat?: boolean;
|
|
3518
3794
|
}): string;
|
|
3519
3795
|
|
|
3796
|
+
declare type SignalProcessing = Filter1DInterface<'signalProcessing', 'Signal processing', MatrixOptions>;
|
|
3797
|
+
|
|
3798
|
+
declare interface SignalProcessingFilter extends BaseFilter {
|
|
3799
|
+
name: 'signalProcessing';
|
|
3800
|
+
value: MatrixOptions;
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3520
3803
|
export declare function signals2DToZ(signals: NMRSignal2D[], options?: Signals2DToZOptions): Spectrum2D;
|
|
3521
3804
|
|
|
3522
3805
|
declare interface Signals2DToZOptions {
|
|
@@ -3565,12 +3848,8 @@ export declare interface SignalsJoinOptions {
|
|
|
3565
3848
|
* imaginary parts, that is why the couplings should be assigned in order to generate the spin system.
|
|
3566
3849
|
*/
|
|
3567
3850
|
export declare function signalsToFID(signals: NMRSignal1D[], options: SignalsToFIDOptions): {
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
im: DoubleArray;
|
|
3571
|
-
} | {
|
|
3572
|
-
re: DoubleArray;
|
|
3573
|
-
im: DoubleArray;
|
|
3851
|
+
re: Float64Array;
|
|
3852
|
+
im: Float64Array;
|
|
3574
3853
|
};
|
|
3575
3854
|
|
|
3576
3855
|
export declare interface SignalsToFIDOptions {
|
|
@@ -3716,6 +3995,8 @@ declare interface SineSquare<ShapeOption = SineBellOptions> {
|
|
|
3716
3995
|
options: ShapeOption;
|
|
3717
3996
|
}
|
|
3718
3997
|
|
|
3998
|
+
declare type SineSquareOptions = Omit<SineBellOptions, 'exponent'>;
|
|
3999
|
+
|
|
3719
4000
|
export declare type Solvent = keyof typeof impuritiesContent;
|
|
3720
4001
|
|
|
3721
4002
|
declare type Solvent_2 = keyof typeof impurities;
|
|
@@ -3825,6 +4106,13 @@ export declare interface SumOptions {
|
|
|
3825
4106
|
moleculeId?: string;
|
|
3826
4107
|
}
|
|
3827
4108
|
|
|
4109
|
+
declare type SymmetrizeCosyLike = Filter2DInterface<'symmetrizeCosyLike', 'symmetrize COSY-like', Record<string, never>>;
|
|
4110
|
+
|
|
4111
|
+
declare interface SymmetrizeCosyLikeOptions extends BaseFilter {
|
|
4112
|
+
name: 'symmetrizeCosyLike';
|
|
4113
|
+
value: Record<string, never>;
|
|
4114
|
+
}
|
|
4115
|
+
|
|
3828
4116
|
declare class T1Regression extends BaseRegression {
|
|
3829
4117
|
fullMagnetization: number;
|
|
3830
4118
|
relaxationT1: number;
|
|
@@ -3889,7 +4177,7 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
3889
4177
|
|
|
3890
4178
|
export declare function updateRangesRelativeValues(spectrum: Entry1D, forceCalculateIntegral?: boolean): void;
|
|
3891
4179
|
|
|
3892
|
-
export declare type WindowFunctions = Exponential | LorentToGauss | SineBell | SineSquare | Traf | ModifiedGaussian;
|
|
4180
|
+
export declare type WindowFunctions = Exponential | LorentToGauss | SineBell | SineSquare | Traf | ModifiedGaussian | Gaussian;
|
|
3893
4181
|
|
|
3894
4182
|
/**
|
|
3895
4183
|
* Predict back points by singular value decomposition.
|
|
@@ -4095,9 +4383,29 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
4095
4383
|
|
|
4096
4384
|
export declare function xyzPhaseCorrection(data: NmrData2DFt, options: PhaseCorrectionTwoDOptions): NmrData2DFt;
|
|
4097
4385
|
|
|
4386
|
+
declare type ZeroFilling = Filter1DInterface<'zeroFilling', 'Zero Filling', ZeroFillingOptions>;
|
|
4387
|
+
|
|
4388
|
+
declare type ZeroFillingDimension1 = Filter2DInterface<'zeroFillingDimension1', 'Zero filling on Dimension 1', ZeroFillingOptions>;
|
|
4389
|
+
|
|
4390
|
+
declare interface ZeroFillingDimension1Options extends BaseFilter {
|
|
4391
|
+
name: 'zeroFillingDimension1';
|
|
4392
|
+
value: ZeroFillingOptions;
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
declare type ZeroFillingDimension2 = Filter2DInterface<'zeroFillingDimension2', 'Zero filling on Dimension 2', ZeroFillingOptions>;
|
|
4396
|
+
|
|
4397
|
+
declare interface ZeroFillingDimension2Options extends BaseFilter {
|
|
4398
|
+
name: 'zeroFillingDimension2';
|
|
4399
|
+
value: ZeroFillingOptions;
|
|
4400
|
+
}
|
|
4401
|
+
|
|
4402
|
+
declare interface ZeroFillingFilterOptions extends BaseFilter {
|
|
4403
|
+
name: 'zeroFilling';
|
|
4404
|
+
value: ZeroFillingOptions;
|
|
4405
|
+
}
|
|
4406
|
+
|
|
4098
4407
|
export declare interface ZeroFillingOptions {
|
|
4099
|
-
nbPoints
|
|
4100
|
-
factor?: number;
|
|
4408
|
+
nbPoints: number;
|
|
4101
4409
|
}
|
|
4102
4410
|
|
|
4103
4411
|
export declare interface Zone {
|