nmr-processing 9.5.0 → 9.5.1-pre.1685396168
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/apodization/apodization.d.ts +6 -5
- package/lib/apodization/apodization.js +4 -1
- package/lib/apodization/apodization.js.map +1 -1
- package/lib/apodization/applyWindow.js.map +1 -1
- package/lib/apodization/compose.js.map +1 -1
- package/lib/apodization/getFunction.js +3 -0
- package/lib/apodization/getFunction.js.map +1 -1
- package/lib/apodization/shapes/WindowFunctions.d.ts +6 -1
- package/lib/apodization/shapes/sineBell.d.ts +27 -0
- package/lib/apodization/shapes/sineBell.js +17 -0
- package/lib/apodization/shapes/sineBell.js.map +1 -0
- package/lib/apodization/utils/getData.js.map +1 -1
- package/lib/constants/SignalsKinds.d.ts +9 -0
- package/lib/constants/SignalsKinds.js +40 -0
- package/lib/constants/SignalsKinds.js.map +1 -0
- package/lib/datum/Entry1D.d.ts +10 -0
- package/lib/datum/Entry1D.js +3 -0
- package/lib/datum/Entry1D.js.map +1 -0
- package/lib/datum/ExclusionZone.d.ts +5 -0
- package/lib/datum/ExclusionZone.js +3 -0
- package/lib/datum/ExclusionZone.js.map +1 -0
- package/lib/datum/Filters.d.ts +13 -0
- package/lib/datum/Filters.js +49 -0
- package/lib/datum/Filters.js.map +1 -0
- package/lib/datum/FiltersManager.d.ts +30 -0
- package/lib/datum/FiltersManager.js +184 -0
- package/lib/datum/FiltersManager.js.map +1 -0
- package/lib/datum/MatrixFilter.d.ts +39 -0
- package/lib/datum/MatrixFilter.js +3 -0
- package/lib/datum/MatrixFilter.js.map +1 -0
- package/lib/datum/MatrixOptions.d.ts +28 -0
- package/lib/datum/MatrixOptions.js +3 -0
- package/lib/datum/MatrixOptions.js.map +1 -0
- package/lib/datum/data1d/filter1d/apodization.d.ts +26 -0
- package/lib/datum/data1d/filter1d/apodization.js +75 -0
- package/lib/datum/data1d/filter1d/apodization.js.map +1 -0
- package/lib/datum/data1d/filter1d/baselineCorrection.d.ts +32 -0
- package/lib/datum/data1d/filter1d/baselineCorrection.js +61 -0
- package/lib/datum/data1d/filter1d/baselineCorrection.js.map +1 -0
- package/lib/datum/data1d/filter1d/digitalFilter.d.ts +18 -0
- package/lib/datum/data1d/filter1d/digitalFilter.js +47 -0
- package/lib/datum/data1d/filter1d/digitalFilter.js.map +1 -0
- package/lib/datum/data1d/filter1d/equallySpaced.d.ts +29 -0
- package/lib/datum/data1d/filter1d/equallySpaced.js +55 -0
- package/lib/datum/data1d/filter1d/equallySpaced.js.map +1 -0
- package/lib/datum/data1d/filter1d/exclusionZones.d.ts +11 -0
- package/lib/datum/data1d/filter1d/exclusionZones.js +35 -0
- package/lib/datum/data1d/filter1d/exclusionZones.js.map +1 -0
- package/lib/datum/data1d/filter1d/fft.d.ts +14 -0
- package/lib/datum/data1d/filter1d/fft.js +94 -0
- package/lib/datum/data1d/filter1d/fft.js.map +1 -0
- package/lib/datum/data1d/filter1d/phaseCorrection.d.ts +33 -0
- package/lib/datum/data1d/filter1d/phaseCorrection.js +84 -0
- package/lib/datum/data1d/filter1d/phaseCorrection.js.map +1 -0
- package/lib/datum/data1d/filter1d/shiftX.d.ts +16 -0
- package/lib/datum/data1d/filter1d/shiftX.js +30 -0
- package/lib/datum/data1d/filter1d/shiftX.js.map +1 -0
- package/lib/datum/data1d/filter1d/signalProcessing.d.ts +17 -0
- package/lib/datum/data1d/filter1d/signalProcessing.js +88 -0
- package/lib/datum/data1d/filter1d/signalProcessing.js.map +1 -0
- package/lib/datum/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +5 -0
- package/lib/datum/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +41 -0
- package/lib/datum/data1d/filter1d/utils/padDataToNextPowerOfTwo.js.map +1 -0
- package/lib/datum/data1d/filter1d/zeroFilling.d.ts +18 -0
- package/lib/datum/data1d/filter1d/zeroFilling.js +68 -0
- package/lib/datum/data1d/filter1d/zeroFilling.js.map +1 -0
- package/lib/datum/data1d/updateRelatives.d.ts +4 -0
- package/lib/datum/data1d/updateRelatives.js +36 -0
- package/lib/datum/data1d/updateRelatives.js.map +1 -0
- package/lib/datum/data1d/utils/RangeUtilities.d.ts +22 -0
- package/lib/datum/data1d/utils/RangeUtilities.js +83 -0
- package/lib/datum/data1d/utils/RangeUtilities.js.map +1 -0
- package/lib/datum/data1d/utils/checkIntegralKind.d.ts +7 -0
- package/lib/datum/data1d/utils/checkIntegralKind.js +14 -0
- package/lib/datum/data1d/utils/checkIntegralKind.js.map +1 -0
- package/lib/datum/data1d/utils/checkRangeKind.d.ts +2 -0
- package/lib/datum/data1d/utils/checkRangeKind.js +10 -0
- package/lib/datum/data1d/utils/checkRangeKind.js.map +1 -0
- package/lib/datum/data1d/utils/getShiftX.d.ts +2 -0
- package/lib/datum/data1d/utils/getShiftX.js +11 -0
- package/lib/datum/data1d/utils/getShiftX.js.map +1 -0
- package/lib/datum/data1d/utils/getSpectrumErrorValue.d.ts +2 -0
- package/lib/datum/data1d/utils/getSpectrumErrorValue.js +9 -0
- package/lib/datum/data1d/utils/getSpectrumErrorValue.js.map +1 -0
- package/lib/datum/data1d/utils/mapIntegrals.d.ts +13 -0
- package/lib/datum/data1d/utils/mapIntegrals.js +41 -0
- package/lib/datum/data1d/utils/mapIntegrals.js.map +1 -0
- package/lib/datum/data1d/utils/mapPeaks.d.ts +4 -0
- package/lib/datum/data1d/utils/mapPeaks.js +51 -0
- package/lib/datum/data1d/utils/mapPeaks.js.map +1 -0
- package/lib/datum/data1d/utils/mapRanges.d.ts +38 -0
- package/lib/datum/data1d/utils/mapRanges.js +84 -0
- package/lib/datum/data1d/utils/mapRanges.js.map +1 -0
- package/lib/datum/data1d/utils/updateIntegrals.d.ts +2 -0
- package/lib/datum/data1d/utils/updateIntegrals.js +11 -0
- package/lib/datum/data1d/utils/updateIntegrals.js.map +1 -0
- package/lib/datum/data1d/utils/updateIntegralsRelativeValues.d.ts +2 -0
- package/lib/datum/data1d/utils/updateIntegralsRelativeValues.js +10 -0
- package/lib/datum/data1d/utils/updateIntegralsRelativeValues.js.map +1 -0
- package/lib/datum/data1d/utils/updatePeaks.d.ts +2 -0
- package/lib/datum/data1d/utils/updatePeaks.js +12 -0
- package/lib/datum/data1d/utils/updatePeaks.js.map +1 -0
- package/lib/datum/data1d/utils/updateRanges.d.ts +2 -0
- package/lib/datum/data1d/utils/updateRanges.js +14 -0
- package/lib/datum/data1d/utils/updateRanges.js.map +1 -0
- package/lib/datum/data1d/utils/updateRangesRelativeValues.d.ts +2 -0
- package/lib/datum/data1d/utils/updateRangesRelativeValues.js +10 -0
- package/lib/datum/data1d/utils/updateRangesRelativeValues.js.map +1 -0
- package/lib/datum/data2d/filter2d/shiftX.d.ts +16 -0
- package/lib/datum/data2d/filter2d/shiftX.js +34 -0
- package/lib/datum/data2d/filter2d/shiftX.js.map +1 -0
- package/lib/datum/data2d/filter2d/shiftY.d.ts +16 -0
- package/lib/datum/data2d/filter2d/shiftY.js +34 -0
- package/lib/datum/data2d/filter2d/shiftY.js.map +1 -0
- package/lib/datum/data2d/utils/get2DSpectrumErrorValue.d.ts +6 -0
- package/lib/datum/data2d/utils/get2DSpectrumErrorValue.js +14 -0
- package/lib/datum/data2d/utils/get2DSpectrumErrorValue.js.map +1 -0
- package/lib/datum/data2d/utils/getShift.d.ts +6 -0
- package/lib/datum/data2d/utils/getShift.js +20 -0
- package/lib/datum/data2d/utils/getShift.js.map +1 -0
- package/lib/datum/data2d/utils/isZoneExists.d.ts +4 -0
- package/lib/datum/data2d/utils/isZoneExists.js +21 -0
- package/lib/datum/data2d/utils/isZoneExists.js.map +1 -0
- package/lib/datum/data2d/utils/mapZones.d.ts +34 -0
- package/lib/datum/data2d/utils/mapZones.js +68 -0
- package/lib/datum/data2d/utils/mapZones.js.map +1 -0
- package/lib/datum/data2d/utils/updateZones.d.ts +2 -0
- package/lib/datum/data2d/utils/updateZones.js +12 -0
- package/lib/datum/data2d/utils/updateZones.js.map +1 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +27 -0
- package/lib/index.js.map +1 -1
- package/lib/signals/signalsToRanges.js.map +1 -1
- package/lib/signals/simulation/simulateXYPeaks.js.map +1 -1
- package/lib/signals/utils/jAnalyzer.d.ts +11 -8
- package/lib/signals/utils/jAnalyzer.js.map +1 -1
- package/lib/types/ContourOptions.d.ts +10 -0
- package/lib/types/ContourOptions.js +3 -0
- package/lib/types/ContourOptions.js.map +1 -0
- package/lib/types/Data1D.d.ts +5 -0
- package/lib/types/Data1D.js +3 -0
- package/lib/types/Data1D.js.map +1 -0
- package/lib/types/Data2D.d.ts +5 -0
- package/{lib-esm/xyz → lib/types}/Data2D.js.map +1 -1
- package/lib/types/Display.d.ts +3 -0
- package/lib/types/Display.js +3 -0
- package/lib/types/Display.js.map +1 -0
- package/lib/types/Display1D.d.ts +7 -0
- package/lib/types/Display1D.js +3 -0
- package/lib/types/Display1D.js.map +1 -0
- package/lib/types/Display2D.d.ts +11 -0
- package/lib/types/Display2D.js +3 -0
- package/lib/types/Display2D.js.map +1 -0
- package/lib/types/Filter.d.ts +11 -0
- package/lib/types/Filter.js +3 -0
- package/lib/types/Filter.js.map +1 -0
- package/lib/types/Info/Info.d.ts +15 -0
- package/lib/types/Info/Info.js +3 -0
- package/lib/types/Info/Info.js.map +1 -0
- package/lib/types/Info/Info1D.d.ts +13 -0
- package/lib/types/Info/Info1D.js +3 -0
- package/lib/types/Info/Info1D.js.map +1 -0
- package/lib/types/Info/Info2D.d.ts +10 -0
- package/lib/types/Info/Info2D.js +3 -0
- package/lib/types/Info/Info2D.js.map +1 -0
- package/lib/types/Integral.d.ts +10 -0
- package/lib/types/Integral.js +3 -0
- package/lib/types/Integral.js.map +1 -0
- package/lib/types/Integrals.d.ts +6 -0
- package/lib/types/Integrals.js +3 -0
- package/lib/types/Integrals.js.map +1 -0
- package/lib/types/Jcoupling.d.ts +5 -0
- package/lib/types/Jcoupling.js +3 -0
- package/lib/types/Jcoupling.js.map +1 -0
- package/lib/types/ObjectXY.d.ts +4 -0
- package/lib/types/ObjectXY.js +3 -0
- package/lib/types/ObjectXY.js.map +1 -0
- package/lib/types/Options/DataSelectionOption.d.ts +1 -0
- package/lib/types/Options/DataSelectionOption.js +3 -0
- package/lib/types/Options/DataSelectionOption.js.map +1 -0
- package/lib/types/Options/JcampParsingOptions.d.ts +30 -0
- package/lib/types/Options/JcampParsingOptions.js +3 -0
- package/lib/types/Options/JcampParsingOptions.js.map +1 -0
- package/lib/types/Options/NmredataParsingOptions.d.ts +14 -0
- package/lib/types/Options/NmredataParsingOptions.js +3 -0
- package/lib/types/Options/NmredataParsingOptions.js.map +1 -0
- package/lib/types/Options/ParsingOptions.d.ts +74 -0
- package/lib/types/Options/ParsingOptions.js +3 -0
- package/lib/types/Options/ParsingOptions.js.map +1 -0
- package/lib/types/Options/SumOptions.d.ts +24 -0
- package/lib/types/Options/SumOptions.js +3 -0
- package/lib/types/Options/SumOptions.js.map +1 -0
- package/lib/types/Peaks/BasePeak.d.ts +3 -0
- package/lib/types/Peaks/BasePeak.js +3 -0
- package/lib/types/Peaks/BasePeak.js.map +1 -0
- package/lib/types/Peaks/Peak1D.d.ts +5 -0
- package/lib/types/Peaks/Peak1D.js +3 -0
- package/lib/types/Peaks/Peak1D.js.map +1 -0
- package/lib/types/Peaks/Peak2D.d.ts +13 -0
- package/lib/types/Peaks/Peak2D.js +3 -0
- package/lib/types/Peaks/Peak2D.js.map +1 -0
- package/lib/types/Peaks/Peaks.d.ts +5 -0
- package/lib/types/Peaks/Peaks.js +3 -0
- package/lib/types/Peaks/Peaks.js.map +1 -0
- package/lib/types/Ranges/Ranges.d.ts +16 -0
- package/lib/types/Ranges/Ranges.js +3 -0
- package/lib/types/Ranges/Ranges.js.map +1 -0
- package/lib/types/Signals/Signal.d.ts +4 -0
- package/lib/types/Signals/Signal.js +3 -0
- package/lib/types/Signals/Signal.js.map +1 -0
- package/lib/types/Signals/Signal1D.d.ts +6 -0
- package/lib/types/Signals/Signal1D.js +3 -0
- package/lib/types/Signals/Signal1D.js.map +1 -0
- package/lib/types/Signals/Signal2D.d.ts +18 -0
- package/lib/types/Signals/Signal2D.js +3 -0
- package/lib/types/Signals/Signal2D.js.map +1 -0
- package/lib/types/Spectrum/BaseSpectrum.d.ts +7 -0
- package/lib/types/Spectrum/BaseSpectrum.js +3 -0
- package/lib/types/Spectrum/BaseSpectrum.js.map +1 -0
- package/lib/types/Spectrum/Spectrum.d.ts +3 -0
- package/lib/types/Spectrum/Spectrum.js +3 -0
- package/lib/types/Spectrum/Spectrum.js.map +1 -0
- package/lib/types/Spectrum/Spectrum1D.d.ts +20 -0
- package/lib/types/Spectrum/Spectrum1D.js +3 -0
- package/lib/types/Spectrum/Spectrum1D.js.map +1 -0
- package/lib/types/Spectrum/Spectrum2D.d.ts +16 -0
- package/lib/types/Spectrum/Spectrum2D.js +3 -0
- package/lib/types/Spectrum/Spectrum2D.js.map +1 -0
- package/lib/types/Zones/Zone.d.ts +13 -0
- package/lib/types/Zones/Zone.js +3 -0
- package/lib/types/Zones/Zone.js.map +1 -0
- package/lib/types/Zones/Zones.d.ts +5 -0
- package/lib/types/Zones/Zones.js +3 -0
- package/lib/types/Zones/Zones.js.map +1 -0
- package/lib/types/common/MapOptions.d.ts +5 -0
- package/lib/types/common/MapOptions.js +3 -0
- package/lib/types/common/MapOptions.js.map +1 -0
- package/lib/utilities/checkData2DFid.d.ts +3 -0
- package/lib/utilities/checkData2DFid.js +10 -0
- package/lib/utilities/checkData2DFid.js.map +1 -0
- package/lib/utilities/cloneData1D.d.ts +6 -0
- package/lib/utilities/cloneData1D.js +9 -0
- package/lib/utilities/cloneData1D.js.map +1 -0
- package/lib/utilities/cloneData2D.d.ts +2 -0
- package/lib/utilities/cloneData2D.js +28 -0
- package/lib/utilities/cloneData2D.js.map +1 -0
- package/lib/utilities/getSum.d.ts +8 -0
- package/lib/utilities/getSum.js +25 -0
- package/lib/utilities/getSum.js.map +1 -0
- package/lib/xyz/Entry2D.d.ts +10 -0
- package/lib/xyz/Entry2D.js +3 -0
- package/lib/xyz/Entry2D.js.map +1 -0
- package/lib/xyz/quadrature.d.ts +7 -0
- package/lib/xyz/quadrature.js +54 -0
- package/lib/xyz/quadrature.js.map +1 -0
- package/lib/xyz/util/fft2d/digitalFilter.d.ts +7 -0
- package/lib/xyz/util/fft2d/digitalFilter.js +20 -0
- package/lib/xyz/util/fft2d/digitalFilter.js.map +1 -0
- package/lib/xyz/util/fft2d/fftDirectDimension.d.ts +24 -0
- package/lib/xyz/util/fft2d/fftDirectDimension.js +57 -0
- package/lib/xyz/util/fft2d/fftDirectDimension.js.map +1 -0
- package/lib/xyz/util/fft2d/fftIndirectDimension.d.ts +23 -0
- package/lib/xyz/util/fft2d/fftIndirectDimension.js +72 -0
- package/lib/xyz/util/fft2d/fftIndirectDimension.js.map +1 -0
- package/lib/xyz/util/fft2d/removeDCOffset.d.ts +5 -0
- package/lib/xyz/util/fft2d/removeDCOffset.js +19 -0
- package/lib/xyz/util/fft2d/removeDCOffset.js.map +1 -0
- package/lib/xyz/util/fft2d/zeroFilling.d.ts +10 -0
- package/lib/xyz/util/fft2d/zeroFilling.js +29 -0
- package/lib/xyz/util/fft2d/zeroFilling.js.map +1 -0
- package/lib/xyz/util/padData.d.ts +5 -3
- package/lib/xyz/util/padData.js +7 -7
- package/lib/xyz/util/padData.js.map +1 -1
- package/lib/xyz/xyzAutoSignalsPicking.d.ts +2 -2
- package/lib/xyz/xyzAutoSignalsPicking.js.map +1 -1
- package/lib/xyz/xyzAutoZonesPicking.d.ts +2 -8
- package/lib/xyz/xyzAutoZonesPicking.js.map +1 -1
- package/lib/xyz/xyzBidimensionalFFT.d.ts +40 -0
- package/lib/xyz/xyzBidimensionalFFT.js +79 -0
- package/lib/xyz/xyzBidimensionalFFT.js.map +1 -0
- package/lib/xyz/xyzJResAnalyzer.d.ts +1 -4
- package/lib/xyz/xyzJResAnalyzer.js +35 -26
- package/lib/xyz/xyzJResAnalyzer.js.map +1 -1
- package/lib-esm/apodization/apodization.js +4 -1
- package/lib-esm/apodization/apodization.js.map +1 -1
- package/lib-esm/apodization/applyWindow.js.map +1 -1
- package/lib-esm/apodization/compose.js.map +1 -1
- package/lib-esm/apodization/getFunction.js +3 -0
- package/lib-esm/apodization/getFunction.js.map +1 -1
- package/lib-esm/apodization/shapes/sineBell.js +13 -0
- package/lib-esm/apodization/shapes/sineBell.js.map +1 -0
- package/lib-esm/apodization/utils/getData.js.map +1 -1
- package/lib-esm/constants/SignalsKinds.js +37 -0
- package/lib-esm/constants/SignalsKinds.js.map +1 -0
- package/lib-esm/datum/Entry1D.js +2 -0
- package/lib-esm/datum/Entry1D.js.map +1 -0
- package/lib-esm/datum/ExclusionZone.js +2 -0
- package/lib-esm/datum/ExclusionZone.js.map +1 -0
- package/lib-esm/datum/Filters.js +23 -0
- package/lib-esm/datum/Filters.js.map +1 -0
- package/lib-esm/datum/FiltersManager.js +175 -0
- package/lib-esm/datum/FiltersManager.js.map +1 -0
- package/lib-esm/datum/MatrixFilter.js +2 -0
- package/lib-esm/datum/MatrixFilter.js.map +1 -0
- package/lib-esm/datum/MatrixOptions.js +2 -0
- package/lib-esm/datum/MatrixOptions.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/apodization.js +68 -0
- package/lib-esm/datum/data1d/filter1d/apodization.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/baselineCorrection.js +52 -0
- package/lib-esm/datum/data1d/filter1d/baselineCorrection.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/digitalFilter.js +41 -0
- package/lib-esm/datum/data1d/filter1d/digitalFilter.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/equallySpaced.js +49 -0
- package/lib-esm/datum/data1d/filter1d/equallySpaced.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/exclusionZones.js +29 -0
- package/lib-esm/datum/data1d/filter1d/exclusionZones.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/fft.js +88 -0
- package/lib-esm/datum/data1d/filter1d/fft.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/phaseCorrection.js +78 -0
- package/lib-esm/datum/data1d/filter1d/phaseCorrection.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/shiftX.js +24 -0
- package/lib-esm/datum/data1d/filter1d/shiftX.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/signalProcessing.js +58 -0
- package/lib-esm/datum/data1d/filter1d/signalProcessing.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +37 -0
- package/lib-esm/datum/data1d/filter1d/utils/padDataToNextPowerOfTwo.js.map +1 -0
- package/lib-esm/datum/data1d/filter1d/zeroFilling.js +62 -0
- package/lib-esm/datum/data1d/filter1d/zeroFilling.js.map +1 -0
- package/lib-esm/datum/data1d/updateRelatives.js +32 -0
- package/lib-esm/datum/data1d/updateRelatives.js.map +1 -0
- package/lib-esm/datum/data1d/utils/RangeUtilities.js +69 -0
- package/lib-esm/datum/data1d/utils/RangeUtilities.js.map +1 -0
- package/lib-esm/datum/data1d/utils/checkIntegralKind.js +10 -0
- package/lib-esm/datum/data1d/utils/checkIntegralKind.js.map +1 -0
- package/lib-esm/datum/data1d/utils/checkRangeKind.js +6 -0
- package/lib-esm/datum/data1d/utils/checkRangeKind.js.map +1 -0
- package/lib-esm/datum/data1d/utils/getShiftX.js +7 -0
- package/lib-esm/datum/data1d/utils/getShiftX.js.map +1 -0
- package/lib-esm/datum/data1d/utils/getSpectrumErrorValue.js +5 -0
- package/lib-esm/datum/data1d/utils/getSpectrumErrorValue.js.map +1 -0
- package/lib-esm/datum/data1d/utils/mapIntegrals.js +37 -0
- package/lib-esm/datum/data1d/utils/mapIntegrals.js.map +1 -0
- package/lib-esm/datum/data1d/utils/mapPeaks.js +47 -0
- package/lib-esm/datum/data1d/utils/mapPeaks.js.map +1 -0
- package/lib-esm/datum/data1d/utils/mapRanges.js +80 -0
- package/lib-esm/datum/data1d/utils/mapRanges.js.map +1 -0
- package/lib-esm/datum/data1d/utils/updateIntegrals.js +7 -0
- package/lib-esm/datum/data1d/utils/updateIntegrals.js.map +1 -0
- package/lib-esm/datum/data1d/utils/updateIntegralsRelativeValues.js +6 -0
- package/lib-esm/datum/data1d/utils/updateIntegralsRelativeValues.js.map +1 -0
- package/lib-esm/datum/data1d/utils/updatePeaks.js +8 -0
- package/lib-esm/datum/data1d/utils/updatePeaks.js.map +1 -0
- package/lib-esm/datum/data1d/utils/updateRanges.js +10 -0
- package/lib-esm/datum/data1d/utils/updateRanges.js.map +1 -0
- package/lib-esm/datum/data1d/utils/updateRangesRelativeValues.js +6 -0
- package/lib-esm/datum/data1d/utils/updateRangesRelativeValues.js.map +1 -0
- package/lib-esm/datum/data2d/filter2d/shiftX.js +28 -0
- package/lib-esm/datum/data2d/filter2d/shiftX.js.map +1 -0
- package/lib-esm/datum/data2d/filter2d/shiftY.js +28 -0
- package/lib-esm/datum/data2d/filter2d/shiftY.js.map +1 -0
- package/lib-esm/datum/data2d/utils/get2DSpectrumErrorValue.js +10 -0
- package/lib-esm/datum/data2d/utils/get2DSpectrumErrorValue.js.map +1 -0
- package/lib-esm/datum/data2d/utils/getShift.js +16 -0
- package/lib-esm/datum/data2d/utils/getShift.js.map +1 -0
- package/lib-esm/datum/data2d/utils/isZoneExists.js +17 -0
- package/lib-esm/datum/data2d/utils/isZoneExists.js.map +1 -0
- package/lib-esm/datum/data2d/utils/mapZones.js +64 -0
- package/lib-esm/datum/data2d/utils/mapZones.js.map +1 -0
- package/lib-esm/datum/data2d/utils/updateZones.js +8 -0
- package/lib-esm/datum/data2d/utils/updateZones.js.map +1 -0
- package/lib-esm/index.js +14 -0
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/signals/signalsToRanges.js.map +1 -1
- package/lib-esm/signals/simulation/simulateXYPeaks.js.map +1 -1
- package/lib-esm/signals/utils/jAnalyzer.js.map +1 -1
- package/lib-esm/types/ContourOptions.js +2 -0
- package/lib-esm/types/ContourOptions.js.map +1 -0
- package/lib-esm/types/Data1D.js +2 -0
- package/lib-esm/types/Data1D.js.map +1 -0
- package/{lib/xyz → lib-esm/types}/Data2D.js.map +1 -1
- package/lib-esm/types/Display.js +2 -0
- package/lib-esm/types/Display.js.map +1 -0
- package/lib-esm/types/Display1D.js +2 -0
- package/lib-esm/types/Display1D.js.map +1 -0
- package/lib-esm/types/Display2D.js +2 -0
- package/lib-esm/types/Display2D.js.map +1 -0
- package/lib-esm/types/Filter.js +2 -0
- package/lib-esm/types/Filter.js.map +1 -0
- package/lib-esm/types/Info/Info.js +2 -0
- package/lib-esm/types/Info/Info.js.map +1 -0
- package/lib-esm/types/Info/Info1D.js +2 -0
- package/lib-esm/types/Info/Info1D.js.map +1 -0
- package/lib-esm/types/Info/Info2D.js +2 -0
- package/lib-esm/types/Info/Info2D.js.map +1 -0
- package/lib-esm/types/Integral.js +2 -0
- package/lib-esm/types/Integral.js.map +1 -0
- package/lib-esm/types/Integrals.js +2 -0
- package/lib-esm/types/Integrals.js.map +1 -0
- package/lib-esm/types/Jcoupling.js +2 -0
- package/lib-esm/types/Jcoupling.js.map +1 -0
- package/lib-esm/types/ObjectXY.js +2 -0
- package/lib-esm/types/ObjectXY.js.map +1 -0
- package/lib-esm/types/Options/DataSelectionOption.js +2 -0
- package/lib-esm/types/Options/DataSelectionOption.js.map +1 -0
- package/lib-esm/types/Options/JcampParsingOptions.js +2 -0
- package/lib-esm/types/Options/JcampParsingOptions.js.map +1 -0
- package/lib-esm/types/Options/NmredataParsingOptions.js +2 -0
- package/lib-esm/types/Options/NmredataParsingOptions.js.map +1 -0
- package/lib-esm/types/Options/ParsingOptions.js +2 -0
- package/lib-esm/types/Options/ParsingOptions.js.map +1 -0
- package/lib-esm/types/Options/SumOptions.js +2 -0
- package/lib-esm/types/Options/SumOptions.js.map +1 -0
- package/lib-esm/types/Peaks/BasePeak.js +2 -0
- package/lib-esm/types/Peaks/BasePeak.js.map +1 -0
- package/lib-esm/types/Peaks/Peak1D.js +2 -0
- package/lib-esm/types/Peaks/Peak1D.js.map +1 -0
- package/lib-esm/types/Peaks/Peak2D.js +2 -0
- package/lib-esm/types/Peaks/Peak2D.js.map +1 -0
- package/lib-esm/types/Peaks/Peaks.js +2 -0
- package/lib-esm/types/Peaks/Peaks.js.map +1 -0
- package/lib-esm/types/Ranges/Ranges.js +2 -0
- package/lib-esm/types/Ranges/Ranges.js.map +1 -0
- package/lib-esm/types/Signals/Signal.js +2 -0
- package/lib-esm/types/Signals/Signal.js.map +1 -0
- package/lib-esm/types/Signals/Signal1D.js +2 -0
- package/lib-esm/types/Signals/Signal1D.js.map +1 -0
- package/lib-esm/types/Signals/Signal2D.js +2 -0
- package/lib-esm/types/Signals/Signal2D.js.map +1 -0
- package/lib-esm/types/Spectrum/BaseSpectrum.js +2 -0
- package/lib-esm/types/Spectrum/BaseSpectrum.js.map +1 -0
- package/lib-esm/types/Spectrum/Spectrum.js +2 -0
- package/lib-esm/types/Spectrum/Spectrum.js.map +1 -0
- package/lib-esm/types/Spectrum/Spectrum1D.js +2 -0
- package/lib-esm/types/Spectrum/Spectrum1D.js.map +1 -0
- package/lib-esm/types/Spectrum/Spectrum2D.js +2 -0
- package/lib-esm/types/Spectrum/Spectrum2D.js.map +1 -0
- package/lib-esm/types/Zones/Zone.js +2 -0
- package/lib-esm/types/Zones/Zone.js.map +1 -0
- package/lib-esm/types/Zones/Zones.js +2 -0
- package/lib-esm/types/Zones/Zones.js.map +1 -0
- package/lib-esm/types/common/MapOptions.js +2 -0
- package/lib-esm/types/common/MapOptions.js.map +1 -0
- package/lib-esm/utilities/checkData2DFid.js +6 -0
- package/lib-esm/utilities/checkData2DFid.js.map +1 -0
- package/lib-esm/utilities/cloneData1D.js +5 -0
- package/lib-esm/utilities/cloneData1D.js.map +1 -0
- package/lib-esm/utilities/cloneData2D.js +24 -0
- package/lib-esm/utilities/cloneData2D.js.map +1 -0
- package/lib-esm/utilities/getSum.js +21 -0
- package/lib-esm/utilities/getSum.js.map +1 -0
- package/lib-esm/xyz/Entry2D.js +2 -0
- package/lib-esm/xyz/Entry2D.js.map +1 -0
- package/lib-esm/xyz/quadrature.js +50 -0
- package/lib-esm/xyz/quadrature.js.map +1 -0
- package/lib-esm/xyz/util/fft2d/digitalFilter.js +16 -0
- package/lib-esm/xyz/util/fft2d/digitalFilter.js.map +1 -0
- package/lib-esm/xyz/util/fft2d/fftDirectDimension.js +50 -0
- package/lib-esm/xyz/util/fft2d/fftDirectDimension.js.map +1 -0
- package/lib-esm/xyz/util/fft2d/fftIndirectDimension.js +65 -0
- package/lib-esm/xyz/util/fft2d/fftIndirectDimension.js.map +1 -0
- package/lib-esm/xyz/util/fft2d/removeDCOffset.js +15 -0
- package/lib-esm/xyz/util/fft2d/removeDCOffset.js.map +1 -0
- package/lib-esm/xyz/util/fft2d/zeroFilling.js +25 -0
- package/lib-esm/xyz/util/fft2d/zeroFilling.js.map +1 -0
- package/lib-esm/xyz/util/padData.js +7 -4
- package/lib-esm/xyz/util/padData.js.map +1 -1
- package/lib-esm/xyz/xyzAutoSignalsPicking.js.map +1 -1
- package/lib-esm/xyz/xyzAutoZonesPicking.js.map +1 -1
- package/lib-esm/xyz/xyzBidimensionalFFT.js +75 -0
- package/lib-esm/xyz/xyzBidimensionalFFT.js.map +1 -0
- package/lib-esm/xyz/xyzJResAnalyzer.js +35 -26
- package/lib-esm/xyz/xyzJResAnalyzer.js.map +1 -1
- package/package.json +10 -2
- package/src/apodization/apodization.ts +8 -4
- package/src/apodization/applyWindow.ts +0 -1
- package/src/apodization/compose.ts +1 -0
- package/src/apodization/getFunction.ts +3 -0
- package/src/apodization/shapes/WindowFunctions.ts +7 -1
- package/src/apodization/shapes/sineBell.ts +41 -0
- package/src/apodization/utils/getData.ts +0 -1
- package/src/constants/SignalsKinds.ts +37 -0
- package/src/datum/Entry1D.ts +11 -0
- package/src/datum/ExclusionZone.ts +5 -0
- package/src/datum/Filters.ts +44 -0
- package/src/datum/FiltersManager.ts +238 -0
- package/src/datum/MatrixFilter.ts +58 -0
- package/src/datum/MatrixOptions.ts +25 -0
- package/src/datum/data1d/filter1d/apodization.ts +90 -0
- package/src/datum/data1d/filter1d/baselineCorrection.ts +83 -0
- package/src/datum/data1d/filter1d/digitalFilter.ts +54 -0
- package/src/datum/data1d/filter1d/equallySpaced.ts +61 -0
- package/src/datum/data1d/filter1d/exclusionZones.ts +34 -0
- package/src/datum/data1d/filter1d/fft.ts +138 -0
- package/src/datum/data1d/filter1d/phaseCorrection.ts +127 -0
- package/src/datum/data1d/filter1d/shiftX.ts +31 -0
- package/src/datum/data1d/filter1d/signalProcessing.ts +79 -0
- package/src/datum/data1d/filter1d/utils/padDataToNextPowerOfTwo.ts +49 -0
- package/src/datum/data1d/filter1d/zeroFilling.ts +90 -0
- package/src/datum/data1d/updateRelatives.ts +50 -0
- package/src/datum/data1d/utils/RangeUtilities.ts +102 -0
- package/src/datum/data1d/utils/checkIntegralKind.ts +11 -0
- package/src/datum/data1d/utils/checkRangeKind.ts +8 -0
- package/src/datum/data1d/utils/getShiftX.ts +10 -0
- package/src/datum/data1d/utils/getSpectrumErrorValue.ts +6 -0
- package/src/datum/data1d/utils/mapIntegrals.ts +52 -0
- package/src/datum/data1d/utils/mapPeaks.ts +62 -0
- package/src/datum/data1d/utils/mapRanges.ts +107 -0
- package/src/datum/data1d/utils/updateIntegrals.ts +13 -0
- package/src/datum/data1d/utils/updateIntegralsRelativeValues.ts +17 -0
- package/src/datum/data1d/utils/updatePeaks.ts +10 -0
- package/src/datum/data1d/utils/updateRanges.ts +12 -0
- package/src/datum/data1d/utils/updateRangesRelativeValues.ts +16 -0
- package/src/datum/data2d/filter2d/shiftX.ts +37 -0
- package/src/datum/data2d/filter2d/shiftY.ts +36 -0
- package/src/datum/data2d/utils/get2DSpectrumErrorValue.ts +18 -0
- package/src/datum/data2d/utils/getShift.ts +23 -0
- package/src/datum/data2d/utils/isZoneExists.ts +27 -0
- package/src/datum/data2d/utils/mapZones.ts +80 -0
- package/src/datum/data2d/utils/updateZones.ts +10 -0
- package/src/index.ts +38 -0
- package/src/signals/signalsToRanges.ts +1 -1
- package/src/signals/simulation/simulateXYPeaks.ts +1 -1
- package/src/signals/utils/jAnalyzer.ts +20 -10
- package/src/types/ContourOptions.ts +10 -0
- package/src/types/Data1D.ts +5 -0
- package/src/types/Data2D.ts +7 -0
- package/src/types/Display.ts +3 -0
- package/src/types/Display1D.ts +8 -0
- package/src/types/Display2D.ts +12 -0
- package/src/types/Filter.ts +12 -0
- package/src/types/Info/Info.ts +15 -0
- package/src/types/Info/Info1D.ts +14 -0
- package/src/types/Info/Info2D.ts +11 -0
- package/src/types/Integral.ts +10 -0
- package/src/types/Integrals.ts +7 -0
- package/src/types/Jcoupling.ts +5 -0
- package/src/types/ObjectXY.ts +4 -0
- package/src/types/Options/DataSelectionOption.ts +6 -0
- package/src/types/Options/JcampParsingOptions.ts +35 -0
- package/src/types/Options/NmredataParsingOptions.ts +20 -0
- package/src/types/Options/ParsingOptions.ts +80 -0
- package/src/types/Options/SumOptions.ts +24 -0
- package/src/types/Peaks/BasePeak.ts +3 -0
- package/src/types/Peaks/Peak1D.ts +7 -0
- package/src/types/Peaks/Peak2D.ts +11 -0
- package/src/types/Peaks/Peaks.ts +6 -0
- package/src/types/Ranges/Ranges.ts +19 -0
- package/src/types/Signals/Signal.ts +4 -0
- package/src/types/Signals/Signal1D.ts +8 -0
- package/src/types/Signals/Signal2D.ts +21 -0
- package/src/types/Spectrum/BaseSpectrum.ts +8 -0
- package/src/types/Spectrum/Spectrum.ts +4 -0
- package/src/types/Spectrum/Spectrum1D.ts +23 -0
- package/src/types/Spectrum/Spectrum2D.ts +19 -0
- package/src/types/Zones/Zone.ts +15 -0
- package/src/types/Zones/Zones.ts +6 -0
- package/src/types/common/MapOptions.ts +6 -0
- package/src/utilities/checkData2DFid.ts +10 -0
- package/src/utilities/cloneData1D.ts +6 -0
- package/src/utilities/cloneData2D.ts +27 -0
- package/src/utilities/getSum.ts +24 -0
- package/src/xyz/Entry2D.ts +12 -0
- package/src/xyz/quadrature.ts +68 -0
- package/src/xyz/util/fft2d/digitalFilter.ts +24 -0
- package/src/xyz/util/fft2d/fftDirectDimension.ts +111 -0
- package/src/xyz/util/fft2d/fftIndirectDimension.ts +123 -0
- package/src/xyz/util/fft2d/removeDCOffset.ts +19 -0
- package/src/xyz/util/fft2d/zeroFilling.ts +39 -0
- package/src/xyz/util/padData.ts +13 -7
- package/src/xyz/xyzAutoSignalsPicking.ts +2 -2
- package/src/xyz/xyzAutoZonesPicking.ts +3 -9
- package/src/xyz/xyzBidimensionalFFT.ts +122 -0
- package/src/xyz/xyzJResAnalyzer.ts +51 -42
- package/lib/xyz/Data2D.d.ts +0 -7
- package/src/xyz/Data2D.ts +0 -7
- /package/lib/{xyz → types}/Data2D.js +0 -0
- /package/lib-esm/{xyz → types}/Data2D.js +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Spectrum2D } from '../../../types/Spectrum/Spectrum2D';
|
|
2
|
+
import { Filters } from '../../Filters';
|
|
3
|
+
|
|
4
|
+
export interface Shift2D {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function getShift(spectrum: Spectrum2D): Shift2D {
|
|
10
|
+
let shift = { x: 0, y: 0 };
|
|
11
|
+
if (spectrum?.filters) {
|
|
12
|
+
for (const filter of spectrum.filters) {
|
|
13
|
+
if (filter.name === Filters.shift2DX.id) {
|
|
14
|
+
shift.x = filter?.flag ? filter.value.shift : 0;
|
|
15
|
+
}
|
|
16
|
+
if (filter.name === Filters.shift2DY.id) {
|
|
17
|
+
shift.y = filter?.flag ? filter.value.shift : 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return shift;
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Spectrum2D } from '../../../types/Spectrum/Spectrum2D';
|
|
2
|
+
import { Zone } from '../../../types/Zones/Zone';
|
|
3
|
+
|
|
4
|
+
import { Zone2DError } from './get2DSpectrumErrorValue';
|
|
5
|
+
|
|
6
|
+
export function isZoneExists(
|
|
7
|
+
zone: Zone,
|
|
8
|
+
spectrum: Spectrum2D,
|
|
9
|
+
error: Zone2DError,
|
|
10
|
+
) {
|
|
11
|
+
const newXRange = zone.x || { from: 0, to: 0 };
|
|
12
|
+
const newYRange = zone.y || { from: 0, to: 0 };
|
|
13
|
+
|
|
14
|
+
if (!spectrum.zones?.values) return false;
|
|
15
|
+
|
|
16
|
+
for (const { x, y } of spectrum.zones.values) {
|
|
17
|
+
if (
|
|
18
|
+
Math.abs(newXRange.from - x.from) < error.x &&
|
|
19
|
+
Math.abs(newXRange.to - x.to) < error.x &&
|
|
20
|
+
Math.abs(newYRange.from - y.from) < error.y &&
|
|
21
|
+
Math.abs(newYRange.to - y.to) < error.y
|
|
22
|
+
) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { v4 } from '@lukeed/uuid';
|
|
2
|
+
|
|
3
|
+
import { DatumKind } from '../../../constants/SignalsKinds';
|
|
4
|
+
import { Signal2D } from '../../../types/Signals/Signal2D';
|
|
5
|
+
import { Spectrum2D } from '../../../types/Spectrum/Spectrum2D';
|
|
6
|
+
import { Zone } from '../../../types/Zones/Zone';
|
|
7
|
+
import { MapOptions, ShiftTarget } from '../../../types/common/MapOptions';
|
|
8
|
+
|
|
9
|
+
import { get2DSpectrumErrorValue } from './get2DSpectrumErrorValue';
|
|
10
|
+
import { getShift, Shift2D } from './getShift';
|
|
11
|
+
import { isZoneExists } from './isZoneExists';
|
|
12
|
+
|
|
13
|
+
function getSignal(signal: Signal2D, shiftTarget: ShiftTarget, shift: Shift2D) {
|
|
14
|
+
const { x, y } = signal;
|
|
15
|
+
|
|
16
|
+
if (shiftTarget === 'origin') {
|
|
17
|
+
return {
|
|
18
|
+
...signal,
|
|
19
|
+
x: {
|
|
20
|
+
...x,
|
|
21
|
+
originDelta: x.delta - shift.x,
|
|
22
|
+
},
|
|
23
|
+
y: {
|
|
24
|
+
...y,
|
|
25
|
+
originDelta: y.delta - shift.y,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
} else {
|
|
29
|
+
return {
|
|
30
|
+
...signal,
|
|
31
|
+
x: {
|
|
32
|
+
...x,
|
|
33
|
+
delta: x.originDelta + shift.x,
|
|
34
|
+
},
|
|
35
|
+
y: {
|
|
36
|
+
...y,
|
|
37
|
+
delta: y.originDelta + shift.y,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function mapZones(
|
|
44
|
+
zones: Zone[],
|
|
45
|
+
datum: Spectrum2D,
|
|
46
|
+
options: MapOptions = {},
|
|
47
|
+
) {
|
|
48
|
+
const { checkIsExisting = true, shiftTarget = 'origin' } = options;
|
|
49
|
+
const shift = getShift(datum);
|
|
50
|
+
const error = get2DSpectrumErrorValue(datum);
|
|
51
|
+
|
|
52
|
+
let _zones: Zone[] = zones;
|
|
53
|
+
|
|
54
|
+
if (checkIsExisting) {
|
|
55
|
+
_zones = zones.filter((zone) => !isZoneExists(zone, datum, error));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return _zones.map((zone: Zone) => {
|
|
59
|
+
const x = zone.x || { from: 0, to: 0 };
|
|
60
|
+
const y = zone.y || { from: 0, to: 0 };
|
|
61
|
+
|
|
62
|
+
const signals = zone.signals.map((signal) => {
|
|
63
|
+
const { id, kind } = signal;
|
|
64
|
+
return {
|
|
65
|
+
...getSignal(signal, shiftTarget, shift),
|
|
66
|
+
id: id || v4(),
|
|
67
|
+
kind: kind || 'signal',
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
...zone,
|
|
73
|
+
id: zone.id || v4(),
|
|
74
|
+
x: { from: x.from, to: x.to },
|
|
75
|
+
y: { from: y.from, to: y.to },
|
|
76
|
+
signals,
|
|
77
|
+
kind: zone.kind || DatumKind.signal,
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Spectrum2D } from '../../../types/Spectrum/Spectrum2D';
|
|
2
|
+
|
|
3
|
+
import { mapZones } from './mapZones';
|
|
4
|
+
|
|
5
|
+
export function updateZones(spectrum: Spectrum2D) {
|
|
6
|
+
spectrum.zones.values = mapZones(spectrum.zones.values, spectrum, {
|
|
7
|
+
checkIsExisting: false,
|
|
8
|
+
shiftTarget: 'current',
|
|
9
|
+
});
|
|
10
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from 'gyromagnetic-ratio';
|
|
2
2
|
export * from './constants/impurities';
|
|
3
|
+
export * from './constants/SignalsKinds';
|
|
3
4
|
export * from './constants/couplingPatterns';
|
|
4
5
|
|
|
5
6
|
export * from './peaks/peaksFilterImpurities';
|
|
@@ -40,6 +41,7 @@ export * from './xy/xyPeaksOptimization';
|
|
|
40
41
|
export * from './xyz/xyzAutoZonesPicking';
|
|
41
42
|
export * from './xyz/xyzAutoSignalsPicking';
|
|
42
43
|
export * from './xyz/xyzJResAnalyzer';
|
|
44
|
+
export * from './xyz/xyzBidimensionalFFT';
|
|
43
45
|
|
|
44
46
|
export * from './databases/getDatabase';
|
|
45
47
|
export * from './databases/carbonImpurities';
|
|
@@ -58,8 +60,44 @@ export * from './multiplicity/checkMultiplet';
|
|
|
58
60
|
export * from './multiplicity/checkMultiplicity';
|
|
59
61
|
export * from './multiplicity/translateMultiplet';
|
|
60
62
|
|
|
63
|
+
export * from './datum/Filters';
|
|
64
|
+
export * as FiltersManager from './datum/FiltersManager';
|
|
65
|
+
export * from './datum/data1d/utils/getShiftX';
|
|
66
|
+
export * from './datum/data1d/utils/getSpectrumErrorValue';
|
|
67
|
+
export * from './datum/data1d/utils/mapPeaks';
|
|
68
|
+
export * from './datum/data1d/utils/mapRanges';
|
|
69
|
+
export * from './datum/data1d/utils/updateRanges';
|
|
70
|
+
export * from './datum/data1d/utils/checkIntegralKind';
|
|
71
|
+
export * from './datum/data1d/updateRelatives';
|
|
72
|
+
export * from './datum/data1d/utils/updateRangesRelativeValues';
|
|
73
|
+
export * from './datum/data1d/utils/updateIntegralsRelativeValues';
|
|
74
|
+
export * as RangeUtilities from './datum/data1d/utils/RangeUtilities';
|
|
75
|
+
|
|
76
|
+
export type { BaseFilter, Filter } from './types/Filter';
|
|
77
|
+
|
|
61
78
|
export type { NMRSignal1D } from './signals/NMRSignal1D';
|
|
62
79
|
export type { NMRSignal2D, Signal2DProjection } from './xyz/NMRSignal2D';
|
|
80
|
+
export type { Peaks } from './types/Peaks/Peaks';
|
|
81
|
+
export type { Peak1D } from './types/Peaks/Peak1D';
|
|
82
|
+
export type { Peak2D } from './types/Peaks/Peak2D';
|
|
83
|
+
export type { Signal1D } from './types/Signals/Signal1D';
|
|
84
|
+
export type { Signal2D } from './types/Signals/Signal2D';
|
|
85
|
+
export type { Range, Ranges } from './types/Ranges/Ranges';
|
|
86
|
+
export type { Zone } from './types/Zones/Zone';
|
|
87
|
+
export type { Zones } from './types/Zones/Zones';
|
|
88
|
+
export type { Data1D } from './types/Data1D';
|
|
89
|
+
export type { Data2D } from './types/Data2D';
|
|
90
|
+
export type { Display1D } from './types/Display1D';
|
|
91
|
+
export type { Color2D, Display2D } from './types/Display2D';
|
|
92
|
+
export type { Info1D } from './types/Info/Info1D';
|
|
93
|
+
export type { Info2D } from './types/Info/Info2D';
|
|
94
|
+
export type { Integral } from './types/Integral';
|
|
95
|
+
export type { Integrals } from './types/Integrals';
|
|
96
|
+
export type { SumOptions } from './types/Options/SumOptions';
|
|
97
|
+
export type { Spectrum } from './types/Spectrum/Spectrum';
|
|
98
|
+
export type { Spectrum1D, Spectrum1DSource } from './types/Spectrum/Spectrum1D';
|
|
99
|
+
export type { Spectrum2D, Spectrum2DSource } from './types/Spectrum/Spectrum2D';
|
|
100
|
+
|
|
63
101
|
export type { NMRRange } from './xy/NMRRange';
|
|
64
102
|
export type { NMRZone } from './xyz/NMRZone';
|
|
65
103
|
export type { NMRPeak1D } from './peaks/NMRPeak1D';
|
|
@@ -56,7 +56,7 @@ export function signalsToRanges(
|
|
|
56
56
|
|
|
57
57
|
wrapped = wrapped.sort((signal1, signal2) => signal1.from - signal2.from);
|
|
58
58
|
|
|
59
|
-
let ranges = [];
|
|
59
|
+
let ranges: RangeFullfiled[] = [];
|
|
60
60
|
let range = {} as RangeFullfiled;
|
|
61
61
|
for (let signal of wrapped) {
|
|
62
62
|
if (range.from === undefined || signal.from > range.to) {
|
|
@@ -68,7 +68,7 @@ export function simulateXYPeaks(
|
|
|
68
68
|
|
|
69
69
|
const multiplicity = spinSystem.multiplicity;
|
|
70
70
|
|
|
71
|
-
const xyPeaks = [];
|
|
71
|
+
const xyPeaks: Array<{ x: number; y: number }> = [];
|
|
72
72
|
for (const cluster of spinSystem.clusters) {
|
|
73
73
|
let clusterFake = cluster.map((cluster) =>
|
|
74
74
|
cluster < 0 ? -cluster - 1 : cluster,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NMRPeak1D } from '../../peaks/NMRPeak1D';
|
|
2
2
|
import type { MakeMandatory } from '../../utilities/MakeMandatory';
|
|
3
|
+
import { Jcoupling } from '../Jcoupling';
|
|
3
4
|
|
|
4
5
|
/*
|
|
5
6
|
* This library implements the J analyser described by Cobas et al in the paper:
|
|
@@ -34,7 +35,7 @@ export type Peak1DIntern = Omit<NMRPeak1D, 'y' | 'shape'> & {
|
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
export interface SignalIntern {
|
|
37
|
-
id
|
|
38
|
+
id?: string;
|
|
38
39
|
delta: number;
|
|
39
40
|
nbPeaks: number;
|
|
40
41
|
startX: number;
|
|
@@ -44,17 +45,26 @@ export interface SignalIntern {
|
|
|
44
45
|
mask?: boolean[];
|
|
45
46
|
mask2?: boolean[];
|
|
46
47
|
maskPattern?: boolean[];
|
|
47
|
-
nmrJs?:
|
|
48
|
+
nmrJs?: Jcoupling[];
|
|
48
49
|
multiplicity?: string;
|
|
49
50
|
pattern?: string;
|
|
51
|
+
|
|
50
52
|
observe: number;
|
|
51
|
-
nucleus
|
|
52
|
-
kind
|
|
53
|
+
nucleus?: string;
|
|
54
|
+
kind?: string;
|
|
53
55
|
integralData: IntergralData;
|
|
54
56
|
peaks: Peak1DIntern[];
|
|
55
57
|
peaksComp?: Peak1DIntern[];
|
|
56
58
|
}
|
|
57
59
|
|
|
60
|
+
export type SignalFlexiblePeaks = Omit<SignalIntern, 'peaks'> & {
|
|
61
|
+
peaks: Array<
|
|
62
|
+
Omit<Peak1DIntern, 'intensity'> & {
|
|
63
|
+
intensity?: number;
|
|
64
|
+
}
|
|
65
|
+
>;
|
|
66
|
+
};
|
|
67
|
+
|
|
58
68
|
type SignalInternMandatory = MakeMandatory<
|
|
59
69
|
SignalIntern,
|
|
60
70
|
'symRank' | 'mask' | 'peaksComp'
|
|
@@ -83,7 +93,7 @@ export default {
|
|
|
83
93
|
* @private
|
|
84
94
|
*/
|
|
85
95
|
compilePattern: (
|
|
86
|
-
inputSignal:
|
|
96
|
+
inputSignal: SignalFlexiblePeaks,
|
|
87
97
|
options: OpitonsCompilePatter = {},
|
|
88
98
|
) => {
|
|
89
99
|
let { jAxisKey = jAxisKeys } = options;
|
|
@@ -111,7 +121,7 @@ export default {
|
|
|
111
121
|
signal.asymmetric = false;
|
|
112
122
|
let P1, n2, maxFlagged;
|
|
113
123
|
let k = 1;
|
|
114
|
-
let jCouplings = [];
|
|
124
|
+
let jCouplings: number[] = [];
|
|
115
125
|
|
|
116
126
|
// Loop over the possible number of coupling contributing to the multiplet
|
|
117
127
|
for (let n = 0; n < 9; n++) {
|
|
@@ -129,7 +139,7 @@ export default {
|
|
|
129
139
|
n2 = Math.pow(2, n);
|
|
130
140
|
|
|
131
141
|
// 1.4 Find a combination of integer heights Hi, one from each Si, that sums to 2^n.
|
|
132
|
-
let heights = null;
|
|
142
|
+
let heights: number[] | null = null;
|
|
133
143
|
let counter = 1;
|
|
134
144
|
while (
|
|
135
145
|
!validPattern &&
|
|
@@ -250,7 +260,7 @@ function abstractPattern(signal: SignalInternMandatory, jCouplings: number[]) {
|
|
|
250
260
|
let tol = 0.05;
|
|
251
261
|
let pattern = '';
|
|
252
262
|
let cont = 1;
|
|
253
|
-
let newNmrJs = [];
|
|
263
|
+
let newNmrJs: Jcoupling[] = [];
|
|
254
264
|
|
|
255
265
|
if (jCouplings && jCouplings.length > 0) {
|
|
256
266
|
jCouplings.sort((a, b) => {
|
|
@@ -411,7 +421,7 @@ function getRanges(peaks: Peak1DIntern[]): GetRanges {
|
|
|
411
421
|
* @private
|
|
412
422
|
*/
|
|
413
423
|
function symmetrizeChoiseBest(
|
|
414
|
-
signal:
|
|
424
|
+
signal: SignalFlexiblePeaks,
|
|
415
425
|
options: {
|
|
416
426
|
maxError: number;
|
|
417
427
|
iteration: number;
|
|
@@ -456,7 +466,7 @@ function symmetrizeChoiseBest(
|
|
|
456
466
|
* @private
|
|
457
467
|
*/
|
|
458
468
|
function symmetrize(
|
|
459
|
-
signalInput:
|
|
469
|
+
signalInput: SignalFlexiblePeaks,
|
|
460
470
|
maxError: number,
|
|
461
471
|
iteration: number,
|
|
462
472
|
key: JAxisKeys,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ContourOptions } from './ContourOptions';
|
|
2
|
+
import { Display } from './Display';
|
|
3
|
+
|
|
4
|
+
export interface Color2D {
|
|
5
|
+
positiveColor: string;
|
|
6
|
+
negativeColor: string;
|
|
7
|
+
}
|
|
8
|
+
export interface Display2D extends Color2D, Display {
|
|
9
|
+
isPositiveVisible: boolean;
|
|
10
|
+
isNegativeVisible: boolean;
|
|
11
|
+
contourOptions: ContourOptions;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface Info {
|
|
2
|
+
isFid: boolean;
|
|
3
|
+
phc1?: number;
|
|
4
|
+
phc0?: number;
|
|
5
|
+
aqMod?: number;
|
|
6
|
+
isComplex: boolean;
|
|
7
|
+
dimension: number;
|
|
8
|
+
isFt: boolean;
|
|
9
|
+
experiment?: any;
|
|
10
|
+
digitalFilter?: number;
|
|
11
|
+
experimentNumber?: number;
|
|
12
|
+
solvent?: string;
|
|
13
|
+
pulseSequence?: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Info } from './Info';
|
|
2
|
+
|
|
3
|
+
export interface Info1D extends Info {
|
|
4
|
+
nucleus: string;
|
|
5
|
+
spectralWidth: number;
|
|
6
|
+
originFrequency: number;
|
|
7
|
+
baseFrequency?: number;
|
|
8
|
+
digitalFilter?: number;
|
|
9
|
+
frequencyOffset?: number;
|
|
10
|
+
owner?: string;
|
|
11
|
+
reverse?: boolean;
|
|
12
|
+
DECIM?: number;
|
|
13
|
+
DSPFVS?: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Info } from './Info';
|
|
2
|
+
|
|
3
|
+
export interface Info2D extends Info {
|
|
4
|
+
nucleus: string[];
|
|
5
|
+
digitalFilter?: number;
|
|
6
|
+
originFrequency: number[];
|
|
7
|
+
baseFrequency: number[];
|
|
8
|
+
frequencyOffset: number[];
|
|
9
|
+
spectralWidth: number[];
|
|
10
|
+
reverse?: boolean[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Logger } from 'cheminfo-types';
|
|
2
|
+
|
|
3
|
+
import { DataSelectionOption } from './DataSelectionOption';
|
|
4
|
+
|
|
5
|
+
export interface JcampParsingOptions {
|
|
6
|
+
name?: string;
|
|
7
|
+
converter?: JcampConverterOptions;
|
|
8
|
+
selector?: JcampSelectorOptions;
|
|
9
|
+
keepSource?: boolean;
|
|
10
|
+
logger?: Logger;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface JcampSelectorOptions {
|
|
14
|
+
index?: number;
|
|
15
|
+
tree?: FilterTreeByDataTypeDataClass[];
|
|
16
|
+
dataSelection?: DataSelectionOption;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface JcampConverterOptions {
|
|
20
|
+
keepRecordsRegExp?: RegExp;
|
|
21
|
+
profiling?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface FilterTreeByDataTypeDataClass {
|
|
25
|
+
/**
|
|
26
|
+
* dataClass to be filter out of the tree, default value is
|
|
27
|
+
* the same dataClass of the input data.
|
|
28
|
+
*/
|
|
29
|
+
dataClass?: string;
|
|
30
|
+
/**
|
|
31
|
+
* dataType to be filter out of the tree, default value is
|
|
32
|
+
* the same dataType of the input data.
|
|
33
|
+
*/
|
|
34
|
+
dataType?: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ConverterOptions as BrukerConverterOptions } from 'brukerconverter';
|
|
2
|
+
|
|
3
|
+
import { JcampConverterOptions } from './JcampParsingOptions';
|
|
4
|
+
import {
|
|
5
|
+
BrukerLoaderSelector,
|
|
6
|
+
GeneralLoadersSelector,
|
|
7
|
+
JcampLoaderSelector,
|
|
8
|
+
} from './ParsingOptions';
|
|
9
|
+
|
|
10
|
+
export interface NmredataParsingOptions {
|
|
11
|
+
converter?: {
|
|
12
|
+
jcamp?: JcampConverterOptions;
|
|
13
|
+
bruker?: BrukerConverterOptions;
|
|
14
|
+
};
|
|
15
|
+
selector?: {
|
|
16
|
+
general?: GeneralLoadersSelector;
|
|
17
|
+
bruker?: BrukerLoaderSelector;
|
|
18
|
+
jcamp?: JcampLoaderSelector;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ConverterOptions as BrukerConverterOptions } from 'brukerconverter';
|
|
2
|
+
import type { Logger } from 'cheminfo-types';
|
|
3
|
+
|
|
4
|
+
import { DataSelectionOption } from './DataSelectionOption';
|
|
5
|
+
import { JcampConverterOptions } from './JcampParsingOptions';
|
|
6
|
+
import { NmredataParsingOptions } from './NmredataParsingOptions';
|
|
7
|
+
|
|
8
|
+
export interface GeneralLoadersSelector {
|
|
9
|
+
/**
|
|
10
|
+
* priories processed or raw data if both exists
|
|
11
|
+
* @default 'both'
|
|
12
|
+
*/
|
|
13
|
+
dataSelection?: DataSelectionOption;
|
|
14
|
+
/**
|
|
15
|
+
* should we ignore 1D spectra
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
keep1D?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* should we ignore 2D spectra
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
keep2D?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* should we keep only real part. we will ignore keepFID
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
onlyReal?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface BrukerLoaderSelector {
|
|
32
|
+
/**
|
|
33
|
+
* processing number to select, default the smallest number
|
|
34
|
+
*/
|
|
35
|
+
processingNumbers?: string;
|
|
36
|
+
/**
|
|
37
|
+
* experiment number to select, default all
|
|
38
|
+
*/
|
|
39
|
+
experimentNumbers?: string;
|
|
40
|
+
/**
|
|
41
|
+
* should we take only the first processed data (procno).
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
onlyFirstProcessedData?: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface JcampTreeFilter {
|
|
48
|
+
/**
|
|
49
|
+
* Data type comes from the LDR
|
|
50
|
+
*/
|
|
51
|
+
dataType?: string;
|
|
52
|
+
dataClass?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface JcampLoaderSelector {
|
|
56
|
+
index?: number;
|
|
57
|
+
tree?: JcampTreeFilter[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface NmrLoaderSelectors {
|
|
61
|
+
general?: GeneralLoadersSelector;
|
|
62
|
+
bruker?: BrukerLoaderSelector;
|
|
63
|
+
jcamp?: JcampLoaderSelector;
|
|
64
|
+
files?: string[];
|
|
65
|
+
}
|
|
66
|
+
export interface ParsingOptions {
|
|
67
|
+
name?: string;
|
|
68
|
+
converter?: {
|
|
69
|
+
jcamp?: JcampConverterOptions;
|
|
70
|
+
bruker?: BrukerConverterOptions;
|
|
71
|
+
nmredata?: NmredataParsingOptions;
|
|
72
|
+
};
|
|
73
|
+
sourceSelector?: NmrLoaderSelectors;
|
|
74
|
+
/**
|
|
75
|
+
* if it is true the source object with files will be keeped
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
keepSource?: boolean;
|
|
79
|
+
logger?: Logger;
|
|
80
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface SumOptions {
|
|
2
|
+
/**
|
|
3
|
+
* @default true
|
|
4
|
+
*/
|
|
5
|
+
isSumConstant: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* If you force the "sum" the mf should not be exists any more otherwise if mf is exists the "sum" must be null or undefined
|
|
8
|
+
* @default undefined
|
|
9
|
+
*/
|
|
10
|
+
sum: number | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
sumAuto: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* mf will be set automatically for the first time based on the first molecules unless the user change it
|
|
17
|
+
* example 'C10H20O3'
|
|
18
|
+
*/
|
|
19
|
+
mf?: string;
|
|
20
|
+
/**
|
|
21
|
+
* key of the selected molecule
|
|
22
|
+
*/
|
|
23
|
+
moleculeId?: string;
|
|
24
|
+
}
|