nmr-processing 11.2.3 → 11.3.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,7 +71,7 @@ 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
@@ -143,7 +154,7 @@ declare interface BasePeak {
143
154
  }
144
155
 
145
156
  declare interface BidimensionalFFTOptions {
146
- fnMode: string;
157
+ acquisitionScheme: string;
147
158
  info: Info2D_2;
148
159
  zeroFilling?: ZeroFillingOptions_2;
149
160
  phaseCorrection?: {
@@ -264,7 +275,8 @@ export declare const DatumKind: {
264
275
  declare function deleteFilter(datum: Entry1D | Entry2D, id?: string): void;
265
276
 
266
277
  declare interface DirectDimensionOptions {
267
- fnMode?: string;
278
+ acquisitionScheme?: string;
279
+ reverse?: boolean;
268
280
  digitalFilterValue?: number;
269
281
  zeroFilling?: ZeroFillingOptions_2;
270
282
  apodization?: ApodizationFilterOptions;
@@ -308,16 +320,17 @@ declare interface ExclusionZone {
308
320
  to: number;
309
321
  }
310
322
 
311
- declare interface Exponential {
323
+ declare interface Exponential<ShapeOption = ExponentialOptions> {
312
324
  kind: 'exponential';
313
- options: ExponentialOptions;
325
+ options: ShapeOption;
314
326
  }
315
327
 
316
328
  declare interface ExponentialOptions {
317
329
  /**
318
330
  * line broadening value in Hz, a negative value will invert the shape
331
+ * @default 0.3
319
332
  */
320
- lb: number;
333
+ lb?: number;
321
334
  /**
322
335
  * increment value in time or the independent value
323
336
  */
@@ -373,6 +386,8 @@ export { FiltersManager }
373
386
  */
374
387
  export declare function findMultiplet(name: string): MultipletDefinition | undefined;
375
388
 
389
+ declare type FlexibleWindowFunctions = Exponential<Partial<ExponentialOptions>> | LorentToGauss<Partial<LorentzToGaussOptions>> | SineBell<Partial<SineBellOptions>>;
390
+
376
391
  export declare interface ForwardLPOptions {
377
392
  /**
378
393
  * Number of coefficients to be calculated in the SVD.
@@ -2081,7 +2096,7 @@ export declare interface ImpuritySignal {
2081
2096
  }
2082
2097
 
2083
2098
  declare interface IndirectDimensionOptions {
2084
- fnMode?: string;
2099
+ acquisitionScheme?: string;
2085
2100
  reverse?: boolean;
2086
2101
  zeroFilling?: ZeroFillingOptions_2;
2087
2102
  apodization?: ApodizationFilterOptions;
@@ -2115,6 +2130,11 @@ export declare interface Info1D extends Info {
2115
2130
  reverse?: boolean;
2116
2131
  DECIM?: number;
2117
2132
  DSPFVS?: number;
2133
+ lpNumberOfCoefficients?: number;
2134
+ tdOff?: number;
2135
+ spectrumSize?: number;
2136
+ numberOfPoints?: number;
2137
+ linearPredictionBin?: number;
2118
2138
  }
2119
2139
 
2120
2140
  export declare interface Info2D extends Info {
@@ -2129,7 +2149,7 @@ export declare interface Info2D extends Info {
2129
2149
  tdOff?: number[];
2130
2150
  spectrumSize: number[];
2131
2151
  numberOfPoints: number[];
2132
- linearPredictionBin?: number[];
2152
+ linearPredictionBin?: number;
2133
2153
  }
2134
2154
 
2135
2155
  declare type Info2D_2 = any;
@@ -2180,9 +2200,9 @@ declare interface ListField extends Field<string[]> {
2180
2200
 
2181
2201
  declare function lookupForFilter(datum: Entry1D | Entry2D, filterName: string): Filter | undefined;
2182
2202
 
2183
- declare interface LorentToGauss {
2203
+ declare interface LorentToGauss<ShapeOption = LorentzToGaussOptions> {
2184
2204
  kind: 'lorentzToGauss';
2185
- options: LorentzToGaussOptions;
2205
+ options: ShapeOption;
2186
2206
  }
2187
2207
 
2188
2208
  declare interface LorentzToGaussOptions {
@@ -3143,7 +3163,7 @@ declare type Shape1DWithFWHM = Omit<Shape1D, 'fwhm'> & {
3143
3163
  fwhm: number;
3144
3164
  };
3145
3165
 
3146
- declare interface ShapeOptions {
3166
+ declare interface ShapeOptions<ShapeWindow = WindowFunctions> {
3147
3167
  /**
3148
3168
  * length of the window shape
3149
3169
  */
@@ -3151,10 +3171,10 @@ declare interface ShapeOptions {
3151
3171
  /**
3152
3172
  * parameters of the shape plus the kind of shape to identify
3153
3173
  */
3154
- shapes?: ShapeToAdd[];
3174
+ shapes?: Array<ShapeToAdd<ShapeWindow>>;
3155
3175
  }
3156
3176
 
3157
- declare interface ShapeToAdd {
3177
+ declare interface ShapeToAdd<ShapeWindows = WindowFunctions> {
3158
3178
  /**
3159
3179
  * Start Location for Applying Apodize Window
3160
3180
  */
@@ -3162,7 +3182,7 @@ declare interface ShapeToAdd {
3162
3182
  /**
3163
3183
  * parameters of the shape plus the kind of shape to identify
3164
3184
  */
3165
- shape: WindowFunctions;
3185
+ shape: ShapeWindows;
3166
3186
  }
3167
3187
 
3168
3188
  declare type ShiftTarget = 'origin' | 'current';
@@ -3282,6 +3302,10 @@ declare interface Signals2DToZOptions {
3282
3302
  * imaginary parts, that is why the couplings should be assigned in order to generate the spin system.
3283
3303
  */
3284
3304
  export declare function signalsToFID(signals: NMRSignal1D[], options: SignalsToFIDOptions): {
3305
+ x: DoubleArray;
3306
+ re: DoubleArray;
3307
+ im: DoubleArray;
3308
+ } | {
3285
3309
  re: DoubleArray;
3286
3310
  im: DoubleArray;
3287
3311
  };
@@ -3392,9 +3416,9 @@ declare interface SimulationOptions {
3392
3416
  twoD?: Partial<TwoDOptions>;
3393
3417
  }
3394
3418
 
3395
- declare interface SineBell {
3419
+ declare interface SineBell<ShapeOption = SineBellOptions> {
3396
3420
  kind: 'sineBell';
3397
- options: SineBellOptions;
3421
+ options: ShapeOption;
3398
3422
  }
3399
3423
 
3400
3424
  declare interface SineBellOptions {