nmrium 0.34.0 → 0.35.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/LinesSeries.js +4 -5
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +5 -7
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +142 -160
- 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 +4 -4
- package/lib/component/1d/ranges/AssignmentActionsButtons.d.ts +11 -0
- package/lib/component/1d/ranges/AssignmentActionsButtons.js +11 -0
- package/lib/component/1d/ranges/Range.d.ts +3 -10
- package/lib/component/1d/ranges/Range.js +30 -45
- package/lib/component/1d/ranges/Ranges.js +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -2
- package/lib/component/2d/1d-tracer/Left1DChart.d.ts +2 -2
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts +2 -2
- package/lib/component/2d/Chart2D.d.ts +2 -2
- package/lib/component/2d/ft/Contours.js +13 -13
- package/lib/component/2d/ft/FTContainer.d.ts +2 -2
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/Signal.js +1 -2
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.js +0 -1
- package/lib/component/2d/zones/Zone.d.ts +2 -2
- package/lib/component/NMRium.d.ts +2 -5
- package/lib/component/NMRium.js +10 -2
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -2
- package/lib/component/assignment/actions/removeAssignment.js +2 -2
- package/lib/component/context/PreferencesContext.d.ts +10 -21
- package/lib/component/context/PreferencesContext.js +4 -7
- package/lib/component/elements/Button.d.ts +4 -2
- package/lib/component/elements/Button.js +26 -15
- package/lib/component/elements/Input.js +38 -46
- package/lib/component/elements/NumberInput.d.ts +4 -12
- package/lib/component/elements/NumberInput.js +10 -40
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +2 -4
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +3 -2
- package/lib/component/elements/ReactTable/ReactTable.d.ts +7 -6
- package/lib/component/elements/ReactTable/ReactTable.js +3 -12
- package/lib/component/elements/ReactTable/Style.js +0 -8
- package/lib/component/elements/formik/FormikNumberInput.d.ts +1 -1
- package/lib/component/elements/formik/FormikNumberInput.js +13 -3
- package/lib/component/header/ApodizationOptionsPanel.js +2 -12
- package/lib/component/header/AutoPeakPickingOptionPanel.js +11 -15
- package/lib/component/header/BaseLineCorrectionPanel.js +2 -12
- package/lib/component/header/Header.js +2 -2
- package/lib/component/header/PhaseCorrectionPanel.d.ts +2 -0
- package/lib/component/header/{ManualPhaseCorrectionPanel.js → PhaseCorrectionPanel.js} +23 -22
- package/lib/component/header/RangesPickingOptionPanel.js +17 -28
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -2
- package/lib/component/header/Zones2DOptionPanel.js +16 -23
- package/lib/component/highlight/index.d.ts +2 -2
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +1 -2
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +2 -3
- package/lib/component/hooks/useFilter.d.ts +1 -1
- package/lib/component/hooks/useSpectraPerNucleus.d.ts +2 -3
- package/lib/component/hooks/useSpectrum.d.ts +2 -3
- package/lib/component/modal/EditPeakShapeModal.d.ts +2 -2
- package/lib/component/modal/ExportAsJcampModal.d.ts +8 -0
- package/lib/component/modal/ExportAsJcampModal.js +62 -0
- package/lib/component/modal/MultipletAnalysisModal.d.ts +2 -2
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +1 -1
- package/lib/component/modal/editZone/EditPathLengthFormik.js +11 -14
- package/lib/component/modal/editZone/EditZoneModal.js +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.d.ts +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +3 -3
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +2 -3
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/PanelNoData.d.ts +6 -0
- package/lib/component/panels/PanelNoData.js +24 -0
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +4 -4
- package/lib/component/panels/RangesPanel/RangesPanel.js +12 -7
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +4 -5
- package/lib/component/panels/RangesPanel/RangesTable.js +4 -14
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +5 -4
- package/lib/component/panels/RangesPanel/RangesTableRow.js +15 -11
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts +6 -5
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +37 -33
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.js +8 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +6 -11
- 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/SpectraPanelHeader.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraTable.d.ts +3 -4
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +65 -17
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.d.ts +3 -4
- package/lib/component/panels/SpectrumsPanel/base/SpectrumName.d.ts +2 -3
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +0 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +11 -8
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +1 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js +3 -13
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +3 -2
- package/lib/component/panels/databasePanel/DatabasePanel.js +77 -7
- package/lib/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +2 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +17 -9
- package/lib/component/panels/filtersPanel/FiltersTable.js +16 -30
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib/component/panels/header/PreferencesHeader.js +1 -1
- package/lib/component/reducer/IgnoreActions.js +0 -1
- package/lib/component/reducer/Reducer.d.ts +4 -960
- package/lib/component/reducer/Reducer.js +3 -7
- package/lib/component/reducer/actions/AssignmentsActions.js +2 -4
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +5 -6
- package/lib/component/reducer/actions/DomainActions.js +17 -11
- package/lib/component/reducer/actions/FiltersActions.d.ts +14 -19
- package/lib/component/reducer/actions/FiltersActions.js +257 -152
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -3
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -1
- package/lib/component/reducer/actions/PeaksActions.js +6 -2
- package/lib/component/reducer/actions/PreferencesActions.js +3 -0
- package/lib/component/reducer/actions/RangesActions.d.ts +1 -1
- package/lib/component/reducer/actions/RangesActions.js +19 -11
- package/lib/component/reducer/actions/SpectrumsActions.js +15 -13
- package/lib/component/reducer/actions/ToolsActions.d.ts +6 -2
- package/lib/component/reducer/actions/ToolsActions.js +41 -38
- package/lib/component/reducer/actions/ZonesActions.d.ts +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +7 -3
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +6 -3
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +3 -4843
- package/lib/component/reducer/preferences/preferencesReducer.js +1 -4
- package/lib/component/reducer/types/Types.d.ts +0 -2
- package/lib/component/reducer/types/Types.js +0 -2
- package/lib/component/toolbar/BasicToolBar.js +3 -3
- package/lib/component/toolbar/FunctionToolBar.js +2 -2
- package/lib/component/toolbar/ToolTypes.d.ts +1 -2
- package/lib/component/toolbar/ToolTypes.js +13 -13
- package/lib/component/utility/getSpectraByNucleus.d.ts +2 -3
- package/lib/component/utility/getSpectraObjectPaths.d.ts +2 -3
- package/lib/component/workspaces/Workspace.d.ts +1 -0
- package/lib/component/workspaces/assignment.js +1 -1
- package/lib/component/workspaces/basic.js +1 -1
- package/lib/component/workspaces/embedded.js +1 -1
- package/lib/component/workspaces/exercise.js +1 -1
- package/lib/component/workspaces/prediction.js +1 -1
- package/lib/component/workspaces/process1D.js +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/Filters.d.ts +0 -4
- package/lib/data/Filters.js +0 -4
- package/lib/data/FiltersManager.d.ts +17 -5
- package/lib/data/FiltersManager.js +21 -14
- package/lib/data/PredictionManager.d.ts +2 -3
- package/lib/data/SpectraManager.d.ts +11 -0
- package/lib/data/SpectraManager.js +47 -5
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -2
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/get1DDataXY.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.js +3 -3
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +2 -2
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +16 -17
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +7 -7
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.d.ts +3 -4
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/isSpectrum1D.d.ts +2 -3
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -5
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +7 -7
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +5 -5
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +8 -9
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +13 -7
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +13 -7
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +9 -9
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +6 -5
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts +10 -9
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +6 -6
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.d.ts +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +2 -2
- package/lib/data/data1d/filter1d/apodization.d.ts +8 -6
- package/lib/data/data1d/filter1d/apodization.js +4 -0
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +6 -4
- package/lib/data/data1d/filter1d/baselineCorrection.js +4 -0
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +7 -6
- package/lib/data/data1d/filter1d/digitalFilter.js +15 -11
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +5 -5
- package/lib/data/data1d/filter1d/equallySpaced.js +10 -10
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +7 -5
- package/lib/data/data1d/filter1d/exclusionZones.js +13 -9
- package/lib/data/data1d/filter1d/fft.d.ts +6 -4
- package/lib/data/data1d/filter1d/fft.js +27 -23
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +6 -5
- package/lib/data/data1d/filter1d/phaseCorrection.js +22 -17
- package/lib/data/data1d/filter1d/shiftX.d.ts +5 -3
- package/lib/data/data1d/filter1d/shiftX.js +7 -3
- package/lib/data/data1d/filter1d/signalProcessing.d.ts +7 -5
- package/lib/data/data1d/filter1d/signalProcessing.js +15 -11
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +2 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +6 -6
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +7 -6
- package/lib/data/data1d/filter1d/zeroFilling.js +15 -11
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +4 -5
- package/lib/data/data2d/Spectrum2D/contours.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/contours.js +5 -4
- package/lib/data/data2d/Spectrum2D/get2DColor.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/get2DSpectrumErrorValue.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +2 -2
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +2 -3
- package/lib/data/data2d/Spectrum2D/getShift.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/getShift.js +3 -3
- package/lib/data/data2d/Spectrum2D/getSlice.d.ts +4 -4
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts +2 -3
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +4 -4
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +4 -10
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +4 -4
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +6 -12
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js +2 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.js +3 -3
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +6 -12
- package/lib/data/data2d/Spectrum2D/zones/mapZones.js +1 -0
- package/lib/data/data2d/Spectrum2D/zones/updateZones.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/updateZones.js +2 -2
- package/lib/data/data2d/filter2d/shiftX.d.ts +6 -4
- package/lib/data/data2d/filter2d/shiftX.js +10 -6
- package/lib/data/data2d/filter2d/shiftY.d.ts +5 -3
- package/lib/data/data2d/filter2d/shiftY.js +5 -1
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +1 -1
- package/lib/data/molecules/MoleculeManager.js +2 -2
- package/lib/data/parseMeta/linkMetaWithSpectra.d.ts +2 -3
- package/lib/data/types/common/Info.d.ts +1 -0
- package/lib/data/types/data1d/ComplexData1D.d.ts +1 -1
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/types/data1d/index.d.ts +0 -11
- package/lib/data/types/data2d/index.d.ts +0 -7
- package/lib/data/utilities/FindUtilities.d.ts +7 -9
- package/lib/data/utilities/RangeUtilities.d.ts +7 -2
- package/lib/data/utilities/RangeUtilities.js +9 -16
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.js +6 -6
- package/lib/data/utilities/calculateSanPlot.d.ts +2 -3
- package/lib/data/utilities/convertSpectraListToObject.d.ts +2 -3
- package/lib/data/utilities/generateColor.d.ts +1 -1
- package/lib/types/NMRiumDataReturn.d.ts +2 -3
- package/lib/types/NMRiumToolBarPreferences.d.ts +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/LinesSeries.js +4 -5
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +144 -160
- package/lib-cjs/component/1d/ranges/AssignmentActionsButtons.js +18 -0
- package/lib-cjs/component/1d/ranges/Range.js +29 -44
- package/lib-cjs/component/1d/ranges/Ranges.js +1 -1
- package/lib-cjs/component/2d/ft/Contours.js +13 -13
- package/lib-cjs/component/2d/zones/Signal.js +1 -2
- package/lib-cjs/component/2d/zones/SignalCrosshair.js +0 -1
- package/lib-cjs/component/NMRium.js +10 -2
- package/lib-cjs/component/assignment/actions/removeAssignment.js +2 -2
- package/lib-cjs/component/context/PreferencesContext.js +4 -7
- package/lib-cjs/component/elements/Button.js +26 -15
- package/lib-cjs/component/elements/Input.js +37 -45
- package/lib-cjs/component/elements/NumberInput.js +8 -38
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +3 -2
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +3 -12
- package/lib-cjs/component/elements/ReactTable/Style.js +0 -8
- package/lib-cjs/component/elements/formik/FormikNumberInput.js +13 -3
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +1 -11
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +33 -14
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +1 -11
- package/lib-cjs/component/header/Header.js +2 -2
- package/lib-cjs/component/header/{ManualPhaseCorrectionPanel.js → PhaseCorrectionPanel.js} +24 -23
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +38 -26
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +0 -1
- package/lib-cjs/component/header/Zones2DOptionPanel.js +37 -21
- package/lib-cjs/component/modal/ExportAsJcampModal.js +67 -0
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +11 -14
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +1 -1
- package/lib-cjs/component/modal/setting/settings-tabs/ToolsTabContent.js +1 -1
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +3 -3
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib-cjs/component/panels/PanelNoData.js +28 -0
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +4 -4
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +12 -7
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +4 -14
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +15 -10
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +36 -32
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.js +12 -0
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +6 -11
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +63 -15
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +0 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +11 -8
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -12
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +3 -2
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +76 -6
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +15 -7
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +16 -30
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib-cjs/component/panels/header/PreferencesHeader.js +1 -1
- package/lib-cjs/component/reducer/IgnoreActions.js +0 -1
- package/lib-cjs/component/reducer/Reducer.js +3 -7
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +2 -4
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib-cjs/component/reducer/actions/DomainActions.js +17 -11
- package/lib-cjs/component/reducer/actions/FiltersActions.js +257 -153
- package/lib-cjs/component/reducer/actions/LoadActions.js +1 -1
- package/lib-cjs/component/reducer/actions/PeaksActions.js +6 -2
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +3 -0
- package/lib-cjs/component/reducer/actions/RangesActions.js +19 -11
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +13 -11
- package/lib-cjs/component/reducer/actions/ToolsActions.js +38 -35
- package/lib-cjs/component/reducer/actions/ZonesActions.js +7 -3
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +6 -3
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +1 -4
- package/lib-cjs/component/reducer/types/Types.js +2 -4
- package/lib-cjs/component/toolbar/BasicToolBar.js +3 -3
- package/lib-cjs/component/toolbar/FunctionToolBar.js +2 -2
- package/lib-cjs/component/toolbar/ToolTypes.js +13 -13
- package/lib-cjs/component/workspaces/assignment.js +1 -1
- package/lib-cjs/component/workspaces/basic.js +1 -1
- package/lib-cjs/component/workspaces/embedded.js +1 -1
- package/lib-cjs/component/workspaces/exercise.js +1 -1
- package/lib-cjs/component/workspaces/prediction.js +1 -1
- package/lib-cjs/component/workspaces/process1D.js +1 -1
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib-cjs/data/Filters.js +1 -5
- package/lib-cjs/data/FiltersManager.js +22 -14
- package/lib-cjs/data/SpectraManager.js +48 -5
- package/lib-cjs/data/data1d/Spectrum1D/get1DDataXY.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/getShiftX.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +16 -17
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/integrals/mapIntegrals.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegrals.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -5
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +5 -5
- package/lib-cjs/data/data1d/Spectrum1D/peaks/updatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +13 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +13 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +9 -9
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +6 -5
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +6 -6
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRanges.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +2 -2
- package/lib-cjs/data/data1d/filter1d/apodization.js +5 -1
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +5 -1
- package/lib-cjs/data/data1d/filter1d/digitalFilter.js +16 -12
- package/lib-cjs/data/data1d/filter1d/equallySpaced.js +10 -10
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +14 -10
- package/lib-cjs/data/data1d/filter1d/fft.js +27 -23
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +23 -18
- package/lib-cjs/data/data1d/filter1d/shiftX.js +8 -4
- package/lib-cjs/data/data1d/filter1d/signalProcessing.js +16 -12
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +6 -6
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +16 -12
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +5 -4
- package/lib-cjs/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +3 -3
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +4 -4
- package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +4 -4
- package/lib-cjs/data/data2d/Spectrum2D/zones/initiateZones.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/zones/isZoneExists.js +3 -3
- package/lib-cjs/data/data2d/Spectrum2D/zones/mapZones.js +1 -0
- package/lib-cjs/data/data2d/Spectrum2D/zones/updateZones.js +2 -2
- package/lib-cjs/data/data2d/filter2d/shiftX.js +11 -7
- package/lib-cjs/data/data2d/filter2d/shiftY.js +6 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +2 -2
- package/lib-cjs/data/utilities/RangeUtilities.js +9 -16
- package/lib-cjs/data/utilities/ZoneUtilities.js +6 -6
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +38 -37
- package/lib/component/header/ManualPhaseCorrectionPanel.d.ts +0 -2
- package/lib/data/data1d/filter1d/centerMean.d.ts +0 -13
- package/lib/data/data1d/filter1d/centerMean.js +0 -37
- package/lib/data/data1d/filter1d/fromTo.d.ts +0 -13
- package/lib/data/data1d/filter1d/fromTo.js +0 -31
- package/lib/data/data1d/filter1d/pareto.d.ts +0 -13
- package/lib/data/data1d/filter1d/pareto.js +0 -29
- package/lib/data/data1d/filter1d/standardDeviation.d.ts +0 -13
- package/lib/data/data1d/filter1d/standardDeviation.js +0 -37
- package/lib/data/types/data1d/Data1D.d.ts +0 -5
- package/lib/data/types/data1d/Data1D.js +0 -1
- package/lib/data/types/data1d/Datum1D.d.ts +0 -23
- package/lib/data/types/data1d/Datum1D.js +0 -1
- package/lib/data/types/data1d/Display1D.d.ts +0 -5
- package/lib/data/types/data1d/Display1D.js +0 -1
- package/lib/data/types/data1d/Info1D.d.ts +0 -8
- package/lib/data/types/data1d/Info1D.js +0 -1
- package/lib/data/types/data1d/Integral.d.ts +0 -10
- package/lib/data/types/data1d/Integral.js +0 -1
- package/lib/data/types/data1d/Integrals.d.ts +0 -6
- package/lib/data/types/data1d/Integrals.js +0 -1
- package/lib/data/types/data1d/Peak.d.ts +0 -5
- package/lib/data/types/data1d/Peak.js +0 -1
- package/lib/data/types/data1d/Peaks.d.ts +0 -5
- package/lib/data/types/data1d/Peaks.js +0 -1
- package/lib/data/types/data1d/Range.d.ts +0 -11
- package/lib/data/types/data1d/Range.js +0 -1
- package/lib/data/types/data1d/Ranges.d.ts +0 -6
- package/lib/data/types/data1d/Ranges.js +0 -1
- package/lib/data/types/data1d/Signal1D.d.ts +0 -5
- package/lib/data/types/data1d/Signal1D.js +0 -1
- package/lib/data/types/data1d/SumOptions.d.ts +0 -7
- package/lib/data/types/data1d/SumOptions.js +0 -1
- package/lib/data/types/data2d/Data2D.d.ts +0 -20
- package/lib/data/types/data2d/Data2D.js +0 -1
- package/lib/data/types/data2d/Datum2D.d.ts +0 -19
- package/lib/data/types/data2d/Datum2D.js +0 -1
- package/lib/data/types/data2d/Display2D.d.ts +0 -11
- package/lib/data/types/data2d/Display2D.js +0 -1
- package/lib/data/types/data2d/Info2D.d.ts +0 -5
- package/lib/data/types/data2d/Info2D.js +0 -1
- package/lib/data/types/data2d/Signal2D.d.ts +0 -7
- package/lib/data/types/data2d/Signal2D.js +0 -1
- package/lib/data/types/data2d/Signal2DAxisData.d.ts +0 -4
- package/lib/data/types/data2d/Signal2DAxisData.js +0 -1
- package/lib/data/types/data2d/Zone.d.ts +0 -9
- package/lib/data/types/data2d/Zone.js +0 -1
- package/lib/data/types/data2d/Zone2DAxisData.d.ts +0 -6
- package/lib/data/types/data2d/Zone2DAxisData.js +0 -1
- package/lib/data/types/data2d/Zones.d.ts +0 -7
- package/lib/data/types/data2d/Zones.js +0 -1
- package/lib-cjs/data/data1d/filter1d/centerMean.js +0 -43
- package/lib-cjs/data/data1d/filter1d/fromTo.js +0 -37
- package/lib-cjs/data/data1d/filter1d/pareto.js +0 -35
- package/lib-cjs/data/data1d/filter1d/standardDeviation.js +0 -43
- package/lib-cjs/data/types/data1d/Data1D.js +0 -2
- package/lib-cjs/data/types/data1d/Datum1D.js +0 -2
- package/lib-cjs/data/types/data1d/Display1D.js +0 -2
- package/lib-cjs/data/types/data1d/Info1D.js +0 -2
- package/lib-cjs/data/types/data1d/Integral.js +0 -2
- package/lib-cjs/data/types/data1d/Integrals.js +0 -2
- package/lib-cjs/data/types/data1d/Peak.js +0 -2
- package/lib-cjs/data/types/data1d/Peaks.js +0 -2
- package/lib-cjs/data/types/data1d/Range.js +0 -2
- package/lib-cjs/data/types/data1d/Ranges.js +0 -2
- package/lib-cjs/data/types/data1d/Signal1D.js +0 -2
- package/lib-cjs/data/types/data1d/SumOptions.js +0 -2
- package/lib-cjs/data/types/data2d/Data2D.js +0 -2
- package/lib-cjs/data/types/data2d/Datum2D.js +0 -2
- package/lib-cjs/data/types/data2d/Display2D.js +0 -2
- package/lib-cjs/data/types/data2d/Info2D.js +0 -2
- package/lib-cjs/data/types/data2d/Signal2D.js +0 -2
- package/lib-cjs/data/types/data2d/Signal2DAxisData.js +0 -2
- package/lib-cjs/data/types/data2d/Zone.js +0 -2
- package/lib-cjs/data/types/data2d/Zone2DAxisData.js +0 -2
- package/lib-cjs/data/types/data2d/Zones.js +0 -2
|
@@ -1,41 +1,45 @@
|
|
|
1
|
-
import { reimFFT, reimPhaseCorrection, xMean } from 'ml-spectra-processing';
|
|
1
|
+
import { reimFFT, reimPhaseCorrection, xMean, } from 'ml-spectra-processing';
|
|
2
2
|
import { padDataToNextPowerOfTwo } from './utils/padDataToNextPowerOfTwo';
|
|
3
3
|
export const id = 'fft';
|
|
4
4
|
export const name = 'FFT';
|
|
5
|
+
export const DOMAIN_UPDATE_RULES = {
|
|
6
|
+
updateXDomain: true,
|
|
7
|
+
updateYDomain: true,
|
|
8
|
+
};
|
|
5
9
|
/**
|
|
6
10
|
*
|
|
7
|
-
* @param {
|
|
11
|
+
* @param {Spectrum1D} spectrum
|
|
8
12
|
*/
|
|
9
|
-
export function apply(
|
|
10
|
-
if (!isApplicable(
|
|
13
|
+
export function apply(spectrum) {
|
|
14
|
+
if (!isApplicable(spectrum)) {
|
|
11
15
|
throw new Error('fft not applicable on this data');
|
|
12
16
|
}
|
|
13
|
-
checkSameLength(
|
|
14
|
-
let digitalFilterApplied =
|
|
15
|
-
const { meta: { AQ_mod: aqMod }, } =
|
|
17
|
+
checkSameLength(spectrum);
|
|
18
|
+
let digitalFilterApplied = spectrum.filters.some((e) => e.name === 'digitalFilter' && e.flag);
|
|
19
|
+
const { meta: { AQ_mod: aqMod }, } = spectrum;
|
|
16
20
|
if (aqMod === 1) {
|
|
17
|
-
removeDCOffset(
|
|
21
|
+
removeDCOffset(spectrum, digitalFilterApplied);
|
|
18
22
|
}
|
|
19
|
-
if (!isPowerOfTwo(
|
|
20
|
-
padDataToNextPowerOfTwo(
|
|
23
|
+
if (!isPowerOfTwo(spectrum.data.x.length)) {
|
|
24
|
+
padDataToNextPowerOfTwo(spectrum, digitalFilterApplied);
|
|
21
25
|
}
|
|
22
|
-
const { data, info } =
|
|
26
|
+
const { data, info } = spectrum;
|
|
23
27
|
Object.assign(data, reimFFT(data, { applyZeroShift: true }));
|
|
24
28
|
if (digitalFilterApplied) {
|
|
25
29
|
let { digitalFilter = 0 } = info;
|
|
26
30
|
let ph1 = (digitalFilter - Math.floor(digitalFilter)) * Math.PI * 2;
|
|
27
|
-
Object.assign(data, reimPhaseCorrection(data, 0, ph1));
|
|
31
|
+
Object.assign(data, reimPhaseCorrection(data, 0, -ph1, { reverse: true }));
|
|
28
32
|
}
|
|
29
|
-
data.x = generateXAxis(
|
|
33
|
+
data.x = generateXAxis(spectrum);
|
|
30
34
|
if (info?.reverse?.[0]) {
|
|
31
35
|
data.re.reverse();
|
|
32
36
|
data.im.reverse();
|
|
33
37
|
}
|
|
34
38
|
// Object.assign(datum1D.data, data);
|
|
35
|
-
|
|
39
|
+
spectrum.info = { ...info, isFid: false, isFt: true };
|
|
36
40
|
}
|
|
37
|
-
export function isApplicable(
|
|
38
|
-
if (
|
|
41
|
+
export function isApplicable(spectrum) {
|
|
42
|
+
if (spectrum.info.isComplex && spectrum.info.isFid)
|
|
39
43
|
return true;
|
|
40
44
|
return false;
|
|
41
45
|
}
|
|
@@ -65,9 +69,9 @@ function generateXAxis(datum1D) {
|
|
|
65
69
|
function isPowerOfTwo(n) {
|
|
66
70
|
return n !== 0 && (n & (n - 1)) === 0;
|
|
67
71
|
}
|
|
68
|
-
function removeDCOffset(
|
|
69
|
-
let { digitalFilter = 0 } = digitalFilterApplied ?
|
|
70
|
-
const data =
|
|
72
|
+
function removeDCOffset(spectrum, digitalFilterApplied) {
|
|
73
|
+
let { digitalFilter = 0 } = digitalFilterApplied ? spectrum.info : {};
|
|
74
|
+
const data = spectrum.data;
|
|
71
75
|
const nbPoints = data.re.length;
|
|
72
76
|
const newRe = new Float64Array(data.re);
|
|
73
77
|
const newIm = new Float64Array(data.im);
|
|
@@ -77,11 +81,11 @@ function removeDCOffset(datum1D, digitalFilterApplied) {
|
|
|
77
81
|
newRe[i] -= averageRe;
|
|
78
82
|
newIm[i] -= averageIm;
|
|
79
83
|
}
|
|
80
|
-
Object.assign(
|
|
81
|
-
return
|
|
84
|
+
Object.assign(spectrum.data, { re: newRe, im: newIm });
|
|
85
|
+
return spectrum;
|
|
82
86
|
}
|
|
83
|
-
function checkSameLength(
|
|
84
|
-
const { data } =
|
|
87
|
+
function checkSameLength(spectrum) {
|
|
88
|
+
const { data } = spectrum;
|
|
85
89
|
if (data.x.length !== data.re.length || data.x.length !== data.im?.length) {
|
|
86
90
|
throw new Error('The length of data should be equal');
|
|
87
91
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Data1D } from '
|
|
2
|
-
import {
|
|
1
|
+
import { Data1D, Spectrum1D } from 'nmr-load-save';
|
|
2
|
+
import { FilterDomainUpdateRules } from '../../FiltersManager';
|
|
3
3
|
export declare const id = "phaseCorrection";
|
|
4
4
|
export declare const name = "Phase correction";
|
|
5
|
+
export declare const DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules>;
|
|
5
6
|
/**
|
|
6
7
|
*
|
|
7
|
-
* @param {
|
|
8
|
+
* @param {Spectrum1D} spectrum
|
|
8
9
|
* @param {Object} [options={}]
|
|
9
10
|
* @param {number} [options.ph0=0]
|
|
10
11
|
* @param {number} [options.ph1=0]
|
|
@@ -14,8 +15,8 @@ interface PhaseCorrectionOptions {
|
|
|
14
15
|
ph1?: number;
|
|
15
16
|
absolute?: boolean;
|
|
16
17
|
}
|
|
17
|
-
export declare function apply(
|
|
18
|
-
export declare function isApplicable(
|
|
18
|
+
export declare function apply(spectrum: Spectrum1D, options: PhaseCorrectionOptions): void;
|
|
19
|
+
export declare function isApplicable(spectrum: Spectrum1D): spectrum is Spectrum1D & {
|
|
19
20
|
data: Required<Data1D>;
|
|
20
21
|
};
|
|
21
22
|
export declare function reduce(previousValue: any, newValue: any): {
|
|
@@ -1,36 +1,40 @@
|
|
|
1
1
|
import { reimAbsolute, reimPhaseCorrection, reimAutoPhaseCorrection, } from 'ml-spectra-processing';
|
|
2
2
|
export const id = 'phaseCorrection';
|
|
3
3
|
export const name = 'Phase correction';
|
|
4
|
-
export
|
|
5
|
-
|
|
4
|
+
export const DOMAIN_UPDATE_RULES = {
|
|
5
|
+
updateXDomain: false,
|
|
6
|
+
updateYDomain: false,
|
|
7
|
+
};
|
|
8
|
+
export function apply(spectrum, options) {
|
|
9
|
+
if (!isApplicable(spectrum)) {
|
|
6
10
|
throw new Error('phaseCorrection not applicable on this data');
|
|
7
11
|
}
|
|
8
12
|
const { absolute = false } = options;
|
|
9
|
-
const filter =
|
|
13
|
+
const filter = spectrum.filters?.find((filter) => filter.name === id);
|
|
10
14
|
if (absolute) {
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
spectrum.data.re = reimAbsolute(spectrum.data);
|
|
16
|
+
spectrum.data.im = new Float64Array(0);
|
|
13
17
|
if (filter) {
|
|
14
18
|
filter.value = { ...filter.value, ph0: 0, ph1: 0, absolute };
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
21
|
else if ('ph0' in options && 'ph1' in options) {
|
|
18
22
|
let { ph0, ph1 } = options;
|
|
19
|
-
phaseCorrection(
|
|
23
|
+
phaseCorrection(spectrum, { ph0, ph1 });
|
|
20
24
|
if (filter) {
|
|
21
25
|
filter.value = { ...filter.value, absolute };
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
else {
|
|
25
|
-
let { ph0, ph1 } = autoPhaseCorrection(
|
|
26
|
-
phaseCorrection(
|
|
29
|
+
let { ph0, ph1 } = autoPhaseCorrection(spectrum);
|
|
30
|
+
phaseCorrection(spectrum, { ph0, ph1 });
|
|
27
31
|
if (filter) {
|
|
28
32
|
filter.value = { ...filter.value, absolute, ph0, ph1 };
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
35
|
}
|
|
32
|
-
export function isApplicable(
|
|
33
|
-
if (
|
|
36
|
+
export function isApplicable(spectrum) {
|
|
37
|
+
if (spectrum.info.isComplex && !spectrum.info.isFid)
|
|
34
38
|
return true;
|
|
35
39
|
return false;
|
|
36
40
|
}
|
|
@@ -40,20 +44,21 @@ export function reduce(previousValue, newValue) {
|
|
|
40
44
|
reduce: newValue,
|
|
41
45
|
};
|
|
42
46
|
}
|
|
43
|
-
function phaseCorrection(
|
|
47
|
+
function phaseCorrection(spectrum, { ph0, ph1 }) {
|
|
44
48
|
ph0 *= Math.PI / 180;
|
|
45
49
|
ph1 *= Math.PI / 180;
|
|
46
|
-
|
|
47
|
-
...
|
|
48
|
-
...reimPhaseCorrection(
|
|
50
|
+
spectrum.data = {
|
|
51
|
+
...spectrum.data,
|
|
52
|
+
...reimPhaseCorrection(spectrum.data, ph0, ph1, { reverse: true }),
|
|
49
53
|
};
|
|
50
54
|
}
|
|
51
|
-
function autoPhaseCorrection(
|
|
52
|
-
const { minRegSize = 5, maxDistanceToJoin = 128, magnitudeMode = true, factorNoise = 5, } = options;
|
|
53
|
-
return reimAutoPhaseCorrection(
|
|
55
|
+
function autoPhaseCorrection(spectrum, options = {}) {
|
|
56
|
+
const { minRegSize = 5, maxDistanceToJoin = 128, magnitudeMode = true, factorNoise = 5, reverse = true, } = options;
|
|
57
|
+
return reimAutoPhaseCorrection(spectrum.data, {
|
|
54
58
|
minRegSize,
|
|
55
59
|
maxDistanceToJoin,
|
|
56
60
|
magnitudeMode,
|
|
57
61
|
factorNoise,
|
|
62
|
+
reverse,
|
|
58
63
|
});
|
|
59
64
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spectrum1D } from 'nmr-load-save';
|
|
2
|
+
import { FilterDomainUpdateRules } from '../../FiltersManager';
|
|
2
3
|
/**
|
|
3
4
|
*
|
|
4
|
-
* @param {
|
|
5
|
+
* @param {Spectrum1D} spectrum
|
|
5
6
|
* @param {number} [shiftValue=0]
|
|
6
7
|
*/
|
|
7
8
|
export declare const id = "shiftX";
|
|
8
9
|
export declare const name = "Shift X";
|
|
9
|
-
export declare
|
|
10
|
+
export declare const DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules>;
|
|
11
|
+
export declare function apply(spectrum: Spectrum1D, options?: {
|
|
10
12
|
shift?: number;
|
|
11
13
|
}): void;
|
|
12
14
|
export declare function isApplicable(): boolean;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {
|
|
3
|
+
* @param {Spectrum1D} spectrum
|
|
4
4
|
* @param {number} [shiftValue=0]
|
|
5
5
|
*/
|
|
6
6
|
export const id = 'shiftX';
|
|
7
7
|
export const name = 'Shift X';
|
|
8
|
-
export
|
|
8
|
+
export const DOMAIN_UPDATE_RULES = {
|
|
9
|
+
updateXDomain: true,
|
|
10
|
+
updateYDomain: false,
|
|
11
|
+
};
|
|
12
|
+
export function apply(spectrum, options = {}) {
|
|
9
13
|
const { shift = 0 } = options;
|
|
10
|
-
|
|
14
|
+
spectrum.data.x = spectrum.data.x.map((val) => val + shift);
|
|
11
15
|
}
|
|
12
16
|
export function isApplicable() {
|
|
13
17
|
return true;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spectrum1D } from 'nmr-load-save';
|
|
2
|
+
import { FilterDomainUpdateRules } from '../../FiltersManager';
|
|
2
3
|
import { MatrixOptions } from '../../types/data1d/MatrixOptions';
|
|
3
4
|
export declare const id = "signalProcessing";
|
|
4
5
|
export declare const name = "Signal processing";
|
|
6
|
+
export declare const DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules>;
|
|
5
7
|
/**
|
|
6
8
|
*
|
|
7
|
-
* @param {
|
|
9
|
+
* @param {Spectrum1D} spectrum
|
|
8
10
|
* @param {MatrixOptions} options
|
|
9
11
|
*/
|
|
10
|
-
export declare function apply(
|
|
11
|
-
export declare function isApplicable(
|
|
12
|
+
export declare function apply(spectrum: Spectrum1D, options: MatrixOptions): void;
|
|
13
|
+
export declare function isApplicable(spectrum: Spectrum1D): boolean;
|
|
12
14
|
export declare function reduce(previousValue: any, newValue: any): {
|
|
13
15
|
once: boolean;
|
|
14
16
|
reduce: any;
|
|
@@ -17,7 +19,7 @@ export declare function reduce(previousValue: any, newValue: any): {
|
|
|
17
19
|
* Apply filters on {x:[], y:[]}
|
|
18
20
|
* @returns A very important number
|
|
19
21
|
*/
|
|
20
|
-
export declare function filterXY(
|
|
22
|
+
export declare function filterXY(spectrum: Spectrum1D, options: MatrixOptions): {
|
|
21
23
|
x: Float64Array;
|
|
22
24
|
re: Float64Array;
|
|
23
25
|
im: Float64Array | undefined;
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import * as Filters from 'ml-signal-processing';
|
|
2
2
|
export const id = 'signalProcessing';
|
|
3
3
|
export const name = 'Signal processing';
|
|
4
|
+
export const DOMAIN_UPDATE_RULES = {
|
|
5
|
+
updateXDomain: true,
|
|
6
|
+
updateYDomain: true,
|
|
7
|
+
};
|
|
4
8
|
/**
|
|
5
9
|
*
|
|
6
|
-
* @param {
|
|
10
|
+
* @param {Spectrum1D} spectrum
|
|
7
11
|
* @param {MatrixOptions} options
|
|
8
12
|
*/
|
|
9
|
-
export function apply(
|
|
10
|
-
if (!isApplicable(
|
|
13
|
+
export function apply(spectrum, options) {
|
|
14
|
+
if (!isApplicable(spectrum)) {
|
|
11
15
|
throw new Error('Signal Processing is not applicable on this data');
|
|
12
16
|
}
|
|
13
|
-
|
|
17
|
+
spectrum.data = filterXY(spectrum, options);
|
|
14
18
|
}
|
|
15
|
-
export function isApplicable(
|
|
16
|
-
if (
|
|
19
|
+
export function isApplicable(spectrum) {
|
|
20
|
+
if (spectrum.info.isFt)
|
|
17
21
|
return true;
|
|
18
22
|
return false;
|
|
19
23
|
}
|
|
@@ -27,11 +31,11 @@ export function reduce(previousValue, newValue) {
|
|
|
27
31
|
* Apply filters on {x:[], y:[]}
|
|
28
32
|
* @returns A very important number
|
|
29
33
|
*/
|
|
30
|
-
export function filterXY(
|
|
31
|
-
let x =
|
|
32
|
-
let cloneX =
|
|
33
|
-
let re =
|
|
34
|
-
let im =
|
|
34
|
+
export function filterXY(spectrum, options) {
|
|
35
|
+
let x = spectrum.data.x.slice(0);
|
|
36
|
+
let cloneX = spectrum.data.x.slice(0);
|
|
37
|
+
let re = spectrum.data.re.slice(0);
|
|
38
|
+
let im = spectrum.data.im?.slice(0);
|
|
35
39
|
const filters = options.filters.slice();
|
|
36
40
|
const { range: { from, to }, numberOfPoints, exclusionsZones: exclusions, } = options;
|
|
37
41
|
filters.push({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function padDataToNextPowerOfTwo(
|
|
1
|
+
import { Spectrum1D } from 'nmr-load-save';
|
|
2
|
+
export declare function padDataToNextPowerOfTwo(spectrum: Spectrum1D, digitalFilterApplied: boolean): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { xSequentialFill } from 'ml-spectra-processing';
|
|
2
|
-
export function padDataToNextPowerOfTwo(
|
|
3
|
-
const { x, re, im } =
|
|
2
|
+
export function padDataToNextPowerOfTwo(spectrum, digitalFilterApplied) {
|
|
3
|
+
const { x, re, im } = spectrum.data;
|
|
4
4
|
const size = nextPowerOfTwo(x.length);
|
|
5
5
|
let newRE = new Float64Array(size);
|
|
6
6
|
let newIM = new Float64Array(size);
|
|
7
|
-
const pointsToShift = getPointsToShift(
|
|
7
|
+
const pointsToShift = getPointsToShift(spectrum);
|
|
8
8
|
newRE.set(re.slice(0, length - pointsToShift));
|
|
9
9
|
newIM.set(im.slice(0, length - pointsToShift));
|
|
10
10
|
if (pointsToShift > 0 && digitalFilterApplied) {
|
|
@@ -16,10 +16,10 @@ export function padDataToNextPowerOfTwo(datum1D, digitalFilterApplied) {
|
|
|
16
16
|
size,
|
|
17
17
|
step: x[1] - x[0],
|
|
18
18
|
});
|
|
19
|
-
|
|
19
|
+
spectrum.data = { ...spectrum.data, re: newRE, im: newIM, x: newX };
|
|
20
20
|
}
|
|
21
|
-
function getPointsToShift(
|
|
22
|
-
let grpdly =
|
|
21
|
+
function getPointsToShift(spectrum) {
|
|
22
|
+
let grpdly = spectrum.info?.digitalFilter || 0;
|
|
23
23
|
return grpdly > 0 ? Math.floor(grpdly) : 0;
|
|
24
24
|
}
|
|
25
25
|
function nextPowerOfTwo(n) {
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { Data1D } from '
|
|
2
|
-
import {
|
|
1
|
+
import { Data1D, Spectrum1D } from 'nmr-load-save';
|
|
2
|
+
import { FilterDomainUpdateRules } from '../../FiltersManager';
|
|
3
3
|
export declare const id = "zeroFilling";
|
|
4
|
-
export declare const name = "Zero
|
|
4
|
+
export declare const name = "Zero filling";
|
|
5
|
+
export declare const DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules>;
|
|
5
6
|
/**
|
|
6
7
|
*
|
|
7
|
-
* @param {
|
|
8
|
+
* @param {Spectrum1D} spectrum
|
|
8
9
|
* @param {Object} [nbPoints]
|
|
9
10
|
*/
|
|
10
11
|
export interface ZeroFillingOptions {
|
|
11
12
|
nbPoints?: number;
|
|
12
13
|
factor?: number;
|
|
13
14
|
}
|
|
14
|
-
export declare function apply(
|
|
15
|
-
export declare function isApplicable(
|
|
15
|
+
export declare function apply(spectrum: Spectrum1D, options: ZeroFillingOptions): void;
|
|
16
|
+
export declare function isApplicable(spectrum: Spectrum1D): spectrum is Spectrum1D & {
|
|
16
17
|
data: Required<Data1D>;
|
|
17
18
|
};
|
|
18
19
|
export declare function reduce(_previousValue: any, newValue: any): {
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
export const id = 'zeroFilling';
|
|
2
|
-
export const name = 'Zero
|
|
3
|
-
export
|
|
4
|
-
|
|
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)) {
|
|
5
9
|
throw new Error('zeroFilling not applicable on this data');
|
|
6
10
|
}
|
|
7
11
|
let { nbPoints, factor = 2 } = options;
|
|
8
12
|
if (!nbPoints) {
|
|
9
|
-
nbPoints = 2 ** Math.round(Math.log2(
|
|
10
|
-
const filter =
|
|
13
|
+
nbPoints = 2 ** Math.round(Math.log2(spectrum.data.x.length * factor));
|
|
14
|
+
const filter = spectrum.filters.find((filter) => filter.name === id);
|
|
11
15
|
if (filter) {
|
|
12
16
|
filter.value = { nbPoints };
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
|
-
let digitalFilterApplied =
|
|
16
|
-
let grpdly =
|
|
19
|
+
let digitalFilterApplied = spectrum.filters.some((e) => e.name === 'digitalFilter' && e.flag);
|
|
20
|
+
let grpdly = spectrum.info?.digitalFilter || 0;
|
|
17
21
|
let pointsToShift;
|
|
18
22
|
if (grpdly > 0 && digitalFilterApplied) {
|
|
19
23
|
pointsToShift = Math.floor(grpdly);
|
|
@@ -21,7 +25,7 @@ export function apply(datum1D, options) {
|
|
|
21
25
|
else {
|
|
22
26
|
pointsToShift = 0;
|
|
23
27
|
}
|
|
24
|
-
const { re, im, x } =
|
|
28
|
+
const { re, im = [], x } = spectrum.data;
|
|
25
29
|
let newRE = new Float64Array(nbPoints);
|
|
26
30
|
let newIM = new Float64Array(nbPoints);
|
|
27
31
|
let newX = new Float64Array(nbPoints);
|
|
@@ -39,10 +43,10 @@ export function apply(datum1D, options) {
|
|
|
39
43
|
newRE.set(re.slice(re.length - pointsToShift), nbPoints - pointsToShift);
|
|
40
44
|
newIM.set(im.slice(re.length - pointsToShift), nbPoints - pointsToShift);
|
|
41
45
|
}
|
|
42
|
-
|
|
46
|
+
spectrum.data = { ...spectrum.data, re: newRE, im: newIM, x: newX };
|
|
43
47
|
}
|
|
44
|
-
export function isApplicable(
|
|
45
|
-
if (
|
|
48
|
+
export function isApplicable(spectrum) {
|
|
49
|
+
if (spectrum.info.isComplex && spectrum.info.isFid) {
|
|
46
50
|
return true;
|
|
47
51
|
}
|
|
48
52
|
return false;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spectrum, Spectrum1D } from 'nmr-load-save';
|
|
2
2
|
import { MultipleSpectraAnalysisPreferences, PanelsPreferences, WorkSpacePanelPreferences } from '../../component/workspaces/Workspace';
|
|
3
|
-
import { Datum1D } from '../types/data1d/Datum1D';
|
|
4
3
|
import { RangeDetectionResult } from '../types/data1d/index';
|
|
5
4
|
export declare enum COLUMNS_TYPES {
|
|
6
5
|
NORMAL = "NORMAL",
|
|
@@ -44,7 +43,7 @@ export interface SpectraAnalysisData {
|
|
|
44
43
|
export type SpectraAnalysis = Record<string /** where the key is the nucleus*/, SpectraAnalysisInnerData>;
|
|
45
44
|
export declare function getColumns(spectraAnalysis: PanelsPreferences['multipleSpectraAnalysis'], nucleus: string): any;
|
|
46
45
|
export declare function getValue(colKey: string, columns: SpectraAnalysisColumns, data: any): any;
|
|
47
|
-
export declare function getSpectraAnalysis(spectra:
|
|
46
|
+
export declare function getSpectraAnalysis(spectra: Spectrum[], options: any): {
|
|
48
47
|
values: Array<AnalysisRow>;
|
|
49
48
|
sum: number;
|
|
50
49
|
};
|
|
@@ -57,7 +56,7 @@ export declare function mapColumns(options: MultipleSpectraAnalysisPreferences['
|
|
|
57
56
|
};
|
|
58
57
|
export declare function changeColumnValueKey(spectraAnalysis: PanelsPreferences['multipleSpectraAnalysis'], nucleus: string, columnKey: string, newKey: COLUMNS_VALUES_KEYS): void;
|
|
59
58
|
export declare function analyzeSpectra(spectraAnalysis: PanelsPreferences['multipleSpectraAnalysis'], options: any): void;
|
|
60
|
-
export declare function generateAnalyzeSpectra(multipleSpectraAnalysis: MultipleSpectraAnalysisPreferences, spectra:
|
|
59
|
+
export declare function generateAnalyzeSpectra(multipleSpectraAnalysis: MultipleSpectraAnalysisPreferences, spectra: Spectrum1D[], nucleus: string): {
|
|
61
60
|
values: unknown[];
|
|
62
61
|
options: {
|
|
63
62
|
columns: SpectraAnalysisColumns;
|
|
@@ -65,5 +64,5 @@ export declare function generateAnalyzeSpectra(multipleSpectraAnalysis: Multiple
|
|
|
65
64
|
};
|
|
66
65
|
};
|
|
67
66
|
export declare function deleteSpectraAnalysis(spectraAnalysis: PanelsPreferences['multipleSpectraAnalysis'], colKey: string, nucleus: string): void;
|
|
68
|
-
export declare function getDataAsString(spectraAnalysis: SpectraAnalysisData, spectra:
|
|
67
|
+
export declare function getDataAsString(spectraAnalysis: SpectraAnalysisData, spectra: Spectrum1D[], spectraPanelPreferences: WorkSpacePanelPreferences['spectra']): string | null;
|
|
69
68
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spectrum2D } from 'nmr-load-save';
|
|
2
2
|
interface Level {
|
|
3
3
|
positive: number;
|
|
4
4
|
negative: number;
|
|
@@ -32,7 +32,7 @@ interface ReturnContoursManager {
|
|
|
32
32
|
}
|
|
33
33
|
declare function getDefaultContoursLevel(options: ContourOptions): Level;
|
|
34
34
|
declare function contoursManager(spectrumID: string, state: ContoursLevels, options: ContourOptions): ReturnContoursManager;
|
|
35
|
-
declare function drawContours(level: number,
|
|
35
|
+
declare function drawContours(level: number, spectrum: Spectrum2D, negative?: boolean, quadrant?: string): {
|
|
36
36
|
contours: any;
|
|
37
37
|
timeout: boolean;
|
|
38
38
|
};
|
|
@@ -96,25 +96,26 @@ function range(from, to, step) {
|
|
|
96
96
|
}
|
|
97
97
|
return result;
|
|
98
98
|
}
|
|
99
|
-
function drawContours(level,
|
|
99
|
+
function drawContours(level, spectrum, negative = false, quadrant = 'rr') {
|
|
100
100
|
const zoom = level / 2 + 1;
|
|
101
|
-
const { positive: { numberOfLayers: numberOfPositiveLayer }, negative: { numberOfLayers: numberOfNegativeLayer }, } =
|
|
101
|
+
const { positive: { numberOfLayers: numberOfPositiveLayer }, negative: { numberOfLayers: numberOfNegativeLayer }, } = spectrum.display.contourOptions;
|
|
102
102
|
if (negative) {
|
|
103
103
|
return getContours(zoom, {
|
|
104
104
|
negative,
|
|
105
105
|
nbLevels: numberOfNegativeLayer,
|
|
106
|
-
data:
|
|
106
|
+
data: spectrum.data[quadrant],
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
return getContours(zoom, {
|
|
110
110
|
nbLevels: numberOfPositiveLayer,
|
|
111
|
-
data:
|
|
111
|
+
data: spectrum.data[quadrant],
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
function getContours(zoomLevel, options) {
|
|
115
115
|
const { negative = false, timeout = 2000, nbLevels, data } = options;
|
|
116
116
|
const xs = getRange(data.minX, data.maxX, data.z[0].length);
|
|
117
117
|
const ys = getRange(data.minY, data.maxY, data.z.length);
|
|
118
|
+
// @ts-expect-error refactor Conrect class to accept Float32Array Array instead of an array of number
|
|
118
119
|
const conrec = new Conrec(data.z, { xs, ys, swapAxes: false });
|
|
119
120
|
const sanResult = calculateSanPlot('2D', data);
|
|
120
121
|
const median = sanResult.positive;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Color2D } from '
|
|
1
|
+
import { Color2D } from 'nmr-load-save';
|
|
2
2
|
export declare function get2DColor(options: any, usedColors: any, regenerate?: boolean): Color2D;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spectrum2D } from 'nmr-load-save';
|
|
2
2
|
export interface Zone2DError {
|
|
3
3
|
x: number;
|
|
4
4
|
y: number;
|
|
5
5
|
}
|
|
6
|
-
export declare function get2DSpectrumErrorValue(
|
|
6
|
+
export declare function get2DSpectrumErrorValue(spectrum: Spectrum2D): Zone2DError;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { Data2DFt, Info2D } from 'nmr-load-save';
|
|
1
2
|
import { UsedColors } from '../../../types/UsedColors';
|
|
2
|
-
import { Info2D } from '../../types/data2d';
|
|
3
|
-
import { MinMaxContent } from '../../types/data2d/Data2D';
|
|
4
3
|
/**
|
|
5
4
|
* calculate the missing projection
|
|
6
5
|
*/
|
|
7
|
-
export declare function getMissingProjection(datum:
|
|
6
|
+
export declare function getMissingProjection(datum: Data2DFt['rr'], nucleus: string, datumInfo: Info2D, usedColors: UsedColors): import("nmr-load-save").Spectrum1D;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spectrum2D } from 'nmr-load-save';
|
|
2
2
|
export interface Shift2D {
|
|
3
3
|
x: number;
|
|
4
4
|
y: number;
|
|
5
5
|
}
|
|
6
|
-
export declare function getShift(
|
|
6
|
+
export declare function getShift(spectrum: Spectrum2D): Shift2D;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as Filters from '../../Filters';
|
|
2
|
-
export function getShift(
|
|
2
|
+
export function getShift(spectrum) {
|
|
3
3
|
let shift = { x: 0, y: 0 };
|
|
4
|
-
if (
|
|
5
|
-
for (const filter of
|
|
4
|
+
if (spectrum?.filters) {
|
|
5
|
+
for (const filter of spectrum.filters) {
|
|
6
6
|
if (filter.name === Filters.shift2DX.id) {
|
|
7
7
|
shift.x = filter?.flag ? filter.value.shift : 0;
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spectrum2D } from 'nmr-load-save';
|
|
2
2
|
/** get 2d projection
|
|
3
3
|
* @param {number} x in ppm
|
|
4
4
|
* @param {number} y in ppm
|
|
@@ -7,8 +7,8 @@ interface SlicePosition {
|
|
|
7
7
|
x: number;
|
|
8
8
|
y: number;
|
|
9
9
|
}
|
|
10
|
-
export declare function getSlice(spectrum:
|
|
11
|
-
horizontal: import("
|
|
12
|
-
vertical: import("
|
|
10
|
+
export declare function getSlice(spectrum: Spectrum2D, position: SlicePosition): {
|
|
11
|
+
horizontal: import("nmr-load-save").Spectrum1D;
|
|
12
|
+
vertical: import("nmr-load-save").Spectrum1D;
|
|
13
13
|
} | undefined;
|
|
14
14
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function initiateDatum2D(spectrum: any, usedColors?: {}):
|
|
1
|
+
import { Spectrum2D } from 'nmr-load-save';
|
|
2
|
+
export declare function initiateDatum2D(spectrum: any, usedColors?: {}): Spectrum2D;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function isSpectrum2D(spectrum: Datum1D | Datum2D): spectrum is Datum2D;
|
|
1
|
+
import { Spectrum, Spectrum2D } from 'nmr-load-save';
|
|
2
|
+
export declare function isSpectrum2D(spectrum: Spectrum): spectrum is Spectrum2D;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spectrum2D } from 'nmr-load-save';
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {number} zoneID
|
|
@@ -7,7 +7,7 @@ import { Datum2D } from '../../../types/data2d';
|
|
|
7
7
|
* @param {number} signal.y
|
|
8
8
|
* @param {string} signal.id
|
|
9
9
|
*/
|
|
10
|
-
export declare function changeZoneSignal(
|
|
10
|
+
export declare function changeZoneSignal(spectrum: Spectrum2D, zoneID: any, newSignal: any): {
|
|
11
11
|
xShift: number;
|
|
12
12
|
yShift: number;
|
|
13
13
|
};
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* @param {number} signal.y
|
|
7
7
|
* @param {string} signal.id
|
|
8
8
|
*/
|
|
9
|
-
export function changeZoneSignal(
|
|
10
|
-
const zoneIndex =
|
|
9
|
+
export function changeZoneSignal(spectrum, zoneID, newSignal) {
|
|
10
|
+
const zoneIndex = spectrum.zones.values.findIndex((zone) => zone.id === zoneID);
|
|
11
11
|
if (zoneIndex !== -1) {
|
|
12
|
-
const signalIndex =
|
|
13
|
-
const zone =
|
|
12
|
+
const signalIndex = spectrum.zones.values[zoneIndex].signals.findIndex((s) => s.id === newSignal.id);
|
|
13
|
+
const zone = spectrum.zones.values[zoneIndex];
|
|
14
14
|
if (signalIndex !== -1) {
|
|
15
15
|
const originalSignal = zone.signals[signalIndex];
|
|
16
16
|
const xShift = newSignal?.x || newSignal?.x === 0
|