nmr-processing 19.0.3 → 19.1.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.
@@ -120,8 +120,8 @@ declare type ApodizationDimension2 = FilterFactory<Entry2D, Apodization2D2Option
120
120
 
121
121
  export declare function apodizationXReIm(data: Required<NmrData1D>, options: Apodization1DOptions): {
122
122
  x: Float64Array<ArrayBufferLike>;
123
- re: Float64Array<ArrayBufferLike>;
124
- im: Float64Array<ArrayBufferLike>;
123
+ re: Float64Array<ArrayBuffer>;
124
+ im: Float64Array<ArrayBuffer>;
125
125
  };
126
126
 
127
127
  /**
@@ -129,7 +129,7 @@ export declare function apodizationXReIm(data: Required<NmrData1D>, options: Apo
129
129
  * @param data
130
130
  * @param options
131
131
  */
132
- export declare function apodize(data: DoubleArray, options: ApplyWindowOptions): Float64Array<ArrayBufferLike>;
132
+ export declare function apodize(data: DoubleArray, options: ApplyWindowOptions): Float64Array<ArrayBuffer>;
133
133
 
134
134
  declare function applyFilter(datum: Entry1D, filter: Filter1DOptions, logger?: Logger): void;
135
135
 
@@ -309,6 +309,21 @@ export declare interface CalculateDiffussionCoefficientOptions {
309
309
  timeCorrection: number;
310
310
  }
311
311
 
312
+ /**
313
+ * Calculates the frequencies (in MHz) for a pair of nuclei based on the observed spectrometer frequency.
314
+ *
315
+ * - The first element of the `nucleus` array is the observed nucleus.
316
+ * - The second element is the indirect nucleus.
317
+ * - Returns an array: [frequency of observed nucleus, frequency of indirect nucleus].
318
+ *
319
+ * @param nucleus - Array of two nuclei (e.g., ['1H', '13C']).
320
+ * - The first element is the observed nucleus.
321
+ * - The second element is the indirect nucleus.
322
+ * @param frequency - The spectrometer frequency (in MHz) of the observed nucleus (first element of the nucleus array).
323
+ * @returns Array of frequencies in MHz: [frequency of observed nucleus, frequency of indirect nucleus].
324
+ */
325
+ export declare function calculateRelativeFrequency(nucleus: string[], frequency: number): number[];
326
+
312
327
  declare interface CalculateT1Options {
313
328
  optimization?: CalculateT1OptionsOptimization;
314
329
  }
@@ -891,15 +906,9 @@ export declare function getDatabase(url?: string, options?: {
891
906
  declare function getDiaIDs(range: Range): string[];
892
907
 
893
908
  /**
894
- * calculate the frequency of a nucleus with respect to a reference nucleus
895
- * @param nucleus
896
- * @param observedNucleusData
897
- */
898
- export declare function getFrequency(
899
- /**
900
- * nucleus to calculate the frequency
909
+ * @deprecated use getRelativeFrequency instead
901
910
  */
902
- nucleus: string, observedNucleusData: ObservedNucleusData): number;
911
+ export declare const getFrequency: typeof getRelativeFrequency;
903
912
 
904
913
  declare interface GetKernelOptions {
905
914
  sigma?: number;
@@ -935,6 +944,17 @@ export declare interface GetPeakListOptions extends GSDOptions, OptimizePeaksOpt
935
944
 
936
945
  declare function getPopulations(p: PopulationInput[]): PopulationOutput[];
937
946
 
947
+ /**
948
+ * calculate the frequency of a nucleus with respect to a reference nucleus
949
+ * @param nucleus
950
+ * @param observedNucleusData
951
+ */
952
+ export declare function getRelativeFrequency(
953
+ /**
954
+ * nucleus to calculate the frequency
955
+ */
956
+ nucleus: string, observedNucleusData: ObservedNucleusData): number;
957
+
938
958
  declare function getShiftGroups(sg: ShiftGroupEntry[]): {
939
959
  id: string;
940
960
  parentID: string;
@@ -1871,7 +1891,7 @@ export declare interface PredictProtonOptions {
1871
1891
 
1872
1892
  export declare function predictSpectra(molecule: Molecule, options?: PredictAllSpectraOptions): Promise<PredictSpectraResult>;
1873
1893
 
1874
- declare interface PredictSpectraResult {
1894
+ export declare interface PredictSpectraResult {
1875
1895
  spectra: Array<PredictedSpectrum1D | PredictedSpectrum2D>;
1876
1896
  molecules: Array<{
1877
1897
  molfile: string;
@@ -1946,7 +1966,7 @@ export declare interface RangesToACSOptions {
1946
1966
  export declare function rangesToTSV(ranges: NMRRange[]): string;
1947
1967
 
1948
1968
  export declare function rangesToXY(ranges: NMRRange[], options?: RangesToXYOptions): {
1949
- x: Float64Array<ArrayBufferLike>;
1969
+ x: Float64Array<ArrayBuffer>;
1950
1970
  y: Float64Array<ArrayBuffer>;
1951
1971
  };
1952
1972
 
@@ -2171,7 +2191,7 @@ export declare function signals2DToZ(signals: NMRSignal2D[], options?: Signals2D
2171
2191
  maxY: number;
2172
2192
  minZ: number;
2173
2193
  maxZ: number;
2174
- z: Float64Array<ArrayBufferLike>[];
2194
+ z: Float64Array<ArrayBuffer>[];
2175
2195
  };
2176
2196
 
2177
2197
  declare interface Signals2DToZOptions {
@@ -2488,10 +2508,28 @@ declare interface Traf<ShapeOption = TrafOptions> {
2488
2508
  */
2489
2509
  export declare function translateMultiplet(name: string): string;
2490
2510
 
2511
+ /**
2512
+ * Options for specifying the region and resolution of the 2D spectrum
2513
+ */
2491
2514
  declare interface TwoDOptions {
2492
- from: PointXY;
2493
- to: PointXY;
2515
+ /**
2516
+ * Defines the chemical shift range for proton and carbon axes
2517
+ */
2518
+ fromTo: {
2519
+ proton: FromTo;
2520
+ carbon: FromTo;
2521
+ };
2522
+ /**
2523
+ * Number of points in each dimension (x and y)
2524
+ */
2494
2525
  nbPoints: PointXY;
2526
+ /**
2527
+ * Optional peak width in each dimension (x and y), in Hz
2528
+ */
2529
+ width?: {
2530
+ x: number;
2531
+ y: number;
2532
+ };
2495
2533
  }
2496
2534
 
2497
2535
  declare function unlink(range: Range, options?: UnlinkOptions): Range;