nmr-processing 11.2.3 → 11.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import { DataXReIm } from 'ml-spectra-processing';
1
2
  import { DataXY } from 'cheminfo-types';
2
3
  import { DoubleArray } from 'cheminfo-types';
3
4
  import type { FilterXYType } from 'ml-signal-processing';
@@ -40,7 +41,12 @@ export declare interface AirplsOptions {
40
41
  tolerance: number;
41
42
  }
42
43
 
43
- export declare function apodization(data: DataReIm, options?: ApodizationFilterOptions): {
44
+ export declare function apodization(data: DataReIm | DataXReIm, options?: ApodizationFilterOptions): {
45
+ windowData: Float64Array;
46
+ x: DoubleArray;
47
+ re: DoubleArray;
48
+ im: DoubleArray;
49
+ } | {
44
50
  windowData: Float64Array;
45
51
  /** Array of re values */
46
52
  re: DoubleArray;
@@ -49,6 +55,11 @@ export declare function apodization(data: DataReIm, options?: ApodizationFilterO
49
55
  };
50
56
 
51
57
  export declare function apodizationFilter(datum1D: Entry1DApodizationFilter, options: ApodizationOptions): {
58
+ windowData: Float64Array;
59
+ x: DoubleArray;
60
+ re: DoubleArray;
61
+ im: DoubleArray;
62
+ } | {
52
63
  windowData: Float64Array;
53
64
  re: DoubleArray;
54
65
  im: DoubleArray;
@@ -60,12 +71,13 @@ export declare interface ApodizationFilterOptions {
60
71
  * @default 0
61
72
  */
62
73
  pointsToShift?: number;
63
- compose?: ShapeOptions;
74
+ compose?: Partial<ShapeOptions<FlexibleWindowFunctions>>;
64
75
  /**
65
76
  * apply the window data to input data
66
77
  * @default true
67
78
  */
68
79
  apply?: boolean;
80
+ windowData?: Float64Array;
69
81
  }
70
82
 
71
83
  export declare interface ApodizationOptions {
@@ -143,7 +155,7 @@ declare interface BasePeak {
143
155
  }
144
156
 
145
157
  declare interface BidimensionalFFTOptions {
146
- fnMode: string;
158
+ acquisitionScheme: string;
147
159
  info: Info2D_2;
148
160
  zeroFilling?: ZeroFillingOptions_2;
149
161
  phaseCorrection?: {
@@ -264,7 +276,8 @@ export declare const DatumKind: {
264
276
  declare function deleteFilter(datum: Entry1D | Entry2D, id?: string): void;
265
277
 
266
278
  declare interface DirectDimensionOptions {
267
- fnMode?: string;
279
+ acquisitionScheme?: string;
280
+ reverse?: boolean;
268
281
  digitalFilterValue?: number;
269
282
  zeroFilling?: ZeroFillingOptions_2;
270
283
  apodization?: ApodizationFilterOptions;
@@ -308,16 +321,17 @@ declare interface ExclusionZone {
308
321
  to: number;
309
322
  }
310
323
 
311
- declare interface Exponential {
324
+ declare interface Exponential<ShapeOption = ExponentialOptions> {
312
325
  kind: 'exponential';
313
- options: ExponentialOptions;
326
+ options: ShapeOption;
314
327
  }
315
328
 
316
329
  declare interface ExponentialOptions {
317
330
  /**
318
331
  * line broadening value in Hz, a negative value will invert the shape
332
+ * @default 0.3
319
333
  */
320
- lb: number;
334
+ lb?: number;
321
335
  /**
322
336
  * increment value in time or the independent value
323
337
  */
@@ -373,6 +387,8 @@ export { FiltersManager }
373
387
  */
374
388
  export declare function findMultiplet(name: string): MultipletDefinition | undefined;
375
389
 
390
+ declare type FlexibleWindowFunctions = Exponential<Partial<ExponentialOptions>> | LorentToGauss<Partial<LorentzToGaussOptions>> | SineBell<Partial<SineBellOptions>> | Traf<Partial<TrafOptions>>;
391
+
376
392
  export declare interface ForwardLPOptions {
377
393
  /**
378
394
  * Number of coefficients to be calculated in the SVD.
@@ -2081,7 +2097,7 @@ export declare interface ImpuritySignal {
2081
2097
  }
2082
2098
 
2083
2099
  declare interface IndirectDimensionOptions {
2084
- fnMode?: string;
2100
+ acquisitionScheme?: string;
2085
2101
  reverse?: boolean;
2086
2102
  zeroFilling?: ZeroFillingOptions_2;
2087
2103
  apodization?: ApodizationFilterOptions;
@@ -2115,6 +2131,11 @@ export declare interface Info1D extends Info {
2115
2131
  reverse?: boolean;
2116
2132
  DECIM?: number;
2117
2133
  DSPFVS?: number;
2134
+ lpNumberOfCoefficients?: number;
2135
+ tdOff?: number;
2136
+ spectrumSize?: number;
2137
+ numberOfPoints?: number;
2138
+ linearPredictionBin?: number;
2118
2139
  }
2119
2140
 
2120
2141
  export declare interface Info2D extends Info {
@@ -2129,7 +2150,7 @@ export declare interface Info2D extends Info {
2129
2150
  tdOff?: number[];
2130
2151
  spectrumSize: number[];
2131
2152
  numberOfPoints: number[];
2132
- linearPredictionBin?: number[];
2153
+ linearPredictionBin?: number;
2133
2154
  }
2134
2155
 
2135
2156
  declare type Info2D_2 = any;
@@ -2180,9 +2201,9 @@ declare interface ListField extends Field<string[]> {
2180
2201
 
2181
2202
  declare function lookupForFilter(datum: Entry1D | Entry2D, filterName: string): Filter | undefined;
2182
2203
 
2183
- declare interface LorentToGauss {
2204
+ declare interface LorentToGauss<ShapeOption = LorentzToGaussOptions> {
2184
2205
  kind: 'lorentzToGauss';
2185
- options: LorentzToGaussOptions;
2206
+ options: ShapeOption;
2186
2207
  }
2187
2208
 
2188
2209
  declare interface LorentzToGaussOptions {
@@ -3143,7 +3164,7 @@ declare type Shape1DWithFWHM = Omit<Shape1D, 'fwhm'> & {
3143
3164
  fwhm: number;
3144
3165
  };
3145
3166
 
3146
- declare interface ShapeOptions {
3167
+ declare interface ShapeOptions<ShapeWindow = WindowFunctions> {
3147
3168
  /**
3148
3169
  * length of the window shape
3149
3170
  */
@@ -3151,10 +3172,10 @@ declare interface ShapeOptions {
3151
3172
  /**
3152
3173
  * parameters of the shape plus the kind of shape to identify
3153
3174
  */
3154
- shapes?: ShapeToAdd[];
3175
+ shapes?: Array<ShapeToAdd<ShapeWindow>>;
3155
3176
  }
3156
3177
 
3157
- declare interface ShapeToAdd {
3178
+ declare interface ShapeToAdd<ShapeWindows = WindowFunctions> {
3158
3179
  /**
3159
3180
  * Start Location for Applying Apodize Window
3160
3181
  */
@@ -3162,7 +3183,7 @@ declare interface ShapeToAdd {
3162
3183
  /**
3163
3184
  * parameters of the shape plus the kind of shape to identify
3164
3185
  */
3165
- shape: WindowFunctions;
3186
+ shape: ShapeWindows;
3166
3187
  }
3167
3188
 
3168
3189
  declare type ShiftTarget = 'origin' | 'current';
@@ -3282,6 +3303,10 @@ declare interface Signals2DToZOptions {
3282
3303
  * imaginary parts, that is why the couplings should be assigned in order to generate the spin system.
3283
3304
  */
3284
3305
  export declare function signalsToFID(signals: NMRSignal1D[], options: SignalsToFIDOptions): {
3306
+ x: DoubleArray;
3307
+ re: DoubleArray;
3308
+ im: DoubleArray;
3309
+ } | {
3285
3310
  re: DoubleArray;
3286
3311
  im: DoubleArray;
3287
3312
  };
@@ -3392,9 +3417,9 @@ declare interface SimulationOptions {
3392
3417
  twoD?: Partial<TwoDOptions>;
3393
3418
  }
3394
3419
 
3395
- declare interface SineBell {
3420
+ declare interface SineBell<ShapeOption = SineBellOptions> {
3396
3421
  kind: 'sineBell';
3397
- options: SineBellOptions;
3422
+ options: ShapeOption;
3398
3423
  }
3399
3424
 
3400
3425
  declare interface SineBellOptions {
@@ -3535,6 +3560,27 @@ export declare interface SumOptions {
3535
3560
 
3536
3561
  export declare type Targets = Record<string, NMRRangeWithIntegration>;
3537
3562
 
3563
+ declare interface Traf<ShapeOption = TrafOptions> {
3564
+ kind: 'traf';
3565
+ options: ShapeOption;
3566
+ }
3567
+
3568
+ declare interface TrafOptions {
3569
+ /**
3570
+ * line broadening value in Hz, a negative value will invert the shape
3571
+ * @default 0.3
3572
+ */
3573
+ lb?: number;
3574
+ /**
3575
+ * increment value in time or the independent value
3576
+ */
3577
+ dw: number;
3578
+ /**
3579
+ * Specifies the number of points in the window function.
3580
+ */
3581
+ length: number;
3582
+ }
3583
+
3538
3584
  /**
3539
3585
  * convert from pattern name to only one letter abbreviation or any supported abbreviation to pattern name.
3540
3586
  * @param name - pattern name or abbreviation.
@@ -3569,7 +3615,7 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
3569
3615
 
3570
3616
  export declare function updateRangesRelativeValues(spectrum: Entry1D, forceCalculateIntegral?: boolean): void;
3571
3617
 
3572
- declare type WindowFunctions = Exponential | LorentToGauss | SineBell;
3618
+ declare type WindowFunctions = Exponential | LorentToGauss | SineBell | Traf;
3573
3619
 
3574
3620
  /**
3575
3621
  * Predict back points by singular value decomposition.