nmr-processing 19.0.1 → 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.
- package/dist/nmr-processing.d.ts +61 -18
- package/dist/nmr-processing.js +2 -2
- package/package.json +21 -21
package/dist/nmr-processing.d.ts
CHANGED
|
@@ -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<
|
|
124
|
-
im: Float64Array<
|
|
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<
|
|
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
|
-
*
|
|
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
|
-
|
|
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;
|
|
@@ -1148,9 +1168,9 @@ export declare function matrixToBoxPlot(input: NumberArray[], options?: {
|
|
|
1148
1168
|
colors?: string[];
|
|
1149
1169
|
}): {
|
|
1150
1170
|
color: (string | undefined)[];
|
|
1151
|
-
median: Float64Array<ArrayBufferLike>;
|
|
1152
1171
|
max: Float64Array<ArrayBufferLike>;
|
|
1153
1172
|
min: Float64Array<ArrayBufferLike>;
|
|
1173
|
+
median: Float64Array<ArrayBufferLike>;
|
|
1154
1174
|
q1: Float64Array<ArrayBufferLike>;
|
|
1155
1175
|
q3: Float64Array<ArrayBufferLike>;
|
|
1156
1176
|
};
|
|
@@ -1286,7 +1306,7 @@ export declare function optimizeSignals(data: DataXY, signals: Signal[], options
|
|
|
1286
1306
|
delta: number;
|
|
1287
1307
|
js: Jcoupling[];
|
|
1288
1308
|
shape: {
|
|
1289
|
-
kind: "gaussian" | "lorentzian" | "pseudoVoigt" | "generalizedLorentzian";
|
|
1309
|
+
kind: "gaussian" | "lorentzian" | "pseudoVoigt" | "lorentzianDispersive" | "generalizedLorentzian";
|
|
1290
1310
|
fwhm: number;
|
|
1291
1311
|
};
|
|
1292
1312
|
intensity: number;
|
|
@@ -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<
|
|
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<
|
|
2194
|
+
z: Float64Array<ArrayBuffer>[];
|
|
2175
2195
|
};
|
|
2176
2196
|
|
|
2177
2197
|
declare interface Signals2DToZOptions {
|
|
@@ -2324,6 +2344,11 @@ export declare interface Simulate1DOptions extends SimulateXYPeaksOptions {
|
|
|
2324
2344
|
* Options to add noise to the spectrum
|
|
2325
2345
|
*/
|
|
2326
2346
|
noise?: Extract<GenerateSpectrumOptions, 'noise'>;
|
|
2347
|
+
/**
|
|
2348
|
+
* assume the spin system is a 1/2 (proton), if it's doesn't exists
|
|
2349
|
+
* it is defined by checking if all the levels are 2.
|
|
2350
|
+
*/
|
|
2351
|
+
isProton?: boolean;
|
|
2327
2352
|
}
|
|
2328
2353
|
|
|
2329
2354
|
declare interface SimulateXYPeaksOptions {
|
|
@@ -2483,10 +2508,28 @@ declare interface Traf<ShapeOption = TrafOptions> {
|
|
|
2483
2508
|
*/
|
|
2484
2509
|
export declare function translateMultiplet(name: string): string;
|
|
2485
2510
|
|
|
2511
|
+
/**
|
|
2512
|
+
* Options for specifying the region and resolution of the 2D spectrum
|
|
2513
|
+
*/
|
|
2486
2514
|
declare interface TwoDOptions {
|
|
2487
|
-
|
|
2488
|
-
|
|
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
|
+
*/
|
|
2489
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
|
+
};
|
|
2490
2533
|
}
|
|
2491
2534
|
|
|
2492
2535
|
declare function unlink(range: Range, options?: UnlinkOptions): Range;
|