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
|
@@ -102,19 +102,19 @@ function range(from, to, step) {
|
|
|
102
102
|
}
|
|
103
103
|
return result;
|
|
104
104
|
}
|
|
105
|
-
function drawContours(level,
|
|
105
|
+
function drawContours(level, spectrum, negative = false, quadrant = 'rr') {
|
|
106
106
|
const zoom = level / 2 + 1;
|
|
107
|
-
const { positive: { numberOfLayers: numberOfPositiveLayer }, negative: { numberOfLayers: numberOfNegativeLayer }, } =
|
|
107
|
+
const { positive: { numberOfLayers: numberOfPositiveLayer }, negative: { numberOfLayers: numberOfNegativeLayer }, } = spectrum.display.contourOptions;
|
|
108
108
|
if (negative) {
|
|
109
109
|
return getContours(zoom, {
|
|
110
110
|
negative,
|
|
111
111
|
nbLevels: numberOfNegativeLayer,
|
|
112
|
-
data:
|
|
112
|
+
data: spectrum.data[quadrant],
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
return getContours(zoom, {
|
|
116
116
|
nbLevels: numberOfPositiveLayer,
|
|
117
|
-
data:
|
|
117
|
+
data: spectrum.data[quadrant],
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
exports.drawContours = drawContours;
|
|
@@ -122,6 +122,7 @@ function getContours(zoomLevel, options) {
|
|
|
122
122
|
const { negative = false, timeout = 2000, nbLevels, data } = options;
|
|
123
123
|
const xs = getRange(data.minX, data.maxX, data.z[0].length);
|
|
124
124
|
const ys = getRange(data.minY, data.maxY, data.z.length);
|
|
125
|
+
// @ts-expect-error refactor Conrect class to accept Float32Array Array instead of an array of number
|
|
125
126
|
const conrec = new ml_conrec_1.Conrec(data.z, { xs, ys, swapAxes: false });
|
|
126
127
|
const sanResult = (0, calculateSanPlot_1.calculateSanPlot)('2D', data);
|
|
127
128
|
const median = sanResult.positive;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.get2DSpectrumErrorValue = void 0;
|
|
4
|
-
function get2DSpectrumErrorValue(
|
|
5
|
-
const { data, info } =
|
|
4
|
+
function get2DSpectrumErrorValue(spectrum) {
|
|
5
|
+
const { data, info } = spectrum;
|
|
6
6
|
const { minX, maxX, minY, maxY } = info.isFid
|
|
7
7
|
? data.re
|
|
8
8
|
: data.rr;
|
|
@@ -25,10 +25,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.getShift = void 0;
|
|
27
27
|
const Filters = __importStar(require("../../Filters"));
|
|
28
|
-
function getShift(
|
|
28
|
+
function getShift(spectrum) {
|
|
29
29
|
let shift = { x: 0, y: 0 };
|
|
30
|
-
if (
|
|
31
|
-
for (const filter of
|
|
30
|
+
if (spectrum?.filters) {
|
|
31
|
+
for (const filter of spectrum.filters) {
|
|
32
32
|
if (filter.name === Filters.shift2DX.id) {
|
|
33
33
|
shift.x = filter?.flag ? filter.value.shift : 0;
|
|
34
34
|
}
|
|
@@ -9,11 +9,11 @@ exports.changeZoneSignal = void 0;
|
|
|
9
9
|
* @param {number} signal.y
|
|
10
10
|
* @param {string} signal.id
|
|
11
11
|
*/
|
|
12
|
-
function changeZoneSignal(
|
|
13
|
-
const zoneIndex =
|
|
12
|
+
function changeZoneSignal(spectrum, zoneID, newSignal) {
|
|
13
|
+
const zoneIndex = spectrum.zones.values.findIndex((zone) => zone.id === zoneID);
|
|
14
14
|
if (zoneIndex !== -1) {
|
|
15
|
-
const signalIndex =
|
|
16
|
-
const zone =
|
|
15
|
+
const signalIndex = spectrum.zones.values[zoneIndex].signals.findIndex((s) => s.id === newSignal.id);
|
|
16
|
+
const zone = spectrum.zones.values[zoneIndex];
|
|
17
17
|
if (signalIndex !== -1) {
|
|
18
18
|
const originalSignal = zone.signals[signalIndex];
|
|
19
19
|
const xShift = newSignal?.x || newSignal?.x === 0
|
|
@@ -13,16 +13,16 @@ const nmr_processing_1 = require("nmr-processing");
|
|
|
13
13
|
* @param {number} options.thresholdFactor
|
|
14
14
|
* @param {boolean} options.convolutionByFFT
|
|
15
15
|
*/
|
|
16
|
-
function getDetectionZones(
|
|
16
|
+
function getDetectionZones(spectrum, options) {
|
|
17
17
|
let dataMatrix = {};
|
|
18
18
|
if (options.selectedZone) {
|
|
19
19
|
options.enhanceSymmetry = false;
|
|
20
|
-
dataMatrix = getSubMatrix(
|
|
20
|
+
dataMatrix = getSubMatrix(spectrum, options.selectedZone);
|
|
21
21
|
}
|
|
22
22
|
else {
|
|
23
|
-
dataMatrix =
|
|
23
|
+
dataMatrix = spectrum.data;
|
|
24
24
|
}
|
|
25
|
-
return autoZonesDetection(dataMatrix, { ...options, info:
|
|
25
|
+
return autoZonesDetection(dataMatrix, { ...options, info: spectrum.info });
|
|
26
26
|
}
|
|
27
27
|
exports.getDetectionZones = getDetectionZones;
|
|
28
28
|
function autoZonesDetection(data, options) {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.initiateZones = void 0;
|
|
7
7
|
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
8
|
const mapZones_1 = require("./mapZones");
|
|
9
|
-
function initiateZones(options,
|
|
9
|
+
function initiateZones(options, spectrum) {
|
|
10
10
|
return (0, merge_1.default)({
|
|
11
11
|
values: [],
|
|
12
12
|
options: {
|
|
@@ -15,7 +15,7 @@ function initiateZones(options, datum) {
|
|
|
15
15
|
sumAuto: true,
|
|
16
16
|
},
|
|
17
17
|
}, options.zones, {
|
|
18
|
-
values: (0, mapZones_1.mapZones)(options?.zones?.values || [],
|
|
18
|
+
values: (0, mapZones_1.mapZones)(options?.zones?.values || [], spectrum),
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
exports.initiateZones = initiateZones;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isZoneExists = void 0;
|
|
4
|
-
function isZoneExists(zone,
|
|
4
|
+
function isZoneExists(zone, spectrum, error) {
|
|
5
5
|
const newXRange = zone.x || { from: 0, to: 0 };
|
|
6
6
|
const newYRange = zone.y || { from: 0, to: 0 };
|
|
7
|
-
if (!
|
|
7
|
+
if (!spectrum.zones?.values)
|
|
8
8
|
return false;
|
|
9
|
-
for (const { x, y } of
|
|
9
|
+
for (const { x, y } of spectrum.zones.values) {
|
|
10
10
|
if (Math.abs(newXRange.from - x.from) < error.x &&
|
|
11
11
|
Math.abs(newXRange.to - x.to) < error.x &&
|
|
12
12
|
Math.abs(newYRange.from - y.from) < error.y &&
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateZones = void 0;
|
|
4
4
|
const mapZones_1 = require("./mapZones");
|
|
5
|
-
function updateZones(
|
|
6
|
-
|
|
5
|
+
function updateZones(spectrum) {
|
|
6
|
+
spectrum.zones.values = (0, mapZones_1.mapZones)(spectrum.zones.values, spectrum, {
|
|
7
7
|
checkIsExisting: false,
|
|
8
8
|
shiftTarget: 'current',
|
|
9
9
|
});
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reduce = exports.isApplicable = exports.apply = exports.name = exports.id = void 0;
|
|
3
|
+
exports.reduce = exports.isApplicable = exports.apply = exports.DOMAIN_UPDATE_RULES = exports.name = exports.id = void 0;
|
|
4
4
|
exports.id = 'shift2DX';
|
|
5
|
-
exports.name = 'Shift
|
|
5
|
+
exports.name = 'Shift X';
|
|
6
|
+
exports.DOMAIN_UPDATE_RULES = {
|
|
7
|
+
updateXDomain: true,
|
|
8
|
+
updateYDomain: false,
|
|
9
|
+
};
|
|
6
10
|
/**
|
|
7
11
|
*
|
|
8
|
-
* @param {
|
|
12
|
+
* @param {Spectrum2D} spectrum
|
|
9
13
|
* @param {number} [shiftValue=0]
|
|
10
14
|
*/
|
|
11
|
-
function apply(
|
|
15
|
+
function apply(spectrum, options = {}) {
|
|
12
16
|
const { shift = 0 } = options;
|
|
13
|
-
for (const key in
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
for (const key in spectrum.data) {
|
|
18
|
+
spectrum.data[key].minX += shift;
|
|
19
|
+
spectrum.data[key].maxX += shift;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
22
|
exports.apply = apply;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reduce = exports.isApplicable = exports.apply = exports.name = exports.id = void 0;
|
|
3
|
+
exports.reduce = exports.isApplicable = exports.apply = exports.DOMAIN_UPDATE_RULES = exports.name = exports.id = void 0;
|
|
4
4
|
exports.id = 'shift2DY';
|
|
5
|
-
exports.name = 'Shift
|
|
5
|
+
exports.name = 'Shift Y';
|
|
6
|
+
exports.DOMAIN_UPDATE_RULES = {
|
|
7
|
+
updateXDomain: false,
|
|
8
|
+
updateYDomain: true,
|
|
9
|
+
};
|
|
6
10
|
/**
|
|
7
11
|
*
|
|
8
12
|
* @param {Object} datum2d
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getLabelNumber = exports.extractLabelsNumbers = exports.extractNumber = exports.setMolfile = exports.addMolfile = exports.fromJSON = void 0;
|
|
4
4
|
const full_1 = require("openchemlib/full");
|
|
5
5
|
const Molecule_1 = require("./Molecule");
|
|
6
|
-
function fromJSON(mols = []) {
|
|
7
|
-
const reservedNumbers = extractLabelsNumbers(mols);
|
|
6
|
+
function fromJSON(mols, reservedMolecules = []) {
|
|
7
|
+
const reservedNumbers = extractLabelsNumbers(reservedMolecules.concat(mols));
|
|
8
8
|
const molecules = [];
|
|
9
9
|
for (const mol of mols) {
|
|
10
10
|
const molecule = full_1.Molecule.fromMolfile(mol.molfile);
|
|
@@ -40,31 +40,24 @@ function resetDiaIDs(range) {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
exports.resetDiaIDs = resetDiaIDs;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
* @param {String('both' | 'range' | 'signal')} unlinkType
|
|
47
|
-
* @param {object} options
|
|
48
|
-
* @param {number} [options.signalIndex]
|
|
49
|
-
* @returns {object}
|
|
50
|
-
*/
|
|
51
|
-
function unlink(range, unlinkType = 'both', options = {}) {
|
|
43
|
+
function unlink(range, options = {}) {
|
|
44
|
+
const { unlinkType = 'both', signalIndex = -1 } = options;
|
|
45
|
+
const keys = ['diaIDs', 'nbAtoms'];
|
|
52
46
|
switch (unlinkType) {
|
|
53
47
|
case 'both':
|
|
54
48
|
resetDiaIDs(range);
|
|
55
49
|
break;
|
|
56
50
|
case 'range':
|
|
57
|
-
|
|
58
|
-
delete range.nbAtoms;
|
|
51
|
+
range = (0, omit_1.default)(range, keys);
|
|
59
52
|
break;
|
|
60
53
|
case 'signal':
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
if (signalIndex !== -1) {
|
|
55
|
+
range.signals[signalIndex] = (0, omit_1.default)(range.signals[signalIndex], keys);
|
|
56
|
+
}
|
|
63
57
|
break;
|
|
64
58
|
default:
|
|
65
59
|
break;
|
|
66
60
|
}
|
|
67
|
-
setNbAtoms(range);
|
|
68
61
|
return range;
|
|
69
62
|
}
|
|
70
63
|
exports.unlink = unlink;
|
|
@@ -95,8 +88,8 @@ function unlinkInAssignmentData(assignmentData, ranges) {
|
|
|
95
88
|
return [];
|
|
96
89
|
});
|
|
97
90
|
assignmentData.dispatch({
|
|
98
|
-
type: '
|
|
99
|
-
payload: {
|
|
91
|
+
type: 'REMOVE',
|
|
92
|
+
payload: { ids, axis: 'x' },
|
|
100
93
|
});
|
|
101
94
|
}
|
|
102
95
|
exports.unlinkInAssignmentData = unlinkInAssignmentData;
|
|
@@ -82,18 +82,18 @@ function unlinkInAssignmentData(assignmentData, zones, axis) {
|
|
|
82
82
|
});
|
|
83
83
|
if (axis) {
|
|
84
84
|
assignmentData.dispatch({
|
|
85
|
-
type: '
|
|
86
|
-
payload: {
|
|
85
|
+
type: 'REMOVE',
|
|
86
|
+
payload: { ids, axis },
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
90
90
|
assignmentData.dispatch({
|
|
91
|
-
type: '
|
|
92
|
-
payload: {
|
|
91
|
+
type: 'REMOVE',
|
|
92
|
+
payload: { ids, axis: 'x' },
|
|
93
93
|
});
|
|
94
94
|
assignmentData.dispatch({
|
|
95
|
-
type: '
|
|
96
|
-
payload: {
|
|
95
|
+
type: 'REMOVE',
|
|
96
|
+
payload: { ids, axis: 'y' },
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
}
|
package/lib-cjs/versionInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.35.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib-cjs/component/NMRium.js",
|
|
7
7
|
"module": "lib/component/NMRium.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"url": "git+https://github.com/cheminfo/nmrium.git"
|
|
46
46
|
},
|
|
47
47
|
"volta": {
|
|
48
|
-
"node": "18.
|
|
48
|
+
"node": "18.16.0"
|
|
49
49
|
},
|
|
50
50
|
"overrides": {
|
|
51
51
|
"react": "$react",
|
|
@@ -56,18 +56,19 @@
|
|
|
56
56
|
"react-dom": ">=18.0.0"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@emotion/react": "^11.10.
|
|
60
|
-
"@lukeed/uuid": "^2.0.
|
|
59
|
+
"@emotion/react": "^11.10.8",
|
|
60
|
+
"@lukeed/uuid": "^2.0.1",
|
|
61
61
|
"cheminfo-font": "^1.9.0",
|
|
62
|
-
"cheminfo-types": "^1.
|
|
62
|
+
"cheminfo-types": "^1.7.0",
|
|
63
63
|
"clipboard-polyfill": "^4.0.0",
|
|
64
|
-
"
|
|
64
|
+
"convert-to-jcamp": "^5.4.2",
|
|
65
|
+
"d3": "^7.8.4",
|
|
65
66
|
"eventemitter3": "^5.0.0",
|
|
66
67
|
"fifo-logger": "^0.6.1",
|
|
67
68
|
"file-saver": "^2.0.5",
|
|
68
|
-
"filelist-utils": "^1.8.
|
|
69
|
+
"filelist-utils": "^1.8.1",
|
|
69
70
|
"formik": "^2.2.9",
|
|
70
|
-
"immer": "^
|
|
71
|
+
"immer": "^10.0.1",
|
|
71
72
|
"jszip": "^3.10.1",
|
|
72
73
|
"lodash": "^4.17.21",
|
|
73
74
|
"ml-airpls": "^1.0.0",
|
|
@@ -77,22 +78,22 @@
|
|
|
77
78
|
"ml-array-xy-equally-spaced": "^1.2.1",
|
|
78
79
|
"ml-baseline-correction-regression": "^1.0.0",
|
|
79
80
|
"ml-conrec": "^4.0.0",
|
|
80
|
-
"ml-gsd": "^12.1.
|
|
81
|
-
"ml-spectra-processing": "^12.
|
|
81
|
+
"ml-gsd": "^12.1.3",
|
|
82
|
+
"ml-spectra-processing": "^12.3.0",
|
|
82
83
|
"ml-stat": "^1.3.3",
|
|
83
84
|
"multiplet-analysis": "^2.0.0",
|
|
84
85
|
"nmr-correlation": "^2.3.3",
|
|
85
|
-
"nmr-load-save": "^0.
|
|
86
|
-
"nmr-processing": "^9.3.
|
|
86
|
+
"nmr-load-save": "^0.11.0",
|
|
87
|
+
"nmr-processing": "^9.3.8",
|
|
87
88
|
"nmredata": "^0.9.2",
|
|
88
89
|
"numeral": "^2.0.6",
|
|
89
|
-
"openchemlib": "^8.
|
|
90
|
+
"openchemlib": "^8.3.0",
|
|
90
91
|
"openchemlib-utils": "^2.4.0",
|
|
91
92
|
"papaparse": "^5.4.1",
|
|
92
93
|
"re-resizable": "^6.9.9",
|
|
93
94
|
"react-d3-utils": "^1.0.0",
|
|
94
95
|
"react-dropzone": "^14.2.3",
|
|
95
|
-
"react-error-boundary": "^4.0.
|
|
96
|
+
"react-error-boundary": "^4.0.4",
|
|
96
97
|
"react-icons": "^4.8.0",
|
|
97
98
|
"react-inspector": "^6.0.1",
|
|
98
99
|
"react-mf": "^2.0.2",
|
|
@@ -100,46 +101,46 @@
|
|
|
100
101
|
"react-ocl-nmr": "^2.0.0",
|
|
101
102
|
"react-plot": "^1.4.2",
|
|
102
103
|
"react-rnd": "^10.4.1",
|
|
103
|
-
"react-science": "^0.
|
|
104
|
+
"react-science": "^0.22.0",
|
|
104
105
|
"react-slider": "^2.0.4",
|
|
105
106
|
"react-table": "^7.8.0",
|
|
106
107
|
"react-transition-group": "^4.4.5",
|
|
107
108
|
"react-use": "^17.4.0",
|
|
108
|
-
"smart-array-filter": "^4.0.
|
|
109
|
-
"yup": "^1.
|
|
109
|
+
"smart-array-filter": "^4.0.2",
|
|
110
|
+
"yup": "^1.1.1"
|
|
110
111
|
},
|
|
111
112
|
"devDependencies": {
|
|
112
113
|
"@babel/plugin-transform-modules-commonjs": "^7.21.2",
|
|
113
114
|
"@babel/preset-react": "^7.18.6",
|
|
114
|
-
"@babel/preset-typescript": "^7.21.
|
|
115
|
-
"@playwright/test": "^1.
|
|
115
|
+
"@babel/preset-typescript": "^7.21.4",
|
|
116
|
+
"@playwright/test": "^1.33.0",
|
|
116
117
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
117
118
|
"@types/d3": "^7.4.0",
|
|
118
|
-
"@types/node": "^18.
|
|
119
|
+
"@types/node": "^18.16.2",
|
|
119
120
|
"@types/papaparse": "^5.3.7",
|
|
120
|
-
"@types/react": "^18.0
|
|
121
|
-
"@types/react-dom": "^18.
|
|
121
|
+
"@types/react": "^18.2.0",
|
|
122
|
+
"@types/react-dom": "^18.2.1",
|
|
122
123
|
"@types/react-table": "^7.7.14",
|
|
123
|
-
"@vitejs/plugin-react-swc": "^3.
|
|
124
|
-
"@vitest/coverage-c8": "^0.
|
|
124
|
+
"@vitejs/plugin-react-swc": "^3.3.0",
|
|
125
|
+
"@vitest/coverage-c8": "^0.30.1",
|
|
125
126
|
"cross-env": "^7.0.3",
|
|
126
|
-
"cspell": "^6.
|
|
127
|
-
"eslint": "^8.
|
|
128
|
-
"eslint-config-zakodium": "^7.
|
|
127
|
+
"cspell": "^6.31.1",
|
|
128
|
+
"eslint": "^8.39.0",
|
|
129
|
+
"eslint-config-zakodium": "^7.2.0",
|
|
129
130
|
"modern-normalize": "^1.1.0",
|
|
130
131
|
"postcss-styled-syntax": "^0.4.0",
|
|
131
|
-
"prettier": "^2.8.
|
|
132
|
-
"rc-menu": "^9.8.
|
|
132
|
+
"prettier": "^2.8.8",
|
|
133
|
+
"rc-menu": "^9.8.4",
|
|
133
134
|
"react": "^18.2.0",
|
|
134
135
|
"react-dom": "^18.2.0",
|
|
135
|
-
"react-router-dom": "^6.
|
|
136
|
-
"rimraf": "^
|
|
136
|
+
"react-router-dom": "^6.10.0",
|
|
137
|
+
"rimraf": "^5.0.0",
|
|
137
138
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
138
139
|
"serve": "^14.2.0",
|
|
139
|
-
"stylelint": "^15.
|
|
140
|
-
"stylelint-config-standard": "^
|
|
141
|
-
"typescript": "~5.0.
|
|
142
|
-
"vite": "^4.
|
|
143
|
-
"vitest": "^0.
|
|
140
|
+
"stylelint": "^15.6.0",
|
|
141
|
+
"stylelint-config-standard": "^33.0.0",
|
|
142
|
+
"typescript": "~5.0.4",
|
|
143
|
+
"vite": "^4.3.3",
|
|
144
|
+
"vitest": "^0.30.1"
|
|
144
145
|
}
|
|
145
|
-
}
|
|
146
|
+
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Datum1D } from '../../types/data1d/Datum1D';
|
|
2
|
-
export declare const id = "centerMean";
|
|
3
|
-
export declare const name = "Center Mean";
|
|
4
|
-
/**
|
|
5
|
-
* Computes the arithmetic mean of the given values
|
|
6
|
-
* @param {Datum1d} datum1d
|
|
7
|
-
*/
|
|
8
|
-
export declare function apply(datum1D: Datum1D): void;
|
|
9
|
-
export declare function isApplicable(datum1D: Datum1D): boolean;
|
|
10
|
-
export declare function reduce(): {
|
|
11
|
-
once: boolean;
|
|
12
|
-
reduce: null;
|
|
13
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { mean } from 'ml-stat/array';
|
|
2
|
-
export const id = 'centerMean';
|
|
3
|
-
export const name = 'Center Mean';
|
|
4
|
-
/**
|
|
5
|
-
* Computes the arithmetic mean of the given values
|
|
6
|
-
* @param {Datum1d} datum1d
|
|
7
|
-
*/
|
|
8
|
-
export function apply(datum1D) {
|
|
9
|
-
if (!isApplicable(datum1D)) {
|
|
10
|
-
throw new Error('Center Mean is not applicable on this data');
|
|
11
|
-
}
|
|
12
|
-
const re = datum1D.data.re.slice(0);
|
|
13
|
-
const im = datum1D.data.im?.slice(0);
|
|
14
|
-
const reMean = mean(re);
|
|
15
|
-
const imMean = mean(im || []);
|
|
16
|
-
for (let i = 0; i < re.length; i++) {
|
|
17
|
-
re[i] -= reMean;
|
|
18
|
-
if (im) {
|
|
19
|
-
im[i] -= imMean;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
datum1D.data.re = re;
|
|
23
|
-
if (im) {
|
|
24
|
-
datum1D.data.im = im;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
export function isApplicable(datum1D) {
|
|
28
|
-
if (datum1D.info.isComplex && !datum1D.info.isFid)
|
|
29
|
-
return true;
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
export function reduce() {
|
|
33
|
-
return {
|
|
34
|
-
once: false,
|
|
35
|
-
reduce: null,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Datum1D } from '../../types/data1d/Datum1D';
|
|
2
|
-
export declare const id = "fromTo";
|
|
3
|
-
export declare const name = "From/To";
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param {Datum1d} datum1d
|
|
7
|
-
*/
|
|
8
|
-
export declare function apply(datum1D: Datum1D, options?: any): void;
|
|
9
|
-
export declare function isApplicable(datum1D: Datum1D): boolean;
|
|
10
|
-
export declare function reduce(previousValue: any, newValue: any): {
|
|
11
|
-
once: boolean;
|
|
12
|
-
reduce: any;
|
|
13
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { xGetFromToIndex } from 'ml-spectra-processing';
|
|
2
|
-
export const id = 'fromTo';
|
|
3
|
-
export const name = 'From/To';
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param {Datum1d} datum1d
|
|
7
|
-
*/
|
|
8
|
-
export function apply(datum1D, options = {}) {
|
|
9
|
-
if (!isApplicable(datum1D)) {
|
|
10
|
-
throw new Error('From/To filter not applicable on this data');
|
|
11
|
-
}
|
|
12
|
-
const { x, re, im } = datum1D.data;
|
|
13
|
-
const { from, to } = options;
|
|
14
|
-
const { fromIndex, toIndex } = xGetFromToIndex(x, { from, to });
|
|
15
|
-
datum1D.data.x = x.slice(fromIndex, toIndex);
|
|
16
|
-
datum1D.data.re = re.slice(fromIndex, toIndex);
|
|
17
|
-
if (im) {
|
|
18
|
-
datum1D.data.im = im.slice(fromIndex, toIndex);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export function isApplicable(datum1D) {
|
|
22
|
-
if (datum1D.info.isComplex && !datum1D.info.isFid)
|
|
23
|
-
return true;
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
export function reduce(previousValue, newValue) {
|
|
27
|
-
return {
|
|
28
|
-
once: true,
|
|
29
|
-
reduce: newValue,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Datum1D } from '../../types/data1d/Datum1D';
|
|
2
|
-
export declare const id = "pareto";
|
|
3
|
-
export declare const name = "Pareto";
|
|
4
|
-
/**
|
|
5
|
-
* Computes the arithmetic mean of the given values
|
|
6
|
-
* @param {Datum1d} datum1d
|
|
7
|
-
*/
|
|
8
|
-
export declare function apply(datum1D: Datum1D): void;
|
|
9
|
-
export declare function isApplicable(datum1D: Datum1D): boolean;
|
|
10
|
-
export declare function reduce(): {
|
|
11
|
-
once: boolean;
|
|
12
|
-
reduce: null;
|
|
13
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { xParetoNormalization } from 'ml-spectra-processing';
|
|
2
|
-
export const id = 'pareto';
|
|
3
|
-
export const name = 'Pareto';
|
|
4
|
-
/**
|
|
5
|
-
* Computes the arithmetic mean of the given values
|
|
6
|
-
* @param {Datum1d} datum1d
|
|
7
|
-
*/
|
|
8
|
-
export function apply(datum1D) {
|
|
9
|
-
if (!isApplicable(datum1D)) {
|
|
10
|
-
throw new Error('Pareto is not applicable on this data');
|
|
11
|
-
}
|
|
12
|
-
const re = datum1D.data.re.slice(0);
|
|
13
|
-
const im = datum1D.data.im?.slice(0);
|
|
14
|
-
datum1D.data.re = Float64Array.from(xParetoNormalization(re));
|
|
15
|
-
if (im) {
|
|
16
|
-
datum1D.data.im = Float64Array.from(xParetoNormalization(im));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export function isApplicable(datum1D) {
|
|
20
|
-
if (datum1D.info.isComplex && !datum1D.info.isFid)
|
|
21
|
-
return true;
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
export function reduce() {
|
|
25
|
-
return {
|
|
26
|
-
once: false,
|
|
27
|
-
reduce: null,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Datum1D } from '../../types/data1d/Datum1D';
|
|
2
|
-
export declare const id = "standardDeviation";
|
|
3
|
-
export declare const name = "Standard Deviation";
|
|
4
|
-
/**
|
|
5
|
-
* Computes the standard deviation of the given values
|
|
6
|
-
* @param {Datum1d} datum1d
|
|
7
|
-
*/
|
|
8
|
-
export declare function apply(datum1D: Datum1D): void;
|
|
9
|
-
export declare function isApplicable(datum1D: Datum1D): boolean;
|
|
10
|
-
export declare function reduce(): {
|
|
11
|
-
once: boolean;
|
|
12
|
-
reduce: null;
|
|
13
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { standardDeviation } from 'ml-stat/array';
|
|
2
|
-
export const id = 'standardDeviation';
|
|
3
|
-
export const name = 'Standard Deviation';
|
|
4
|
-
/**
|
|
5
|
-
* Computes the standard deviation of the given values
|
|
6
|
-
* @param {Datum1d} datum1d
|
|
7
|
-
*/
|
|
8
|
-
export function apply(datum1D) {
|
|
9
|
-
if (!isApplicable(datum1D)) {
|
|
10
|
-
throw new Error('Standard Deviation is not applicable on this data');
|
|
11
|
-
}
|
|
12
|
-
const re = datum1D.data.re.slice(0);
|
|
13
|
-
const im = datum1D.data.im?.slice(0);
|
|
14
|
-
const reStd = standardDeviation(re);
|
|
15
|
-
const imStd = standardDeviation(im || []);
|
|
16
|
-
for (let i = 0; i < re.length; i++) {
|
|
17
|
-
re[i] /= reStd;
|
|
18
|
-
if (im) {
|
|
19
|
-
im[i] /= imStd;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
datum1D.data.re = re;
|
|
23
|
-
if (im) {
|
|
24
|
-
datum1D.data.im = im;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
export function isApplicable(datum1D) {
|
|
28
|
-
if (datum1D.info.isComplex && !datum1D.info.isFid)
|
|
29
|
-
return true;
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
export function reduce() {
|
|
33
|
-
return {
|
|
34
|
-
once: false,
|
|
35
|
-
reduce: null,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|