nmrium 0.35.1 → 0.37.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/ApodizationLine.d.ts +1 -2
- package/lib/component/1d/Chart1D.d.ts +1 -2
- package/lib/component/1d/ExclusionZonesAnnotations.d.ts +1 -2
- package/lib/component/1d/Line.d.ts +1 -1
- package/lib/component/1d/LinesSeries.d.ts +1 -2
- package/lib/component/1d/SpectraLegends.d.ts +1 -2
- package/lib/component/1d/Viewer1D.d.ts +1 -1
- package/lib/component/1d/database/DatabaseElements.d.ts +1 -2
- package/lib/component/1d/database/DatabaseSpectrum.d.ts +1 -2
- package/lib/component/1d/database/ResurrectedDatabaseRanges.d.ts +1 -2
- package/lib/component/1d/integral/Integral.d.ts +1 -2
- package/lib/component/1d/integral/IntegralIndicator.d.ts +1 -2
- package/lib/component/1d/integral/IntegralsSeries.d.ts +1 -2
- package/lib/component/1d/jCouplingGraph/JGraph.d.ts +1 -2
- package/lib/component/1d/jCouplingGraph/JGraphVerticalAxis.d.ts +1 -2
- package/lib/component/1d/jCouplingGraph/JsCoupling.d.ts +1 -2
- package/lib/component/1d/jCouplingGraph/JsCouplingLinks.d.ts +1 -2
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -2
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.d.ts +1 -2
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -2
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +2 -1
- package/lib/component/1d/multiplicityTree/StringNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/TreeNodes.d.ts +1 -1
- package/lib/component/1d/peaks/PeakAnnotations.d.ts +1 -2
- package/lib/component/1d/peaks/PeaksShapes.d.ts +1 -2
- package/lib/component/1d/ranges/AssignmentActionsButtons.d.ts +1 -2
- package/lib/component/1d/ranges/RangeIntegral.d.ts +1 -2
- package/lib/component/1d/ranges/Ranges.d.ts +1 -2
- package/lib/component/1d/tool/PeakPointer.d.ts +1 -2
- package/lib/component/1d/tool/VerticalIndicator.d.ts +1 -2
- package/lib/component/1d/tool/XLabelPointer.d.ts +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/ActionsButton.d.ts +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +2 -3
- package/lib/component/1d-2d/components/SpectrumInfoBlock.d.ts +1 -2
- package/lib/component/1d-2d/tools/BrushX.d.ts +1 -2
- package/lib/component/1d-2d/tools/BrushXY.d.ts +1 -2
- package/lib/component/1d-2d/tools/CrossLinePointer.d.ts +1 -2
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.d.ts +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.d.ts +1 -1
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.d.ts +1 -1
- package/lib/component/2d/Chart2D.d.ts +1 -2
- package/lib/component/2d/SlicingView.d.ts +1 -2
- package/lib/component/2d/Viewer2D.d.ts +1 -1
- package/lib/component/2d/fid/FidCanvas.d.ts +1 -2
- package/lib/component/2d/fid/FidContainer.d.ts +1 -2
- package/lib/component/2d/ft/Contours.d.ts +1 -2
- package/lib/component/2d/ft/Contours.js +0 -6
- package/lib/component/2d/ft/FTContainer.d.ts +1 -2
- package/lib/component/2d/tools/XYLabelPointer.d.ts +1 -2
- package/lib/component/2d/zones/Zones.d.ts +1 -2
- package/lib/component/ErrorOverlay.d.ts +1 -2
- package/lib/component/EventsTrackers/BrushTracker.d.ts +1 -1
- package/lib/component/EventsTrackers/MouseTracker.d.ts +1 -1
- package/lib/component/NMRium.d.ts +2 -0
- package/lib/component/NMRium.js +7 -8
- package/lib/component/SplitPaneWrapper.d.ts +1 -2
- package/lib/component/assignment/index.d.ts +1 -2
- package/lib/component/context/LoggerContext.d.ts +1 -1
- package/lib/component/elements/ActionButtons.d.ts +1 -1
- package/lib/component/elements/ButtonToolTip.d.ts +1 -1
- package/lib/component/elements/CheckBoxCell.d.ts +1 -2
- package/lib/component/elements/CloseButton.d.ts +1 -1
- package/lib/component/elements/ColumnWrapper.d.ts +1 -1
- package/lib/component/elements/DeleteButton.d.ts +1 -2
- package/lib/component/elements/GroupPane.d.ts +1 -1
- package/lib/component/elements/IsotopesViewer.d.ts +1 -1
- package/lib/component/elements/Logo.d.ts +1 -2
- package/lib/component/elements/Message.d.ts +1 -1
- package/lib/component/elements/ReactTable/Elements/EmptyDataRow.d.ts +1 -2
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.d.ts +1 -1
- package/lib/component/elements/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +14 -1
- package/lib/component/elements/SVGGroup.d.ts +1 -1
- package/lib/component/elements/Table/Table.d.ts +1 -1
- package/lib/component/elements/Table/TableBody.d.ts +1 -1
- package/lib/component/elements/Table/TableCell.d.ts +1 -1
- package/lib/component/elements/Table/TableHead.d.ts +1 -1
- package/lib/component/elements/Table/TableRow.d.ts +1 -1
- package/lib/component/elements/ToolTip/ToolTip.d.ts +1 -1
- package/lib/component/elements/accordion/Accordion.d.ts +1 -1
- package/lib/component/elements/accordion/AccordionItem.d.ts +1 -1
- package/lib/component/elements/draggable/SVGDraggable.d.ts +1 -1
- package/lib/component/elements/formik/ErrorMessage.d.ts +1 -1
- package/lib/component/elements/formik/FormikCheckBox.d.ts +1 -1
- package/lib/component/elements/formik/FormikColorInput.d.ts +1 -1
- package/lib/component/elements/formik/FormikColorPicker.d.ts +1 -1
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +1 -1
- package/lib/component/elements/formik/FormikErrorsSummary.d.ts +1 -1
- package/lib/component/elements/formik/FormikInput.d.ts +1 -2
- package/lib/component/elements/formik/FormikNumberInput.d.ts +1 -2
- package/lib/component/elements/formik/FormikSelect.d.ts +1 -2
- package/lib/component/elements/formik/FormikSlider.d.ts +1 -2
- package/lib/component/elements/formik/FormikTextarea.d.ts +1 -1
- package/lib/component/elements/formik/Input.d.ts +1 -2
- package/lib/component/elements/linearAxis/LinearVerticalAxis.d.ts +1 -2
- package/lib/component/elements/popup/Alert/Provider.d.ts +1 -1
- package/lib/component/elements/popup/Modal/Modal.d.ts +1 -1
- package/lib/component/elements/popup/Transition.d.ts +1 -1
- package/lib/component/elements/popup/Wrapper.d.ts +1 -2
- package/lib/component/elements/resizer/Resizer.d.ts +1 -1
- package/lib/component/elements/toggle/ToggleButton.d.ts +1 -1
- package/lib/component/elements/toggle/ToggleButtonGroup.d.ts +1 -1
- package/lib/component/header/ApodizationOptionsPanel.d.ts +1 -2
- package/lib/component/header/AutoPeakPickingOptionPanel.d.ts +1 -1
- package/lib/component/header/BaseLineCorrectionPanel.d.ts +1 -2
- package/lib/component/header/Header.js +1 -1
- package/lib/component/header/HeaderContainer.d.ts +1 -1
- package/lib/component/header/LogsHistory.d.ts +1 -2
- package/lib/component/header/PhaseCorrectionPanel.d.ts +1 -2
- package/lib/component/header/RangesPickingOptionPanel.d.ts +1 -2
- package/lib/component/header/ZeroFillingOptionsPanel.d.ts +1 -2
- package/lib/component/header/Zones2DOptionPanel.d.ts +1 -2
- package/lib/component/highlight/index.d.ts +1 -1
- package/lib/component/hooks/useSaveSettings.d.ts +1 -2
- package/lib/component/loader/NoData.d.ts +1 -1
- package/lib/component/loader/Spinner.d.ts +1 -1
- package/lib/component/loader/SpinnerContext.d.ts +1 -1
- package/lib/component/modal/AboutPredictionModal.d.ts +2 -0
- package/lib/component/modal/AboutPredictionModal.js +49 -0
- package/lib/component/modal/ExportAsJcampModal.d.ts +1 -2
- package/lib/component/modal/MultipletAnalysisModal.js +6 -1
- package/lib/component/modal/editRange/EditRangeModal.js +3 -2
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +1 -1
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +2 -1
- package/lib/component/modal/editRange/forms/components/DeltaInput.d.ts +1 -2
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +1 -1
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.d.ts +1 -2
- package/lib/component/modal/editRange/forms/components/SignalFormTab.d.ts +1 -1
- package/lib/component/modal/editZone/SignalFormTab.d.ts +1 -2
- package/lib/component/modal/setting/WorkspaceItem.d.ts +1 -2
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +1 -2
- package/lib/component/modal/setting/settings-tabs/DisplayTabContent.d.ts +1 -2
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.d.ts +1 -2
- package/lib/component/modal/setting/settings-tabs/ImportationFiltersTabContent.d.ts +1 -2
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.d.ts +1 -2
- package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.d.ts +1 -2
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.d.ts +1 -2
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +1 -1
- package/lib/component/panels/InformationPanel.d.ts +1 -2
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +17 -13
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.d.ts +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +3 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.d.ts +1 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisCell.d.ts +1 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.d.ts +1 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.d.ts +1 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.d.ts +1 -2
- package/lib/component/panels/PanelNoData.d.ts +1 -2
- package/lib/component/panels/Panels.d.ts +1 -2
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +0 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +0 -11
- package/lib/component/panels/RangesPanel/TableColumns/AbsoluteColumn.d.ts +1 -2
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.d.ts +1 -2
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/RangeColumn.d.ts +1 -2
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.d.ts +1 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.d.ts +1 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +1 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib/component/panels/SpectrumsPanel/SpectraTable.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/SpectrumName.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.d.ts +1 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.d.ts +1 -2
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +3 -12
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +2 -4
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -16
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +1 -6
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +1 -2
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +2 -3
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +1 -6
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +2 -22
- package/lib/component/panels/extra/placeholder/NoTableData.d.ts +1 -2
- package/lib/component/panels/extra/preferences/NucleusGroup.d.ts +1 -1
- package/lib/component/panels/extra/preferences/NucleusPreferences.d.ts +1 -2
- package/lib/component/panels/extra/preferences/PreferencesContainer.d.ts +1 -1
- package/lib/component/panels/extra/preferences/PreferencesGroup.d.ts +1 -1
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.d.ts +2 -5
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +3 -29
- package/lib/component/panels/filtersPanel/FiltersTable.d.ts +1 -2
- package/lib/component/panels/header/SpectraAutomaticPickingButton.d.ts +1 -2
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +1 -2
- package/lib/component/panels/predictionPanel/PredictionPanel.js +6 -1
- package/lib/component/reducer/actions/LoadActions.js +14 -6
- package/lib/component/reducer/actions/MoleculeActions.js +26 -2
- package/lib/component/reducer/actions/PreferencesActions.js +17 -4
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib/component/toolbar/BasicToolBar.d.ts +1 -2
- package/lib/component/toolbar/FunctionToolBar.d.ts +1 -2
- package/lib/component/toolbar/HistoryToolBar.d.ts +1 -1
- package/lib/component/toolbar/ToolBar.d.ts +1 -2
- package/lib/component/workspaces/Workspace.d.ts +2 -1
- package/lib/component/workspaces/exercise.js +31 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib/data/constants/Multiplets.js +6 -13
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +41 -18
- package/lib/data/data1d/filter1d/fft.js +5 -7
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +2 -2
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Spectrum2D/contours.d.ts +1 -4
- package/lib/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -2
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +12 -0
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +1 -0
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +9 -4
- package/lib/data/utilities/ZoneUtilities.js +0 -1
- package/lib/types/NMRiumGeneralPreferences.d.ts +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +2 -1
- package/lib-cjs/component/2d/ft/Contours.js +0 -6
- package/lib-cjs/component/NMRium.js +4 -5
- package/lib-cjs/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +15 -2
- package/lib-cjs/component/header/Header.js +1 -1
- package/lib-cjs/component/modal/AboutPredictionModal.js +54 -0
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +6 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +5 -4
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +2 -1
- package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +2 -2
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +17 -13
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -4
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +3 -2
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +0 -12
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -22
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +1 -21
- package/lib-cjs/component/panels/extra/utilities/MultiplicityUtilities.js +5 -34
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +6 -1
- package/lib-cjs/component/reducer/actions/LoadActions.js +14 -6
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +25 -1
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +17 -4
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib-cjs/component/workspaces/exercise.js +31 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib-cjs/data/constants/Multiplets.js +6 -13
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +40 -17
- package/lib-cjs/data/data1d/filter1d/fft.js +5 -7
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +1 -2
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZonesManual.js +12 -0
- package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +9 -4
- package/lib-cjs/data/utilities/ZoneUtilities.js +0 -1
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +33 -33
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +0 -4
|
@@ -1,47 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
3
|
+
exports.hasCouplingConstant = exports.getPascal = exports.getMultiplicityNumber = void 0;
|
|
4
|
+
const nmr_processing_1 = require("nmr-processing");
|
|
5
5
|
function getMultiplicityNumber(string) {
|
|
6
|
-
const multiplet =
|
|
6
|
+
const multiplet = (0, nmr_processing_1.findMultiplet)(string);
|
|
7
7
|
return multiplet ? multiplet.multiplicity : null;
|
|
8
8
|
}
|
|
9
9
|
exports.getMultiplicityNumber = getMultiplicityNumber;
|
|
10
|
-
function checkMultiplet(multiplet, rejected = []) {
|
|
11
|
-
// options to determine whether a massive (m), for example, should be considered as rejected multiplet
|
|
12
|
-
if (multiplet === undefined || multiplet.length === 0) {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
const _multiplet = Multiplets_1.Multiplets.find((m) => m.value === multiplet || m.label === multiplet);
|
|
16
|
-
return (_multiplet &&
|
|
17
|
-
!rejected.includes(_multiplet.value) &&
|
|
18
|
-
!rejected.includes(_multiplet.label));
|
|
19
|
-
}
|
|
20
|
-
exports.checkMultiplet = checkMultiplet;
|
|
21
|
-
function checkMultiplicity(multiplicity, rejected = []) {
|
|
22
|
-
// options to determine whether a massive (m), for example, should be considered as rejected multiplicity
|
|
23
|
-
if (multiplicity === undefined || multiplicity.length === 0) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
const isBroad = multiplicity.match(/(?<broad>br s)/);
|
|
27
|
-
return (isBroad ||
|
|
28
|
-
multiplicity
|
|
29
|
-
.split('')
|
|
30
|
-
.every((_multiplet) => checkMultiplet(_multiplet, rejected)));
|
|
31
|
-
}
|
|
32
|
-
exports.checkMultiplicity = checkMultiplicity;
|
|
33
|
-
function translateMultiplet(multiplet) {
|
|
34
|
-
return multiplet.length === 1
|
|
35
|
-
? Multiplets_1.Multiplets.find((_multiplet) => _multiplet.value === multiplet)?.label
|
|
36
|
-
: Multiplets_1.Multiplets.find((_multiplet) => _multiplet.label === multiplet)?.value;
|
|
37
|
-
}
|
|
38
|
-
exports.translateMultiplet = translateMultiplet;
|
|
39
10
|
function hasCouplingConstant(multiplet) {
|
|
40
11
|
if (multiplet.length > 1) {
|
|
41
|
-
multiplet = translateMultiplet(multiplet);
|
|
12
|
+
multiplet = (0, nmr_processing_1.translateMultiplet)(multiplet);
|
|
42
13
|
}
|
|
43
14
|
// with the pre-set rejected ones, we check the given multiplicity for the need of having a coupling constant (massive and singlet do not)
|
|
44
|
-
return checkMultiplicity(multiplet, ['m', 's']);
|
|
15
|
+
return (0, nmr_processing_1.checkMultiplicity)(multiplet, ['m', 's']);
|
|
45
16
|
}
|
|
46
17
|
exports.hasCouplingConstant = hasCouplingConstant;
|
|
47
18
|
function getPascal(n, spin) {
|
|
@@ -43,7 +43,12 @@ function PredictionPane() {
|
|
|
43
43
|
}
|
|
44
44
|
})();
|
|
45
45
|
};
|
|
46
|
-
return ((0, jsx_runtime_1.jsx)(MoleculePanel_1.default, { onMoleculeChange: changeHandler, actionsOptions: {
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(MoleculePanel_1.default, { onMoleculeChange: changeHandler, actionsOptions: {
|
|
47
|
+
hidePredict: true,
|
|
48
|
+
hideDelete: true,
|
|
49
|
+
hideExport: true,
|
|
50
|
+
showAboutPredict: true,
|
|
51
|
+
}, emptyTextStyle: {
|
|
47
52
|
padding: '0.25rem 0.5rem',
|
|
48
53
|
borderRadius: '0.2rem',
|
|
49
54
|
backgroundColor: '#2dd36f',
|
|
@@ -78,11 +78,12 @@ function initSpectra(inputSpectra, options) {
|
|
|
78
78
|
return spectra;
|
|
79
79
|
}
|
|
80
80
|
exports.initSpectra = initSpectra;
|
|
81
|
-
function setData(draft, input) {
|
|
81
|
+
function setData(draft, input, options = {}) {
|
|
82
82
|
const { data, usedColors, view, onLoadProcessing = {}, parseMetaFileResult = null, } = input || {
|
|
83
83
|
data: { spectra: [], molecules: [], correlations: {} },
|
|
84
84
|
multipleAnalysis: {},
|
|
85
85
|
};
|
|
86
|
+
const { autoOnLoadProcessing = true } = options;
|
|
86
87
|
const { source, spectra = [], molecules = [], correlations = {}, } = data || {};
|
|
87
88
|
if (view) {
|
|
88
89
|
const defaultViewState = (0, Reducer_1.getDefaultViewState)();
|
|
@@ -97,7 +98,10 @@ function setData(draft, input) {
|
|
|
97
98
|
});
|
|
98
99
|
}
|
|
99
100
|
draft.molecules = draft.molecules.concat(MoleculeManager.fromJSON(molecules, draft.molecules));
|
|
100
|
-
draft.data = draft.data.concat(initSpectra(spectra, {
|
|
101
|
+
draft.data = draft.data.concat(initSpectra(spectra, {
|
|
102
|
+
usedColors,
|
|
103
|
+
onLoadProcessing: autoOnLoadProcessing ? onLoadProcessing : {},
|
|
104
|
+
}));
|
|
101
105
|
setCorrelation(draft, correlations);
|
|
102
106
|
if (parseMetaFileResult) {
|
|
103
107
|
const { matches } = (0, linkMetaWithSpectra_1.linkMetaWithSpectra)({
|
|
@@ -139,11 +143,12 @@ function setPreferences(draft, data) {
|
|
|
139
143
|
(0, PreferencesActions_1.changeSpectrumVerticalAlignment)(draft, { verticalAlign: 'auto-check' });
|
|
140
144
|
}
|
|
141
145
|
}
|
|
142
|
-
function initData(draft, action,
|
|
146
|
+
function initData(draft, action, options = {}) {
|
|
147
|
+
const { forceInitialize = false, autoOnLoadProcessing = true } = options;
|
|
143
148
|
const { data, view } = action.payload;
|
|
144
149
|
if (data?.spectra?.length || forceInitialize) {
|
|
145
150
|
const state = (0, Reducer_1.getInitialState)();
|
|
146
|
-
setData(state, action.payload);
|
|
151
|
+
setData(state, action.payload, { autoOnLoadProcessing });
|
|
147
152
|
(0, ToolsActions_1.setActiveTab)(state, { tab: data?.view?.activeTab || '' });
|
|
148
153
|
state.width = draft.width;
|
|
149
154
|
state.height = draft.height;
|
|
@@ -162,14 +167,17 @@ function initData(draft, action, forceInitialize = false) {
|
|
|
162
167
|
}
|
|
163
168
|
}
|
|
164
169
|
function initiate(draft, action) {
|
|
165
|
-
return initData(draft, action,
|
|
170
|
+
return initData(draft, action, {
|
|
171
|
+
forceInitialize: true,
|
|
172
|
+
autoOnLoadProcessing: false,
|
|
173
|
+
});
|
|
166
174
|
}
|
|
167
175
|
exports.initiate = initiate;
|
|
168
176
|
function loadDropFiles(draft, action) {
|
|
169
177
|
const { payload, type } = action;
|
|
170
178
|
const { data: { spectra = [] }, containsNmrium = false, resetSourceObject = true, } = payload;
|
|
171
179
|
if (containsNmrium) {
|
|
172
|
-
return initData(draft, action);
|
|
180
|
+
return initData(draft, action, { autoOnLoadProcessing: false });
|
|
173
181
|
}
|
|
174
182
|
else {
|
|
175
183
|
setData(draft, payload);
|
|
@@ -115,10 +115,14 @@ exports.predictSpectraFromMoleculeHandler = predictSpectraFromMoleculeHandler;
|
|
|
115
115
|
function initMoleculeViewProperties(id, draft) {
|
|
116
116
|
// check if the molecule is exists in the view object otherwise add it with the default value
|
|
117
117
|
if (!draft.view.molecules[id]) {
|
|
118
|
+
const position = getFloatingMoleculeInitialPosition(id, draft);
|
|
118
119
|
draft.view.molecules[id] = {
|
|
119
120
|
floating: {
|
|
120
121
|
visible: false,
|
|
121
|
-
bounding:
|
|
122
|
+
bounding: {
|
|
123
|
+
...Molecule_1.DRAGGABLE_STRUCTURE_INITIAL_BOUNDING_REACT,
|
|
124
|
+
...position,
|
|
125
|
+
},
|
|
122
126
|
},
|
|
123
127
|
showAtomNumber: false,
|
|
124
128
|
};
|
|
@@ -127,6 +131,26 @@ function initMoleculeViewProperties(id, draft) {
|
|
|
127
131
|
function getMoleculeViewObject(id, draft) {
|
|
128
132
|
return draft.view.molecules[id] || null;
|
|
129
133
|
}
|
|
134
|
+
function getFloatingMoleculeInitialPosition(id, draft) {
|
|
135
|
+
const { view: { molecules }, width: displayerWidth, height: displayerHeight, } = draft;
|
|
136
|
+
const { top, left } = Constants_1.MARGIN['2D'];
|
|
137
|
+
const { width: baseWidth, height: baseHeight } = Molecule_1.DRAGGABLE_STRUCTURE_INITIAL_BOUNDING_REACT;
|
|
138
|
+
const width = displayerWidth - left;
|
|
139
|
+
const height = displayerHeight - top;
|
|
140
|
+
const columns = Math.floor(width / baseWidth);
|
|
141
|
+
const rows = Math.floor(height / baseHeight);
|
|
142
|
+
const moleculeKeys = Object.keys(molecules);
|
|
143
|
+
let index = 0;
|
|
144
|
+
if (!molecules[id]) {
|
|
145
|
+
index = moleculeKeys.length - 1;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
index = moleculeKeys.indexOf(id);
|
|
149
|
+
}
|
|
150
|
+
const x = ((index + 1) % columns) * (width / columns) + left;
|
|
151
|
+
const y = Math.floor(moleculeKeys.length / columns) * (height / rows) + top;
|
|
152
|
+
return { x, y };
|
|
153
|
+
}
|
|
130
154
|
function floatMoleculeOverSpectrum(draft, action) {
|
|
131
155
|
const { id } = action.payload;
|
|
132
156
|
initMoleculeViewProperties(id, draft);
|
|
@@ -24,11 +24,24 @@ function changeSpectrumVerticalAlignment(draft, options) {
|
|
|
24
24
|
if (isFid) {
|
|
25
25
|
draft.view.verticalAlign[nucleus] = 'center';
|
|
26
26
|
}
|
|
27
|
-
else if (dataPerNucleus.length > 1) {
|
|
28
|
-
draft.view.verticalAlign[nucleus] = 'stack';
|
|
29
|
-
}
|
|
30
27
|
else {
|
|
31
|
-
|
|
28
|
+
let hasMoreThanOnFt = false;
|
|
29
|
+
let count = 1;
|
|
30
|
+
for (const spectrum of dataPerNucleus) {
|
|
31
|
+
if (count > 1) {
|
|
32
|
+
hasMoreThanOnFt = true;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
if (spectrum.info.isFt) {
|
|
36
|
+
count++;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (hasMoreThanOnFt) {
|
|
40
|
+
draft.view.verticalAlign[nucleus] = 'stack';
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
draft.view.verticalAlign[nucleus] = 'bottom';
|
|
44
|
+
}
|
|
32
45
|
}
|
|
33
46
|
}
|
|
34
47
|
else {
|
|
@@ -7,6 +7,7 @@ exports.exercise = {
|
|
|
7
7
|
display: {
|
|
8
8
|
general: {
|
|
9
9
|
hideGeneralSettings: true,
|
|
10
|
+
hideLogs: true,
|
|
10
11
|
},
|
|
11
12
|
panels: {
|
|
12
13
|
spectraPanel: { display: true, open: true },
|
|
@@ -26,4 +27,34 @@ exports.exercise = {
|
|
|
26
27
|
spectraStackAlignments: true,
|
|
27
28
|
},
|
|
28
29
|
},
|
|
30
|
+
general: {
|
|
31
|
+
dimmedSpectraOpacity: 0.1,
|
|
32
|
+
verticalSplitterPosition: '440px',
|
|
33
|
+
verticalSplitterCloseThreshold: 600,
|
|
34
|
+
spectraRendering: 'auto',
|
|
35
|
+
loggingLevel: 'info',
|
|
36
|
+
},
|
|
37
|
+
formatting: {
|
|
38
|
+
nuclei: {},
|
|
39
|
+
panels: {
|
|
40
|
+
integrals: {
|
|
41
|
+
nuclei: {
|
|
42
|
+
'1H': {
|
|
43
|
+
relative: { show: true, format: '0.00' },
|
|
44
|
+
absolute: { show: false, format: '0.00' },
|
|
45
|
+
color: 'black',
|
|
46
|
+
strokeWidth: 1,
|
|
47
|
+
showKind: false,
|
|
48
|
+
},
|
|
49
|
+
'13C': {
|
|
50
|
+
relative: { show: true, format: '0.00' },
|
|
51
|
+
absolute: { show: false, format: '0.00' },
|
|
52
|
+
color: 'black',
|
|
53
|
+
strokeWidth: 1,
|
|
54
|
+
showKind: false,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
29
60
|
};
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Multiplets = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{ label: 'quartet (q)', value: 'q', multiplicity: 4 },
|
|
11
|
-
{ label: 'quintet (i)', value: 'i', multiplicity: 5 },
|
|
12
|
-
{ label: 'sextet (x)', value: 'x', multiplicity: 6 },
|
|
13
|
-
{ label: 'septet (p)', value: 'p', multiplicity: 7 },
|
|
14
|
-
{ label: 'octet (o)', value: 'o', multiplicity: 8 },
|
|
15
|
-
{ label: 'nonet (n)', value: 'n', multiplicity: 9 },
|
|
16
|
-
];
|
|
4
|
+
const nmr_processing_1 = require("nmr-processing");
|
|
5
|
+
exports.Multiplets = nmr_processing_1.MultiplicityPatterns.map(({ label, value, acs, multiplicity }) => ({
|
|
6
|
+
label: `${label}`,
|
|
7
|
+
value: acs || value,
|
|
8
|
+
multiplicity,
|
|
9
|
+
}));
|
|
@@ -34,7 +34,7 @@ const initiatePeaks_1 = require("./peaks/initiatePeaks");
|
|
|
34
34
|
const initiateRanges_1 = require("./ranges/initiateRanges");
|
|
35
35
|
function initiateDatum1D(spectrum, options = {}) {
|
|
36
36
|
const { usedColors = {}, filters = [] } = options;
|
|
37
|
-
const spectrumObj = {};
|
|
37
|
+
const spectrumObj = { ...spectrum };
|
|
38
38
|
spectrumObj.id = spectrum.id || (0, uuid_1.v4)();
|
|
39
39
|
spectrumObj.display = {
|
|
40
40
|
isVisible: true,
|
|
@@ -14,37 +14,60 @@ function detectSignal(data, options) {
|
|
|
14
14
|
});
|
|
15
15
|
if (!checkMaxLength ||
|
|
16
16
|
(checkMaxLength && toIndex - fromIndex <= exports.MAX_LENGTH)) {
|
|
17
|
-
const
|
|
17
|
+
const dataRoi = {
|
|
18
18
|
x: x.slice(fromIndex, toIndex),
|
|
19
19
|
y: re.slice(fromIndex, toIndex),
|
|
20
20
|
};
|
|
21
|
-
const result = (0, multiplet_analysis_1.analyseMultiplet)(
|
|
21
|
+
const result = (0, multiplet_analysis_1.analyseMultiplet)(dataRoi, {
|
|
22
22
|
frequency,
|
|
23
|
+
minimalResolution: 0.3,
|
|
24
|
+
maxTestedJ: 17,
|
|
25
|
+
checkSymmetryFirst: true,
|
|
23
26
|
takeBestPartMultiplet: true,
|
|
24
|
-
|
|
27
|
+
correctVerticalOffset: true,
|
|
28
|
+
symmetrizeEachStep: false,
|
|
29
|
+
decreasingJvalues: true,
|
|
30
|
+
makeShortCutForSpeed: true,
|
|
25
31
|
});
|
|
26
32
|
if (result && result.chemShift === undefined)
|
|
27
33
|
return;
|
|
28
|
-
const
|
|
29
|
-
|
|
34
|
+
const { delta, js } = joinCouplings(result);
|
|
35
|
+
let cs = 0;
|
|
36
|
+
let area = 0;
|
|
37
|
+
for (let i = 0; i < dataRoi.x.length; i++) {
|
|
38
|
+
cs += dataRoi.x[i] * dataRoi.y[i];
|
|
39
|
+
area += dataRoi.y[i];
|
|
40
|
+
}
|
|
41
|
+
cs /= area;
|
|
42
|
+
const peakList = js.length === 0 ? (0, nmr_processing_1.xyAutoPeaksPicking)(dataRoi, { frequency }) : [];
|
|
43
|
+
return {
|
|
44
|
+
multiplicity: js.length > 0
|
|
45
|
+
? js.map((j) => j.multiplicity).join('')
|
|
46
|
+
: Math.abs(cs - delta) / cs < 1e-3
|
|
47
|
+
? peakList.length === 1
|
|
48
|
+
? 's'
|
|
49
|
+
: 'm'
|
|
50
|
+
: 'm',
|
|
30
51
|
kind: 'signal',
|
|
31
|
-
delta:
|
|
32
|
-
js
|
|
52
|
+
delta: cs,
|
|
53
|
+
js,
|
|
33
54
|
diaIDs: [],
|
|
34
55
|
};
|
|
35
|
-
if (result.js.length === 0) {
|
|
36
|
-
const { x: xData } = data;
|
|
37
|
-
const { chemShift: delta } = result;
|
|
38
|
-
const peakList = (0, nmr_processing_1.xyAutoPeaksPicking)(data, { frequency });
|
|
39
|
-
const deltaX = xData[0] - xData[1];
|
|
40
|
-
const peaks = peakList.filter((peak) => peak.x < delta - deltaX && peak.x > delta + deltaX);
|
|
41
|
-
if (peaks.length === 1)
|
|
42
|
-
signal.multiplicity = 's';
|
|
43
|
-
}
|
|
44
|
-
return signal;
|
|
45
56
|
}
|
|
46
57
|
else {
|
|
47
58
|
throw new Error(`length of signal should not exceed ${exports.MAX_LENGTH} points`);
|
|
48
59
|
}
|
|
49
60
|
}
|
|
50
61
|
exports.default = detectSignal;
|
|
62
|
+
function joinCouplings(result) {
|
|
63
|
+
const { chemShift: delta, js } = result;
|
|
64
|
+
return {
|
|
65
|
+
delta,
|
|
66
|
+
js: js.length > 1
|
|
67
|
+
? (0, nmr_processing_1.signalJoinCouplings)({
|
|
68
|
+
delta,
|
|
69
|
+
js,
|
|
70
|
+
}, { tolerance: 0.6, ignoreDiaIDs: true }).js
|
|
71
|
+
: js,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -19,7 +19,7 @@ function apply(spectrum) {
|
|
|
19
19
|
}
|
|
20
20
|
checkSameLength(spectrum);
|
|
21
21
|
let digitalFilterApplied = spectrum.filters.some((e) => e.name === 'digitalFilter' && e.flag);
|
|
22
|
-
const {
|
|
22
|
+
const { info: { aqMod }, } = spectrum;
|
|
23
23
|
if (aqMod === 1) {
|
|
24
24
|
removeDCOffset(spectrum, digitalFilterApplied);
|
|
25
25
|
}
|
|
@@ -27,18 +27,16 @@ function apply(spectrum) {
|
|
|
27
27
|
(0, padDataToNextPowerOfTwo_1.padDataToNextPowerOfTwo)(spectrum, digitalFilterApplied);
|
|
28
28
|
}
|
|
29
29
|
const { data, info } = spectrum;
|
|
30
|
-
Object.assign(data, (0, ml_spectra_processing_1.reimFFT)(
|
|
30
|
+
Object.assign(data, (0, ml_spectra_processing_1.reimFFT)({
|
|
31
|
+
re: data.re,
|
|
32
|
+
im: data.im,
|
|
33
|
+
}, { applyZeroShift: true }));
|
|
31
34
|
if (digitalFilterApplied) {
|
|
32
35
|
let { digitalFilter = 0 } = info;
|
|
33
36
|
let ph1 = (digitalFilter - Math.floor(digitalFilter)) * Math.PI * 2;
|
|
34
37
|
Object.assign(data, (0, ml_spectra_processing_1.reimPhaseCorrection)(data, 0, -ph1, { reverse: true }));
|
|
35
38
|
}
|
|
36
39
|
data.x = generateXAxis(spectrum);
|
|
37
|
-
if (info?.reverse?.[0]) {
|
|
38
|
-
data.re.reverse();
|
|
39
|
-
data.im.reverse();
|
|
40
|
-
}
|
|
41
|
-
// Object.assign(datum1D.data, data);
|
|
42
40
|
spectrum.info = { ...info, isFid: false, isFt: true };
|
|
43
41
|
}
|
|
44
42
|
exports.apply = apply;
|
|
@@ -8,8 +8,8 @@ function padDataToNextPowerOfTwo(spectrum, digitalFilterApplied) {
|
|
|
8
8
|
let newRE = new Float64Array(size);
|
|
9
9
|
let newIM = new Float64Array(size);
|
|
10
10
|
const pointsToShift = getPointsToShift(spectrum);
|
|
11
|
-
newRE.set(re.slice(0,
|
|
12
|
-
newIM.set(im.slice(0,
|
|
11
|
+
newRE.set(re.slice(0, size - pointsToShift));
|
|
12
|
+
newIM.set(im.slice(0, size - pointsToShift));
|
|
13
13
|
if (pointsToShift > 0 && digitalFilterApplied) {
|
|
14
14
|
newRE.set(re.slice(re.length - pointsToShift), size - pointsToShift);
|
|
15
15
|
newIM.set(im.slice(re.length - pointsToShift), size - pointsToShift);
|
|
@@ -122,7 +122,6 @@ function getContours(zoomLevel, options) {
|
|
|
122
122
|
const { negative = false, timeout = 2000, nbLevels, data } = options;
|
|
123
123
|
const xs = getRange(data.minX, data.maxX, data.z[0].length);
|
|
124
124
|
const ys = getRange(data.minY, data.maxY, data.z.length);
|
|
125
|
-
// @ts-expect-error refactor Conrect class to accept Float32Array Array instead of an array of number
|
|
126
125
|
const conrec = new ml_conrec_1.Conrec(data.z, { xs, ys, swapAxes: false });
|
|
127
126
|
const sanResult = (0, calculateSanPlot_1.calculateSanPlot)('2D', data);
|
|
128
127
|
const median = sanResult.positive;
|
|
@@ -31,9 +31,8 @@ const get2DColor_1 = require("./get2DColor");
|
|
|
31
31
|
const initiateZones_1 = require("./zones/initiateZones");
|
|
32
32
|
const defaultMinMax = { z: [], minX: 0, minY: 0, maxX: 0, maxY: 0 };
|
|
33
33
|
function initiateDatum2D(spectrum, usedColors = {}) {
|
|
34
|
-
const datum = {};
|
|
34
|
+
const datum = { ...spectrum };
|
|
35
35
|
datum.id = spectrum.id || (0, uuid_1.v4)();
|
|
36
|
-
datum.selector = spectrum?.selector || {};
|
|
37
36
|
datum.display = {
|
|
38
37
|
isPositiveVisible: true,
|
|
39
38
|
isNegativeVisible: true,
|
|
@@ -15,7 +15,19 @@ const mapZones_1 = require("./mapZones");
|
|
|
15
15
|
* @param {boolean} options.convolutionByFFT
|
|
16
16
|
*/
|
|
17
17
|
function detectZonesManual(datum, options) {
|
|
18
|
+
const { spectralWidth, originFrequency } = datum.info;
|
|
19
|
+
options.tolerances = spectralWidth.map((sw, i) => sw * originFrequency[i]);
|
|
18
20
|
const zones = (0, getDetectionZones_1.getDetectionZones)(datum, options);
|
|
21
|
+
let { fromX, fromY, toX, toY } = options.selectedZone;
|
|
22
|
+
if (fromX > toX)
|
|
23
|
+
[fromX, toX] = [toX, fromX];
|
|
24
|
+
if (fromX > toX)
|
|
25
|
+
[fromY, toY] = [toY, fromY];
|
|
26
|
+
zones[0] = {
|
|
27
|
+
...zones[0],
|
|
28
|
+
x: { from: fromX, to: toX },
|
|
29
|
+
y: { from: fromY, to: toY },
|
|
30
|
+
};
|
|
19
31
|
return (0, mapZones_1.mapZones)(zones, datum);
|
|
20
32
|
}
|
|
21
33
|
exports.detectZonesManual = detectZonesManual;
|
|
@@ -15,21 +15,26 @@ const nmr_processing_1 = require("nmr-processing");
|
|
|
15
15
|
*/
|
|
16
16
|
function getDetectionZones(spectrum, options) {
|
|
17
17
|
let dataMatrix = {};
|
|
18
|
-
|
|
18
|
+
const { selectedZone } = options;
|
|
19
|
+
if (selectedZone) {
|
|
19
20
|
options.enhanceSymmetry = false;
|
|
20
|
-
dataMatrix = getSubMatrix(spectrum,
|
|
21
|
+
dataMatrix = getSubMatrix(spectrum, selectedZone);
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
23
24
|
dataMatrix = spectrum.data;
|
|
24
25
|
}
|
|
25
|
-
return autoZonesDetection(dataMatrix, {
|
|
26
|
+
return autoZonesDetection(dataMatrix, {
|
|
27
|
+
...options,
|
|
28
|
+
info: spectrum.info,
|
|
29
|
+
});
|
|
26
30
|
}
|
|
27
31
|
exports.getDetectionZones = getDetectionZones;
|
|
28
32
|
function autoZonesDetection(data, options) {
|
|
29
|
-
const {
|
|
33
|
+
const { clean, tolerances, thresholdFactor, maxPercentCutOff, convolutionByFFT, info: { nucleus: nuclei, originFrequency }, } = options;
|
|
30
34
|
const { enhanceSymmetry = nuclei[0] === nuclei[1] } = options;
|
|
31
35
|
let zones = (0, nmr_processing_1.xyzAutoZonesPicking)(data, {
|
|
32
36
|
nuclei,
|
|
37
|
+
tolerances,
|
|
33
38
|
observedFrequencies: originFrequency,
|
|
34
39
|
thresholdFactor,
|
|
35
40
|
realTopDetection: true,
|
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.37.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib-cjs/component/NMRium.js",
|
|
7
7
|
"module": "lib/component/NMRium.js",
|
|
@@ -58,35 +58,35 @@
|
|
|
58
58
|
"react-dom": ">=18.0.0"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@emotion/react": "^11.
|
|
61
|
+
"@emotion/react": "^11.11.0",
|
|
62
62
|
"@lukeed/uuid": "^2.0.1",
|
|
63
|
-
"cheminfo-font": "^1.
|
|
64
|
-
"cheminfo-types": "^1.7.
|
|
63
|
+
"cheminfo-font": "^1.10.0",
|
|
64
|
+
"cheminfo-types": "^1.7.1",
|
|
65
65
|
"clipboard-polyfill": "^4.0.0",
|
|
66
|
-
"convert-to-jcamp": "^5.4.
|
|
66
|
+
"convert-to-jcamp": "^5.4.6",
|
|
67
67
|
"d3": "^7.8.4",
|
|
68
|
-
"eventemitter3": "^5.0.
|
|
68
|
+
"eventemitter3": "^5.0.1",
|
|
69
69
|
"fifo-logger": "^0.6.1",
|
|
70
70
|
"file-saver": "^2.0.5",
|
|
71
|
-
"filelist-utils": "^1.
|
|
71
|
+
"filelist-utils": "^1.9.0",
|
|
72
72
|
"formik": "^2.2.9",
|
|
73
|
-
"immer": "^10.0.
|
|
73
|
+
"immer": "^10.0.2",
|
|
74
74
|
"jszip": "^3.10.1",
|
|
75
75
|
"lodash": "^4.17.21",
|
|
76
|
-
"ml-airpls": "^1.0.
|
|
76
|
+
"ml-airpls": "^1.0.2",
|
|
77
77
|
"ml-array-max": "^1.2.4",
|
|
78
78
|
"ml-array-mean": "^1.1.6",
|
|
79
79
|
"ml-array-median": "^1.1.6",
|
|
80
80
|
"ml-array-xy-equally-spaced": "^1.2.1",
|
|
81
|
-
"ml-baseline-correction-regression": "^1.0.
|
|
82
|
-
"ml-conrec": "^
|
|
81
|
+
"ml-baseline-correction-regression": "^1.0.2",
|
|
82
|
+
"ml-conrec": "^5.0.2",
|
|
83
83
|
"ml-gsd": "^12.1.3",
|
|
84
|
-
"ml-spectra-processing": "^12.
|
|
84
|
+
"ml-spectra-processing": "^12.4.0",
|
|
85
85
|
"ml-stat": "^1.3.3",
|
|
86
|
-
"multiplet-analysis": "^2.
|
|
86
|
+
"multiplet-analysis": "^2.1.1",
|
|
87
87
|
"nmr-correlation": "^2.3.3",
|
|
88
|
-
"nmr-load-save": "^0.11.
|
|
89
|
-
"nmr-processing": "^9.
|
|
88
|
+
"nmr-load-save": "^0.11.5",
|
|
89
|
+
"nmr-processing": "^9.5.0",
|
|
90
90
|
"nmredata": "^0.9.2",
|
|
91
91
|
"numeral": "^2.0.6",
|
|
92
92
|
"openchemlib": "^8.3.0",
|
|
@@ -103,46 +103,46 @@
|
|
|
103
103
|
"react-ocl-nmr": "^2.0.0",
|
|
104
104
|
"react-plot": "^1.4.2",
|
|
105
105
|
"react-rnd": "^10.4.1",
|
|
106
|
-
"react-science": "^0.22.
|
|
106
|
+
"react-science": "^0.22.1",
|
|
107
107
|
"react-slider": "^2.0.4",
|
|
108
108
|
"react-table": "^7.8.0",
|
|
109
109
|
"react-transition-group": "^4.4.5",
|
|
110
110
|
"react-use": "^17.4.0",
|
|
111
111
|
"smart-array-filter": "^4.0.2",
|
|
112
|
-
"yup": "^1.
|
|
112
|
+
"yup": "^1.2.0"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@babel/plugin-transform-modules-commonjs": "^7.21.
|
|
115
|
+
"@babel/plugin-transform-modules-commonjs": "^7.21.5",
|
|
116
116
|
"@babel/preset-react": "^7.18.6",
|
|
117
|
-
"@babel/preset-typescript": "^7.21.
|
|
118
|
-
"@playwright/test": "^1.
|
|
117
|
+
"@babel/preset-typescript": "^7.21.5",
|
|
118
|
+
"@playwright/test": "^1.34.3",
|
|
119
119
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
120
120
|
"@types/d3": "^7.4.0",
|
|
121
|
-
"@types/node": "^
|
|
121
|
+
"@types/node": "^20.2.4",
|
|
122
122
|
"@types/papaparse": "^5.3.7",
|
|
123
|
-
"@types/react": "^18.2.
|
|
124
|
-
"@types/react-dom": "^18.2.
|
|
123
|
+
"@types/react": "^18.2.7",
|
|
124
|
+
"@types/react-dom": "^18.2.4",
|
|
125
125
|
"@types/react-table": "^7.7.14",
|
|
126
|
-
"@vitejs/plugin-react-swc": "^3.3.
|
|
127
|
-
"@vitest/coverage-c8": "^0.
|
|
126
|
+
"@vitejs/plugin-react-swc": "^3.3.1",
|
|
127
|
+
"@vitest/coverage-c8": "^0.31.1",
|
|
128
128
|
"cross-env": "^7.0.3",
|
|
129
129
|
"cspell": "^6.31.1",
|
|
130
|
-
"eslint": "^8.
|
|
130
|
+
"eslint": "^8.41.0",
|
|
131
131
|
"eslint-config-zakodium": "^7.2.0",
|
|
132
|
-
"modern-normalize": "^
|
|
132
|
+
"modern-normalize": "^2.0.0",
|
|
133
133
|
"postcss-styled-syntax": "^0.4.0",
|
|
134
134
|
"prettier": "^2.8.8",
|
|
135
|
-
"rc-menu": "^9.
|
|
135
|
+
"rc-menu": "^9.9.2",
|
|
136
136
|
"react": "^18.2.0",
|
|
137
137
|
"react-dom": "^18.2.0",
|
|
138
|
-
"react-router-dom": "^6.
|
|
139
|
-
"rimraf": "^5.0.
|
|
138
|
+
"react-router-dom": "^6.11.2",
|
|
139
|
+
"rimraf": "^5.0.1",
|
|
140
140
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
141
141
|
"serve": "^14.2.0",
|
|
142
|
-
"stylelint": "^15.6.
|
|
142
|
+
"stylelint": "^15.6.2",
|
|
143
143
|
"stylelint-config-standard": "^33.0.0",
|
|
144
144
|
"typescript": "~5.0.4",
|
|
145
|
-
"vite": "^4.3.
|
|
146
|
-
"vitest": "^0.
|
|
145
|
+
"vite": "^4.3.8",
|
|
146
|
+
"vitest": "^0.31.1"
|
|
147
147
|
}
|
|
148
148
|
}
|