nmrium 0.38.0 → 0.38.2
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.js +27 -4
- package/lib/component/1d/ExclusionZoneAnnotation.js +1 -1
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib/component/1d/FooterBanner.js +5 -5
- package/lib/component/1d/SpectraLegends.js +2 -3
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib/component/1d/integral/Integral.d.ts +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/StringNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/buildTreeNode.d.ts +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +2 -1
- package/lib/component/1d/ranges/Range.d.ts +1 -1
- package/lib/component/1d/tool/PeakPointer.js +6 -6
- package/lib/component/1d/tool/XLabelPointer.js +5 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -1
- package/lib/component/1d-2d/tools/BrushX.js +2 -3
- package/lib/component/1d-2d/tools/BrushXY.js +2 -3
- package/lib/component/1d-2d/tools/CrossLinePointer.js +4 -5
- package/lib/component/2d/Chart2D.js +4 -4
- package/lib/component/2d/FooterBanner.js +5 -5
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +5 -5
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/Zone.d.ts +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +20 -12
- package/lib/component/EventsTrackers/BrushTracker.js +35 -22
- package/lib/component/EventsTrackers/MouseTracker.d.ts +6 -2
- package/lib/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib/component/NMRium.d.ts +4 -5
- package/lib/component/NMRium.js +11 -14
- package/lib/component/assignment/AssignmentsReducer.d.ts +2 -2
- package/lib/component/context/PreferencesContext.d.ts +6 -6
- package/lib/component/elements/Button.d.ts +13 -11
- package/lib/component/elements/Button.js +16 -25
- package/lib/component/elements/ColorInput.d.ts +0 -1
- package/lib/component/elements/ColorInput.js +2 -2
- package/lib/component/elements/EditableColumn.js +5 -2
- package/lib/component/elements/Input.js +2 -4
- package/lib/component/elements/Label.d.ts +1 -0
- package/lib/component/elements/Label.js +2 -2
- package/lib/component/elements/MolecularFormulaInput.d.ts +2 -2
- package/lib/component/elements/MolecularFormulaInput.js +15 -18
- package/lib/component/elements/NextPrev.d.ts +5 -3
- package/lib/component/elements/NextPrev.js +26 -8
- package/lib/component/elements/NumberInput.js +2 -2
- package/lib/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib/component/elements/formik/FormikCheckBox.d.ts +2 -1
- package/lib/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +4 -0
- package/lib/component/elements/formik/FormikColumnFormatField.js +19 -16
- package/lib/component/elements/formik/FormikInput.js +10 -6
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/header/ApodizationOptionsPanel.js +4 -3
- package/lib/component/header/AutoPeakPickingOptionPanel.js +16 -7
- package/lib/component/header/BaseLineCorrectionPanel.js +5 -2
- package/lib/component/header/PhaseCorrectionPanel.js +5 -2
- package/lib/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/highlight/index.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectra.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrum.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.d.ts +1 -1
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.d.ts +2 -0
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.js +17 -0
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +2 -2
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +3 -2
- package/lib/component/hooks/useExport.js +1 -1
- package/lib/component/hooks/useFilter.d.ts +2 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
- package/lib/component/hooks/usePanelPreferences.js +4 -0
- package/lib/component/hooks/useSaveSettings.d.ts +1 -1
- package/lib/component/hooks/useSaveSettings.js +1 -1
- package/lib/component/hooks/useVerticalAlign.d.ts +1 -1
- package/lib/component/loader/DropZone.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.d.ts +2 -2
- package/lib/component/modal/LoadJCAMPModal.d.ts +3 -3
- package/lib/component/modal/LoadJCAMPModal.js +35 -66
- package/lib/component/modal/ModalStyle.js +0 -10
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +2 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib/component/modal/MultipletAnalysisModal.d.ts +2 -2
- package/lib/component/modal/PredictSpectraModal.d.ts +4 -2
- package/lib/component/modal/PredictSpectraModal.js +43 -105
- package/lib/component/modal/SaveAsModal.d.ts +2 -0
- package/lib/component/modal/SaveAsModal.js +21 -14
- package/lib/component/modal/changeSum/ChangeSumModal.js +25 -38
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +2 -2
- package/lib/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib/component/modal/setting/GeneralSettings.js +1 -6
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -15
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +1 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +20 -25
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +6 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +71 -81
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +39 -53
- package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +7 -22
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +11 -28
- package/lib/component/panels/databasePanel/DatabasePreferences.js +2 -2
- package/lib/component/panels/header/DefaultPanelHeader.d.ts +2 -3
- package/lib/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib/component/panels/header/PanelHeader.d.ts +7 -0
- package/lib/component/panels/header/PanelHeader.js +12 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.d.ts +9 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +94 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +107 -37
- package/lib/component/panels/predictionPanel/PredictionPreferences.d.ts +3 -0
- package/lib/component/panels/predictionPanel/PredictionPreferences.js +24 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.d.ts +2 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +44 -0
- package/lib/component/reducer/Reducer.d.ts +5 -87
- package/lib/component/reducer/Reducer.js +1 -25
- package/lib/component/reducer/actions/FiltersActions.d.ts +1 -2
- package/lib/component/reducer/actions/FiltersActions.js +47 -52
- package/lib/component/reducer/actions/HistoryActions.d.ts +4 -0
- package/lib/component/reducer/actions/HistoryActions.js +40 -0
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/LoadActions.d.ts +1 -2
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +7 -4
- package/lib/component/reducer/actions/MoleculeActions.js +57 -28
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -2
- package/lib/component/reducer/actions/PeaksActions.js +3 -3
- package/lib/component/reducer/actions/RangesActions.d.ts +4 -5
- package/lib/component/reducer/actions/RangesActions.js +5 -27
- package/lib/component/reducer/actions/SpectrumsActions.js +2 -2
- package/lib/component/reducer/actions/ToolsActions.d.ts +2 -2
- package/lib/component/reducer/actions/ZonesActions.d.ts +2 -1
- package/lib/component/reducer/actions/ZonesActions.js +1 -2
- package/lib/component/reducer/helper/getActiveSpectra.d.ts +1 -1
- package/lib/component/reducer/helper/getActiveSpectrum.d.ts +1 -1
- package/lib/component/reducer/helper/getVerticalAlign.d.ts +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getActiveWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.d.ts +2 -3
- package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +1 -1
- package/lib/component/toolbar/BasicToolBar.js +6 -11
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/ToolTypes.js +1 -1
- package/lib/component/workspaces/assignment.d.ts +1 -1
- package/lib/component/workspaces/basic.d.ts +1 -1
- package/lib/component/workspaces/embedded.d.ts +1 -1
- package/lib/component/workspaces/exercise.d.ts +1 -1
- package/lib/component/workspaces/index.d.ts +6 -6
- package/lib/component/workspaces/prediction.d.ts +1 -1
- package/lib/component/workspaces/prediction.js +193 -0
- package/lib/component/workspaces/process1D.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/PredictionManager.d.ts +2 -1
- package/lib/data/PredictionManager.js +16 -2
- package/lib/data/SpectraManager.d.ts +1 -2
- package/lib/data/constants/DefaultApodizationOptions.d.ts +2 -0
- package/lib/data/constants/DefaultApodizationOptions.js +5 -0
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/index.d.ts +1 -5
- package/lib/data/data1d/Spectrum1D/index.js +1 -5
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +5 -24
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +37 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +1 -1
- package/lib/data/data1d/database.js +2 -4
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +3 -30
- package/lib/data/data1d/multipleSpectraAnalysis.js +4 -15
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/getShift.js +1 -1
- package/lib/data/data2d/Spectrum2D/getSlice.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.d.ts +2 -1
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +3 -2
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/types/data1d/ComplexData1D.d.ts +2 -2
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/utilities/FindUtilities.d.ts +2 -1
- package/lib/data/utilities/RangeUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/calculateSanPlot.d.ts +2 -2
- package/lib/types/NMRiumDataReturn.d.ts +1 -3
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ApodizationLine.js +28 -5
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +3 -26
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +5 -28
- package/lib-cjs/component/1d/FooterBanner.js +2 -2
- package/lib-cjs/component/1d/SpectraLegends.js +1 -2
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib-cjs/component/1d/tool/PeakPointer.js +3 -3
- package/lib-cjs/component/1d/tool/XLabelPointer.js +2 -2
- package/lib-cjs/component/1d-2d/tools/BrushX.js +1 -2
- package/lib-cjs/component/1d-2d/tools/BrushXY.js +1 -2
- package/lib-cjs/component/1d-2d/tools/CrossLinePointer.js +2 -3
- package/lib-cjs/component/2d/Chart2D.js +4 -4
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +36 -22
- package/lib-cjs/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib-cjs/component/NMRium.js +8 -11
- package/lib-cjs/component/elements/Button.js +16 -25
- package/lib-cjs/component/elements/ColorInput.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +5 -2
- package/lib-cjs/component/elements/Input.js +2 -4
- package/lib-cjs/component/elements/Label.js +2 -2
- package/lib-cjs/component/elements/MolecularFormulaInput.js +14 -16
- package/lib-cjs/component/elements/NextPrev.js +26 -8
- package/lib-cjs/component/elements/NumberInput.js +2 -2
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +20 -16
- package/lib-cjs/component/elements/formik/FormikInput.js +10 -6
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +6 -5
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +15 -6
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +6 -3
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +6 -26
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +2 -25
- package/lib-cjs/component/hooks/useCheckPointsNumberInWindowArea.js +24 -0
- package/lib-cjs/component/hooks/useExport.js +1 -1
- package/lib-cjs/component/hooks/usePanelPreferences.js +4 -0
- package/lib-cjs/component/hooks/useSaveSettings.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +60 -67
- package/lib-cjs/component/modal/ModalStyle.js +0 -10
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib-cjs/component/modal/PredictSpectraModal.js +43 -126
- package/lib-cjs/component/modal/SaveAsModal.js +22 -14
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +24 -37
- package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib-cjs/component/modal/setting/GeneralSettings.js +1 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +6 -14
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +19 -24
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +76 -86
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +38 -52
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +5 -20
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +11 -28
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +25 -2
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib-cjs/component/panels/header/PanelHeader.js +15 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionOptionsPanel.js +122 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +107 -37
- package/lib-cjs/component/panels/predictionPanel/PredictionPreferences.js +29 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionSimpleOptions.js +72 -0
- package/lib-cjs/component/reducer/Reducer.js +2 -27
- package/lib-cjs/component/reducer/actions/FiltersActions.js +66 -94
- package/lib-cjs/component/reducer/actions/HistoryActions.js +45 -0
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +58 -32
- package/lib-cjs/component/reducer/actions/PeaksActions.js +3 -3
- package/lib-cjs/component/reducer/actions/RangesActions.js +7 -52
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +4 -27
- package/lib-cjs/component/reducer/actions/ZonesActions.js +4 -28
- package/lib-cjs/component/toolbar/BasicToolBar.js +5 -10
- package/lib-cjs/component/toolbar/ToolTypes.js +9 -32
- package/lib-cjs/component/workspaces/prediction.js +193 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +21 -44
- package/lib-cjs/data/PredictionManager.js +16 -2
- package/lib-cjs/data/constants/DefaultApodizationOptions.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/index.js +7 -11
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +9 -32
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +7 -26
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +3 -4
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib-cjs/data/data1d/database.js +2 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +5 -16
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +3 -26
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +2 -25
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +25 -25
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +0 -7
- package/lib/component/panels/predictionPanel/PredictionOptions.js +0 -74
- package/lib/component/workspaces/Workspace.d.ts +0 -188
- package/lib/component/workspaces/Workspace.js +0 -1
- package/lib/data/Filters.d.ts +0 -12
- package/lib/data/Filters.js +0 -12
- package/lib/data/FiltersManager.d.ts +0 -30
- package/lib/data/FiltersManager.js +0 -175
- package/lib/data/data1d/Spectrum1D/getShiftX.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.js +0 -6
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -4
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.d.ts +0 -7
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -9
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.d.ts +0 -12
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -36
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -6
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -5
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -26
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +0 -3
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -45
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -7
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +0 -4
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -78
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -9
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -5
- package/lib/data/data1d/filter1d/apodization.d.ts +0 -27
- package/lib/data/data1d/filter1d/apodization.js +0 -81
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +0 -33
- package/lib/data/data1d/filter1d/baselineCorrection.js +0 -51
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +0 -20
- package/lib/data/data1d/filter1d/digitalFilter.js +0 -44
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +0 -33
- package/lib/data/data1d/filter1d/equallySpaced.js +0 -52
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +0 -15
- package/lib/data/data1d/filter1d/exclusionZones.js +0 -32
- package/lib/data/data1d/filter1d/fft.d.ts +0 -18
- package/lib/data/data1d/filter1d/fft.js +0 -90
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +0 -26
- package/lib/data/data1d/filter1d/phaseCorrection.js +0 -64
- package/lib/data/data1d/filter1d/shiftX.d.ts +0 -20
- package/lib/data/data1d/filter1d/shiftX.js +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.d.ts +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.js +0 -65
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +0 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -35
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +0 -22
- package/lib/data/data1d/filter1d/zeroFilling.js +0 -60
- package/lib/data/data2d/filter2d/shiftX.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftX.js +0 -27
- package/lib/data/data2d/filter2d/shiftY.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftY.js +0 -27
- package/lib/data/types/view-state/PeaksViewState.d.ts +0 -17
- package/lib/data/types/view-state/PeaksViewState.js +0 -1
- package/lib/types/NMRiumGeneralPreferences.d.ts +0 -7
- package/lib/types/NMRiumGeneralPreferences.js +0 -1
- package/lib/types/NMRiumPanelPreferences.d.ts +0 -17
- package/lib/types/NMRiumPanelPreferences.js +0 -1
- package/lib/types/NMRiumToolBarPreferences.d.ts +0 -22
- package/lib/types/NMRiumToolBarPreferences.js +0 -1
- package/lib/types/PanelPreferencesType.d.ts +0 -4
- package/lib/types/PanelPreferencesType.js +0 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +0 -102
- package/lib-cjs/component/workspaces/Workspace.js +0 -2
- package/lib-cjs/data/Filters.js +0 -38
- package/lib-cjs/data/FiltersManager.js +0 -206
- package/lib-cjs/data/data1d/Spectrum1D/getShiftX.js +0 -33
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -8
- package/lib-cjs/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -40
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -10
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -30
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -49
- package/lib-cjs/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -11
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -82
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/filter1d/apodization.js +0 -88
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +0 -60
- package/lib-cjs/data/data1d/filter1d/digitalFilter.js +0 -50
- package/lib-cjs/data/data1d/filter1d/equallySpaced.js +0 -61
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +0 -38
- package/lib-cjs/data/data1d/filter1d/fft.js +0 -96
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +0 -70
- package/lib-cjs/data/data1d/filter1d/shiftX.js +0 -32
- package/lib-cjs/data/data1d/filter1d/signalProcessing.js +0 -95
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -39
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +0 -66
- package/lib-cjs/data/data2d/filter2d/shiftX.js +0 -33
- package/lib-cjs/data/data2d/filter2d/shiftY.js +0 -33
- package/lib-cjs/data/types/view-state/PeaksViewState.js +0 -2
- package/lib-cjs/types/NMRiumGeneralPreferences.js +0 -2
- package/lib-cjs/types/NMRiumPanelPreferences.js +0 -2
- package/lib-cjs/types/NMRiumToolBarPreferences.js +0 -2
- package/lib-cjs/types/PanelPreferencesType.js +0 -2
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
export const id = 'zeroFilling';
|
|
2
|
-
export const name = 'Zero filling';
|
|
3
|
-
export const DOMAIN_UPDATE_RULES = {
|
|
4
|
-
updateXDomain: true,
|
|
5
|
-
updateYDomain: false,
|
|
6
|
-
};
|
|
7
|
-
export function apply(spectrum, options) {
|
|
8
|
-
if (!isApplicable(spectrum)) {
|
|
9
|
-
throw new Error('zeroFilling not applicable on this data');
|
|
10
|
-
}
|
|
11
|
-
let { nbPoints, factor = 2 } = options;
|
|
12
|
-
if (!nbPoints) {
|
|
13
|
-
nbPoints = 2 ** Math.round(Math.log2(spectrum.data.x.length * factor));
|
|
14
|
-
const filter = spectrum.filters.find((filter) => filter.name === id);
|
|
15
|
-
if (filter) {
|
|
16
|
-
filter.value = { nbPoints };
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
let digitalFilterApplied = spectrum.filters.some((e) => e.name === 'digitalFilter' && e.flag);
|
|
20
|
-
let grpdly = spectrum.info?.digitalFilter || 0;
|
|
21
|
-
let pointsToShift;
|
|
22
|
-
if (grpdly > 0 && digitalFilterApplied) {
|
|
23
|
-
pointsToShift = Math.floor(grpdly);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
pointsToShift = 0;
|
|
27
|
-
}
|
|
28
|
-
const { re, im = [], x } = spectrum.data;
|
|
29
|
-
let newRE = new Float64Array(nbPoints);
|
|
30
|
-
let newIM = new Float64Array(nbPoints);
|
|
31
|
-
let newX = new Float64Array(nbPoints);
|
|
32
|
-
const length = Math.min(nbPoints, re.length);
|
|
33
|
-
newRE.set(re.slice(0, length - pointsToShift));
|
|
34
|
-
newIM.set(im.slice(0, length - pointsToShift));
|
|
35
|
-
newX.set(x.slice(0, length - pointsToShift));
|
|
36
|
-
let diff = x[1] - x[0];
|
|
37
|
-
let currentX = x[length - pointsToShift - 1];
|
|
38
|
-
for (let i = length - pointsToShift; i < nbPoints; i++) {
|
|
39
|
-
currentX += diff;
|
|
40
|
-
newX[i] = currentX;
|
|
41
|
-
}
|
|
42
|
-
if (pointsToShift > 0 && pointsToShift < nbPoints) {
|
|
43
|
-
newRE.set(re.slice(re.length - pointsToShift), nbPoints - pointsToShift);
|
|
44
|
-
newIM.set(im.slice(re.length - pointsToShift), nbPoints - pointsToShift);
|
|
45
|
-
}
|
|
46
|
-
spectrum.data = { ...spectrum.data, re: newRE, im: newIM, x: newX };
|
|
47
|
-
}
|
|
48
|
-
export function isApplicable(spectrum) {
|
|
49
|
-
if (spectrum.info.isComplex && spectrum.info.isFid) {
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
export function reduce(_previousValue, newValue) {
|
|
55
|
-
delete newValue.factor;
|
|
56
|
-
return {
|
|
57
|
-
once: true,
|
|
58
|
-
reduce: newValue,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Spectrum2D } from 'nmr-load-save';
|
|
2
|
-
import { FilterDomainUpdateRules } from '../../FiltersManager';
|
|
3
|
-
export declare const id = "shift2DX";
|
|
4
|
-
export declare const name = "Shift X";
|
|
5
|
-
export declare const DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules>;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param {Spectrum2D} spectrum
|
|
9
|
-
* @param {number} [shiftValue=0]
|
|
10
|
-
*/
|
|
11
|
-
export declare function apply(spectrum: Spectrum2D, options?: {
|
|
12
|
-
shift?: number;
|
|
13
|
-
}): void;
|
|
14
|
-
export declare function isApplicable(): boolean;
|
|
15
|
-
export declare function reduce(previousValue: any, newValue: any): {
|
|
16
|
-
once: boolean;
|
|
17
|
-
reduce: any;
|
|
18
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export const id = 'shift2DX';
|
|
2
|
-
export const name = 'Shift X';
|
|
3
|
-
export const DOMAIN_UPDATE_RULES = {
|
|
4
|
-
updateXDomain: true,
|
|
5
|
-
updateYDomain: false,
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param {Spectrum2D} spectrum
|
|
10
|
-
* @param {number} [shiftValue=0]
|
|
11
|
-
*/
|
|
12
|
-
export function apply(spectrum, options = {}) {
|
|
13
|
-
const { shift = 0 } = options;
|
|
14
|
-
for (const key in spectrum.data) {
|
|
15
|
-
spectrum.data[key].minX += shift;
|
|
16
|
-
spectrum.data[key].maxX += shift;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export function isApplicable() {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
export function reduce(previousValue, newValue) {
|
|
23
|
-
return {
|
|
24
|
-
once: true,
|
|
25
|
-
reduce: previousValue + newValue,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Spectrum2D } from 'nmr-load-save';
|
|
2
|
-
import { FilterDomainUpdateRules } from '../../FiltersManager';
|
|
3
|
-
export declare const id = "shift2DY";
|
|
4
|
-
export declare const name = "Shift Y";
|
|
5
|
-
export declare const DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules>;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param {Object} datum2d
|
|
9
|
-
* @param {number} [shiftValue=0]
|
|
10
|
-
*/
|
|
11
|
-
export declare function apply(datum2D: Spectrum2D, options?: {
|
|
12
|
-
shift?: number;
|
|
13
|
-
}): void;
|
|
14
|
-
export declare function isApplicable(): boolean;
|
|
15
|
-
export declare function reduce(previousValue: any, newValue: any): {
|
|
16
|
-
once: boolean;
|
|
17
|
-
reduce: any;
|
|
18
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export const id = 'shift2DY';
|
|
2
|
-
export const name = 'Shift Y';
|
|
3
|
-
export const DOMAIN_UPDATE_RULES = {
|
|
4
|
-
updateXDomain: false,
|
|
5
|
-
updateYDomain: true,
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param {Object} datum2d
|
|
10
|
-
* @param {number} [shiftValue=0]
|
|
11
|
-
*/
|
|
12
|
-
export function apply(datum2D, options = {}) {
|
|
13
|
-
const { shift = 0 } = options;
|
|
14
|
-
for (const key in datum2D.data) {
|
|
15
|
-
datum2D.data[key].minY += shift;
|
|
16
|
-
datum2D.data[key].maxY += shift;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export function isApplicable() {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
export function reduce(previousValue, newValue) {
|
|
23
|
-
return {
|
|
24
|
-
once: true,
|
|
25
|
-
reduce: previousValue + newValue,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface PeaksViewState {
|
|
2
|
-
/**
|
|
3
|
-
* boolean indicator to hide/show peaks for spectrum
|
|
4
|
-
* @default true
|
|
5
|
-
*/
|
|
6
|
-
isPeaksVisible: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* boolean indicator to hide/show peaks for shapes spectrum
|
|
9
|
-
* @default false
|
|
10
|
-
*/
|
|
11
|
-
showPeaksShapes: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* boolean indicator to hide/show peaks sum for spectrum
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
16
|
-
showPeaksSum: boolean;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PanelPreferencesType } from './PanelPreferencesType';
|
|
2
|
-
export interface NMRiumPanelPreferences {
|
|
3
|
-
spectraPanel: PanelPreferencesType;
|
|
4
|
-
informationPanel: PanelPreferencesType;
|
|
5
|
-
peaksPanel: PanelPreferencesType;
|
|
6
|
-
integralsPanel: PanelPreferencesType;
|
|
7
|
-
rangesPanel: PanelPreferencesType;
|
|
8
|
-
structuresPanel: PanelPreferencesType;
|
|
9
|
-
processingsPanel: PanelPreferencesType;
|
|
10
|
-
zonesPanel: PanelPreferencesType;
|
|
11
|
-
summaryPanel: PanelPreferencesType;
|
|
12
|
-
multipleSpectraAnalysisPanel: PanelPreferencesType;
|
|
13
|
-
databasePanel: PanelPreferencesType;
|
|
14
|
-
predictionPanel: PanelPreferencesType;
|
|
15
|
-
automaticAssignmentPanel: PanelPreferencesType;
|
|
16
|
-
matrixGenerationPanel: PanelPreferencesType;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface NMRiumToolBarPreferences {
|
|
2
|
-
zoom: boolean;
|
|
3
|
-
zoomOut: boolean;
|
|
4
|
-
import: boolean;
|
|
5
|
-
exportAs: boolean;
|
|
6
|
-
spectraStackAlignments: boolean;
|
|
7
|
-
spectraCenterAlignments: boolean;
|
|
8
|
-
realImaginary: boolean;
|
|
9
|
-
peakPicking: boolean;
|
|
10
|
-
integral: boolean;
|
|
11
|
-
zonePicking: boolean;
|
|
12
|
-
slicing: boolean;
|
|
13
|
-
rangePicking: boolean;
|
|
14
|
-
zeroFilling: boolean;
|
|
15
|
-
apodization: boolean;
|
|
16
|
-
phaseCorrection: boolean;
|
|
17
|
-
baselineCorrection: boolean;
|
|
18
|
-
fft: boolean;
|
|
19
|
-
multipleSpectraAnalysis: boolean;
|
|
20
|
-
exclusionZones: boolean;
|
|
21
|
-
autoRangeAndZonePicking: boolean;
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
30
|
-
/** @jsxImportSource @emotion/react */
|
|
31
|
-
const react_1 = require("@emotion/react");
|
|
32
|
-
const formik_1 = require("formik");
|
|
33
|
-
const react_2 = require("react");
|
|
34
|
-
const Yup = __importStar(require("yup"));
|
|
35
|
-
const PredictionManager_1 = require("../../../data/PredictionManager");
|
|
36
|
-
const Button_1 = __importDefault(require("../../elements/Button"));
|
|
37
|
-
const IsotopesViewer_1 = __importDefault(require("../../elements/IsotopesViewer"));
|
|
38
|
-
const Label_1 = __importDefault(require("../../elements/Label"));
|
|
39
|
-
const FormikErrorsSummary_1 = __importDefault(require("../../elements/formik/FormikErrorsSummary"));
|
|
40
|
-
const FormikInput_1 = __importDefault(require("../../elements/formik/FormikInput"));
|
|
41
|
-
const FormikSelect_1 = __importDefault(require("../../elements/formik/FormikSelect"));
|
|
42
|
-
const styles = (0, react_1.css) `
|
|
43
|
-
padding: 10px;
|
|
44
|
-
border-top: solid #f2f2f2 1px;
|
|
45
|
-
|
|
46
|
-
.row {
|
|
47
|
-
flex: row;
|
|
48
|
-
display: flex;
|
|
49
|
-
padding-bottom: 10px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.inner-content {
|
|
53
|
-
flex: 1;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.custom-label {
|
|
57
|
-
width: 160px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.footer-container {
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: row-reverse;
|
|
63
|
-
align-items: flex-end;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.input {
|
|
67
|
-
font-size: 14px;
|
|
68
|
-
border-radius: 5px;
|
|
69
|
-
border: 1px solid #ccc;
|
|
70
|
-
padding: 5px;
|
|
71
|
-
width: 100px;
|
|
72
|
-
margin-right: 10px;
|
|
73
|
-
height: initial !important;
|
|
74
|
-
}
|
|
75
|
-
`;
|
|
76
|
-
const predictionFormValidation = Yup.object().shape({
|
|
77
|
-
frequency: Yup.number().integer().required().label('Frequency'),
|
|
78
|
-
'1d': Yup.object({
|
|
79
|
-
'1H': Yup.object({
|
|
80
|
-
from: Yup.number().integer().required().label("1H ' From ' "),
|
|
81
|
-
to: Yup.number().integer().required().label("1H ' To ' "),
|
|
82
|
-
}),
|
|
83
|
-
'13C': Yup.object().shape({
|
|
84
|
-
from: Yup.number().integer().required().label("13C ' From ' "),
|
|
85
|
-
to: Yup.number().integer().required().label("13C ' To ' "),
|
|
86
|
-
}),
|
|
87
|
-
lineWidth: Yup.number().integer().min(1).required().label('Line Width'),
|
|
88
|
-
}),
|
|
89
|
-
});
|
|
90
|
-
function PredictionOptions({ onPredict = () => null, disabled = false, }) {
|
|
91
|
-
const refForm = (0, react_2.useRef)();
|
|
92
|
-
const handleSave = (0, react_2.useCallback)(() => {
|
|
93
|
-
refForm.current.submitForm();
|
|
94
|
-
}, []);
|
|
95
|
-
const submitHandler = (0, react_2.useCallback)((values) => {
|
|
96
|
-
void (async () => {
|
|
97
|
-
onPredict(values);
|
|
98
|
-
})();
|
|
99
|
-
}, [onPredict]);
|
|
100
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: styles, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { innerRef: refForm, initialValues: PredictionManager_1.defaultPredictionOptions, validationSchema: predictionFormValidation, onSubmit: submitHandler, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FormikErrorsSummary_1.default, {}), (0, jsx_runtime_1.jsxs)("div", { className: "row margin-10", children: [(0, jsx_runtime_1.jsx)("span", { className: "custom-label", children: "Frequency : " }), (0, jsx_runtime_1.jsx)(FormikSelect_1.default, { items: PredictionManager_1.FREQUENCIES, style: { width: 290, height: 30, margin: 0 }, name: "frequency" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "row", children: [(0, jsx_runtime_1.jsx)(IsotopesViewer_1.default, { value: "1H", className: "custom-label" }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "From", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "1d.1H.from", type: "number" }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "To", style: { label: { padding: '0 10px' } }, children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "1d.1H.to", type: "number" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "row", children: [(0, jsx_runtime_1.jsx)(IsotopesViewer_1.default, { value: "13C", className: "custom-label" }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "From", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "1d.13C.from", type: "number" }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "To", style: { label: { padding: '0 10px' } }, children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "1d.13C.to", type: "number" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "row margin-10 padding-h-10", children: [(0, jsx_runtime_1.jsx)("span", { className: "custom-label", children: "Line Width : " }), (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "1d.lineWidth", type: "number", style: { input: { margin: 0 } } }), (0, jsx_runtime_1.jsx)("span", { style: { paddingLeft: '0.4rem' }, children: " Hz " })] })] }) }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Button_1.default.Done, { onClick: handleSave, disabled: disabled, children: "Predict spectra" }) })] }));
|
|
101
|
-
}
|
|
102
|
-
exports.default = PredictionOptions;
|
package/lib-cjs/data/Filters.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.shift2DY = exports.shift2DX = exports.zeroFilling = exports.signalProcessing = exports.shiftX = exports.phaseCorrection = exports.fft = exports.exclusionZones = exports.equallySpaced = exports.digitalFilter = exports.baselineCorrection = exports.apodization = void 0;
|
|
27
|
-
exports.apodization = __importStar(require("./data1d/filter1d/apodization"));
|
|
28
|
-
exports.baselineCorrection = __importStar(require("./data1d/filter1d/baselineCorrection"));
|
|
29
|
-
exports.digitalFilter = __importStar(require("./data1d/filter1d/digitalFilter"));
|
|
30
|
-
exports.equallySpaced = __importStar(require("./data1d/filter1d/equallySpaced"));
|
|
31
|
-
exports.exclusionZones = __importStar(require("./data1d/filter1d/exclusionZones"));
|
|
32
|
-
exports.fft = __importStar(require("./data1d/filter1d/fft"));
|
|
33
|
-
exports.phaseCorrection = __importStar(require("./data1d/filter1d/phaseCorrection"));
|
|
34
|
-
exports.shiftX = __importStar(require("./data1d/filter1d/shiftX"));
|
|
35
|
-
exports.signalProcessing = __importStar(require("./data1d/filter1d/signalProcessing"));
|
|
36
|
-
exports.zeroFilling = __importStar(require("./data1d/filter1d/zeroFilling"));
|
|
37
|
-
exports.shift2DX = __importStar(require("./data2d/filter2d/shiftX"));
|
|
38
|
-
exports.shift2DY = __importStar(require("./data2d/filter2d/shiftY"));
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.lookupForFilter = exports.deleteFilter = exports.addFilter = exports.enableFilter = exports.reapplyFilters = exports.applyFilter = void 0;
|
|
27
|
-
/* eslint-disable import/namespace */
|
|
28
|
-
const uuid_1 = require("@lukeed/uuid");
|
|
29
|
-
const Filters = __importStar(require("./Filters"));
|
|
30
|
-
const cloneDatum1D_1 = require("./data1d/Spectrum1D/cloneDatum1D");
|
|
31
|
-
const updateIntegrals_1 = require("./data1d/Spectrum1D/integrals/updateIntegrals");
|
|
32
|
-
const updatePeaks_1 = require("./data1d/Spectrum1D/peaks/updatePeaks");
|
|
33
|
-
const updateRanges_1 = require("./data1d/Spectrum1D/ranges/updateRanges");
|
|
34
|
-
const cloneDatum2D_1 = require("./data2d/Spectrum2D/cloneDatum2D");
|
|
35
|
-
const updateZones_1 = require("./data2d/Spectrum2D/zones/updateZones");
|
|
36
|
-
function resetDataToOrigin(datum) {
|
|
37
|
-
datum.data =
|
|
38
|
-
datum.info.dimension === 1
|
|
39
|
-
? (0, cloneDatum1D_1.cloneDatum1D)(datum.originalData)
|
|
40
|
-
: (0, cloneDatum2D_1.cloneDatum2D)(datum.originalData);
|
|
41
|
-
datum.info = { ...datum.originalInfo };
|
|
42
|
-
}
|
|
43
|
-
// update the the part of the data that affected by applying the filters
|
|
44
|
-
function updateData(datum) {
|
|
45
|
-
if (datum.info.dimension === 1) {
|
|
46
|
-
(0, updatePeaks_1.updatePeaks)(datum);
|
|
47
|
-
(0, updateRanges_1.updateRanges)(datum);
|
|
48
|
-
(0, updateIntegrals_1.updateIntegrals)(datum);
|
|
49
|
-
}
|
|
50
|
-
else if (datum.info.dimension === 2) {
|
|
51
|
-
(0, updateZones_1.updateZones)(datum);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function applyFilter(datum, filters = [], options = {}) {
|
|
55
|
-
const { forceReapply = false, filterIndex } = options;
|
|
56
|
-
let isReduced = false;
|
|
57
|
-
for (let filter of filters) {
|
|
58
|
-
const filterOption = {
|
|
59
|
-
name: filter.name,
|
|
60
|
-
label: Filters[filter.name].name,
|
|
61
|
-
value: filter.value,
|
|
62
|
-
};
|
|
63
|
-
const previousFilter = lookupForFilter(datum, filter.name);
|
|
64
|
-
const isDeleteAllow = 'isDeleteAllow' in filter ? filter.isDeleteAllow : true;
|
|
65
|
-
if (previousFilter) {
|
|
66
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
67
|
-
const reduceResult = Filters[filter.name].reduce(previousFilter.value, filterOption.value);
|
|
68
|
-
if (reduceResult.once) {
|
|
69
|
-
if (!isReduced) {
|
|
70
|
-
isReduced = true;
|
|
71
|
-
}
|
|
72
|
-
if (reduceResult.reduce != null && reduceResult.reduce !== undefined) {
|
|
73
|
-
replaceFilter(datum, previousFilter.id, reduceResult.reduce);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
addFilter(datum, filterOption, { isDeleteAllow, filterIndex });
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
addFilter(datum, filterOption, { isDeleteAllow, filterIndex });
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (forceReapply) {
|
|
85
|
-
reapplyFilters(datum);
|
|
86
|
-
}
|
|
87
|
-
else if (isReduced) {
|
|
88
|
-
if (filters.length === 1 && isLastFilter(datum, filters[0].name)) {
|
|
89
|
-
Filters[filters[0].name].apply(datum, filters[0].value);
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
reapplyFilters(datum);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
for (let filter of filters) {
|
|
97
|
-
Filters[filter.name].apply(datum, filter.value);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
updateData(datum);
|
|
101
|
-
}
|
|
102
|
-
exports.applyFilter = applyFilter;
|
|
103
|
-
function isLastFilter(datum, id) {
|
|
104
|
-
const index = datum.filters.findIndex((f) => f.name === id);
|
|
105
|
-
if (datum.filters.length === index + 1) {
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
function lookupForFilter(datum, filterName) {
|
|
111
|
-
return datum.filters.find((f) => f.name === filterName);
|
|
112
|
-
}
|
|
113
|
-
exports.lookupForFilter = lookupForFilter;
|
|
114
|
-
function reapplyFilters(datum, filters = null) {
|
|
115
|
-
const _filters = filters || datum.filters;
|
|
116
|
-
enableFilter(datum, null, null, _filters);
|
|
117
|
-
}
|
|
118
|
-
exports.reapplyFilters = reapplyFilters;
|
|
119
|
-
// id filter id
|
|
120
|
-
function enableFilter(datum, id, checked, filters = null) {
|
|
121
|
-
datum.filters = datum.filters.slice(0);
|
|
122
|
-
if (id) {
|
|
123
|
-
datum.filters = datum.filters.map((filter) => {
|
|
124
|
-
return { ...filter, flag: filter.id === id ? checked : filter.flag };
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
resetDataToOrigin(datum);
|
|
128
|
-
const _filters = filters || datum.filters;
|
|
129
|
-
for (let filterIndex in _filters) {
|
|
130
|
-
const filter = datum.filters[filterIndex];
|
|
131
|
-
datum.filters[filterIndex] = {
|
|
132
|
-
...datum.filters[filterIndex],
|
|
133
|
-
error: null,
|
|
134
|
-
};
|
|
135
|
-
if (filter.flag) {
|
|
136
|
-
try {
|
|
137
|
-
Filters[filter.name].apply(datum, filter.value);
|
|
138
|
-
}
|
|
139
|
-
catch (error) {
|
|
140
|
-
datum.filters[filterIndex] = {
|
|
141
|
-
...datum.filters[filterIndex],
|
|
142
|
-
error: error.message,
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
updateData(datum);
|
|
148
|
-
}
|
|
149
|
-
exports.enableFilter = enableFilter;
|
|
150
|
-
function deleteFilter(datum, id) {
|
|
151
|
-
// delete the specified filter otherwise delete all filters where isDeleteAllow is true
|
|
152
|
-
datum.filters = datum.filters
|
|
153
|
-
.slice(0)
|
|
154
|
-
.filter((filter) => (id ? filter.id !== id : !filter.isDeleteAllow));
|
|
155
|
-
resetDataToOrigin(datum);
|
|
156
|
-
for (let filterIndex in datum.filters) {
|
|
157
|
-
const filter = datum.filters[filterIndex];
|
|
158
|
-
datum.filters[filterIndex] = {
|
|
159
|
-
...datum.filters[filterIndex],
|
|
160
|
-
error: null,
|
|
161
|
-
};
|
|
162
|
-
if (filter.flag) {
|
|
163
|
-
try {
|
|
164
|
-
Filters[filter.name].apply(datum, filter.value);
|
|
165
|
-
}
|
|
166
|
-
catch (error) {
|
|
167
|
-
datum.filters[filterIndex] = {
|
|
168
|
-
...datum.filters[filterIndex],
|
|
169
|
-
error: error.message,
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
updateData(datum);
|
|
175
|
-
}
|
|
176
|
-
exports.deleteFilter = deleteFilter;
|
|
177
|
-
function addFilter(datum, filterOptions, options = {}) {
|
|
178
|
-
const { filterIndex, isDeleteAllow = true } = options;
|
|
179
|
-
const id = (0, uuid_1.v4)();
|
|
180
|
-
const filter = {
|
|
181
|
-
...filterOptions,
|
|
182
|
-
id,
|
|
183
|
-
flag: true,
|
|
184
|
-
isDeleteAllow,
|
|
185
|
-
};
|
|
186
|
-
if (typeof filterIndex === 'number' && filterIndex !== -1) {
|
|
187
|
-
datum.filters = [
|
|
188
|
-
...datum.filters.slice(0, filterIndex + 1),
|
|
189
|
-
filter,
|
|
190
|
-
...datum.filters.slice(filterIndex + 1),
|
|
191
|
-
];
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
datum.filters.push(filter);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
exports.addFilter = addFilter;
|
|
198
|
-
function replaceFilter(datum, filterID, value) {
|
|
199
|
-
// datum.filters = datum.filters.slice(0);
|
|
200
|
-
const index = datum.filters.findIndex((f) => f.id === filterID);
|
|
201
|
-
delete datum.filters[index].isSnapshot;
|
|
202
|
-
datum.filters[index] = {
|
|
203
|
-
...datum.filters[index],
|
|
204
|
-
value,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getShiftX = void 0;
|
|
27
|
-
const FiltersTypes = __importStar(require("../../Filters"));
|
|
28
|
-
function getShiftX(spectrum) {
|
|
29
|
-
const filter = spectrum?.filters &&
|
|
30
|
-
spectrum?.filters.find((filter) => filter.name === FiltersTypes.shiftX.id);
|
|
31
|
-
return filter?.flag ? filter.value.shift : 0;
|
|
32
|
-
}
|
|
33
|
-
exports.getShiftX = getShiftX;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSpectrumErrorValue = void 0;
|
|
4
|
-
function getSpectrumErrorValue(spectrum) {
|
|
5
|
-
const { x } = spectrum.data;
|
|
6
|
-
return (x.at(-1) - x[0]) / 10000;
|
|
7
|
-
}
|
|
8
|
-
exports.getSpectrumErrorValue = getSpectrumErrorValue;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkIntegralKind = void 0;
|
|
4
|
-
const SignalsKinds_1 = require("../../../constants/SignalsKinds");
|
|
5
|
-
/**
|
|
6
|
-
* check whether integral based on its kind can be included in another operation or not
|
|
7
|
-
* @param integral integral
|
|
8
|
-
* @returns {boolean}
|
|
9
|
-
*/
|
|
10
|
-
function checkIntegralKind(integral) {
|
|
11
|
-
return SignalsKinds_1.SignalKindsToInclude.includes(integral.kind);
|
|
12
|
-
}
|
|
13
|
-
exports.checkIntegralKind = checkIntegralKind;
|