nmr-processing 14.0.6 → 15.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/nmr-processing.cjs +3 -3
- package/nmr-processing.d.ts +62 -9
- package/nmr-processing.mjs +3 -3
- package/package.json +3 -2
package/nmr-processing.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { AnalizeMultipletOptions } from 'multiplet-analysis';
|
|
1
2
|
import { BaseRegression } from 'ml-regression-base';
|
|
3
|
+
import { DataXReIm } from 'ml-spectra-processing';
|
|
2
4
|
import { DataXY } from 'cheminfo-types';
|
|
3
5
|
import { DoubleArray } from 'cheminfo-types';
|
|
4
6
|
import { ExponentialRegression } from 'ml-regression-exponential';
|
|
@@ -396,6 +398,8 @@ export declare interface DataResurrect {
|
|
|
396
398
|
parts: string[];
|
|
397
399
|
}
|
|
398
400
|
|
|
401
|
+
export declare type DataXReOptionalIm = Omit<DataXReIm, 'im'> & Partial<Pick<DataXReIm, 'im'>>;
|
|
402
|
+
|
|
399
403
|
export declare const DatumKind: {
|
|
400
404
|
signal: string;
|
|
401
405
|
mixed: string;
|
|
@@ -478,7 +482,7 @@ declare interface Entry2D<T extends NmrData2D = NmrData2D> {
|
|
|
478
482
|
id?: string;
|
|
479
483
|
zones: Zones;
|
|
480
484
|
info: Record<string, any>;
|
|
481
|
-
|
|
485
|
+
meta?: Record<string, any>;
|
|
482
486
|
originalInfo?: Record<string, any>;
|
|
483
487
|
data: T;
|
|
484
488
|
originalData?: T;
|
|
@@ -567,11 +571,11 @@ export declare type Filter1DEntry = Filter1DOptions & BaseFilterEntry;
|
|
|
567
571
|
|
|
568
572
|
export declare type Filter1DOptions = BaselineCorrectionFilterOptions | FFT1DOptions | ZeroFillingFilterOptions | SignalProcessingFilter | ShiftXFilterOptions | PhaseCorrection1DFilterOptions | ForwardLP1DOptions | ExclusionZonesOptions | EquallySpacedOptions | DigitalFilterOption | Apodization1DFilterOptions | BackwardLinearPredictionFilterOptions;
|
|
569
573
|
|
|
570
|
-
export declare type Filter2D = ApodizationDimension1 | ApodizationDimension2 | BaselineCorrection2D | BackwardLPDimension1 | BackwardLPDimension2 | FFTDimension1 | FFTDimension2 | FordwardLPDimension1 | FordwardLPDimension2 | DigitalFilter2D | PhaseCorrection2D | ZeroFillingDimension1 | ZeroFillingDimension2 | SymmetrizeCosyLike | Shift2DX | Shift2DY;
|
|
574
|
+
export declare type Filter2D = ApodizationDimension1 | ApodizationDimension2 | BaselineCorrection2D | BackwardLPDimension1 | BackwardLPDimension2 | NUSDimension2 | FFTDimension1 | FFTDimension2 | FordwardLPDimension1 | FordwardLPDimension2 | DigitalFilter2D | PhaseCorrection2D | ZeroFillingDimension1 | ZeroFillingDimension2 | SymmetrizeCosyLike | Shift2DX | Shift2DY;
|
|
571
575
|
|
|
572
576
|
export declare type Filter2DEntry = Filter2DOptions & BaseFilterEntry;
|
|
573
577
|
|
|
574
|
-
export declare type Filter2DOptions = ApodizationDimension1Options | ApodizationDimension2Options | BaselineCorrection2DFilterOptions | BackwardLPDimension1Options | BackwardLPDimension2Options | DigitalFilter2DOptions | FFTDimension1Options | FFTDimension2Options | FordwardLPDimension1Options | FordwardLPDimension2Options | PhaseCorrection2DOptions | Shift2DXFilterOptions | Shift2DYFilterOptions | SymmetrizeCosyLikeOptions | ZeroFillingDimension1Options | ZeroFillingDimension2Options;
|
|
578
|
+
export declare type Filter2DOptions = ApodizationDimension1Options | ApodizationDimension2Options | BaselineCorrection2DFilterOptions | BackwardLPDimension1Options | BackwardLPDimension2Options | DigitalFilter2DOptions | FFTDimension1Options | NUSDimension2Options | FFTDimension2Options | FordwardLPDimension1Options | FordwardLPDimension2Options | PhaseCorrection2DOptions | Shift2DXFilterOptions | Shift2DYFilterOptions | SymmetrizeCosyLikeOptions | ZeroFillingDimension1Options | ZeroFillingDimension2Options;
|
|
575
579
|
|
|
576
580
|
export declare interface FilterDomainUpdateRules {
|
|
577
581
|
updateYDomain: boolean;
|
|
@@ -1306,6 +1310,13 @@ declare interface NumberField extends Field<number> {
|
|
|
1306
1310
|
type: 'number';
|
|
1307
1311
|
}
|
|
1308
1312
|
|
|
1313
|
+
declare type NUSDimension2 = FilterFactory<Entry2D, IndirectDimensionOptions> & Pick<NUSDimension2Options, 'name'>;
|
|
1314
|
+
|
|
1315
|
+
declare interface NUSDimension2Options extends BaseFilter {
|
|
1316
|
+
name: 'nusDimension2';
|
|
1317
|
+
value: IndirectDimensionOptions;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1309
1320
|
declare type ObjectKeys = 'id' | 'multiplicity' | 'js';
|
|
1310
1321
|
|
|
1311
1322
|
export declare interface ObservedNucleusData {
|
|
@@ -1557,6 +1568,33 @@ export declare interface Peaks {
|
|
|
1557
1568
|
*/
|
|
1558
1569
|
export declare function peaksFilterImpurities<T extends NMRPeak1D>(peakList: T[], options?: OptionsPeaksFilterImpurities): T[];
|
|
1559
1570
|
|
|
1571
|
+
/**
|
|
1572
|
+
* Generates an NMR Free Induction Decay (FID) signal from a list of peaks.
|
|
1573
|
+
*
|
|
1574
|
+
* @param {Array<{ x: number, y: number }>} peaks - The list of peaks, where:
|
|
1575
|
+
* - `x` is the chemical shift in ppm.
|
|
1576
|
+
* - `y` is the intensity of the peak.
|
|
1577
|
+
* @param {object} options - The options for FID generation.
|
|
1578
|
+
* @param {number} [options.from=0] - The start of the spectral window in ppm.
|
|
1579
|
+
* @param {number} [options.to=10] - The end of the spectral window in ppm.
|
|
1580
|
+
* @param {number} [options.nbPoints=1024] - The number of data points in the FID.
|
|
1581
|
+
* @param {number} [options.frequency=400] - The spectrometer frequency in MHz.
|
|
1582
|
+
* @param {NumberArray} [options.t2Relaxation] - An array of T2 relaxation times in milliseconds for each peak.
|
|
1583
|
+
* If not provided, all peaks are assigned a default T2 relaxation time of 100 ms.
|
|
1584
|
+
* @returns {{ re: Float64Array, im: Float64Array }} - The generated FID signal, where:
|
|
1585
|
+
* - `re` is the real part of the FID.
|
|
1586
|
+
* - `im` is the imaginary part of the FID.
|
|
1587
|
+
**/
|
|
1588
|
+
export declare function peaksToFID(peaks: Array<{
|
|
1589
|
+
x: number;
|
|
1590
|
+
y: number;
|
|
1591
|
+
}>, options: SignalsToFIDOptions & {
|
|
1592
|
+
t2Relaxation?: NumberArray;
|
|
1593
|
+
}): {
|
|
1594
|
+
re: Float64Array;
|
|
1595
|
+
im: Float64Array;
|
|
1596
|
+
};
|
|
1597
|
+
|
|
1560
1598
|
export declare function peaksToXY(peaks: NMRPeak1D[], options: PeaksToXYOptions): DataXY<Float64Array>;
|
|
1561
1599
|
|
|
1562
1600
|
/**
|
|
@@ -1693,22 +1731,23 @@ export declare interface PredictCarbonOptions {
|
|
|
1693
1731
|
declare interface PredictCOSYOptions {
|
|
1694
1732
|
/**
|
|
1695
1733
|
* maximum number of bonds to take into account.
|
|
1696
|
-
* @default 3
|
|
1697
1734
|
*/
|
|
1698
1735
|
maxLength?: number;
|
|
1699
1736
|
/**
|
|
1700
1737
|
* minimum number of bonds to take into account
|
|
1701
|
-
* @default 2
|
|
1702
1738
|
*/
|
|
1703
1739
|
minLength?: number;
|
|
1740
|
+
/**
|
|
1741
|
+
* minimum scalar coupling in Hz to draw the cross-peak
|
|
1742
|
+
* @default 1.5
|
|
1743
|
+
*/
|
|
1744
|
+
minCoupling?: number;
|
|
1704
1745
|
/**
|
|
1705
1746
|
* signals with euclidean distance in ppm less than this it will
|
|
1706
1747
|
* joined into a zone.
|
|
1707
|
-
* @default {H:0.05,C:0.5}
|
|
1708
1748
|
*/
|
|
1709
1749
|
joinDistance?: {
|
|
1710
1750
|
H: number;
|
|
1711
|
-
C: number;
|
|
1712
1751
|
};
|
|
1713
1752
|
/**
|
|
1714
1753
|
* mono dimensional signal to generate the bidimenionals cross peaks.
|
|
@@ -1763,7 +1802,6 @@ declare interface PredictHMBCOptions {
|
|
|
1763
1802
|
/**
|
|
1764
1803
|
* signals with euclidean distance in ppm less than this it will
|
|
1765
1804
|
* joined into a zone.
|
|
1766
|
-
* @default {H:0.05,C:0.5}
|
|
1767
1805
|
*/
|
|
1768
1806
|
joinDistance?: {
|
|
1769
1807
|
H: number;
|
|
@@ -1846,7 +1884,7 @@ export declare interface PredictionBase2D {
|
|
|
1846
1884
|
* or an empty value (empty string, null, or undefined) if no cache entry is found.
|
|
1847
1885
|
* When the function is called with two parameters, the second parameter is the value that should be put in the cache.
|
|
1848
1886
|
*/
|
|
1849
|
-
declare type PredictionCacheFn = (
|
|
1887
|
+
declare type PredictionCacheFn = (topicMolecule: TopicMolecule, result?: PredictionBase1D) => CacheResult;
|
|
1850
1888
|
|
|
1851
1889
|
export declare interface PredictionOptionsByExperiment {
|
|
1852
1890
|
H?: Partial<PredictProtonOptions>;
|
|
@@ -2575,6 +2613,21 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
2575
2613
|
predicted: Float64Array;
|
|
2576
2614
|
};
|
|
2577
2615
|
|
|
2616
|
+
export declare interface XreimMultipletAnalysis {
|
|
2617
|
+
analyzer?: AnalizeMultipletOptions;
|
|
2618
|
+
autoPhase?: boolean;
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
/**
|
|
2622
|
+
* Determination of J couplings by recursive deconvolution in the frequency domain,
|
|
2623
|
+
* it use the method published by Damien Jeannerat and Geoffrey Bodenhausen @link{https://doi.org/10.1006/jmre.1999.1845}
|
|
2624
|
+
*/
|
|
2625
|
+
export declare function xreimMultipletAnalysis(
|
|
2626
|
+
/**
|
|
2627
|
+
* Imaginary data is optional for auto phase correction of the region before the analysis.
|
|
2628
|
+
*/
|
|
2629
|
+
data: DataXReOptionalIm, options?: XreimMultipletAnalysis): any;
|
|
2630
|
+
|
|
2578
2631
|
export declare function xyAutoPeaksPicking(data: DataXY<Float64Array>, options: OptionsXYAutoPeaksPicking): NMRPeak1DWithShapeID[];
|
|
2579
2632
|
|
|
2580
2633
|
/**
|