nmr-processing 3.4.1 → 6.0.1
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/lib/assignment/get13CAssignments.js.map +1 -1
- package/lib/assignment/get1HAssignments.d.ts +2 -2
- package/lib/{types → assignment}/nmrAssigment.d.ts +2 -2
- package/lib/{types → assignment}/nmrAssigment.js +0 -0
- package/lib/assignment/nmrAssigment.js.map +1 -0
- package/lib/assignment/utils/buildAssignments.js.map +1 -1
- package/lib/assignment/utils/createMapPossibleAssignments.d.ts +1 -1
- package/lib/assignment/utils/createMapPossibleAssignments.js.map +1 -1
- package/lib/constants/couplingValues.js.map +1 -1
- package/lib/databases/DatabaseNMREntry.d.ts +1 -1
- package/lib/index.d.ts +9 -10
- package/lib/index.js +1 -1
- package/lib/ml-matrix-convolution.d.ts +8 -0
- package/lib/ml-matrix-convolution.js +2 -0
- package/lib/ml-matrix-convolution.js.map +1 -0
- package/lib/ml-simple-clustering.d.ts +8 -0
- package/lib/ml-simple-clustering.js +2 -0
- package/lib/ml-simple-clustering.js.map +1 -0
- package/lib/peaks/NMRPeak1D.d.ts +4 -0
- package/lib/{types → peaks}/NMRPeak1D.js +0 -0
- package/lib/{types → peaks}/NMRPeak1D.js.map +1 -1
- package/lib/peaks/peaksFilterImpurities.d.ts +1 -1
- package/lib/peaks/peaksFilterImpurities.js +1 -1
- package/lib/peaks/peaksFilterImpurities.js.map +1 -1
- package/lib/peaks/peaksToRanges.d.ts +2 -2
- package/lib/peaks/peaksToRanges.js +11 -17
- package/lib/peaks/peaksToRanges.js.map +1 -1
- package/lib/peaks/util/determineRealTop.d.ts +2 -2
- package/lib/peaks/util/determineRealTop.js +3 -2
- package/lib/peaks/util/determineRealTop.js.map +1 -1
- package/lib/peaks/util/jAnalyzer.d.ts +2 -2
- package/lib/peaks/util/jAnalyzer.js +12 -13
- package/lib/peaks/util/jAnalyzer.js.map +1 -1
- package/lib/peaks/util/joinRanges.d.ts +1 -1
- package/lib/peaks/util/peakOptimizer.d.ts +3 -3
- package/lib/peaks/util/peakOptimizer.js.map +1 -1
- package/lib/{types → prediction}/dataStructure.d.ts +0 -0
- package/lib/{types → prediction}/dataStructure.js +0 -0
- package/lib/prediction/dataStructure.js.map +1 -0
- package/lib/prediction/predictAll.d.ts +1 -1
- package/lib/prediction/predictAll.js +1 -1
- package/lib/prediction/predictAll.js.map +1 -1
- package/lib/prediction/predictCOSY.d.ts +1 -1
- package/lib/prediction/predictCOSY.js.map +1 -1
- package/lib/prediction/predictCarbon.d.ts +2 -2
- package/lib/prediction/predictCarbon.js.map +1 -1
- package/lib/prediction/predictHMBC.d.ts +1 -1
- package/lib/prediction/predictHMBC.js.map +1 -1
- package/lib/prediction/predictHSQC.d.ts +1 -1
- package/lib/prediction/predictHSQC.js.map +1 -1
- package/lib/prediction/predictProton.d.ts +1 -1
- package/lib/prediction/predictProton.js +1 -1
- package/lib/prediction/predictProton.js.map +1 -1
- package/lib/{types → prediction}/prediction1D.d.ts +2 -2
- package/lib/{types → prediction}/prediction1D.js +0 -0
- package/lib/prediction/prediction1D.js.map +1 -0
- package/lib/prediction/utils/fetchPrediction.d.ts +1 -1
- package/lib/prediction/utils/getFilteredIDiaIDs.d.ts +1 -1
- package/lib/prediction/utils/getFilteredIDiaIDs.js.map +1 -1
- package/lib/prediction/utils/getNuclei.js +1 -1
- package/lib/prediction/utils/getNuclei.js.map +1 -1
- package/lib/prediction/utils/getPredictions.d.ts +2 -2
- package/lib/prediction/utils/predict2D.d.ts +2 -2
- package/lib/prediction/utils/queryByHOSE.d.ts +1 -1
- package/lib/prediction/utils/queryByHOSE.js.map +1 -1
- package/lib/ranges/rangesToACS.d.ts +1 -1
- package/lib/ranges/rangesToXY.d.ts +3 -3
- package/lib/ranges/rangesToXY.js.map +1 -1
- package/lib/signal/signalJoinCouplings.d.ts +2 -2
- package/lib/signal/signalJoinCouplings.js +3 -3
- package/lib/signal/signalJoinCouplings.js.map +1 -1
- package/lib/signal/signalMultiplicityPattern.d.ts +1 -1
- package/lib/{types → signals}/NMRSignal1D.d.ts +1 -1
- package/lib/{types → signals}/NMRSignal1D.js +0 -0
- package/lib/{types → signals}/NMRSignal1D.js.map +1 -1
- package/lib/signals/hackSignalsToXY.d.ts +1 -1
- package/lib/{types → signals}/jcoupling.d.ts +1 -1
- package/lib/{types → signals}/jcoupling.js +0 -0
- package/lib/{types → signals}/jcoupling.js.map +1 -1
- package/lib/signals/signals2DToZ.d.ts +1 -1
- package/lib/signals/signalsJoin.d.ts +4 -4
- package/lib/signals/signalsJoin.js +7 -7
- package/lib/signals/signalsJoin.js.map +1 -1
- package/lib/signals/signalsToRanges.d.ts +2 -2
- package/lib/signals/signalsToRanges.js.map +1 -1
- package/lib/signals/signalsToXY.d.ts +3 -3
- package/lib/signals/simulation/signalsToSpinSystem.d.ts +2 -2
- package/lib/signals/simulation/simulate1D.d.ts +5 -4
- package/lib/signals/simulation/simulate1D.js.map +1 -1
- package/lib/signals/simulation/splitSpinSystem.d.ts +1 -1
- package/lib/signals/simulation/splitSpinSystem.js.map +1 -1
- package/lib/{types → signals}/spinSystem.d.ts +0 -0
- package/lib/{types → signals}/spinSystem.js +0 -0
- package/lib/{types → signals}/spinSystem.js.map +1 -1
- package/lib/{types → utilities}/MakeMandatory.d.ts +0 -0
- package/lib/{types → utilities}/MakeMandatory.js +0 -0
- package/lib/utilities/MakeMandatory.js.map +1 -0
- package/lib/utilities/joinPatterns.js.map +1 -1
- package/lib/utilities/rangeFromSignal.d.ts +1 -1
- package/lib/utilities/resurrect.d.ts +1 -1
- package/lib/utilities/resurrectRange.d.ts +1 -1
- package/lib/{types → xy}/NMRRange.d.ts +1 -1
- package/lib/{types → xy}/NMRRange.js +0 -0
- package/lib/{types → xy}/NMRRange.js.map +1 -1
- package/lib/xy/xyAutoPeaksPicking.d.ts +4 -60
- package/lib/xy/xyAutoPeaksPicking.js +3 -3
- package/lib/xy/xyAutoPeaksPicking.js.map +1 -1
- package/lib/xy/xyAutoRangesPicking.d.ts +2 -2
- package/lib/xy/xyAutoRangesPicking.js.map +1 -1
- package/lib/{types → xyz}/NMRSignal2D.d.ts +6 -7
- package/lib/{types → xyz}/NMRSignal2D.js +0 -0
- package/lib/{types → xyz}/NMRSignal2D.js.map +1 -1
- package/lib/xyz/NMRZone.d.ts +8 -0
- package/lib/{types → xyz}/NMRZone.js +0 -0
- package/lib/{types → xyz}/NMRZone.js.map +1 -1
- package/lib/xyz/{xyzAutoPeaksPicking.d.ts → xyzAutoZonesPicking.d.ts} +3 -3
- package/lib/xyz/{xyzAutoPeaksPicking.js → xyzAutoZonesPicking.js} +38 -24
- package/lib/xyz/xyzAutoZonesPicking.js.map +1 -0
- package/lib/xyz/xyzJResAnalyzer.d.ts +1 -1
- package/lib/xyz/xyzJResAnalyzer.js.map +1 -1
- package/lib-esm/assignment/get13CAssignments.js.map +1 -1
- package/lib-esm/{types → assignment}/nmrAssigment.js +0 -0
- package/lib-esm/assignment/nmrAssigment.js.map +1 -0
- package/lib-esm/assignment/utils/buildAssignments.js.map +1 -1
- package/lib-esm/assignment/utils/createMapPossibleAssignments.js.map +1 -1
- package/lib-esm/constants/couplingValues.js.map +1 -1
- package/lib-esm/index.js +1 -1
- package/lib-esm/ml-matrix-convolution.js +2 -0
- package/lib-esm/ml-matrix-convolution.js.map +1 -0
- package/lib-esm/ml-simple-clustering.js +2 -0
- package/lib-esm/ml-simple-clustering.js.map +1 -0
- package/lib-esm/{types → peaks}/NMRPeak1D.js +0 -0
- package/lib-esm/{types → peaks}/NMRPeak1D.js.map +1 -1
- package/lib-esm/peaks/peaksFilterImpurities.js +1 -1
- package/lib-esm/peaks/peaksFilterImpurities.js.map +1 -1
- package/lib-esm/peaks/peaksToRanges.js +11 -17
- package/lib-esm/peaks/peaksToRanges.js.map +1 -1
- package/lib-esm/peaks/util/determineRealTop.js +4 -3
- package/lib-esm/peaks/util/determineRealTop.js.map +1 -1
- package/lib-esm/peaks/util/jAnalyzer.js +12 -13
- package/lib-esm/peaks/util/jAnalyzer.js.map +1 -1
- package/lib-esm/peaks/util/peakOptimizer.js.map +1 -1
- package/lib-esm/{types → prediction}/dataStructure.js +0 -0
- package/lib-esm/prediction/dataStructure.js.map +1 -0
- package/lib-esm/prediction/predictAll.js +1 -1
- package/lib-esm/prediction/predictAll.js.map +1 -1
- package/lib-esm/prediction/predictCOSY.js.map +1 -1
- package/lib-esm/prediction/predictCarbon.js.map +1 -1
- package/lib-esm/prediction/predictHMBC.js.map +1 -1
- package/lib-esm/prediction/predictHSQC.js.map +1 -1
- package/lib-esm/prediction/predictProton.js +1 -1
- package/lib-esm/prediction/predictProton.js.map +1 -1
- package/lib-esm/{types → prediction}/prediction1D.js +0 -0
- package/lib-esm/prediction/prediction1D.js.map +1 -0
- package/lib-esm/prediction/utils/getFilteredIDiaIDs.js.map +1 -1
- package/lib-esm/prediction/utils/getNuclei.js +1 -1
- package/lib-esm/prediction/utils/getNuclei.js.map +1 -1
- package/lib-esm/prediction/utils/queryByHOSE.js.map +1 -1
- package/lib-esm/ranges/rangesToXY.js.map +1 -1
- package/lib-esm/signal/signalJoinCouplings.js +3 -3
- package/lib-esm/signal/signalJoinCouplings.js.map +1 -1
- package/lib-esm/{types → signals}/NMRSignal1D.js +0 -0
- package/lib-esm/{types → signals}/NMRSignal1D.js.map +1 -1
- package/lib-esm/{types → signals}/jcoupling.js +0 -0
- package/lib-esm/{types → signals}/jcoupling.js.map +1 -1
- package/lib-esm/signals/signalsJoin.js +7 -7
- package/lib-esm/signals/signalsJoin.js.map +1 -1
- package/lib-esm/signals/signalsToRanges.js.map +1 -1
- package/lib-esm/signals/simulation/simulate1D.js.map +1 -1
- package/lib-esm/signals/simulation/splitSpinSystem.js.map +1 -1
- package/lib-esm/{types → signals}/spinSystem.js +0 -0
- package/lib-esm/{types → signals}/spinSystem.js.map +1 -1
- package/lib-esm/{types → utilities}/MakeMandatory.js +0 -0
- package/lib-esm/utilities/MakeMandatory.js.map +1 -0
- package/lib-esm/utilities/joinPatterns.js.map +1 -1
- package/lib-esm/{types → xy}/NMRRange.js +0 -0
- package/lib-esm/{types → xy}/NMRRange.js.map +1 -1
- package/lib-esm/xy/xyAutoPeaksPicking.js +3 -3
- package/lib-esm/xy/xyAutoPeaksPicking.js.map +1 -1
- package/lib-esm/xy/xyAutoRangesPicking.js.map +1 -1
- package/lib-esm/{types → xyz}/NMRSignal2D.js +0 -0
- package/lib-esm/{types → xyz}/NMRSignal2D.js.map +1 -1
- package/lib-esm/{types → xyz}/NMRZone.js +0 -0
- package/lib-esm/{types → xyz}/NMRZone.js.map +1 -1
- package/lib-esm/xyz/{xyzAutoPeaksPicking.js → xyzAutoZonesPicking.js} +36 -22
- package/lib-esm/xyz/xyzAutoZonesPicking.js.map +1 -0
- package/lib-esm/xyz/xyzJResAnalyzer.js.map +1 -1
- package/package.json +20 -17
- package/src/assignment/get13CAssignments.ts +5 -2
- package/src/assignment/get1HAssignments.ts +2 -2
- package/src/{types → assignment}/nmrAssigment.ts +2 -2
- package/src/assignment/utils/buildAssignments.ts +1 -4
- package/src/assignment/utils/createMapPossibleAssignments.ts +5 -2
- package/src/constants/couplingValues.ts +1 -1
- package/src/databases/DatabaseNMREntry.ts +1 -1
- package/src/index.ts +9 -10
- package/src/{types/ml-levenberg-marquardt/index.d.ts → ml-levenberg-marquardt.d.ts} +0 -0
- package/src/{types/ml-matrix-convolution/index.d.ts → ml-matrix-convolution.ts} +0 -0
- package/src/{types/ml-matrix-peaks-finder/index.d.ts → ml-matrix-peaks-finder.d.ts} +2 -2
- package/src/{types/ml-simple-clustering/index.d.ts → ml-simple-clustering.ts} +1 -1
- package/src/{types/ml-sparse-matrix/index.d.ts → ml-sparse-matrix.d.ts} +0 -0
- package/src/{types/ml-spectra-processing/index.d.ts → ml-spectra-processing.d.ts} +8 -2
- package/src/{types/ml-tree-set/index.d.ts → ml-tree-set.d.ts} +0 -0
- package/src/nmr-parser.d.ts +17 -0
- package/src/{types/openchemlib-utils/index..d.ts → openchemlib.d.ts} +17 -6
- package/src/peaks/NMRPeak1D.ts +5 -0
- package/src/peaks/peaksFilterImpurities.ts +3 -2
- package/src/peaks/peaksToRanges.ts +15 -21
- package/src/peaks/util/determineRealTop.ts +6 -9
- package/src/peaks/util/jAnalyzer.ts +16 -18
- package/src/peaks/util/joinRanges.ts +1 -1
- package/src/peaks/util/peakOptimizer.ts +5 -4
- package/src/{types → prediction}/dataStructure.ts +1 -1
- package/src/prediction/predictAll.ts +6 -7
- package/src/prediction/predictCOSY.ts +1 -2
- package/src/prediction/predictCarbon.ts +4 -4
- package/src/prediction/predictHMBC.ts +1 -2
- package/src/prediction/predictHSQC.ts +5 -3
- package/src/prediction/predictProton.ts +4 -3
- package/src/{types → prediction}/prediction1D.ts +2 -2
- package/src/prediction/utils/fetchPrediction.ts +1 -1
- package/src/prediction/utils/getFilteredIDiaIDs.ts +1 -2
- package/src/prediction/utils/getNuclei.ts +3 -3
- package/src/prediction/utils/getPredictions.ts +3 -3
- package/src/prediction/utils/predict2D.ts +4 -4
- package/src/prediction/utils/queryByHOSE.ts +2 -2
- package/src/ranges/rangesToACS.ts +2 -2
- package/src/ranges/rangesToXY.ts +5 -5
- package/src/signal/signalJoinCouplings.ts +6 -6
- package/src/signal/signalMultiplicityPattern.ts +1 -1
- package/src/{types → signals}/NMRSignal1D.ts +2 -1
- package/src/signals/hackSignalsToXY.ts +2 -2
- package/src/{types → signals}/jcoupling.ts +1 -1
- package/src/signals/signals2DToZ.ts +1 -1
- package/src/signals/signalsJoin.ts +11 -10
- package/src/signals/signalsToRanges.ts +4 -3
- package/src/signals/signalsToXY.ts +6 -6
- package/src/signals/simulation/signalsToSpinSystem.ts +4 -4
- package/src/signals/simulation/simulate1D.ts +5 -4
- package/src/signals/simulation/splitSpinSystem.ts +11 -3
- package/src/{types → signals}/spinSystem.ts +0 -0
- package/src/{types → utilities}/MakeMandatory.ts +0 -0
- package/src/utilities/joinPatterns.ts +0 -1
- package/src/utilities/rangeFromSignal.ts +1 -1
- package/src/utilities/resurrect.ts +1 -1
- package/src/utilities/resurrectRange.ts +2 -2
- package/src/{types → xy}/NMRRange.ts +1 -1
- package/src/xy/xyAutoPeaksPicking.ts +19 -58
- package/src/xy/xyAutoRangesPicking.ts +3 -2
- package/src/{types → xyz}/NMRSignal2D.ts +6 -8
- package/src/xyz/NMRZone.ts +10 -0
- package/src/xyz/{xyzAutoPeaksPicking.ts → xyzAutoZonesPicking.ts} +44 -27
- package/src/xyz/xyzJResAnalyzer.ts +7 -6
- package/CHANGELOG.md +0 -550
- package/lib/types/MPFPeak.d.ts +0 -9
- package/lib/types/MPFPeak.js +0 -3
- package/lib/types/MPFPeak.js.map +0 -1
- package/lib/types/MakeMandatory.js.map +0 -1
- package/lib/types/NMRPeak1D.d.ts +0 -11
- package/lib/types/NMRZone.d.ts +0 -12
- package/lib/types/XYNumberArray.d.ts +0 -4
- package/lib/types/XYNumberArray.js +0 -3
- package/lib/types/XYNumberArray.js.map +0 -1
- package/lib/types/dataStructure.js.map +0 -1
- package/lib/types/nmrAssigment.js.map +0 -1
- package/lib/types/prediction1D.js.map +0 -1
- package/lib/types/prediction2D.d.ts +0 -0
- package/lib/types/prediction2D.js +0 -2
- package/lib/types/prediction2D.js.map +0 -1
- package/lib/xyz/xyzAutoPeaksPicking.js.map +0 -1
- package/lib-esm/types/MPFPeak.js +0 -2
- package/lib-esm/types/MPFPeak.js.map +0 -1
- package/lib-esm/types/MakeMandatory.js.map +0 -1
- package/lib-esm/types/XYNumberArray.js +0 -2
- package/lib-esm/types/XYNumberArray.js.map +0 -1
- package/lib-esm/types/dataStructure.js.map +0 -1
- package/lib-esm/types/nmrAssigment.js.map +0 -1
- package/lib-esm/types/prediction1D.js.map +0 -1
- package/lib-esm/types/prediction2D.js +0 -2
- package/lib-esm/types/prediction2D.js.map +0 -1
- package/lib-esm/xyz/xyzAutoPeaksPicking.js.map +0 -1
- package/src/types/MPFPeak.ts +0 -9
- package/src/types/NMRPeak1D.ts +0 -11
- package/src/types/NMRZone.ts +0 -10
- package/src/types/XYNumberArray.ts +0 -4
- package/src/types/ml-gsd/index.d.ts +0 -164
- package/src/types/prediction2D.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Molecule } from
|
|
1
|
+
import type { Molecule } from 'openchemlib';
|
|
2
2
|
|
|
3
|
-
import type { Prediction1D } from
|
|
3
|
+
import type { Prediction1D } from '../prediction1D';
|
|
4
4
|
|
|
5
5
|
import type { Predictions, PredictOptions, Predictors } from './predict2D';
|
|
6
6
|
|
|
@@ -21,4 +21,4 @@ export async function getPredictions(
|
|
|
21
21
|
: undefined;
|
|
22
22
|
}
|
|
23
23
|
return prediction;
|
|
24
|
-
}
|
|
24
|
+
}
|
|
@@ -11,12 +11,12 @@ import type {
|
|
|
11
11
|
PathInfo,
|
|
12
12
|
} from 'openchemlib-utils';
|
|
13
13
|
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
16
|
-
import type { NMRSignal2D } from '../../
|
|
17
|
-
import type { Prediction1D } from '../../types/prediction1D';
|
|
14
|
+
import type { NMRSignal1D } from '../../signals/NMRSignal1D';
|
|
15
|
+
import type { MakeMandatory } from '../../utilities/MakeMandatory';
|
|
16
|
+
import type { NMRSignal2D } from '../../xyz/NMRSignal2D';
|
|
18
17
|
import type { PredictCarbon, PredictCarbonOptions } from '../predictCarbon';
|
|
19
18
|
import type { PredictProton, PredictProtonOptions } from '../predictProton';
|
|
19
|
+
import type { Prediction1D } from '../prediction1D';
|
|
20
20
|
|
|
21
21
|
import { getNuclei } from './getNuclei';
|
|
22
22
|
import { getPredictions } from './getPredictions';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataBaseStructure } from '
|
|
1
|
+
import type { DataBaseStructure } from '../dataStructure';
|
|
2
2
|
|
|
3
3
|
import type { GroupedDiaIDsWithHose } from './getFilteredIDiaIDs';
|
|
4
4
|
|
|
@@ -37,7 +37,7 @@ export function queryByHose(
|
|
|
37
37
|
for (const atomNumber of element.atoms) {
|
|
38
38
|
let atom = {
|
|
39
39
|
diaIDs: [element.oclID],
|
|
40
|
-
delta: res ? res[0]: null,
|
|
40
|
+
delta: res ? res[0] : null,
|
|
41
41
|
atoms: [atomNumber],
|
|
42
42
|
nbAtoms: 1,
|
|
43
43
|
level: level,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { signalJoinCouplings } from '../signal/signalJoinCouplings';
|
|
2
2
|
import { signalMultiplicityPattern } from '../signal/signalMultiplicityPattern';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { NMRSignal1D } from '../signals/NMRSignal1D';
|
|
4
|
+
import type { NMRRange } from '../xy/NMRRange';
|
|
5
5
|
|
|
6
6
|
const globalOptions = {
|
|
7
7
|
h: {
|
package/src/ranges/rangesToXY.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DoubleArray } from 'cheminfo-types';
|
|
2
2
|
import arraySequentialFill from 'ml-array-sequential-fill';
|
|
3
|
+
import type { Shape1D } from 'ml-peak-shape-generator';
|
|
3
4
|
import { SpectrumGenerator } from 'spectrum-generator';
|
|
4
|
-
import type { Shape1DOptions } from 'spectrum-generator';
|
|
5
5
|
|
|
6
|
+
import type { NMRSignal1D } from '../signals/NMRSignal1D';
|
|
6
7
|
import { hackSignalsToXY } from '../signals/hackSignalsToXY';
|
|
7
|
-
import type { MakeMandatory } from '../
|
|
8
|
-
import type { NMRRange } from '../
|
|
9
|
-
import type { NMRSignal1D } from '../types/NMRSignal1D';
|
|
8
|
+
import type { MakeMandatory } from '../utilities/MakeMandatory';
|
|
9
|
+
import type { NMRRange } from '../xy/NMRRange';
|
|
10
10
|
|
|
11
11
|
type RangeWithSignal = MakeMandatory<NMRRange, 'signals'>;
|
|
12
12
|
|
|
@@ -40,7 +40,7 @@ export interface RangeToXYOptions {
|
|
|
40
40
|
* options of signals.
|
|
41
41
|
* @default { kind: 'gaussian' }
|
|
42
42
|
*/
|
|
43
|
-
shape:
|
|
43
|
+
shape: Shape1D;
|
|
44
44
|
}
|
|
45
45
|
function checkForSignals(
|
|
46
46
|
ranges: NMRRange[],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import sum from 'ml-array-sum';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
3
|
+
import type { NMRSignal1D } from '../signals/NMRSignal1D';
|
|
4
|
+
import type { Jcoupling } from '../signals/jcoupling';
|
|
5
|
+
import type { MakeMandatory } from '../utilities/MakeMandatory';
|
|
6
6
|
import { joinPatterns } from '../utilities/joinPatterns';
|
|
7
7
|
|
|
8
8
|
export interface SignalJoinCouplingsOptions {
|
|
@@ -46,7 +46,7 @@ const takeCareDiaIDs = (
|
|
|
46
46
|
/**
|
|
47
47
|
* Join couplings smaller than a define tolerance.
|
|
48
48
|
* The resulting coupling should be an average of the existing one.
|
|
49
|
-
* If
|
|
49
|
+
* If pathLength is specified and is not always the same this property will be removed.
|
|
50
50
|
*/
|
|
51
51
|
export function signalJoinCouplings(
|
|
52
52
|
signal: NMRSignal1D,
|
|
@@ -111,7 +111,7 @@ function groupJCouplings(
|
|
|
111
111
|
) as string[];
|
|
112
112
|
|
|
113
113
|
let distances = distinctValues(
|
|
114
|
-
group.map((group) => group.
|
|
114
|
+
group.map((group) => group.pathLength) as number[],
|
|
115
115
|
) as number[];
|
|
116
116
|
|
|
117
117
|
let multiplicity = joinPatterns(
|
|
@@ -126,7 +126,7 @@ function groupJCouplings(
|
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
if (diaIDs.length === 1) newJ.diaIDs = diaIDs;
|
|
129
|
-
if (distances.length === 1 && distances[0]) newJ.
|
|
129
|
+
if (distances.length === 1 && distances[0]) newJ.pathLength = distances[0];
|
|
130
130
|
if (assignment.length > 0) newJ.assignment = assignment;
|
|
131
131
|
if (atoms.length > 0) newJ.atoms = atoms;
|
|
132
132
|
signal.js.push(newJ);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { couplingPatterns } from '../constants/couplingPatterns';
|
|
2
|
-
import type { NMRSignal1D } from '../types/NMRSignal1D';
|
|
3
|
-
import type { Jcoupling } from '../types/jcoupling';
|
|
4
2
|
|
|
3
|
+
import type { NMRSignal1D } from './NMRSignal1D';
|
|
4
|
+
import type { Jcoupling } from './jcoupling';
|
|
5
5
|
import { OptionsSignalsToXY, signalsToXY } from './signalsToXY';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { generateSpectrum2D } from 'spectrum-generator';
|
|
2
2
|
import type { XYNumber } from 'spectrum-generator';
|
|
3
3
|
|
|
4
|
-
import type { NMRSignal2D } from '../
|
|
4
|
+
import type { NMRSignal2D } from '../xyz/NMRSignal2D';
|
|
5
5
|
|
|
6
6
|
interface Signals2DToZOptions {
|
|
7
7
|
/**
|
|
@@ -3,9 +3,10 @@ import sum from 'ml-array-sum';
|
|
|
3
3
|
|
|
4
4
|
import { signalJoinCouplings } from '../signal/signalJoinCouplings';
|
|
5
5
|
import type { SignalJoinCouplingsOptions } from '../signal/signalJoinCouplings';
|
|
6
|
-
import type { MakeMandatory } from '../
|
|
7
|
-
|
|
8
|
-
import type {
|
|
6
|
+
import type { MakeMandatory } from '../utilities/MakeMandatory';
|
|
7
|
+
|
|
8
|
+
import type { NMRSignal1D } from './NMRSignal1D';
|
|
9
|
+
import type { Jcoupling } from './jcoupling';
|
|
9
10
|
|
|
10
11
|
export interface SignalsJoinOptions {
|
|
11
12
|
/**
|
|
@@ -17,7 +18,7 @@ export interface SignalsJoinOptions {
|
|
|
17
18
|
|
|
18
19
|
type JcouplingFromPrediction = MakeMandatory<
|
|
19
20
|
Jcoupling,
|
|
20
|
-
'multiplicity' | 'diaIDs' | '
|
|
21
|
+
'multiplicity' | 'diaIDs' | 'pathLength'
|
|
21
22
|
>;
|
|
22
23
|
type Signal1DWidthDiaID = MakeMandatory<NMRSignal1D, 'diaIDs'>;
|
|
23
24
|
type Signal1DWidthJsAndDiaID = Omit<Signal1DWidthDiaID, 'js'> & {
|
|
@@ -29,8 +30,8 @@ const localeCompareJcouplingKeys = (
|
|
|
29
30
|
a: JcouplingFromPrediction,
|
|
30
31
|
b: JcouplingFromPrediction,
|
|
31
32
|
) => {
|
|
32
|
-
const aa = `${a.diaIDs.join(' ')}${a.
|
|
33
|
-
const bb = `${b.diaIDs.join(' ')}${b.
|
|
33
|
+
const aa = `${a.diaIDs.join(' ')}${a.pathLength}`;
|
|
34
|
+
const bb = `${b.diaIDs.join(' ')}${b.pathLength}`;
|
|
34
35
|
return localeCompare(aa, bb);
|
|
35
36
|
};
|
|
36
37
|
function checkForMandatory(
|
|
@@ -41,7 +42,7 @@ function checkForMandatory(
|
|
|
41
42
|
if (!signal.diaIDs) throw new Error('there is not diaIDs');
|
|
42
43
|
for (const jcoupling of signal.js) {
|
|
43
44
|
if (!jcoupling.diaIDs) throw new Error('there is not diaIDs');
|
|
44
|
-
if (!jcoupling.
|
|
45
|
+
if (!jcoupling.pathLength) throw new Error('there is not pathLength');
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
}
|
|
@@ -68,7 +69,7 @@ export function signalsJoin(
|
|
|
68
69
|
const keyDiaIDs = signal.diaIDs.join(' ');
|
|
69
70
|
let id = `${keyDiaIDs} ${signal.js
|
|
70
71
|
.map(
|
|
71
|
-
(j: JcouplingFromPrediction) => `${j.diaIDs.join(' ')} ${j.
|
|
72
|
+
(j: JcouplingFromPrediction) => `${j.diaIDs.join(' ')} ${j.pathLength}`,
|
|
72
73
|
)
|
|
73
74
|
.sort(localeCompare)
|
|
74
75
|
.join(' ')}`;
|
|
@@ -80,13 +81,13 @@ export function signalsJoin(
|
|
|
80
81
|
// for each group we need to combine assignments and average couplings
|
|
81
82
|
let newSignals: Signal1DWidthJsAndDiaID[] = [];
|
|
82
83
|
Object.values(groupedSignals).forEach((group) => {
|
|
83
|
-
// joining couplings only if diaID and
|
|
84
|
+
// joining couplings only if diaID and pathLength are equal
|
|
84
85
|
let js: JcouplingFromPrediction[] = [];
|
|
85
86
|
for (let i = 0; i < group[0].js.length; i++) {
|
|
86
87
|
const coupling = group[0].js[i];
|
|
87
88
|
js.push({
|
|
88
89
|
diaIDs: coupling.diaIDs,
|
|
89
|
-
|
|
90
|
+
pathLength: coupling.pathLength,
|
|
90
91
|
multiplicity: coupling.multiplicity,
|
|
91
92
|
coupling: mean(group.map((item) => item.js[i].coupling)),
|
|
92
93
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { MakeMandatory } from '../
|
|
2
|
-
import type { NMRRange } from '../types/NMRRange';
|
|
3
|
-
import type { NMRSignal1D } from '../types/NMRSignal1D';
|
|
1
|
+
import type { MakeMandatory } from '../utilities/MakeMandatory';
|
|
4
2
|
import { rangeFromSignal } from '../utilities/rangeFromSignal';
|
|
3
|
+
import type { NMRRange } from '../xy/NMRRange';
|
|
4
|
+
|
|
5
|
+
import type { NMRSignal1D } from './NMRSignal1D';
|
|
5
6
|
|
|
6
7
|
interface SignalsToRangesOptions {
|
|
7
8
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import rescale from 'ml-array-rescale';
|
|
2
2
|
import arraySequentialFill from 'ml-array-sequential-fill';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Shape1D } from 'ml-peak-shape-generator';
|
|
4
4
|
|
|
5
|
-
import type { MakeMandatory } from '../
|
|
6
|
-
import type { NMRSignal1D } from '../types/NMRSignal1D';
|
|
7
|
-
import type { Jcoupling } from '../types/jcoupling';
|
|
5
|
+
import type { MakeMandatory } from '../utilities/MakeMandatory';
|
|
8
6
|
|
|
7
|
+
import type { NMRSignal1D } from './NMRSignal1D';
|
|
8
|
+
import type { Jcoupling } from './jcoupling';
|
|
9
9
|
import { signalsToSpinSystem } from './simulation/signalsToSpinSystem';
|
|
10
10
|
import simulate1D from './simulation/simulate1D';
|
|
11
11
|
import { splitSpinSystem } from './simulation/splitSpinSystem';
|
|
@@ -25,7 +25,7 @@ export interface OptionsSignalsToXY {
|
|
|
25
25
|
/**
|
|
26
26
|
* Shape options for ml-spectrum-generator
|
|
27
27
|
*/
|
|
28
|
-
shape?:
|
|
28
|
+
shape?: Shape1D;
|
|
29
29
|
/**
|
|
30
30
|
* The linewidth of the output spectrum, expresed in Hz.
|
|
31
31
|
* @default 1
|
|
@@ -48,7 +48,7 @@ export interface OptionsSignalsToXY {
|
|
|
48
48
|
maxClusterSize?: number;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
type JcouplingFromPrediction = MakeMandatory<Jcoupling, '
|
|
51
|
+
type JcouplingFromPrediction = MakeMandatory<Jcoupling, 'pathLength'>;
|
|
52
52
|
type Signal1DWidthAtomsIDsAndDiaID = MakeMandatory<NMRSignal1D, 'atoms'>;
|
|
53
53
|
type Signal1DWidthJsAndDiaID = Omit<Signal1DWidthAtomsIDsAndDiaID, 'js'> & {
|
|
54
54
|
js: JcouplingFromPrediction[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Matrix } from 'ml-matrix';
|
|
2
2
|
import simpleClustering from 'ml-simple-clustering';
|
|
3
3
|
|
|
4
|
-
import type { MakeMandatory } from '../../
|
|
5
|
-
import type { NMRSignal1D } from '
|
|
6
|
-
import type { Jcoupling } from '
|
|
7
|
-
import type { SpinSystem } from '
|
|
4
|
+
import type { MakeMandatory } from '../../utilities/MakeMandatory';
|
|
5
|
+
import type { NMRSignal1D } from '../NMRSignal1D';
|
|
6
|
+
import type { Jcoupling } from '../jcoupling';
|
|
7
|
+
import type { SpinSystem } from '../spinSystem';
|
|
8
8
|
|
|
9
9
|
interface Ids {
|
|
10
10
|
[index: number]: number;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import binarySearch from 'binary-search';
|
|
2
|
+
import { DataXY } from 'cheminfo-types';
|
|
2
3
|
import { Matrix, EVD } from 'ml-matrix';
|
|
3
4
|
import type { Matrix as MatrixClassType } from 'ml-matrix';
|
|
5
|
+
import type { Shape1D } from 'ml-peak-shape-generator';
|
|
4
6
|
import { SparseMatrix } from 'ml-sparse-matrix';
|
|
5
7
|
import { SpectrumGenerator } from 'spectrum-generator';
|
|
6
|
-
import type { Shape1DOptions } from 'spectrum-generator';
|
|
7
8
|
|
|
8
|
-
import type { SpinSystem } from '
|
|
9
|
+
import type { SpinSystem } from '../spinSystem';
|
|
9
10
|
|
|
10
11
|
import getPauliMatrix from './getPauliMatrix';
|
|
11
12
|
|
|
@@ -46,7 +47,7 @@ interface Simulate1DOptions {
|
|
|
46
47
|
* Shape options
|
|
47
48
|
* @default {kind:'gaussian'}
|
|
48
49
|
*/
|
|
49
|
-
shape?:
|
|
50
|
+
shape?: Shape1D;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
/**
|
|
@@ -59,7 +60,7 @@ export default function simulate1D(
|
|
|
59
60
|
*/
|
|
60
61
|
spinSystem: SpinSystem,
|
|
61
62
|
options: Simulate1DOptions = {},
|
|
62
|
-
) {
|
|
63
|
+
): DataXY {
|
|
63
64
|
let {
|
|
64
65
|
lineWidth = 1,
|
|
65
66
|
maxClusterSize = 8,
|
|
@@ -2,7 +2,7 @@ import { agnes } from 'ml-hclust';
|
|
|
2
2
|
import type { Cluster } from 'ml-hclust';
|
|
3
3
|
import { Matrix } from 'ml-matrix';
|
|
4
4
|
|
|
5
|
-
import type { SpinSystem } from '
|
|
5
|
+
import type { SpinSystem } from '../spinSystem';
|
|
6
6
|
|
|
7
7
|
export interface SplitSpinSystemOptions {
|
|
8
8
|
/**
|
|
@@ -53,7 +53,11 @@ interface SplitClusterOptions {
|
|
|
53
53
|
connectivity: Matrix;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
function splitCluster(
|
|
56
|
+
function splitCluster(
|
|
57
|
+
cluster: Cluster,
|
|
58
|
+
clusterList: Array<Int16Array>,
|
|
59
|
+
options: SplitClusterOptions,
|
|
60
|
+
) {
|
|
57
61
|
let { maxClusterSize, force, nSpins, connectivity } = options;
|
|
58
62
|
if (!force && cluster.size <= maxClusterSize) {
|
|
59
63
|
clusterList.push(getMembers(cluster.indices(), nSpins));
|
|
@@ -102,7 +106,11 @@ function splitCluster(cluster: Cluster, clusterList: Array<Int16Array>, options:
|
|
|
102
106
|
}
|
|
103
107
|
}
|
|
104
108
|
|
|
105
|
-
function calculateBetas(
|
|
109
|
+
function calculateBetas(
|
|
110
|
+
chemicalShifts: number[],
|
|
111
|
+
couplingConstants: Matrix,
|
|
112
|
+
frequency: number,
|
|
113
|
+
) {
|
|
106
114
|
let nRows = couplingConstants.rows;
|
|
107
115
|
let nColumns = couplingConstants.columns;
|
|
108
116
|
let betas = Matrix.zeros(nRows, nRows);
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { couplingPatterns } from '../constants/couplingPatterns';
|
|
2
2
|
import { couplingValues } from '../constants/couplingValues';
|
|
3
3
|
|
|
4
|
-
|
|
5
4
|
export function joinPatterns(patterns: string[]) {
|
|
6
5
|
const sum = patterns.reduce((sum, pattern) => {
|
|
7
6
|
if (isNaN(couplingValues[pattern])) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { NMRSignal1D } from '../signals/NMRSignal1D';
|
|
2
|
+
import type { NMRRange } from '../xy/NMRRange';
|
|
3
3
|
|
|
4
4
|
import { rangeFromSignal } from './rangeFromSignal';
|
|
5
5
|
import { splitParenthesis } from './splitParenthesis';
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { DataXY } from 'cheminfo-types';
|
|
2
2
|
import { gsd, joinBroadPeaks, optimizePeaks } from 'ml-gsd';
|
|
3
|
+
import type {
|
|
4
|
+
Peak1D,
|
|
5
|
+
GSDOptions,
|
|
6
|
+
OptimizePeaksOptions,
|
|
7
|
+
JoinBroadPeaksOptions,
|
|
8
|
+
} from 'ml-gsd';
|
|
3
9
|
import {
|
|
4
10
|
xyExtract,
|
|
5
11
|
xNoiseSanPlot,
|
|
6
12
|
xAbsoluteMedian,
|
|
7
13
|
} from 'ml-spectra-processing';
|
|
8
14
|
|
|
9
|
-
import type { NMRPeak1D } from '../types/NMRPeak1D';
|
|
10
15
|
/**
|
|
11
16
|
* Implementation of the peak picking method described by Cobas in:
|
|
12
17
|
* A new approach to improving automated analysis of proton NMR spectra
|
|
@@ -20,63 +25,19 @@ interface OptionsGetCutOff {
|
|
|
20
25
|
thresholdFactor: number;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
|
-
interface
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
*/
|
|
28
|
-
noiseLevel?: number;
|
|
29
|
-
/**
|
|
30
|
-
* Threshold to determine if a given peak should be considered as a noise, bases on its relative height compared to the highest peak.
|
|
31
|
-
* @default 0.01
|
|
32
|
-
*/
|
|
33
|
-
minMaxRatio: number;
|
|
34
|
-
/**
|
|
35
|
-
* If broadRatio is higher than 0, then all the peaks which second derivative smaller than broadRatio * maxAbsSecondDerivative will be marked with the soft mask equal to true.
|
|
36
|
-
* @default 0.00025
|
|
37
|
-
*/
|
|
38
|
-
broadRatio: number;
|
|
39
|
-
/**
|
|
40
|
-
* Select the peak intensities from a smoothed version of the independent variables.
|
|
41
|
-
* @default true
|
|
42
|
-
*/
|
|
43
|
-
smoothY: boolean;
|
|
28
|
+
export interface IGetPeakListOptions
|
|
29
|
+
extends GSDOptions,
|
|
30
|
+
OptimizePeaksOptions,
|
|
31
|
+
JoinBroadPeaksOptions {
|
|
44
32
|
/**
|
|
45
33
|
* If it is true, the peaks parameters will be optimized.
|
|
46
34
|
* @default false
|
|
47
35
|
*/
|
|
48
36
|
optimize: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* factor to determine the width at the moment to group the peaks in signals in 'GSD.optimizePeaks' function.
|
|
51
|
-
* @default 4
|
|
52
|
-
*/
|
|
53
|
-
factorWidth: number;
|
|
54
|
-
/**
|
|
55
|
-
* if it is true, it optimizes the x and intensity by extrapolation.
|
|
56
|
-
*/
|
|
57
|
-
realTopDetection: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* options to shape used to adapt the FWHM
|
|
60
|
-
* @default {kind:'gaussian'}
|
|
61
|
-
*/
|
|
62
|
-
shape: { kind: string };
|
|
63
|
-
/**
|
|
64
|
-
* options for optimization step, kind represent the algorithm
|
|
65
|
-
* @default {kind:'lm'}
|
|
66
|
-
*/
|
|
67
|
-
optimization: { kind: string };
|
|
68
|
-
/**
|
|
69
|
-
* Threshold to determine if some peak is candidate to clustering into range.
|
|
70
|
-
* @default 0.25
|
|
71
|
-
*/
|
|
72
|
-
broadWidth: number;
|
|
73
|
-
/**
|
|
74
|
-
* Options for savitz Golay
|
|
75
|
-
*/
|
|
76
|
-
sgOptions: { windowSize: number; polynomial: number };
|
|
77
37
|
}
|
|
78
38
|
|
|
79
|
-
export interface OptionsXYAutoPeaksPicking
|
|
39
|
+
export interface OptionsXYAutoPeaksPicking
|
|
40
|
+
extends Partial<IGetPeakListOptions> {
|
|
80
41
|
/**
|
|
81
42
|
* Low limit value in the x axis to extract a sub set of points from the input data.
|
|
82
43
|
*/
|
|
@@ -105,7 +66,7 @@ export interface OptionsXYAutoPeaksPicking extends Partial<OptionsGetPeakList> {
|
|
|
105
66
|
export function xyAutoPeaksPicking(
|
|
106
67
|
data: DataXY,
|
|
107
68
|
options: OptionsXYAutoPeaksPicking = {},
|
|
108
|
-
):
|
|
69
|
+
): Peak1D[] {
|
|
109
70
|
const {
|
|
110
71
|
from,
|
|
111
72
|
to,
|
|
@@ -131,7 +92,7 @@ export function xyAutoPeaksPicking(
|
|
|
131
92
|
|
|
132
93
|
const cutOff = getCutOff(data.y, { noiseLevel, useSanPlot, thresholdFactor });
|
|
133
94
|
|
|
134
|
-
let getPeakOptions = {
|
|
95
|
+
let getPeakOptions: IGetPeakListOptions = {
|
|
135
96
|
shape,
|
|
136
97
|
broadWidth,
|
|
137
98
|
optimize,
|
|
@@ -154,7 +115,7 @@ export function xyAutoPeaksPicking(
|
|
|
154
115
|
return peaks;
|
|
155
116
|
}
|
|
156
117
|
|
|
157
|
-
function getPeakList(data: DataXY, options:
|
|
118
|
+
function getPeakList(data: DataXY, options: IGetPeakListOptions) {
|
|
158
119
|
const {
|
|
159
120
|
shape,
|
|
160
121
|
broadWidth,
|
|
@@ -173,15 +134,15 @@ function getPeakList(data: DataXY, options: OptionsGetPeakList) {
|
|
|
173
134
|
shape,
|
|
174
135
|
sgOptions,
|
|
175
136
|
minMaxRatio,
|
|
176
|
-
broadRatio,
|
|
177
137
|
noiseLevel,
|
|
178
138
|
smoothY,
|
|
179
139
|
realTopDetection,
|
|
180
140
|
});
|
|
181
141
|
|
|
182
142
|
if (broadWidth) {
|
|
183
|
-
peakList = joinBroadPeaks(peakList, {
|
|
184
|
-
|
|
143
|
+
peakList = joinBroadPeaks(data, peakList, {
|
|
144
|
+
broadRatio,
|
|
145
|
+
broadWidth,
|
|
185
146
|
shape,
|
|
186
147
|
optimization,
|
|
187
148
|
});
|
|
@@ -198,7 +159,7 @@ function getPeakList(data: DataXY, options: OptionsGetPeakList) {
|
|
|
198
159
|
return peakList;
|
|
199
160
|
}
|
|
200
161
|
|
|
201
|
-
function getNegativePeaks(data: DataXY, options:
|
|
162
|
+
function getNegativePeaks(data: DataXY, options: IGetPeakListOptions) {
|
|
202
163
|
let { x, y } = data;
|
|
203
164
|
let negativeDataY = new Float64Array(data.y.length);
|
|
204
165
|
for (let i = 0; i < negativeDataY.length; i++) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { DataXY } from 'cheminfo-types';
|
|
2
|
+
|
|
1
3
|
import { peaksFilterImpurities } from '../peaks/peaksFilterImpurities';
|
|
2
4
|
import type { OptionsPeaksFilterImpurities } from '../peaks/peaksFilterImpurities';
|
|
3
5
|
import { OptionsPeaksToRanges, peaksToRanges } from '../peaks/peaksToRanges';
|
|
4
|
-
import type { XYNumberArray } from '../types/XYNumberArray';
|
|
5
6
|
|
|
6
7
|
import { xyAutoPeaksPicking } from './xyAutoPeaksPicking';
|
|
7
8
|
import type { OptionsXYAutoPeaksPicking } from './xyAutoPeaksPicking';
|
|
@@ -16,7 +17,7 @@ interface OptionsXYAutoRangesPicking {
|
|
|
16
17
|
* Detect peaks, optimize parameters and compile multiplicity if required.
|
|
17
18
|
*/
|
|
18
19
|
export function xyAutoRangesPicking(
|
|
19
|
-
data:
|
|
20
|
+
data: DataXY,
|
|
20
21
|
options: OptionsXYAutoRangesPicking = {},
|
|
21
22
|
) {
|
|
22
23
|
let peaks = xyAutoPeaksPicking(data, options.peakPicking);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FromTo } from 'cheminfo-types';
|
|
2
|
+
import type { Peak2D } from 'ml-matrix-peaks-finder';
|
|
2
3
|
|
|
3
4
|
export interface Signal2DAxisData {
|
|
4
5
|
nucleus?: string;
|
|
@@ -6,17 +7,14 @@ export interface Signal2DAxisData {
|
|
|
6
7
|
resolution?: number;
|
|
7
8
|
atoms?: number[];
|
|
8
9
|
diaIDs?: string[];
|
|
9
|
-
fromTo?: {
|
|
10
|
-
from: number;
|
|
11
|
-
to: number
|
|
12
|
-
};
|
|
13
10
|
}
|
|
14
11
|
export interface NMRSignal2D {
|
|
15
12
|
x: Signal2DAxisData;
|
|
16
13
|
y: Signal2DAxisData;
|
|
14
|
+
j?: {
|
|
15
|
+
pathLength?: number | FromTo;
|
|
16
|
+
};
|
|
17
17
|
id?: string;
|
|
18
|
-
peaks?:
|
|
18
|
+
peaks?: Peak2D[];
|
|
19
19
|
kind?: string;
|
|
20
|
-
//eslint-disable-next-line
|
|
21
|
-
_highlight?: (number | string)[];
|
|
22
20
|
}
|