nmr-processing 13.0.2 → 13.0.3-pre.1730842757
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 +437 -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,17 @@ declare interface ExclusionZone {
|
|
|
371
458
|
to: number;
|
|
372
459
|
}
|
|
373
460
|
|
|
461
|
+
declare type ExclusionZones = Filter1DInterface<'exclusionZones', 'Exclusion zones', ExclusionZonesFilterOptions[]>;
|
|
462
|
+
|
|
463
|
+
declare interface ExclusionZonesFilterOptions extends FromTo {
|
|
464
|
+
id: string;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
declare interface ExclusionZonesOptions extends BaseFilter {
|
|
468
|
+
name: 'exclusionZones';
|
|
469
|
+
value: ExclusionZonesFilterOptions[];
|
|
470
|
+
}
|
|
471
|
+
|
|
374
472
|
declare interface Exponential<ShapeOption = ExponentialOptions> {
|
|
375
473
|
kind: 'exponential';
|
|
376
474
|
options: ShapeOption;
|
|
@@ -388,6 +486,27 @@ declare interface ExponentialOptions {
|
|
|
388
486
|
dw: number;
|
|
389
487
|
}
|
|
390
488
|
|
|
489
|
+
declare type FFT1D = Filter1DInterface<'fft', 'FFT', Record<string, never>>;
|
|
490
|
+
|
|
491
|
+
declare interface FFT1DOptions extends BaseFilter {
|
|
492
|
+
name: 'fft';
|
|
493
|
+
value: Record<string, never>;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
declare type FFTDimension1 = Filter2DInterface<'fftDimension1', 'FFT Dimension 1', DirectDimensionOptions>;
|
|
497
|
+
|
|
498
|
+
declare interface FFTDimension1Options extends BaseFilter {
|
|
499
|
+
name: 'fftDimension1';
|
|
500
|
+
value: DirectDimensionOptions;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
declare type FFTDimension2 = Filter2DInterface<'fftDimension2', 'FFT Dimension 2', IndirectDimensionOptions>;
|
|
504
|
+
|
|
505
|
+
declare interface FFTDimension2Options extends BaseFilter {
|
|
506
|
+
name: 'fftDimension2';
|
|
507
|
+
value: IndirectDimensionOptions;
|
|
508
|
+
}
|
|
509
|
+
|
|
391
510
|
export declare function fftDirectDimension(data: {
|
|
392
511
|
re: DoubleArray[];
|
|
393
512
|
im: DoubleArray[];
|
|
@@ -405,50 +524,128 @@ declare interface Field<T> extends BaseField {
|
|
|
405
524
|
default: T;
|
|
406
525
|
}
|
|
407
526
|
|
|
408
|
-
|
|
409
|
-
id
|
|
527
|
+
declare interface Filter extends Required<BaseFilter> {
|
|
528
|
+
id?: string;
|
|
410
529
|
error?: string;
|
|
411
530
|
}
|
|
412
531
|
|
|
413
|
-
declare
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
532
|
+
export declare type Filter1D = Filter1DOptions & Filter;
|
|
533
|
+
|
|
534
|
+
declare type Filter1DContent = FFT1D | BaselineCorrection1D | BackwardLinearPrediction1D | Apodization1D | DigitalFilter | EquallySpaced | ExclusionZones | ForwardLP1D | PhaseCorrection1D | ShiftX | SignalProcessing | ZeroFilling;
|
|
535
|
+
|
|
536
|
+
declare interface Filter1DInterface<ID extends string, Name extends string, Options extends object> {
|
|
537
|
+
/**
|
|
538
|
+
* this will help at the moment to identify filters.
|
|
539
|
+
*/
|
|
540
|
+
id: ID;
|
|
541
|
+
/**
|
|
542
|
+
* name of the filter to be presented in the GUI.
|
|
543
|
+
*/
|
|
544
|
+
name: Name;
|
|
545
|
+
isApplicable: (datum1D: Entry1D) => boolean;
|
|
546
|
+
/**
|
|
547
|
+
* Filter function that process the data in place.
|
|
548
|
+
*/
|
|
549
|
+
apply: (datum1D: Entry1D, options: Options) => void;
|
|
550
|
+
/** This function is called when the same filter had been applied
|
|
551
|
+
* it returns the value should be applied to the filter (reduce) and
|
|
552
|
+
*/
|
|
553
|
+
reduce: (previousValue: Options, newValue: Options) => {
|
|
554
|
+
/**
|
|
555
|
+
* if it is true and there is only one filter to be applied
|
|
556
|
+
* FiltersManager will applied the filter on the processed data.
|
|
557
|
+
*/
|
|
558
|
+
once: boolean;
|
|
559
|
+
/**
|
|
560
|
+
* reduced value of the filter to be applied.
|
|
561
|
+
*/
|
|
562
|
+
reduce: Options;
|
|
563
|
+
};
|
|
419
564
|
DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules>;
|
|
420
565
|
}
|
|
421
566
|
|
|
567
|
+
export declare type Filter1DOptions = BaselineCorrectionFilterOptions | FFT1DOptions | ZeroFillingFilterOptions | SignalProcessingFilter | ShiftXFilterOptions | PhaseCorrection1DFilterOptions | ForwardLP1DOptions | ExclusionZonesOptions | EquallySpacedOptions | DigitalFilterOption | Apodization1DFilterOptions | BackwardLinearPredictionFilterOptions;
|
|
568
|
+
|
|
569
|
+
export declare type Filter2D = Filter2DOptions & Filter;
|
|
570
|
+
|
|
571
|
+
declare type Filter2DContent = ApodizationDimension1 | ApodizationDimension2 | BaselineCorrection2D | BackwardLPDimension1 | BackwardLPDimension2 | FFTDimension1 | FFTDimension2 | FordwardLPDimension1 | FordwardLPDimension2 | DigitalFilter2D | PhaseCorrection2D | ZeroFillingDimension1 | ZeroFillingDimension2 | SymmetrizeCosyLike | Shift2DX | Shift2DY;
|
|
572
|
+
|
|
573
|
+
declare interface Filter2DInterface<ID extends string, Name extends string, Options extends object> {
|
|
574
|
+
/**
|
|
575
|
+
* this will help at the moment to identify filters.
|
|
576
|
+
*/
|
|
577
|
+
id: ID;
|
|
578
|
+
/**
|
|
579
|
+
* name of the filter to be presented in the GUI.
|
|
580
|
+
*/
|
|
581
|
+
name: Name;
|
|
582
|
+
isApplicable: (datum1D: Entry2D) => boolean;
|
|
583
|
+
/**
|
|
584
|
+
* Filter function that process the data in place.
|
|
585
|
+
*/
|
|
586
|
+
apply: (datum1D: Entry2D, options: Options) => void;
|
|
587
|
+
/** This function is called when the same filter had been applied
|
|
588
|
+
* it returns the value should be applied to the filter (reduce) and
|
|
589
|
+
*/
|
|
590
|
+
reduce: (previousValue: Options, newValue: Options) => {
|
|
591
|
+
/**
|
|
592
|
+
* if it is true and there is only one filter to be applied
|
|
593
|
+
* FiltersManager will applied the filter on the processed data.
|
|
594
|
+
*/
|
|
595
|
+
once: boolean;
|
|
596
|
+
/**
|
|
597
|
+
* reduced value of the filter to be applied.
|
|
598
|
+
*/
|
|
599
|
+
reduce: Options;
|
|
600
|
+
};
|
|
601
|
+
DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules_2>;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export declare type Filter2DOptions = ApodizationDimension1Options | ApodizationDimension2Options | BaselineCorrection2DFilterOptions | BackwardLPDimension1Options | BackwardLPDimension2Options | DigitalFilter2DOptions | FFTDimension1Options | FFTDimension2Options | FordwardLPDimension1Options | FordwardLPDimension2Options | PhaseCorrection2DOptions | Shift2DXFilterOptions | Shift2DYFilterOptions | SymmetrizeCosyLikeOptions | ZeroFillingDimension1Options | ZeroFillingDimension2Options;
|
|
605
|
+
|
|
422
606
|
declare interface FilterDomainUpdateRules {
|
|
423
607
|
updateYDomain: boolean;
|
|
424
608
|
updateXDomain: boolean;
|
|
425
609
|
}
|
|
426
610
|
|
|
427
|
-
declare interface
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
value: any;
|
|
611
|
+
declare interface FilterDomainUpdateRules_2 {
|
|
612
|
+
updateYDomain: boolean;
|
|
613
|
+
updateXDomain: boolean;
|
|
431
614
|
}
|
|
432
615
|
|
|
433
|
-
export declare const
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
616
|
+
export declare const Filters1D: {
|
|
617
|
+
[K in Filter1DContent['id']]: Extract<Filter1DContent, {
|
|
618
|
+
id: K;
|
|
619
|
+
}>;
|
|
620
|
+
};
|
|
438
621
|
|
|
439
|
-
declare namespace
|
|
622
|
+
declare namespace Filters1DManager {
|
|
440
623
|
export {
|
|
441
|
-
|
|
442
|
-
lookupForFilter,
|
|
624
|
+
applyFilters,
|
|
443
625
|
reapplyFilters,
|
|
444
626
|
enableFilter,
|
|
445
627
|
deleteFilter,
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
628
|
+
FilterDomainUpdateRules
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
export { Filters1DManager }
|
|
632
|
+
|
|
633
|
+
export declare const Filters2D: {
|
|
634
|
+
[K in Filter2DContent['id']]: Extract<Filter2DContent, {
|
|
635
|
+
id: K;
|
|
636
|
+
}>;
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
declare namespace Filters2DManager {
|
|
640
|
+
export {
|
|
641
|
+
applyFilters_2 as applyFilters,
|
|
642
|
+
reapplyFilters_2 as reapplyFilters,
|
|
643
|
+
enableFilter_2 as enableFilter,
|
|
644
|
+
deleteFilter_2 as deleteFilter,
|
|
645
|
+
FilterDomainUpdateRules_2 as FilterDomainUpdateRules
|
|
449
646
|
}
|
|
450
647
|
}
|
|
451
|
-
export {
|
|
648
|
+
export { Filters2DManager }
|
|
452
649
|
|
|
453
650
|
/**
|
|
454
651
|
* look for a multiplet based on the pattern name or abbreviation.
|
|
@@ -456,7 +653,28 @@ export { FiltersManager }
|
|
|
456
653
|
*/
|
|
457
654
|
export declare function findMultiplet(name: string): MultipletDefinition | undefined;
|
|
458
655
|
|
|
459
|
-
export declare type FlexibleWindowFunctions = Exponential<Partial<ExponentialOptions>> | LorentToGauss<Partial<LorentzToGaussOptions>> | SineBell<Partial<SineBellOptions>> | SineSquare<Partial<SineSquareOptions>> | Traf<Partial<TrafOptions>> | ModifiedGaussian<Partial<ModifiedGaussianOptions>>;
|
|
656
|
+
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>>;
|
|
657
|
+
|
|
658
|
+
declare type FordwardLPDimension1 = Filter2DInterface<'flpDimension1', 'Fordward-LP Dimension 1', Partial<BackwardLPOptions>>;
|
|
659
|
+
|
|
660
|
+
declare interface FordwardLPDimension1Options extends BaseFilter {
|
|
661
|
+
name: 'flpDimension1';
|
|
662
|
+
value: Partial<BackwardLPOptions>;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
declare type FordwardLPDimension2 = Filter2DInterface<'flpDimension2', 'Fordward-LP Dimension 2', Partial<BackwardLPOptions>>;
|
|
666
|
+
|
|
667
|
+
declare interface FordwardLPDimension2Options extends BaseFilter {
|
|
668
|
+
name: 'flpDimension2';
|
|
669
|
+
value: Partial<BackwardLPOptions>;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
declare type ForwardLP1D = Filter1DInterface<'forwardLinearPrediction', 'Forward Linear Prediction Filter', Partial<ForwardLPOptions>>;
|
|
673
|
+
|
|
674
|
+
declare interface ForwardLP1DOptions extends BaseFilter {
|
|
675
|
+
name: 'forwardLinearPrediction';
|
|
676
|
+
value: Partial<ForwardLPOptions>;
|
|
677
|
+
}
|
|
460
678
|
|
|
461
679
|
export declare interface ForwardLPOptions {
|
|
462
680
|
/**
|
|
@@ -477,6 +695,32 @@ export declare interface ForwardLPOptions {
|
|
|
477
695
|
output?: Float64Array;
|
|
478
696
|
}
|
|
479
697
|
|
|
698
|
+
declare interface Gaussian<ShapeOption = GaussianOptions> {
|
|
699
|
+
kind: 'gaussian';
|
|
700
|
+
options: ShapeOption;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
declare interface GaussianOptions {
|
|
704
|
+
/**
|
|
705
|
+
* size of the shape function
|
|
706
|
+
*/
|
|
707
|
+
length: number;
|
|
708
|
+
/**
|
|
709
|
+
* increment value in time or the independent value
|
|
710
|
+
*/
|
|
711
|
+
dw: number;
|
|
712
|
+
/**
|
|
713
|
+
* Inverse Exponential Width, Hz
|
|
714
|
+
* @default 0
|
|
715
|
+
*/
|
|
716
|
+
lineBroadening?: number;
|
|
717
|
+
/**
|
|
718
|
+
* Location of Gauss Maximum, this value should be between 0 to 1
|
|
719
|
+
* @default 1
|
|
720
|
+
*/
|
|
721
|
+
lineBroadeningCenter?: number;
|
|
722
|
+
}
|
|
723
|
+
|
|
480
724
|
export declare function get13CAssignments(ranges: NMRRange[], molecule: Molecule, options?: Get13CAssignmentsOptions): Promise<{
|
|
481
725
|
score: any;
|
|
482
726
|
assignment: unknown[];
|
|
@@ -2295,8 +2539,6 @@ declare interface ListField extends Field<string[]> {
|
|
|
2295
2539
|
properties: Record<string, CommonField>;
|
|
2296
2540
|
}
|
|
2297
2541
|
|
|
2298
|
-
declare function lookupForFilter(datum: Entry1D | Entry2D, filterName: string): Filter | undefined;
|
|
2299
|
-
|
|
2300
2542
|
declare interface LorentToGauss<ShapeOption = LorentzToGaussOptions> {
|
|
2301
2543
|
kind: 'lorentzToGauss';
|
|
2302
2544
|
options: ShapeOption;
|
|
@@ -2936,6 +3178,36 @@ declare interface PhaseCorrection {
|
|
|
2936
3178
|
ph1?: number;
|
|
2937
3179
|
}
|
|
2938
3180
|
|
|
3181
|
+
declare type PhaseCorrection1D = Filter1DInterface<'phaseCorrection', 'Phase correction', PhaseCorrection1DOptions>;
|
|
3182
|
+
|
|
3183
|
+
declare interface PhaseCorrection1DFilterOptions extends BaseFilter {
|
|
3184
|
+
name: 'phaseCorrection';
|
|
3185
|
+
value: PhaseCorrection1DOptions;
|
|
3186
|
+
}
|
|
3187
|
+
|
|
3188
|
+
export declare interface PhaseCorrection1DOptions {
|
|
3189
|
+
absolute?: boolean;
|
|
3190
|
+
ph0?: number;
|
|
3191
|
+
ph1?: number;
|
|
3192
|
+
}
|
|
3193
|
+
|
|
3194
|
+
declare interface PhaseCorrection2D {
|
|
3195
|
+
id: 'phaseCorrectionTwoDimensions';
|
|
3196
|
+
name: 'Phase correction';
|
|
3197
|
+
isApplicable: (datum2D: Entry2D, options: PhaseCorrectionTwoDFilter) => boolean;
|
|
3198
|
+
apply: (datum2D: Entry2D, options: PhaseCorrectionTwoDFilter) => void;
|
|
3199
|
+
reduce: (previousValue: PhaseCorrectionTwoDFilter, newValue: PhaseCorrectionTwoDFilter) => {
|
|
3200
|
+
once: boolean;
|
|
3201
|
+
reduce: PhaseCorrectionTwoDFilter;
|
|
3202
|
+
};
|
|
3203
|
+
DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules_2>;
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
declare interface PhaseCorrection2DOptions extends BaseFilter {
|
|
3207
|
+
name: 'phaseCorrectionTwoDimensions';
|
|
3208
|
+
value: PhaseCorrectionTwoDFilter;
|
|
3209
|
+
}
|
|
3210
|
+
|
|
2939
3211
|
declare interface PhaseCorrection_2 {
|
|
2940
3212
|
mode?: string;
|
|
2941
3213
|
ph0?: number;
|
|
@@ -2947,10 +3219,8 @@ declare interface PhaseCorrectionHorizontalOptions {
|
|
|
2947
3219
|
ph1: number;
|
|
2948
3220
|
}
|
|
2949
3221
|
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
ph1: number;
|
|
2953
|
-
absolute: boolean;
|
|
3222
|
+
declare interface PhaseCorrectionTwoDFilter extends PhaseCorrectionTwoDOptions {
|
|
3223
|
+
automatic?: AutoPhaseCorrection2D;
|
|
2954
3224
|
}
|
|
2955
3225
|
|
|
2956
3226
|
export declare interface PhaseCorrectionTwoDOptions {
|
|
@@ -3357,7 +3627,9 @@ declare namespace RangeUtilities {
|
|
|
3357
3627
|
}
|
|
3358
3628
|
export { RangeUtilities }
|
|
3359
3629
|
|
|
3360
|
-
declare function reapplyFilters(datum: Entry1D
|
|
3630
|
+
declare function reapplyFilters(datum: Entry1D, filters?: Filter1DOptions[]): void;
|
|
3631
|
+
|
|
3632
|
+
declare function reapplyFilters_2(datum: Entry2D, filters?: Filter2DOptions[]): void;
|
|
3361
3633
|
|
|
3362
3634
|
declare function resetDiaIDs(range: Range_2): void;
|
|
3363
3635
|
|
|
@@ -3390,37 +3662,55 @@ declare type Shape1DWithFWHM = Omit<Shape1D, 'fwhm'> & {
|
|
|
3390
3662
|
fwhm: number;
|
|
3391
3663
|
};
|
|
3392
3664
|
|
|
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
|
-
}
|
|
3665
|
+
export declare type Shapes<ShapeWindow = WindowFunctions> = Partial<Record<WindowFunctions['kind'], ShapeToAdd<ShapeWindow>>>;
|
|
3403
3666
|
|
|
3404
|
-
declare
|
|
3405
|
-
|
|
3406
|
-
declare interface ShapeToAdd<ShapeWindows = WindowFunctions> {
|
|
3667
|
+
export declare interface ShapeToAdd<ShapeWindows = WindowFunctions> {
|
|
3407
3668
|
/**
|
|
3408
3669
|
* if it is false the shape is not included in the apodization
|
|
3409
3670
|
* @default true
|
|
3410
3671
|
*/
|
|
3411
3672
|
apply?: boolean;
|
|
3412
|
-
/**
|
|
3413
|
-
* Start Location for Applying Apodize Window
|
|
3414
|
-
*/
|
|
3415
|
-
start?: number;
|
|
3416
3673
|
/**
|
|
3417
3674
|
* parameters of the shape plus the kind of shape to identify
|
|
3418
3675
|
*/
|
|
3419
3676
|
shape: ShapeWindows;
|
|
3420
3677
|
}
|
|
3421
3678
|
|
|
3679
|
+
declare type Shift2DX = Filter2DInterface<'shift2DX', 'Shift 2D X', Shift2DXOptions>;
|
|
3680
|
+
|
|
3681
|
+
declare interface Shift2DXFilterOptions extends BaseFilter {
|
|
3682
|
+
name: 'shift2DX';
|
|
3683
|
+
value: Shift2DXOptions;
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3686
|
+
declare interface Shift2DXOptions {
|
|
3687
|
+
shift: number;
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3690
|
+
declare type Shift2DY = Filter2DInterface<'shift2DY', 'Shift 2D Y', Shift2DYOptions>;
|
|
3691
|
+
|
|
3692
|
+
declare interface Shift2DYFilterOptions extends BaseFilter {
|
|
3693
|
+
name: 'shift2DY';
|
|
3694
|
+
value: Shift2DYOptions;
|
|
3695
|
+
}
|
|
3696
|
+
|
|
3697
|
+
declare interface Shift2DYOptions {
|
|
3698
|
+
shift: number;
|
|
3699
|
+
}
|
|
3700
|
+
|
|
3422
3701
|
declare type ShiftTarget = 'origin' | 'current';
|
|
3423
3702
|
|
|
3703
|
+
declare type ShiftX = Filter1DInterface<'shiftX', 'Shift X', ShiftXOptions>;
|
|
3704
|
+
|
|
3705
|
+
declare interface ShiftXFilterOptions extends BaseFilter {
|
|
3706
|
+
name: 'shiftX';
|
|
3707
|
+
value: ShiftXOptions;
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3710
|
+
declare interface ShiftXOptions {
|
|
3711
|
+
shift: number;
|
|
3712
|
+
}
|
|
3713
|
+
|
|
3424
3714
|
export declare interface Signal extends NMRSignal1D {
|
|
3425
3715
|
intensity?: number;
|
|
3426
3716
|
shape?: Shape1D;
|
|
@@ -3507,6 +3797,13 @@ export declare function signalMultiplicityPattern(signal: NMRSignal1D, options?:
|
|
|
3507
3797
|
acsFormat?: boolean;
|
|
3508
3798
|
}): string;
|
|
3509
3799
|
|
|
3800
|
+
declare type SignalProcessing = Filter1DInterface<'signalProcessing', 'Signal processing', MatrixOptions>;
|
|
3801
|
+
|
|
3802
|
+
declare interface SignalProcessingFilter extends BaseFilter {
|
|
3803
|
+
name: 'signalProcessing';
|
|
3804
|
+
value: MatrixOptions;
|
|
3805
|
+
}
|
|
3806
|
+
|
|
3510
3807
|
export declare function signals2DToZ(signals: NMRSignal2D[], options?: Signals2DToZOptions): Spectrum2D;
|
|
3511
3808
|
|
|
3512
3809
|
declare interface Signals2DToZOptions {
|
|
@@ -3555,12 +3852,8 @@ export declare interface SignalsJoinOptions {
|
|
|
3555
3852
|
* imaginary parts, that is why the couplings should be assigned in order to generate the spin system.
|
|
3556
3853
|
*/
|
|
3557
3854
|
export declare function signalsToFID(signals: NMRSignal1D[], options: SignalsToFIDOptions): {
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
im: DoubleArray;
|
|
3561
|
-
} | {
|
|
3562
|
-
re: DoubleArray;
|
|
3563
|
-
im: DoubleArray;
|
|
3855
|
+
re: Float64Array;
|
|
3856
|
+
im: Float64Array;
|
|
3564
3857
|
};
|
|
3565
3858
|
|
|
3566
3859
|
export declare interface SignalsToFIDOptions {
|
|
@@ -3817,6 +4110,13 @@ export declare interface SumOptions {
|
|
|
3817
4110
|
moleculeId?: string;
|
|
3818
4111
|
}
|
|
3819
4112
|
|
|
4113
|
+
declare type SymmetrizeCosyLike = Filter2DInterface<'symmetrizeCosyLike', 'symmetrize COSY-like', Record<string, never>>;
|
|
4114
|
+
|
|
4115
|
+
declare interface SymmetrizeCosyLikeOptions extends BaseFilter {
|
|
4116
|
+
name: 'symmetrizeCosyLike';
|
|
4117
|
+
value: Record<string, never>;
|
|
4118
|
+
}
|
|
4119
|
+
|
|
3820
4120
|
declare class T1Regression extends BaseRegression {
|
|
3821
4121
|
fullMagnetization: number;
|
|
3822
4122
|
relaxationT1: number;
|
|
@@ -3881,7 +4181,7 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
3881
4181
|
|
|
3882
4182
|
export declare function updateRangesRelativeValues(spectrum: Entry1D, forceCalculateIntegral?: boolean): void;
|
|
3883
4183
|
|
|
3884
|
-
export declare type WindowFunctions = Exponential | LorentToGauss | SineBell | SineSquare | Traf | ModifiedGaussian;
|
|
4184
|
+
export declare type WindowFunctions = Exponential | LorentToGauss | SineBell | SineSquare | Traf | ModifiedGaussian | Gaussian;
|
|
3885
4185
|
|
|
3886
4186
|
/**
|
|
3887
4187
|
* Predict back points by singular value decomposition.
|
|
@@ -4087,9 +4387,29 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
4087
4387
|
|
|
4088
4388
|
export declare function xyzPhaseCorrection(data: NmrData2DFt, options: PhaseCorrectionTwoDOptions): NmrData2DFt;
|
|
4089
4389
|
|
|
4390
|
+
declare type ZeroFilling = Filter1DInterface<'zeroFilling', 'Zero Filling', ZeroFillingOptions>;
|
|
4391
|
+
|
|
4392
|
+
declare type ZeroFillingDimension1 = Filter2DInterface<'zeroFillingDimension1', 'Zero filling on Dimension 1', ZeroFillingOptions>;
|
|
4393
|
+
|
|
4394
|
+
declare interface ZeroFillingDimension1Options extends BaseFilter {
|
|
4395
|
+
name: 'zeroFillingDimension1';
|
|
4396
|
+
value: ZeroFillingOptions;
|
|
4397
|
+
}
|
|
4398
|
+
|
|
4399
|
+
declare type ZeroFillingDimension2 = Filter2DInterface<'zeroFillingDimension2', 'Zero filling on Dimension 2', ZeroFillingOptions>;
|
|
4400
|
+
|
|
4401
|
+
declare interface ZeroFillingDimension2Options extends BaseFilter {
|
|
4402
|
+
name: 'zeroFillingDimension2';
|
|
4403
|
+
value: ZeroFillingOptions;
|
|
4404
|
+
}
|
|
4405
|
+
|
|
4406
|
+
declare interface ZeroFillingFilterOptions extends BaseFilter {
|
|
4407
|
+
name: 'zeroFilling';
|
|
4408
|
+
value: ZeroFillingOptions;
|
|
4409
|
+
}
|
|
4410
|
+
|
|
4090
4411
|
export declare interface ZeroFillingOptions {
|
|
4091
|
-
nbPoints
|
|
4092
|
-
factor?: number;
|
|
4412
|
+
nbPoints: number;
|
|
4093
4413
|
}
|
|
4094
4414
|
|
|
4095
4415
|
export declare interface Zone {
|