nmr-processing 13.0.2 → 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 +433 -117
- package/nmr-processing.mjs +3 -3
- package/package.json +2 -2
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,54 +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
|
-
|
|
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>;
|
|
70
57
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
|
|
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 {
|
|
77
82
|
/**
|
|
78
|
-
*
|
|
79
|
-
* @default 0
|
|
83
|
+
* reapply all the filters using the original data, even if there is a previous filter applied.
|
|
80
84
|
*/
|
|
81
|
-
|
|
82
|
-
compose?: Partial<ShapeOptions<FlexibleWindowFunctions>>;
|
|
85
|
+
forceReapply?: boolean;
|
|
83
86
|
/**
|
|
84
|
-
*
|
|
85
|
-
* @default true
|
|
87
|
+
* filter position at the moment to add a new filter
|
|
86
88
|
*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
filterIndex?: number;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
declare interface ApplyFilterOptions_2 {
|
|
93
|
+
/**
|
|
94
|
+
* reapply all the filters using the original data, even if there is a previous filter applied.
|
|
95
|
+
*/
|
|
96
|
+
forceReapply?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* filter position at the moment to add a new filter
|
|
99
|
+
*/
|
|
100
|
+
filterIndex?: number;
|
|
89
101
|
}
|
|
90
102
|
|
|
91
103
|
/***
|
|
92
104
|
* @param {object} Filters [{name:'',options:{}},{...}]
|
|
93
105
|
*/
|
|
94
|
-
declare function
|
|
106
|
+
declare function applyFilters(datum: Entry1D, filters?: Filter1DOptions[], options?: ApplyFilterOptions): void;
|
|
95
107
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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;
|
|
99
122
|
}
|
|
100
123
|
|
|
101
124
|
declare type AtomTypes = 'H' | 'C';
|
|
@@ -112,6 +135,27 @@ export declare interface AutoPhaseCorrectionOptions {
|
|
|
112
135
|
reverse?: boolean;
|
|
113
136
|
}
|
|
114
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
|
+
|
|
115
159
|
export declare interface BackwardLPOptions {
|
|
116
160
|
/**
|
|
117
161
|
* Number of coefficients to be calculated in the SVD.
|
|
@@ -138,9 +182,7 @@ declare interface BaseField {
|
|
|
138
182
|
description: string;
|
|
139
183
|
}
|
|
140
184
|
|
|
141
|
-
|
|
142
|
-
name: string;
|
|
143
|
-
value: any;
|
|
185
|
+
declare interface BaseFilter {
|
|
144
186
|
isDeleteAllow?: boolean;
|
|
145
187
|
flag?: boolean | null;
|
|
146
188
|
label?: string;
|
|
@@ -148,6 +190,20 @@ export declare interface BaseFilter {
|
|
|
148
190
|
|
|
149
191
|
export declare type BaselineAlgorithms = 'airpls' | 'polynomial';
|
|
150
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
|
+
|
|
151
207
|
export declare type BaselineCorrectionOptions = PolynomialOptions | AirplsOptions;
|
|
152
208
|
|
|
153
209
|
export declare interface BaselineCorrectionZone {
|
|
@@ -247,6 +303,11 @@ export declare const couplingACSPatterns: string[];
|
|
|
247
303
|
|
|
248
304
|
export declare const couplingPatterns: string[];
|
|
249
305
|
|
|
306
|
+
export declare function createApodizationWindowData(options: {
|
|
307
|
+
shapes?: Shapes;
|
|
308
|
+
length: number;
|
|
309
|
+
}): Float64Array;
|
|
310
|
+
|
|
250
311
|
/**
|
|
251
312
|
* This function converts a set of 2D-peaks in 2D-signals. Each signal could be composed
|
|
252
313
|
* of many 2D-peaks, and it has some additional information related to the NMR spectrum.
|
|
@@ -297,13 +358,6 @@ export declare interface DatabaseNMREntry {
|
|
|
297
358
|
|
|
298
359
|
export declare type DataBaseStructure = DataBaseLevelStructure[];
|
|
299
360
|
|
|
300
|
-
export declare interface DataReIm {
|
|
301
|
-
/** Array of re values */
|
|
302
|
-
re: DoubleArray;
|
|
303
|
-
/** Array of im values */
|
|
304
|
-
im: DoubleArray;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
361
|
export declare interface DataResurrect {
|
|
308
362
|
info: {
|
|
309
363
|
solvent?: string;
|
|
@@ -322,7 +376,31 @@ export declare const DatumKind: {
|
|
|
322
376
|
mixed: string;
|
|
323
377
|
};
|
|
324
378
|
|
|
325
|
-
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
|
+
}
|
|
326
404
|
|
|
327
405
|
export declare interface DirectDimensionOptions {
|
|
328
406
|
acquisitionScheme?: string;
|
|
@@ -333,9 +411,14 @@ export declare interface DirectDimensionOptions {
|
|
|
333
411
|
|
|
334
412
|
declare type EmptyValue = void | undefined | null;
|
|
335
413
|
|
|
336
|
-
declare function enableFilter(datum: Entry1D
|
|
414
|
+
declare function enableFilter(datum: Entry1D, id: string | null, checked: boolean | null, filters?: Filter1DOptions[]): void;
|
|
415
|
+
|
|
416
|
+
declare function enableFilter_2(datum: Entry2D, id: string | null, checked: boolean | null, filters?: Filter2DOptions[]): void;
|
|
337
417
|
|
|
338
|
-
declare
|
|
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
|
+
};
|
|
339
422
|
|
|
340
423
|
declare interface Entry1D {
|
|
341
424
|
id?: string;
|
|
@@ -346,14 +429,9 @@ declare interface Entry1D {
|
|
|
346
429
|
ranges: Ranges;
|
|
347
430
|
info: Info1D;
|
|
348
431
|
originalInfo?: Info1D;
|
|
349
|
-
filters:
|
|
432
|
+
filters: Filter1D[];
|
|
350
433
|
}
|
|
351
434
|
|
|
352
|
-
declare type Entry1DApodizationFilter = Partial<Omit<Entry1D, 'info'>> & {
|
|
353
|
-
info: Partial<Info1D>;
|
|
354
|
-
data: Required<NmrData1D>;
|
|
355
|
-
};
|
|
356
|
-
|
|
357
435
|
declare interface Entry2D<T extends NmrData2D = NmrData2D> {
|
|
358
436
|
id?: string;
|
|
359
437
|
zones: Zones;
|
|
@@ -362,7 +440,16 @@ declare interface Entry2D<T extends NmrData2D = NmrData2D> {
|
|
|
362
440
|
originalInfo?: Record<string, any>;
|
|
363
441
|
data: T;
|
|
364
442
|
originalData?: T;
|
|
365
|
-
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;
|
|
366
453
|
}
|
|
367
454
|
|
|
368
455
|
declare interface ExclusionZone {
|
|
@@ -371,6 +458,13 @@ declare interface ExclusionZone {
|
|
|
371
458
|
to: number;
|
|
372
459
|
}
|
|
373
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
|
+
|
|
374
468
|
declare interface Exponential<ShapeOption = ExponentialOptions> {
|
|
375
469
|
kind: 'exponential';
|
|
376
470
|
options: ShapeOption;
|
|
@@ -388,6 +482,27 @@ declare interface ExponentialOptions {
|
|
|
388
482
|
dw: number;
|
|
389
483
|
}
|
|
390
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
|
+
|
|
391
506
|
export declare function fftDirectDimension(data: {
|
|
392
507
|
re: DoubleArray[];
|
|
393
508
|
im: DoubleArray[];
|
|
@@ -405,50 +520,128 @@ declare interface Field<T> extends BaseField {
|
|
|
405
520
|
default: T;
|
|
406
521
|
}
|
|
407
522
|
|
|
408
|
-
|
|
409
|
-
id
|
|
523
|
+
declare interface Filter extends Required<BaseFilter> {
|
|
524
|
+
id?: string;
|
|
410
525
|
error?: string;
|
|
411
526
|
}
|
|
412
527
|
|
|
413
|
-
declare
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
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
|
+
};
|
|
419
560
|
DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules>;
|
|
420
561
|
}
|
|
421
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
|
+
|
|
422
602
|
declare interface FilterDomainUpdateRules {
|
|
423
603
|
updateYDomain: boolean;
|
|
424
604
|
updateXDomain: boolean;
|
|
425
605
|
}
|
|
426
606
|
|
|
427
|
-
declare interface
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
value: any;
|
|
607
|
+
declare interface FilterDomainUpdateRules_2 {
|
|
608
|
+
updateYDomain: boolean;
|
|
609
|
+
updateXDomain: boolean;
|
|
431
610
|
}
|
|
432
611
|
|
|
433
|
-
export declare const
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
612
|
+
export declare const Filters1D: {
|
|
613
|
+
[K in Filter1DContent['id']]: Extract<Filter1DContent, {
|
|
614
|
+
id: K;
|
|
615
|
+
}>;
|
|
616
|
+
};
|
|
438
617
|
|
|
439
|
-
declare namespace
|
|
618
|
+
declare namespace Filters1DManager {
|
|
440
619
|
export {
|
|
441
|
-
|
|
442
|
-
lookupForFilter,
|
|
620
|
+
applyFilters,
|
|
443
621
|
reapplyFilters,
|
|
444
622
|
enableFilter,
|
|
445
623
|
deleteFilter,
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
624
|
+
FilterDomainUpdateRules
|
|
625
|
+
}
|
|
626
|
+
}
|
|
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
|
|
449
642
|
}
|
|
450
643
|
}
|
|
451
|
-
export {
|
|
644
|
+
export { Filters2DManager }
|
|
452
645
|
|
|
453
646
|
/**
|
|
454
647
|
* look for a multiplet based on the pattern name or abbreviation.
|
|
@@ -456,7 +649,28 @@ export { FiltersManager }
|
|
|
456
649
|
*/
|
|
457
650
|
export declare function findMultiplet(name: string): MultipletDefinition | undefined;
|
|
458
651
|
|
|
459
|
-
export declare type FlexibleWindowFunctions = Exponential<Partial<ExponentialOptions>> | LorentToGauss<Partial<LorentzToGaussOptions>> | SineBell<Partial<SineBellOptions>> | SineSquare<Partial<SineSquareOptions>> | Traf<Partial<TrafOptions>> | ModifiedGaussian<Partial<ModifiedGaussianOptions>>;
|
|
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
|
+
}
|
|
460
674
|
|
|
461
675
|
export declare interface ForwardLPOptions {
|
|
462
676
|
/**
|
|
@@ -477,6 +691,32 @@ export declare interface ForwardLPOptions {
|
|
|
477
691
|
output?: Float64Array;
|
|
478
692
|
}
|
|
479
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
|
+
|
|
480
720
|
export declare function get13CAssignments(ranges: NMRRange[], molecule: Molecule, options?: Get13CAssignmentsOptions): Promise<{
|
|
481
721
|
score: any;
|
|
482
722
|
assignment: unknown[];
|
|
@@ -2295,8 +2535,6 @@ declare interface ListField extends Field<string[]> {
|
|
|
2295
2535
|
properties: Record<string, CommonField>;
|
|
2296
2536
|
}
|
|
2297
2537
|
|
|
2298
|
-
declare function lookupForFilter(datum: Entry1D | Entry2D, filterName: string): Filter | undefined;
|
|
2299
|
-
|
|
2300
2538
|
declare interface LorentToGauss<ShapeOption = LorentzToGaussOptions> {
|
|
2301
2539
|
kind: 'lorentzToGauss';
|
|
2302
2540
|
options: ShapeOption;
|
|
@@ -2936,6 +3174,36 @@ declare interface PhaseCorrection {
|
|
|
2936
3174
|
ph1?: number;
|
|
2937
3175
|
}
|
|
2938
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
|
+
|
|
2939
3207
|
declare interface PhaseCorrection_2 {
|
|
2940
3208
|
mode?: string;
|
|
2941
3209
|
ph0?: number;
|
|
@@ -2947,10 +3215,8 @@ declare interface PhaseCorrectionHorizontalOptions {
|
|
|
2947
3215
|
ph1: number;
|
|
2948
3216
|
}
|
|
2949
3217
|
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
ph1: number;
|
|
2953
|
-
absolute: boolean;
|
|
3218
|
+
declare interface PhaseCorrectionTwoDFilter extends PhaseCorrectionTwoDOptions {
|
|
3219
|
+
automatic?: AutoPhaseCorrection2D;
|
|
2954
3220
|
}
|
|
2955
3221
|
|
|
2956
3222
|
export declare interface PhaseCorrectionTwoDOptions {
|
|
@@ -3357,7 +3623,9 @@ declare namespace RangeUtilities {
|
|
|
3357
3623
|
}
|
|
3358
3624
|
export { RangeUtilities }
|
|
3359
3625
|
|
|
3360
|
-
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;
|
|
3361
3629
|
|
|
3362
3630
|
declare function resetDiaIDs(range: Range_2): void;
|
|
3363
3631
|
|
|
@@ -3390,37 +3658,55 @@ declare type Shape1DWithFWHM = Omit<Shape1D, 'fwhm'> & {
|
|
|
3390
3658
|
fwhm: number;
|
|
3391
3659
|
};
|
|
3392
3660
|
|
|
3393
|
-
declare
|
|
3394
|
-
/**
|
|
3395
|
-
* length of the window shape
|
|
3396
|
-
*/
|
|
3397
|
-
length: number;
|
|
3398
|
-
/**
|
|
3399
|
-
* parameters of the shape plus the kind of shape to identify
|
|
3400
|
-
*/
|
|
3401
|
-
shapes?: Shapes<ShapeWindow>;
|
|
3402
|
-
}
|
|
3403
|
-
|
|
3404
|
-
declare type Shapes<ShapeWindow = WindowFunctions> = Partial<Record<WindowFunctions['kind'], ShapeToAdd<ShapeWindow>>>;
|
|
3661
|
+
export declare type Shapes<ShapeWindow = WindowFunctions> = Partial<Record<WindowFunctions['kind'], ShapeToAdd<ShapeWindow>>>;
|
|
3405
3662
|
|
|
3406
|
-
declare interface ShapeToAdd<ShapeWindows = WindowFunctions> {
|
|
3663
|
+
export declare interface ShapeToAdd<ShapeWindows = WindowFunctions> {
|
|
3407
3664
|
/**
|
|
3408
3665
|
* if it is false the shape is not included in the apodization
|
|
3409
3666
|
* @default true
|
|
3410
3667
|
*/
|
|
3411
3668
|
apply?: boolean;
|
|
3412
|
-
/**
|
|
3413
|
-
* Start Location for Applying Apodize Window
|
|
3414
|
-
*/
|
|
3415
|
-
start?: number;
|
|
3416
3669
|
/**
|
|
3417
3670
|
* parameters of the shape plus the kind of shape to identify
|
|
3418
3671
|
*/
|
|
3419
3672
|
shape: ShapeWindows;
|
|
3420
3673
|
}
|
|
3421
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
|
+
|
|
3422
3697
|
declare type ShiftTarget = 'origin' | 'current';
|
|
3423
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
|
+
|
|
3424
3710
|
export declare interface Signal extends NMRSignal1D {
|
|
3425
3711
|
intensity?: number;
|
|
3426
3712
|
shape?: Shape1D;
|
|
@@ -3507,6 +3793,13 @@ export declare function signalMultiplicityPattern(signal: NMRSignal1D, options?:
|
|
|
3507
3793
|
acsFormat?: boolean;
|
|
3508
3794
|
}): string;
|
|
3509
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
|
+
|
|
3510
3803
|
export declare function signals2DToZ(signals: NMRSignal2D[], options?: Signals2DToZOptions): Spectrum2D;
|
|
3511
3804
|
|
|
3512
3805
|
declare interface Signals2DToZOptions {
|
|
@@ -3555,12 +3848,8 @@ export declare interface SignalsJoinOptions {
|
|
|
3555
3848
|
* imaginary parts, that is why the couplings should be assigned in order to generate the spin system.
|
|
3556
3849
|
*/
|
|
3557
3850
|
export declare function signalsToFID(signals: NMRSignal1D[], options: SignalsToFIDOptions): {
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
im: DoubleArray;
|
|
3561
|
-
} | {
|
|
3562
|
-
re: DoubleArray;
|
|
3563
|
-
im: DoubleArray;
|
|
3851
|
+
re: Float64Array;
|
|
3852
|
+
im: Float64Array;
|
|
3564
3853
|
};
|
|
3565
3854
|
|
|
3566
3855
|
export declare interface SignalsToFIDOptions {
|
|
@@ -3817,6 +4106,13 @@ export declare interface SumOptions {
|
|
|
3817
4106
|
moleculeId?: string;
|
|
3818
4107
|
}
|
|
3819
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
|
+
|
|
3820
4116
|
declare class T1Regression extends BaseRegression {
|
|
3821
4117
|
fullMagnetization: number;
|
|
3822
4118
|
relaxationT1: number;
|
|
@@ -3881,7 +4177,7 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
3881
4177
|
|
|
3882
4178
|
export declare function updateRangesRelativeValues(spectrum: Entry1D, forceCalculateIntegral?: boolean): void;
|
|
3883
4179
|
|
|
3884
|
-
export declare type WindowFunctions = Exponential | LorentToGauss | SineBell | SineSquare | Traf | ModifiedGaussian;
|
|
4180
|
+
export declare type WindowFunctions = Exponential | LorentToGauss | SineBell | SineSquare | Traf | ModifiedGaussian | Gaussian;
|
|
3885
4181
|
|
|
3886
4182
|
/**
|
|
3887
4183
|
* Predict back points by singular value decomposition.
|
|
@@ -4087,9 +4383,29 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
4087
4383
|
|
|
4088
4384
|
export declare function xyzPhaseCorrection(data: NmrData2DFt, options: PhaseCorrectionTwoDOptions): NmrData2DFt;
|
|
4089
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
|
+
|
|
4090
4407
|
export declare interface ZeroFillingOptions {
|
|
4091
|
-
nbPoints
|
|
4092
|
-
factor?: number;
|
|
4408
|
+
nbPoints: number;
|
|
4093
4409
|
}
|
|
4094
4410
|
|
|
4095
4411
|
export declare interface Zone {
|