nmrium 0.20.2 → 0.23.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/lib/component/1d/ExclusionZonesAnnotations.js +1 -2
- package/lib/component/1d/FooterBanner.js +1 -1
- package/lib/component/1d/Integral.js +1 -6
- package/lib/component/1d/Viewer1D.js +4 -4
- package/lib/component/1d/ranges/RangeIntegral.js +2 -6
- package/lib/component/1d/utilities/scale.d.ts +1 -1
- package/lib/component/1d/utilities/scale.js +7 -6
- package/lib/component/2d/Viewer2D.js +5 -5
- package/lib/component/EventsTrackers/KeysListenerTracker.js +98 -81
- package/lib/component/NMRium.d.ts +10 -6
- package/lib/component/NMRium.js +3 -9
- package/lib/component/elements/EditableColumn.d.ts +1 -1
- package/lib/component/header/Header.js +13 -10
- package/lib/component/hooks/useCheckExperimentalFeature.js +2 -1
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +1 -0
- package/lib/component/hooks/useCheckToolsVisibility.js +6 -0
- package/lib/component/{1d/utilities → hooks}/useIntegralPath.d.ts +0 -0
- package/lib/component/hooks/useIntegralPath.js +53 -0
- package/lib/component/hooks/useToolsFunctions.js +6 -6
- package/lib/component/hooks/useXScale.d.ts +2 -0
- package/lib/component/hooks/useXScale.js +7 -0
- package/lib/component/loader/DropZone.js +87 -87
- package/lib/component/modal/PredictSpectraModal.d.ts +0 -28
- package/lib/component/modal/PredictSpectraModal.js +2 -32
- package/lib/component/modal/changeSum/ChangeSumModal.js +4 -2
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib/component/modal/editZone/EditPathLengthFormik.d.ts +5 -0
- package/lib/component/modal/editZone/EditPathLengthFormik.js +72 -0
- package/lib/component/modal/editZone/EditZoneModal.d.ts +8 -0
- package/lib/component/modal/editZone/EditZoneModal.js +96 -0
- package/lib/component/modal/editZone/SignalFormTab.d.ts +6 -0
- package/lib/component/modal/editZone/SignalFormTab.js +6 -0
- package/lib/component/modal/editZone/SignalsForm.d.ts +2 -0
- package/lib/component/modal/editZone/SignalsForm.js +62 -0
- package/lib/component/modal/editZone/validation/EditZoneValidation.d.ts +534 -0
- package/lib/component/modal/editZone/validation/EditZoneValidation.js +17 -0
- package/lib/component/modal/editZone/validation/isDefaultPathLength.d.ts +3 -0
- package/lib/component/modal/editZone/validation/isDefaultPathLength.js +7 -0
- package/lib/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib/component/modal/setting/DisplayTabContent.js +5 -1
- package/lib/component/modal/setting/GeneralSettings.d.ts +1 -2
- package/lib/component/modal/setting/GeneralSettings.js +13 -9
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.d.ts +2 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +13 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +7 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +38 -0
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +0 -3
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +4 -17
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +10 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +27 -17
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +9 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +2 -2
- package/lib/component/panels/Panels.d.ts +1 -1
- package/lib/component/panels/Panels.js +17 -14
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +0 -3
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +5 -14
- package/lib/component/panels/RangesPanel/RangesPanel.js +2 -5
- package/lib/component/panels/RangesPanel/RangesPreferences.js +5 -18
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +13 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +7 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.d.ts +1 -6
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -7
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +4 -5
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +21 -25
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +24 -30
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +8 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +89 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -42
- package/lib/component/panels/SummaryPanel/utilities/IsInView.d.ts +6 -0
- package/lib/component/panels/SummaryPanel/utilities/IsInView.js +16 -0
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +29 -0
- package/lib/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +155 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +1 -0
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +26 -3
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +12 -7
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +5 -18
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +3 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js +5 -2
- package/lib/component/panels/databasePanel/DatabasePanel.js +0 -3
- package/lib/component/panels/databasePanel/DatabasePreferences.js +4 -17
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +6 -0
- package/lib/component/panels/predictionPanel/PredictionOptions.js +88 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +2 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.js +33 -0
- package/lib/component/reducer/IgnoreActions.js +2 -1
- package/lib/component/reducer/Reducer.d.ts +9 -23
- package/lib/component/reducer/Reducer.js +7 -8
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +3 -1
- package/lib/component/reducer/actions/DomainActions.js +20 -1
- package/lib/component/reducer/actions/IntegralsActions.js +2 -0
- package/lib/component/reducer/actions/LoadActions.js +29 -1
- package/lib/component/reducer/actions/MoleculeActions.js +1 -1
- package/lib/component/reducer/actions/PreferencesActions.js +0 -2
- package/lib/component/reducer/actions/RangesActions.js +3 -1
- package/lib/component/reducer/actions/SpectrumsActions.js +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +43 -56
- package/lib/component/reducer/actions/ZonesActions.d.ts +3 -1
- package/lib/component/reducer/actions/ZonesActions.js +33 -2
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +17 -21
- package/lib/component/reducer/helper/Zoom1DManager.js +53 -69
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -0
- package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -1
- package/lib/component/reducer/preferencesReducer.d.ts +3 -8
- package/lib/component/reducer/preferencesReducer.js +86 -37
- package/lib/component/reducer/types/Types.d.ts +3 -1
- package/lib/component/reducer/types/Types.js +3 -1
- package/lib/component/toolbar/FunctionToolBar.js +7 -10
- package/lib/component/toolbar/ToolTypes.js +3 -3
- package/lib/component/workspaces/Workspace.d.ts +6 -0
- package/lib/component/workspaces/Workspace.js +1 -0
- package/lib/component/workspaces/basic.d.ts +2 -0
- package/lib/component/workspaces/basic.js +46 -0
- package/lib/component/workspaces/exercise1D.d.ts +2 -0
- package/lib/component/workspaces/exercise1D.js +46 -0
- package/lib/component/workspaces/index.d.ts +6 -0
- package/lib/component/workspaces/index.js +4 -0
- package/lib/component/workspaces/process1D.d.ts +2 -0
- package/lib/component/workspaces/process1D.js +44 -0
- package/lib/data/PredictionManager.d.ts +35 -3
- package/lib/data/PredictionManager.js +45 -7
- package/lib/data/constants/DefaultPathLengths.d.ts +6 -0
- package/lib/data/constants/DefaultPathLengths.js +8 -0
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +4 -0
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +7 -19
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +11 -0
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +11 -0
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +9 -0
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +7 -0
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +29 -0
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +13 -0
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +14 -0
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
- package/lib/data/migration/MigrationManager.js +3 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -2
- package/lib-cjs/component/1d/FooterBanner.js +1 -1
- package/lib-cjs/component/1d/Integral.js +1 -6
- package/lib-cjs/component/1d/Viewer1D.js +4 -4
- package/lib-cjs/component/1d/ranges/RangeIntegral.js +2 -6
- package/lib-cjs/component/1d/utilities/scale.js +7 -6
- package/lib-cjs/component/2d/Viewer2D.js +4 -4
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +98 -81
- package/lib-cjs/component/NMRium.js +3 -10
- package/lib-cjs/component/header/Header.js +13 -10
- package/lib-cjs/component/hooks/useCheckExperimentalFeature.js +5 -1
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +13 -0
- package/lib-cjs/component/hooks/useIntegralPath.js +56 -0
- package/lib-cjs/component/hooks/useToolsFunctions.js +6 -6
- package/lib-cjs/component/hooks/useXScale.js +11 -0
- package/lib-cjs/component/loader/DropZone.js +87 -87
- package/lib-cjs/component/modal/PredictSpectraModal.js +3 -33
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +4 -2
- package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +77 -0
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +101 -0
- package/lib-cjs/component/modal/editZone/SignalFormTab.js +11 -0
- package/lib-cjs/component/modal/editZone/SignalsForm.js +67 -0
- package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +38 -0
- package/lib-cjs/component/modal/editZone/validation/isDefaultPathLength.js +12 -0
- package/lib-cjs/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +5 -1
- package/lib-cjs/component/modal/setting/GeneralSettings.js +12 -8
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +18 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +43 -0
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +0 -3
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +3 -16
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +27 -17
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +2 -2
- package/lib-cjs/component/panels/Panels.js +18 -15
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +0 -3
- package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +4 -13
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +2 -5
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +4 -17
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +13 -3
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +7 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -8
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +4 -5
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +21 -25
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +43 -30
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +94 -0
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +38 -41
- package/lib-cjs/component/panels/SummaryPanel/utilities/IsInView.js +18 -0
- package/lib-cjs/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +157 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +24 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +12 -7
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +4 -17
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +5 -2
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +0 -3
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +3 -16
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +112 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +39 -0
- package/lib-cjs/component/reducer/IgnoreActions.js +2 -1
- package/lib-cjs/component/reducer/Reducer.js +7 -8
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +2 -2
- package/lib-cjs/component/reducer/actions/DomainActions.js +21 -1
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +2 -0
- package/lib-cjs/component/reducer/actions/LoadActions.js +29 -1
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +1 -1
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +0 -2
- package/lib-cjs/component/reducer/actions/RangesActions.js +2 -0
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +2 -2
- package/lib-cjs/component/reducer/actions/ToolsActions.js +50 -63
- package/lib-cjs/component/reducer/actions/ZonesActions.js +35 -2
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +55 -73
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -1
- package/lib-cjs/component/reducer/preferencesReducer.js +87 -38
- package/lib-cjs/component/reducer/types/Types.js +6 -4
- package/lib-cjs/component/toolbar/FunctionToolBar.js +7 -10
- package/lib-cjs/component/toolbar/ToolTypes.js +3 -3
- package/lib-cjs/component/workspaces/Workspace.js +2 -0
- package/lib-cjs/component/workspaces/basic.js +49 -0
- package/lib-cjs/component/workspaces/exercise1D.js +49 -0
- package/lib-cjs/component/workspaces/index.js +6 -0
- package/lib-cjs/component/workspaces/process1D.js +47 -0
- package/lib-cjs/data/PredictionManager.js +46 -8
- package/lib-cjs/data/constants/DefaultPathLengths.js +10 -0
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +7 -19
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +18 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +36 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +21 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
- package/lib-cjs/data/migration/MigrationManager.js +3 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +1 -1
- package/lib/component/1d/utilities/useIntegralPath.js +0 -63
- package/lib/component/nmriumMode/basic.d.ts +0 -38
- package/lib/component/nmriumMode/basic.js +0 -37
- package/lib/component/nmriumMode/exercise1D.d.ts +0 -38
- package/lib/component/nmriumMode/exercise1D.js +0 -37
- package/lib/component/nmriumMode/process1D.d.ts +0 -38
- package/lib/component/nmriumMode/process1D.js +0 -37
- package/lib/component/panels/SummaryPanel/Utilities.d.ts +0 -25
- package/lib/component/reducer/actions/Zoom.d.ts +0 -16
- package/lib/component/reducer/actions/Zoom.js +0 -92
- package/lib-cjs/component/1d/utilities/useIntegralPath.js +0 -66
- package/lib-cjs/component/nmriumMode/basic.js +0 -39
- package/lib-cjs/component/nmriumMode/exercise1D.js +0 -39
- package/lib-cjs/component/nmriumMode/process1D.js +0 -39
- package/lib-cjs/component/reducer/actions/Zoom.js +0 -116
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const basic_1 = require("./basic");
|
|
4
|
+
const exercise1D_1 = require("./exercise1D");
|
|
5
|
+
const process1D_1 = require("./process1D");
|
|
6
|
+
exports.default = { exercise1D: exercise1D_1.exercise1D, basic: basic_1.basic, process1D: process1D_1.process1D };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.process1D = void 0;
|
|
4
|
+
exports.process1D = {
|
|
5
|
+
version: 1,
|
|
6
|
+
label: 'Process 1D Mode',
|
|
7
|
+
display: {
|
|
8
|
+
general: {
|
|
9
|
+
disableMultipletAnalysis: true,
|
|
10
|
+
hideSetSumFromMolecule: false,
|
|
11
|
+
hideGeneralSettings: false,
|
|
12
|
+
hideExperimentalFeatures: false,
|
|
13
|
+
},
|
|
14
|
+
panels: {
|
|
15
|
+
hideSpectraPanel: false,
|
|
16
|
+
hideInformationPanel: false,
|
|
17
|
+
hidePeaksPanel: false,
|
|
18
|
+
hideIntegralsPanel: false,
|
|
19
|
+
hideRangesPanel: true,
|
|
20
|
+
hideStructuresPanel: false,
|
|
21
|
+
hideFiltersPanel: false,
|
|
22
|
+
hideZonesPanel: true,
|
|
23
|
+
hideSummaryPanel: true,
|
|
24
|
+
hideMultipleSpectraAnalysisPanel: true,
|
|
25
|
+
hideDatabasePanel: false,
|
|
26
|
+
hidePredictionPanel: false,
|
|
27
|
+
},
|
|
28
|
+
toolBarButtons: {
|
|
29
|
+
hideZoomTool: false,
|
|
30
|
+
hideZoomOutTool: false,
|
|
31
|
+
hideImport: true,
|
|
32
|
+
hideExportAs: true,
|
|
33
|
+
hideSpectraStackAlignments: false,
|
|
34
|
+
hideSpectraCenterAlignments: false,
|
|
35
|
+
hideRealImaginary: false,
|
|
36
|
+
hidePeakTool: false,
|
|
37
|
+
hideIntegralTool: false,
|
|
38
|
+
hideAutoRangesTool: true,
|
|
39
|
+
hideZeroFillingTool: false,
|
|
40
|
+
hidePhaseCorrectionTool: false,
|
|
41
|
+
hideBaseLineCorrectionTool: false,
|
|
42
|
+
hideFFTTool: false,
|
|
43
|
+
hideMultipleSpectraAnalysisTool: true,
|
|
44
|
+
hideExclusionZonesTool: true,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -3,13 +3,44 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.generateSpectra = exports.predictSpectra = void 0;
|
|
6
|
+
exports.generateSpectra = exports.predictSpectra = exports.FREQUENCIES = exports.defaultPredictionOptions = void 0;
|
|
7
7
|
const nmr_processing_1 = require("nmr-processing");
|
|
8
8
|
const full_1 = __importDefault(require("openchemlib/full"));
|
|
9
9
|
const SignalsKinds_1 = require("./constants/SignalsKinds");
|
|
10
10
|
const Spectrum1D_1 = require("./data1d/Spectrum1D");
|
|
11
11
|
const Spectrum2D_1 = require("./data2d/Spectrum2D");
|
|
12
12
|
const generateID_1 = __importDefault(require("./utilities/generateID"));
|
|
13
|
+
exports.defaultPredictionOptions = {
|
|
14
|
+
frequency: 400,
|
|
15
|
+
'1d': {
|
|
16
|
+
'1H': { from: -1, to: 12 },
|
|
17
|
+
'13C': { from: -5, to: 220 },
|
|
18
|
+
nbPoints: 2 ** 17,
|
|
19
|
+
lineWidth: 1,
|
|
20
|
+
},
|
|
21
|
+
'2d': {
|
|
22
|
+
nbPoints: { x: 1024, y: 1024 },
|
|
23
|
+
},
|
|
24
|
+
spectra: {
|
|
25
|
+
proton: true,
|
|
26
|
+
carbon: true,
|
|
27
|
+
cosy: true,
|
|
28
|
+
hsqc: true,
|
|
29
|
+
hmbc: true,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
exports.FREQUENCIES = [
|
|
33
|
+
{ key: 1, value: 60, label: '60 MHz' },
|
|
34
|
+
{ key: 2, value: 100, label: '100 MHz' },
|
|
35
|
+
{ key: 3, value: 200, label: '200 MHz' },
|
|
36
|
+
{ key: 4, value: 300, label: '300 MHz' },
|
|
37
|
+
{ key: 5, value: 400, label: '400 MHz' },
|
|
38
|
+
{ key: 6, value: 500, label: '500 MHz' },
|
|
39
|
+
{ key: 7, value: 600, label: '600 MHz' },
|
|
40
|
+
{ key: 8, value: 800, label: '800 MHz' },
|
|
41
|
+
{ key: 9, value: 1000, label: '1000 MHz' },
|
|
42
|
+
{ key: 10, value: 1200, label: '1200 MHz' },
|
|
43
|
+
];
|
|
13
44
|
const baseURL = 'https://nmr-prediction.service.zakodium.com';
|
|
14
45
|
async function predictSpectra(molfile) {
|
|
15
46
|
const molecule = full_1.default.Molecule.fromMolfile(molfile);
|
|
@@ -22,8 +53,9 @@ async function predictSpectra(molfile) {
|
|
|
22
53
|
});
|
|
23
54
|
}
|
|
24
55
|
exports.predictSpectra = predictSpectra;
|
|
25
|
-
function generateSpectra(data, inputOptions
|
|
56
|
+
function generateSpectra(data, inputOptions) {
|
|
26
57
|
const spectra = [];
|
|
58
|
+
const color = '#593315';
|
|
27
59
|
for (const experiment in data) {
|
|
28
60
|
if (inputOptions.spectra[experiment]) {
|
|
29
61
|
const spectrum = data[experiment];
|
|
@@ -34,7 +66,7 @@ function generateSpectra(data, inputOptions, usedColors) {
|
|
|
34
66
|
spectrum,
|
|
35
67
|
inputOptions,
|
|
36
68
|
experiment,
|
|
37
|
-
|
|
69
|
+
color,
|
|
38
70
|
});
|
|
39
71
|
spectra.push(datum);
|
|
40
72
|
break;
|
|
@@ -46,7 +78,7 @@ function generateSpectra(data, inputOptions, usedColors) {
|
|
|
46
78
|
spectrum,
|
|
47
79
|
inputOptions,
|
|
48
80
|
experiment,
|
|
49
|
-
|
|
81
|
+
color,
|
|
50
82
|
});
|
|
51
83
|
spectra.push(datum);
|
|
52
84
|
break;
|
|
@@ -60,7 +92,7 @@ function generateSpectra(data, inputOptions, usedColors) {
|
|
|
60
92
|
}
|
|
61
93
|
exports.generateSpectra = generateSpectra;
|
|
62
94
|
function generated1DSpectrum(params) {
|
|
63
|
-
const { spectrum, inputOptions, experiment,
|
|
95
|
+
const { spectrum, inputOptions, experiment, color } = params;
|
|
64
96
|
const { signals, ranges, nucleus } = spectrum;
|
|
65
97
|
const { '1d': { nbPoints }, frequency: freq, } = inputOptions;
|
|
66
98
|
const frequency = getFrequency(nucleus, freq);
|
|
@@ -71,6 +103,9 @@ function generated1DSpectrum(params) {
|
|
|
71
103
|
});
|
|
72
104
|
const datum = (0, Spectrum1D_1.initiateDatum1D)({
|
|
73
105
|
data: { x, im: null, re: y },
|
|
106
|
+
display: {
|
|
107
|
+
color,
|
|
108
|
+
},
|
|
74
109
|
info: {
|
|
75
110
|
nucleus,
|
|
76
111
|
originFrequency: frequency,
|
|
@@ -80,7 +115,7 @@ function generated1DSpectrum(params) {
|
|
|
80
115
|
experiment,
|
|
81
116
|
isFt: true,
|
|
82
117
|
},
|
|
83
|
-
},
|
|
118
|
+
}, []);
|
|
84
119
|
datum.ranges.values = (0, Spectrum1D_1.mapRanges)(ranges, datum);
|
|
85
120
|
(0, Spectrum1D_1.updateIntegralsRelativeValues)(datum);
|
|
86
121
|
return datum;
|
|
@@ -109,7 +144,7 @@ function mapZones(zones) {
|
|
|
109
144
|
}, []);
|
|
110
145
|
}
|
|
111
146
|
function generated2DSpectrum(params) {
|
|
112
|
-
const { spectrum, inputOptions, experiment,
|
|
147
|
+
const { spectrum, inputOptions, experiment, color } = params;
|
|
113
148
|
const { signals, zones, nuclei } = spectrum;
|
|
114
149
|
const xOption = inputOptions['1d'][nuclei[0]];
|
|
115
150
|
const yOption = inputOptions['1d'][nuclei[1]];
|
|
@@ -126,6 +161,9 @@ function generated2DSpectrum(params) {
|
|
|
126
161
|
});
|
|
127
162
|
const datum = (0, Spectrum2D_1.initiateDatum2D)({
|
|
128
163
|
data: { ...spectrumData, noise: 0.01 },
|
|
164
|
+
display: {
|
|
165
|
+
positiveColor: experiment === 'hmbc' ? '#e68337' : color,
|
|
166
|
+
},
|
|
129
167
|
info: {
|
|
130
168
|
nucleus: nuclei,
|
|
131
169
|
originFrequency: frequency,
|
|
@@ -133,7 +171,7 @@ function generated2DSpectrum(params) {
|
|
|
133
171
|
pulseSequence: experiment,
|
|
134
172
|
experiment: '2d',
|
|
135
173
|
},
|
|
136
|
-
},
|
|
174
|
+
}, []);
|
|
137
175
|
datum.zones.values = mapZones(zones);
|
|
138
176
|
return datum;
|
|
139
177
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const DefaultPathLengths = {
|
|
4
|
+
hmbc: { from: 2, to: 3 },
|
|
5
|
+
cosy: { from: 3, to: 4 },
|
|
6
|
+
hsqc: { from: 1, to: 1 },
|
|
7
|
+
hmqc: { from: 1, to: 1 },
|
|
8
|
+
inadequate: { from: 1, to: 1 },
|
|
9
|
+
};
|
|
10
|
+
exports.default = DefaultPathLengths;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSpectrumErrorValue = void 0;
|
|
4
|
+
function getSpectrumErrorValue(datum) {
|
|
5
|
+
const { x } = datum.data;
|
|
6
|
+
return (x[x.length - 1] - x[0]) / 10000;
|
|
7
|
+
}
|
|
8
|
+
exports.getSpectrumErrorValue = getSpectrumErrorValue;
|
|
@@ -23,11 +23,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.initiateDatum1D = void 0;
|
|
26
|
-
const merge_1 = __importDefault(require("lodash/merge"));
|
|
27
26
|
const FiltersTypes = __importStar(require("../../Filters"));
|
|
28
27
|
const FiltersManager = __importStar(require("../../FiltersManager"));
|
|
29
28
|
const generateID_1 = __importDefault(require("../../utilities/generateID"));
|
|
30
29
|
const getColor_1 = __importDefault(require("../../utilities/getColor"));
|
|
30
|
+
const initiateIntegrals_1 = require("./integrals/initiateIntegrals");
|
|
31
|
+
const initiatePeaks_1 = require("./peaks/initiatePeaks");
|
|
32
|
+
const initiateRanges_1 = require("./ranges/initiateRanges");
|
|
31
33
|
function initiateDatum1D(options, usedColors = {}) {
|
|
32
34
|
const datum = {};
|
|
33
35
|
datum.id = options.id || (0, generateID_1.default)();
|
|
@@ -60,27 +62,13 @@ function initiateDatum1D(options, usedColors = {}) {
|
|
|
60
62
|
im: [],
|
|
61
63
|
}, options.data);
|
|
62
64
|
datum.originalData = datum.data;
|
|
63
|
-
datum.
|
|
65
|
+
datum.filters = Object.assign([], options.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
|
|
66
|
+
datum.peaks = (0, initiatePeaks_1.initiatePeaks)(options, datum);
|
|
64
67
|
// array of object {index: xIndex, xShift}
|
|
65
68
|
// in case the peak does not exactly correspond to the point value
|
|
66
69
|
// we can think about a second attributed `xShift`
|
|
67
|
-
datum.integrals = (0,
|
|
68
|
-
|
|
69
|
-
options: {
|
|
70
|
-
sum: undefined,
|
|
71
|
-
isSumConstant: true,
|
|
72
|
-
sumAuto: true,
|
|
73
|
-
},
|
|
74
|
-
}, options.integrals); // array of object (from: xIndex, to: xIndex)
|
|
75
|
-
datum.filters = Object.assign([], options.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
|
|
76
|
-
datum.ranges = (0, merge_1.default)({
|
|
77
|
-
values: [],
|
|
78
|
-
options: {
|
|
79
|
-
sum: undefined,
|
|
80
|
-
isSumConstant: true,
|
|
81
|
-
sumAuto: true,
|
|
82
|
-
},
|
|
83
|
-
}, options.ranges);
|
|
70
|
+
datum.integrals = (0, initiateIntegrals_1.initiateIntegrals)(options); // array of object (from: xIndex, to: xIndex)
|
|
71
|
+
datum.ranges = (0, initiateRanges_1.initiateRanges)(options, datum);
|
|
84
72
|
//reapply filters after load the original data
|
|
85
73
|
FiltersManager.reapplyFilters(datum);
|
|
86
74
|
preprocessing(datum);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.initiateIntegrals = void 0;
|
|
7
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
|
+
function initiateIntegrals(options) {
|
|
9
|
+
return (0, merge_1.default)({
|
|
10
|
+
values: [],
|
|
11
|
+
options: {
|
|
12
|
+
sum: undefined,
|
|
13
|
+
isSumConstant: true,
|
|
14
|
+
sumAuto: true,
|
|
15
|
+
},
|
|
16
|
+
}, options.integrals);
|
|
17
|
+
}
|
|
18
|
+
exports.initiateIntegrals = initiateIntegrals;
|
|
@@ -6,14 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.autoPeakPicking = void 0;
|
|
7
7
|
const ml_array_median_1 = __importDefault(require("ml-array-median"));
|
|
8
8
|
const nmr_processing_1 = require("nmr-processing");
|
|
9
|
-
const
|
|
10
|
-
const getShiftX_1 = require("../shift/getShiftX");
|
|
9
|
+
const mapPeaks_1 = require("./mapPeaks");
|
|
11
10
|
function autoPeakPicking(datum1D, options) {
|
|
12
11
|
const { minMaxRatio, maxNumberOfPeaks, noiseFactor, lookNegative, windowFromIndex, windowToIndex, } = options;
|
|
13
12
|
// we calculate the noise but this could be improved
|
|
14
13
|
const noise = (0, ml_array_median_1.default)(datum1D.data.re.map((y) => Math.abs(y)));
|
|
15
14
|
let { re, x } = datum1D.data;
|
|
16
|
-
let { values: currentPeaks = [] } = datum1D.peaks || {};
|
|
17
15
|
if (windowFromIndex !== undefined && windowToIndex !== undefined) {
|
|
18
16
|
x = x.slice(windowFromIndex, windowToIndex);
|
|
19
17
|
re = re.slice(windowFromIndex, windowToIndex);
|
|
@@ -29,23 +27,6 @@ function autoPeakPicking(datum1D, options) {
|
|
|
29
27
|
peaks.sort((a, b) => b.y - a.y);
|
|
30
28
|
if (maxNumberOfPeaks < peaks.length)
|
|
31
29
|
peaks = peaks.slice(0, maxNumberOfPeaks);
|
|
32
|
-
|
|
33
|
-
const error = (x[x.length - 1] - x[0]) / 10000;
|
|
34
|
-
return peaks.reduce((acc, newPeak) => {
|
|
35
|
-
// check if the peak is already exists
|
|
36
|
-
for (const { x } of currentPeaks) {
|
|
37
|
-
if (Math.abs(newPeak.x - x) < error) {
|
|
38
|
-
return acc;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
acc.push({
|
|
42
|
-
id: (0, generateID_1.default)(),
|
|
43
|
-
originalX: newPeak.x - shiftX,
|
|
44
|
-
x: newPeak.x,
|
|
45
|
-
y: newPeak.y,
|
|
46
|
-
width: newPeak.width,
|
|
47
|
-
});
|
|
48
|
-
return acc;
|
|
49
|
-
}, []);
|
|
30
|
+
return (0, mapPeaks_1.mapPeaks)(peaks, datum1D);
|
|
50
31
|
}
|
|
51
32
|
exports.autoPeakPicking = autoPeakPicking;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.initiatePeaks = void 0;
|
|
7
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
|
+
const mapPeaks_1 = require("./mapPeaks");
|
|
9
|
+
function initiatePeaks(options, datum) {
|
|
10
|
+
return (0, merge_1.default)({ values: [], options: {} }, options.peaks, {
|
|
11
|
+
values: (0, mapPeaks_1.mapPeaks)(options?.peaks?.values || [], datum),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.initiatePeaks = initiatePeaks;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mapPeaks = void 0;
|
|
7
|
+
const generateID_1 = __importDefault(require("../../../utilities/generateID"));
|
|
8
|
+
const getSpectrumErrorValue_1 = require("../getSpectrumErrorValue");
|
|
9
|
+
const getShiftX_1 = require("../shift/getShiftX");
|
|
10
|
+
function checkPeak(peak, datum, error) {
|
|
11
|
+
// check if the Peak is already exists
|
|
12
|
+
for (const { x } of datum.peaks?.values || []) {
|
|
13
|
+
if (Math.abs(peak.x - x) < error) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
function mapPeaks(peaks, datum) {
|
|
20
|
+
const shiftX = (0, getShiftX_1.getShiftX)(datum);
|
|
21
|
+
const error = (0, getSpectrumErrorValue_1.getSpectrumErrorValue)(datum);
|
|
22
|
+
return peaks.reduce((acc, newPeak) => {
|
|
23
|
+
// check if the peak is already exists
|
|
24
|
+
if (checkPeak(newPeak, datum, error))
|
|
25
|
+
return acc;
|
|
26
|
+
acc.push({
|
|
27
|
+
id: newPeak?.id || (0, generateID_1.default)(),
|
|
28
|
+
originalX: newPeak.x - shiftX,
|
|
29
|
+
x: newPeak.x,
|
|
30
|
+
y: newPeak.y,
|
|
31
|
+
width: newPeak.width,
|
|
32
|
+
});
|
|
33
|
+
return acc;
|
|
34
|
+
}, []);
|
|
35
|
+
}
|
|
36
|
+
exports.mapPeaks = mapPeaks;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.initiateRanges = void 0;
|
|
7
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
|
+
const mapRanges_1 = require("./mapRanges");
|
|
9
|
+
function initiateRanges(options, datum) {
|
|
10
|
+
return (0, merge_1.default)({
|
|
11
|
+
values: [],
|
|
12
|
+
options: {
|
|
13
|
+
sum: undefined,
|
|
14
|
+
isSumConstant: true,
|
|
15
|
+
sumAuto: true,
|
|
16
|
+
},
|
|
17
|
+
}, options.ranges, {
|
|
18
|
+
values: (0, mapRanges_1.mapRanges)(options?.ranges?.values || [], datum),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.initiateRanges = initiateRanges;
|
|
@@ -7,19 +7,24 @@ exports.mapRanges = void 0;
|
|
|
7
7
|
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
8
8
|
const SignalsKinds_1 = require("../../../constants/SignalsKinds");
|
|
9
9
|
const generateID_1 = __importDefault(require("../../../utilities/generateID"));
|
|
10
|
+
const getSpectrumErrorValue_1 = require("../getSpectrumErrorValue");
|
|
10
11
|
const getShiftX_1 = require("../shift/getShiftX");
|
|
12
|
+
function checkRange(range, datum, error) {
|
|
13
|
+
// check if the range is already exists
|
|
14
|
+
for (const { from, to } of datum.ranges?.values || []) {
|
|
15
|
+
if (Math.abs(range.from - from) < error &&
|
|
16
|
+
Math.abs(range.to - to) < error) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
11
21
|
function mapRanges(ranges, datum) {
|
|
12
22
|
const { x, re } = datum.data;
|
|
13
23
|
const shiftX = (0, getShiftX_1.getShiftX)(datum);
|
|
14
|
-
const error = (
|
|
24
|
+
const error = (0, getSpectrumErrorValue_1.getSpectrumErrorValue)(datum);
|
|
15
25
|
return ranges.reduce((acc, newRange) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (Math.abs(newRange.from - from) < error &&
|
|
19
|
-
Math.abs(newRange.to - to) < error) {
|
|
20
|
-
return acc;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
26
|
+
if (checkRange(newRange, datum, error))
|
|
27
|
+
return acc;
|
|
23
28
|
const absolute = (0, ml_spectra_processing_1.xyIntegration)({ x, y: re }, { from: newRange.from, to: newRange.to, reverse: true });
|
|
24
29
|
const signals = newRange.signals.map((signal) => {
|
|
25
30
|
const { kind = null, id, ...resSignal } = signal;
|
|
@@ -16,6 +16,9 @@ function migrate(data) {
|
|
|
16
16
|
migrateToVersion2_1.default,
|
|
17
17
|
];
|
|
18
18
|
let index = data?.version || 0;
|
|
19
|
+
if (index > exports.CURRENT_EXPORT_VERSION) {
|
|
20
|
+
throw new Error('This file can not be imported using the current NMRium version, Please move to the new one !!! ');
|
|
21
|
+
}
|
|
19
22
|
return migrationPipe(migrationsFuncs.slice(index))(data);
|
|
20
23
|
}
|
|
21
24
|
exports.migrate = migrate;
|
package/lib-cjs/versionInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.23.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib-cjs/component/NMRium.js",
|
|
7
7
|
"module": "lib/component/NMRium.js",
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { xyIntegral, xyReduce } from 'ml-spectra-processing';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { useChartData } from '../../context/ChartContext';
|
|
4
|
-
import { useScale } from '../../context/ScaleContext';
|
|
5
|
-
import { PathBuilder } from '../../utility/PathBuilder';
|
|
6
|
-
import { getYScale, reScaleY } from './scale';
|
|
7
|
-
export default function useIntegralPath(integralOptions) {
|
|
8
|
-
const { xDomain, height, yDomain, margin, verticalAlign, data, activeSpectrum, zoom, } = useChartData();
|
|
9
|
-
const { scaleX } = useScale();
|
|
10
|
-
const scaleY = useMemo(() => {
|
|
11
|
-
const scale = zoom.integral.scales[activeSpectrum?.id || ''];
|
|
12
|
-
const scaledYDomain = reScaleY(scale === undefined ? 1 : scale < 0.1 ? 0.05 : scale, {
|
|
13
|
-
domain: [yDomain[0], yDomain[1] / 20],
|
|
14
|
-
height,
|
|
15
|
-
margin,
|
|
16
|
-
});
|
|
17
|
-
return getYScale({
|
|
18
|
-
height,
|
|
19
|
-
margin,
|
|
20
|
-
verticalAlign,
|
|
21
|
-
yDomain: scaledYDomain,
|
|
22
|
-
});
|
|
23
|
-
}, [
|
|
24
|
-
activeSpectrum?.id,
|
|
25
|
-
height,
|
|
26
|
-
margin,
|
|
27
|
-
verticalAlign,
|
|
28
|
-
yDomain,
|
|
29
|
-
zoom.integral.scales,
|
|
30
|
-
]);
|
|
31
|
-
const integral = useMemo(() => {
|
|
32
|
-
if (activeSpectrum) {
|
|
33
|
-
const { x, re } = data[activeSpectrum?.index].data;
|
|
34
|
-
const { from, to } = integralOptions;
|
|
35
|
-
return xyIntegral({ x, y: re }, {
|
|
36
|
-
from,
|
|
37
|
-
to,
|
|
38
|
-
reverse: true,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return { x: [], y: [] };
|
|
42
|
-
}, [activeSpectrum, data, integralOptions]);
|
|
43
|
-
const paths = useMemo(() => {
|
|
44
|
-
if (integral && scaleX) {
|
|
45
|
-
const xySeries = xyReduce(integral, {
|
|
46
|
-
from: xDomain[0],
|
|
47
|
-
to: xDomain[1],
|
|
48
|
-
nbPoints: 200,
|
|
49
|
-
optimize: true,
|
|
50
|
-
});
|
|
51
|
-
const pathBuilder = new PathBuilder();
|
|
52
|
-
pathBuilder.moveTo(scaleX()(xySeries.x[0]), scaleY(xySeries.y[0]));
|
|
53
|
-
for (let i = 1; i < xySeries.x.length; i++) {
|
|
54
|
-
pathBuilder.lineTo(scaleX()(xySeries.x[i]), scaleY(xySeries.y[i]));
|
|
55
|
-
}
|
|
56
|
-
return pathBuilder.toString();
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
return '';
|
|
60
|
-
}
|
|
61
|
-
}, [integral, scaleX, scaleY, xDomain]);
|
|
62
|
-
return paths;
|
|
63
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
general: {
|
|
3
|
-
disableMultipletAnalysis: boolean;
|
|
4
|
-
hideSetSumFromMolecule: boolean;
|
|
5
|
-
};
|
|
6
|
-
panels: {
|
|
7
|
-
hideSpectraPanel: boolean;
|
|
8
|
-
hideInformationPanel: boolean;
|
|
9
|
-
hidePeaksPanel: boolean;
|
|
10
|
-
hideIntegralsPanel: boolean;
|
|
11
|
-
hideRangesPanel: boolean;
|
|
12
|
-
hideStructuresPanel: boolean;
|
|
13
|
-
hideFiltersPanel: boolean;
|
|
14
|
-
hideZonesPanel: boolean;
|
|
15
|
-
hideSummaryPanel: boolean;
|
|
16
|
-
hideMultipleSpectraAnalysisPanel: boolean;
|
|
17
|
-
hideDatabasePanel: boolean;
|
|
18
|
-
};
|
|
19
|
-
toolBarButtons: {
|
|
20
|
-
hideZoomTool: boolean;
|
|
21
|
-
hideZoomOutTool: boolean;
|
|
22
|
-
hideImport: boolean;
|
|
23
|
-
hideExportAs: boolean;
|
|
24
|
-
hideSpectraStackAlignments: boolean;
|
|
25
|
-
hideSpectraCenterAlignments: boolean;
|
|
26
|
-
hideRealImaginary: boolean;
|
|
27
|
-
hidePeakTool: boolean;
|
|
28
|
-
hideIntegralTool: boolean;
|
|
29
|
-
hideAutoRangesTool: boolean;
|
|
30
|
-
hideZeroFillingTool: boolean;
|
|
31
|
-
hidePhaseCorrectionTool: boolean;
|
|
32
|
-
hideBaseLineCorrectionTool: boolean;
|
|
33
|
-
hideFFTTool: boolean;
|
|
34
|
-
hideMultipleSpectraAnalysisTool: boolean;
|
|
35
|
-
};
|
|
36
|
-
hideExperimentalFeatures: boolean;
|
|
37
|
-
};
|
|
38
|
-
export default _default;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
general: {
|
|
3
|
-
disableMultipletAnalysis: false,
|
|
4
|
-
hideSetSumFromMolecule: false,
|
|
5
|
-
},
|
|
6
|
-
panels: {
|
|
7
|
-
hideSpectraPanel: false,
|
|
8
|
-
hideInformationPanel: false,
|
|
9
|
-
hidePeaksPanel: false,
|
|
10
|
-
hideIntegralsPanel: false,
|
|
11
|
-
hideRangesPanel: false,
|
|
12
|
-
hideStructuresPanel: false,
|
|
13
|
-
hideFiltersPanel: false,
|
|
14
|
-
hideZonesPanel: false,
|
|
15
|
-
hideSummaryPanel: true,
|
|
16
|
-
hideMultipleSpectraAnalysisPanel: true,
|
|
17
|
-
hideDatabasePanel: false,
|
|
18
|
-
},
|
|
19
|
-
toolBarButtons: {
|
|
20
|
-
hideZoomTool: false,
|
|
21
|
-
hideZoomOutTool: false,
|
|
22
|
-
hideImport: false,
|
|
23
|
-
hideExportAs: false,
|
|
24
|
-
hideSpectraStackAlignments: false,
|
|
25
|
-
hideSpectraCenterAlignments: false,
|
|
26
|
-
hideRealImaginary: false,
|
|
27
|
-
hidePeakTool: false,
|
|
28
|
-
hideIntegralTool: false,
|
|
29
|
-
hideAutoRangesTool: false,
|
|
30
|
-
hideZeroFillingTool: false,
|
|
31
|
-
hidePhaseCorrectionTool: false,
|
|
32
|
-
hideBaseLineCorrectionTool: false,
|
|
33
|
-
hideFFTTool: false,
|
|
34
|
-
hideMultipleSpectraAnalysisTool: false,
|
|
35
|
-
},
|
|
36
|
-
hideExperimentalFeatures: true,
|
|
37
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
general: {
|
|
3
|
-
disableMultipletAnalysis: boolean;
|
|
4
|
-
hideSetSumFromMolecule: boolean;
|
|
5
|
-
};
|
|
6
|
-
panels: {
|
|
7
|
-
hideSpectraPanel: boolean;
|
|
8
|
-
hideInformationPanel: boolean;
|
|
9
|
-
hidePeaksPanel: boolean;
|
|
10
|
-
hideIntegralsPanel: boolean;
|
|
11
|
-
hideRangesPanel: boolean;
|
|
12
|
-
hideStructuresPanel: boolean;
|
|
13
|
-
hideFiltersPanel: boolean;
|
|
14
|
-
hideZonesPanel: boolean;
|
|
15
|
-
hideSummaryPanel: boolean;
|
|
16
|
-
hideMultipleSpectraAnalysisPanel: boolean;
|
|
17
|
-
hideDatabasePanel: boolean;
|
|
18
|
-
};
|
|
19
|
-
toolBarButtons: {
|
|
20
|
-
hideZoomTool: boolean;
|
|
21
|
-
hideZoomOutTool: boolean;
|
|
22
|
-
hideImport: boolean;
|
|
23
|
-
hideExportAs: boolean;
|
|
24
|
-
hideSpectraStackAlignments: boolean;
|
|
25
|
-
hideSpectraCenterAlignments: boolean;
|
|
26
|
-
hideRealImaginary: boolean;
|
|
27
|
-
hidePeakTool: boolean;
|
|
28
|
-
hideIntegralTool: boolean;
|
|
29
|
-
hideAutoRangesTool: boolean;
|
|
30
|
-
hideZeroFillingTool: boolean;
|
|
31
|
-
hidePhaseCorrectionTool: boolean;
|
|
32
|
-
hideBaseLineCorrectionTool: boolean;
|
|
33
|
-
hideFFTTool: boolean;
|
|
34
|
-
hideMultipleSpectraAnalysisTool: boolean;
|
|
35
|
-
hideExclusionZonesTool: boolean;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
export default _default;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
general: {
|
|
3
|
-
disableMultipletAnalysis: true,
|
|
4
|
-
hideSetSumFromMolecule: false,
|
|
5
|
-
},
|
|
6
|
-
panels: {
|
|
7
|
-
hideSpectraPanel: false,
|
|
8
|
-
hideInformationPanel: false,
|
|
9
|
-
hidePeaksPanel: false,
|
|
10
|
-
hideIntegralsPanel: false,
|
|
11
|
-
hideRangesPanel: true,
|
|
12
|
-
hideStructuresPanel: false,
|
|
13
|
-
hideFiltersPanel: true,
|
|
14
|
-
hideZonesPanel: true,
|
|
15
|
-
hideSummaryPanel: true,
|
|
16
|
-
hideMultipleSpectraAnalysisPanel: true,
|
|
17
|
-
hideDatabasePanel: false,
|
|
18
|
-
},
|
|
19
|
-
toolBarButtons: {
|
|
20
|
-
hideZoomTool: false,
|
|
21
|
-
hideZoomOutTool: false,
|
|
22
|
-
hideImport: true,
|
|
23
|
-
hideExportAs: true,
|
|
24
|
-
hideSpectraStackAlignments: false,
|
|
25
|
-
hideSpectraCenterAlignments: false,
|
|
26
|
-
hideRealImaginary: true,
|
|
27
|
-
hidePeakTool: false,
|
|
28
|
-
hideIntegralTool: false,
|
|
29
|
-
hideAutoRangesTool: true,
|
|
30
|
-
hideZeroFillingTool: true,
|
|
31
|
-
hidePhaseCorrectionTool: true,
|
|
32
|
-
hideBaseLineCorrectionTool: true,
|
|
33
|
-
hideFFTTool: true,
|
|
34
|
-
hideMultipleSpectraAnalysisTool: true,
|
|
35
|
-
hideExclusionZonesTool: true,
|
|
36
|
-
},
|
|
37
|
-
};
|