react-cheminfo 0.69.0 → 0.71.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/README.md +70 -2
- package/lib/about/core/providers.d.ts +6 -0
- package/lib/about/core/providers.d.ts.map +1 -1
- package/lib/about/core/providers.js +7 -0
- package/lib/about/core/providers.js.map +1 -1
- package/lib/about/ui/AboutProvidedBy.js +34 -0
- package/lib/about/ui/AboutProvidedBy.js.map +1 -1
- package/lib/chart/ui/useChartPointer.d.ts +9 -1
- package/lib/chart/ui/useChartPointer.d.ts.map +1 -1
- package/lib/chart/ui/useChartPointer.js +11 -3
- package/lib/chart/ui/useChartPointer.js.map +1 -1
- package/lib/credits/core/credits.d.ts +41 -0
- package/lib/credits/core/credits.d.ts.map +1 -1
- package/lib/credits/core/credits.js +50 -0
- package/lib/credits/core/credits.js.map +1 -1
- package/lib/download/core/drawingMarkup.d.ts +8 -1
- package/lib/download/core/drawingMarkup.d.ts.map +1 -1
- package/lib/download/core/drawingMarkup.js +13 -1
- package/lib/download/core/drawingMarkup.js.map +1 -1
- package/lib/download/core/figurePng.d.ts +14 -0
- package/lib/download/core/figurePng.d.ts.map +1 -1
- package/lib/download/core/figurePng.js +21 -6
- package/lib/download/core/figurePng.js.map +1 -1
- package/lib/download/core/figureSvg.d.ts.map +1 -1
- package/lib/download/core/figureSvg.js +5 -3
- package/lib/download/core/figureSvg.js.map +1 -1
- package/lib/download/core/figureTarget.d.ts +13 -0
- package/lib/download/core/figureTarget.d.ts.map +1 -1
- package/lib/download/core/figureTarget.js +25 -5
- package/lib/download/core/figureTarget.js.map +1 -1
- package/lib/download/core/svgBounds.d.ts +15 -0
- package/lib/download/core/svgBounds.d.ts.map +1 -1
- package/lib/download/core/svgBounds.js +20 -0
- package/lib/download/core/svgBounds.js.map +1 -1
- package/lib/download/core/svgToPng.d.ts.map +1 -1
- package/lib/download/core/svgToPng.js +4 -2
- package/lib/download/core/svgToPng.js.map +1 -1
- package/lib/format/core/relativeTime.d.ts +8 -3
- package/lib/format/core/relativeTime.d.ts.map +1 -1
- package/lib/format/core/relativeTime.js +19 -7
- package/lib/format/core/relativeTime.js.map +1 -1
- package/lib/host/core/connectHost.d.ts +25 -34
- package/lib/host/core/connectHost.d.ts.map +1 -1
- package/lib/host/core/connectHost.js +43 -89
- package/lib/host/core/connectHost.js.map +1 -1
- package/lib/host/core/hostOutputs.d.ts +58 -0
- package/lib/host/core/hostOutputs.d.ts.map +1 -0
- package/lib/host/core/hostOutputs.js +151 -0
- package/lib/host/core/hostOutputs.js.map +1 -0
- package/lib/host/core/index.d.ts +9 -3
- package/lib/host/core/index.d.ts.map +1 -1
- package/lib/host/core/index.js +4 -1
- package/lib/host/core/index.js.map +1 -1
- package/lib/host/core/irKinds.d.ts +124 -0
- package/lib/host/core/irKinds.d.ts.map +1 -0
- package/lib/host/core/irKinds.js +46 -0
- package/lib/host/core/irKinds.js.map +1 -0
- package/lib/host/core/kinds.d.ts +13 -5
- package/lib/host/core/kinds.d.ts.map +1 -1
- package/lib/host/core/kinds.js +11 -5
- package/lib/host/core/kinds.js.map +1 -1
- package/lib/host/core/protocol.d.ts +50 -7
- package/lib/host/core/protocol.d.ts.map +1 -1
- package/lib/host/core/protocol.js +10 -6
- package/lib/host/core/protocol.js.map +1 -1
- package/lib/host/core/selectInputs.d.ts +37 -0
- package/lib/host/core/selectInputs.d.ts.map +1 -0
- package/lib/host/core/selectInputs.js +110 -0
- package/lib/host/core/selectInputs.js.map +1 -0
- package/lib/host/testing/sciPeaks.d.ts +31 -0
- package/lib/host/testing/sciPeaks.d.ts.map +1 -1
- package/lib/host/testing/sciPeaks.js +73 -0
- package/lib/host/testing/sciPeaks.js.map +1 -1
- package/lib/host/testing/standInHost.d.ts +9 -1
- package/lib/host/testing/standInHost.d.ts.map +1 -1
- package/lib/host/testing/standInHost.js +19 -1
- package/lib/host/testing/standInHost.js.map +1 -1
- package/lib/host/ui/useHostConnection.d.ts +13 -5
- package/lib/host/ui/useHostConnection.d.ts.map +1 -1
- package/lib/host/ui/useHostConnection.js +4 -3
- package/lib/host/ui/useHostConnection.js.map +1 -1
- package/lib/host-testing.d.ts +2 -2
- package/lib/host-testing.d.ts.map +1 -1
- package/lib/host-testing.js +2 -2
- package/lib/host-testing.js.map +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
- package/lib/ir/core/handPicking.d.ts +58 -0
- package/lib/ir/core/handPicking.d.ts.map +1 -0
- package/lib/ir/core/handPicking.js +130 -0
- package/lib/ir/core/handPicking.js.map +1 -0
- package/lib/ir/core/index.d.ts +3 -0
- package/lib/ir/core/index.d.ts.map +1 -1
- package/lib/ir/core/index.js +3 -0
- package/lib/ir/core/index.js.map +1 -1
- package/lib/ir/core/irBandState.d.ts +57 -0
- package/lib/ir/core/irBandState.d.ts.map +1 -0
- package/lib/ir/core/irBandState.js +119 -0
- package/lib/ir/core/irBandState.js.map +1 -0
- package/lib/ir/core/irCommands.d.ts +11 -0
- package/lib/ir/core/irCommands.d.ts.map +1 -1
- package/lib/ir/core/irCommands.js +6 -0
- package/lib/ir/core/irCommands.js.map +1 -1
- package/lib/ir/core/irPeaks.d.ts +28 -0
- package/lib/ir/core/irPeaks.d.ts.map +1 -0
- package/lib/ir/core/irPeaks.js +66 -0
- package/lib/ir/core/irPeaks.js.map +1 -0
- package/lib/ir/core/irReducer.d.ts +8 -0
- package/lib/ir/core/irReducer.d.ts.map +1 -1
- package/lib/ir/core/irReducer.js +15 -32
- package/lib/ir/core/irReducer.js.map +1 -1
- package/lib/ir/core/irSpectrum.d.ts +15 -0
- package/lib/ir/core/irSpectrum.d.ts.map +1 -1
- package/lib/ir/core/irSpectrum.js.map +1 -1
- package/lib/ir/core/irState.d.ts +9 -6
- package/lib/ir/core/irState.d.ts.map +1 -1
- package/lib/ir/core/irState.js +10 -6
- package/lib/ir/core/irState.js.map +1 -1
- package/lib/ir/core/pickBands.d.ts +14 -0
- package/lib/ir/core/pickBands.d.ts.map +1 -1
- package/lib/ir/core/pickBands.js +39 -33
- package/lib/ir/core/pickBands.js.map +1 -1
- package/lib/ir/core/ramanBands.d.ts +9 -1
- package/lib/ir/core/ramanBands.d.ts.map +1 -1
- package/lib/ir/core/ramanBands.js +2 -2
- package/lib/ir/core/ramanBands.js.map +1 -1
- package/lib/ir/core/spectrumBands.d.ts +46 -0
- package/lib/ir/core/spectrumBands.d.ts.map +1 -0
- package/lib/ir/core/spectrumBands.js +98 -0
- package/lib/ir/core/spectrumBands.js.map +1 -0
- package/lib/ir/ui/BandRow.d.ts +5 -0
- package/lib/ir/ui/BandRow.d.ts.map +1 -1
- package/lib/ir/ui/BandRow.js +4 -3
- package/lib/ir/ui/BandRow.js.map +1 -1
- package/lib/ir/ui/BandsPanel.d.ts +5 -0
- package/lib/ir/ui/BandsPanel.d.ts.map +1 -1
- package/lib/ir/ui/BandsPanel.js +36 -16
- package/lib/ir/ui/BandsPanel.js.map +1 -1
- package/lib/ir/ui/BandsToolbar.d.ts +9 -0
- package/lib/ir/ui/BandsToolbar.d.ts.map +1 -0
- package/lib/ir/ui/BandsToolbar.js +61 -0
- package/lib/ir/ui/BandsToolbar.js.map +1 -0
- package/lib/ir/ui/IrCanvas.d.ts +2 -1
- package/lib/ir/ui/IrCanvas.d.ts.map +1 -1
- package/lib/ir/ui/IrCanvas.js +19 -5
- package/lib/ir/ui/IrCanvas.js.map +1 -1
- package/lib/ir/ui/IrChart.d.ts.map +1 -1
- package/lib/ir/ui/IrChart.js +8 -1
- package/lib/ir/ui/IrChart.js.map +1 -1
- package/lib/ir/ui/IrDocumentationDialog.js +1 -1
- package/lib/ir/ui/IrDocumentationDialog.js.map +1 -1
- package/lib/ir/ui/IrEditor.d.ts +4 -2
- package/lib/ir/ui/IrEditor.d.ts.map +1 -1
- package/lib/ir/ui/IrEditor.js.map +1 -1
- package/lib/ir/ui/IrShell.d.ts.map +1 -1
- package/lib/ir/ui/IrShell.js +6 -0
- package/lib/ir/ui/IrShell.js.map +1 -1
- package/lib/ir/ui/IrStatusBar.d.ts.map +1 -1
- package/lib/ir/ui/IrStatusBar.js +1 -1
- package/lib/ir/ui/IrStatusBar.js.map +1 -1
- package/lib/ir/ui/IrToolbar.d.ts +4 -3
- package/lib/ir/ui/IrToolbar.d.ts.map +1 -1
- package/lib/ir/ui/IrToolbar.js +5 -4
- package/lib/ir/ui/IrToolbar.js.map +1 -1
- package/lib/ir/ui/VibrationalEditor.d.ts +2 -1
- package/lib/ir/ui/VibrationalEditor.d.ts.map +1 -1
- package/lib/ir/ui/VibrationalEditor.js.map +1 -1
- package/lib/ir/ui/irActions.d.ts +5 -0
- package/lib/ir/ui/irActions.d.ts.map +1 -1
- package/lib/ir/ui/irActions.js +6 -0
- package/lib/ir/ui/irActions.js.map +1 -1
- package/lib/ir/ui/irChartProps.d.ts +4 -1
- package/lib/ir/ui/irChartProps.d.ts.map +1 -1
- package/lib/ir/ui/useIrEditor.d.ts +5 -11
- package/lib/ir/ui/useIrEditor.d.ts.map +1 -1
- package/lib/ir/ui/useIrEditor.js +17 -18
- package/lib/ir/ui/useIrEditor.js.map +1 -1
- package/lib/locales/de.json +63 -0
- package/lib/locales/en.json +63 -0
- package/lib/locales/es.json +63 -0
- package/lib/locales/fr.json +63 -0
- package/lib/locales/it.json +63 -0
- package/lib/mass/core/analyseSpectrum.d.ts +85 -0
- package/lib/mass/core/analyseSpectrum.d.ts.map +1 -0
- package/lib/mass/core/analyseSpectrum.js +101 -0
- package/lib/mass/core/analyseSpectrum.js.map +1 -0
- package/lib/mass/core/ascendingTrace.d.ts +24 -0
- package/lib/mass/core/ascendingTrace.d.ts.map +1 -0
- package/lib/mass/core/ascendingTrace.js +57 -0
- package/lib/mass/core/ascendingTrace.js.map +1 -0
- package/lib/mass/core/centroidPeaks.d.ts +77 -0
- package/lib/mass/core/centroidPeaks.d.ts.map +1 -0
- package/lib/mass/core/centroidPeaks.js +62 -0
- package/lib/mass/core/centroidPeaks.js.map +1 -0
- package/lib/mass/core/detectMassFormat.d.ts +24 -0
- package/lib/mass/core/detectMassFormat.d.ts.map +1 -0
- package/lib/mass/core/detectMassFormat.js +105 -0
- package/lib/mass/core/detectMassFormat.js.map +1 -0
- package/lib/mass/core/downloadSpectra.d.ts +24 -0
- package/lib/mass/core/downloadSpectra.d.ts.map +1 -0
- package/lib/mass/core/downloadSpectra.js +35 -0
- package/lib/mass/core/downloadSpectra.js.map +1 -0
- package/lib/mass/core/fromJcamp.d.ts +46 -0
- package/lib/mass/core/fromJcamp.d.ts.map +1 -0
- package/lib/mass/core/fromJcamp.js +123 -0
- package/lib/mass/core/fromJcamp.js.map +1 -0
- package/lib/mass/core/fromText.d.ts +30 -0
- package/lib/mass/core/fromText.d.ts.map +1 -0
- package/lib/mass/core/fromText.js +39 -0
- package/lib/mass/core/fromText.js.map +1 -0
- package/lib/mass/core/index.d.ts +70 -0
- package/lib/mass/core/index.d.ts.map +1 -0
- package/lib/mass/core/index.js +42 -0
- package/lib/mass/core/index.js.map +1 -0
- package/lib/mass/core/jcampTechnique.d.ts +38 -0
- package/lib/mass/core/jcampTechnique.d.ts.map +1 -0
- package/lib/mass/core/jcampTechnique.js +70 -0
- package/lib/mass/core/jcampTechnique.js.map +1 -0
- package/lib/mass/core/labelStackBox.d.ts +49 -0
- package/lib/mass/core/labelStackBox.d.ts.map +1 -0
- package/lib/mass/core/labelStackBox.js +44 -0
- package/lib/mass/core/labelStackBox.js.map +1 -0
- package/lib/mass/core/labelledPeaks.d.ts +79 -0
- package/lib/mass/core/labelledPeaks.d.ts.map +1 -0
- package/lib/mass/core/labelledPeaks.js +74 -0
- package/lib/mass/core/labelledPeaks.js.map +1 -0
- package/lib/mass/core/loadMassSpectra.d.ts +57 -0
- package/lib/mass/core/loadMassSpectra.d.ts.map +1 -0
- package/lib/mass/core/loadMassSpectra.js +45 -0
- package/lib/mass/core/loadMassSpectra.js.map +1 -0
- package/lib/mass/core/loadedMassSpectrum.d.ts +42 -0
- package/lib/mass/core/loadedMassSpectrum.d.ts.map +1 -0
- package/lib/mass/core/loadedMassSpectrum.js +15 -0
- package/lib/mass/core/loadedMassSpectrum.js.map +1 -0
- package/lib/mass/core/massCommands.d.ts +170 -0
- package/lib/mass/core/massCommands.d.ts.map +1 -0
- package/lib/mass/core/massCommands.js +95 -0
- package/lib/mass/core/massCommands.js.map +1 -0
- package/lib/mass/core/massDomain.d.ts +121 -0
- package/lib/mass/core/massDomain.d.ts.map +1 -0
- package/lib/mass/core/massDomain.js +179 -0
- package/lib/mass/core/massDomain.js.map +1 -0
- package/lib/mass/core/massEditorApi.d.ts +65 -0
- package/lib/mass/core/massEditorApi.d.ts.map +1 -0
- package/lib/mass/core/massEditorApi.js +10 -0
- package/lib/mass/core/massEditorApi.js.map +1 -0
- package/lib/mass/core/massFormat.d.ts +78 -0
- package/lib/mass/core/massFormat.d.ts.map +1 -0
- package/lib/mass/core/massFormat.js +168 -0
- package/lib/mass/core/massFormat.js.map +1 -0
- package/lib/mass/core/massMeta.d.ts +85 -0
- package/lib/mass/core/massMeta.d.ts.map +1 -0
- package/lib/mass/core/massMeta.js +182 -0
- package/lib/mass/core/massMeta.js.map +1 -0
- package/lib/mass/core/massReducer.d.ts +82 -0
- package/lib/mass/core/massReducer.d.ts.map +1 -0
- package/lib/mass/core/massReducer.js +163 -0
- package/lib/mass/core/massReducer.js.map +1 -0
- package/lib/mass/core/massResolution.d.ts +92 -0
- package/lib/mass/core/massResolution.d.ts.map +1 -0
- package/lib/mass/core/massResolution.js +126 -0
- package/lib/mass/core/massResolution.js.map +1 -0
- package/lib/mass/core/massSidePanels.d.ts +28 -0
- package/lib/mass/core/massSidePanels.d.ts.map +1 -0
- package/lib/mass/core/massSidePanels.js +12 -0
- package/lib/mass/core/massSidePanels.js.map +1 -0
- package/lib/mass/core/massSpectrum.d.ts +206 -0
- package/lib/mass/core/massSpectrum.d.ts.map +1 -0
- package/lib/mass/core/massSpectrum.js +41 -0
- package/lib/mass/core/massSpectrum.js.map +1 -0
- package/lib/mass/core/massState.d.ts +145 -0
- package/lib/mass/core/massState.d.ts.map +1 -0
- package/lib/mass/core/massState.js +102 -0
- package/lib/mass/core/massState.js.map +1 -0
- package/lib/mass/core/massStateEdits.d.ts +51 -0
- package/lib/mass/core/massStateEdits.d.ts.map +1 -0
- package/lib/mass/core/massStateEdits.js +90 -0
- package/lib/mass/core/massStateEdits.js.map +1 -0
- package/lib/mass/core/massSummary.d.ts +77 -0
- package/lib/mass/core/massSummary.d.ts.map +1 -0
- package/lib/mass/core/massSummary.js +174 -0
- package/lib/mass/core/massSummary.js.map +1 -0
- package/lib/mass/core/mzDecimalsSetting.d.ts +36 -0
- package/lib/mass/core/mzDecimalsSetting.d.ts.map +1 -0
- package/lib/mass/core/mzDecimalsSetting.js +42 -0
- package/lib/mass/core/mzDecimalsSetting.js.map +1 -0
- package/lib/mass/core/nearestPeak.d.ts +75 -0
- package/lib/mass/core/nearestPeak.d.ts.map +1 -0
- package/lib/mass/core/nearestPeak.js +99 -0
- package/lib/mass/core/nearestPeak.js.map +1 -0
- package/lib/mass/core/peakLabelLines.d.ts +77 -0
- package/lib/mass/core/peakLabelLines.d.ts.map +1 -0
- package/lib/mass/core/peakLabelLines.js +54 -0
- package/lib/mass/core/peakLabelLines.js.map +1 -0
- package/lib/mass/core/peakLabelPlan.d.ts +109 -0
- package/lib/mass/core/peakLabelPlan.d.ts.map +1 -0
- package/lib/mass/core/peakLabelPlan.js +143 -0
- package/lib/mass/core/peakLabelPlan.js.map +1 -0
- package/lib/mass/core/peakTable.d.ts +54 -0
- package/lib/mass/core/peakTable.d.ts.map +1 -0
- package/lib/mass/core/peakTable.js +53 -0
- package/lib/mass/core/peakTable.js.map +1 -0
- package/lib/mass/core/resolutionOf.d.ts +60 -0
- package/lib/mass/core/resolutionOf.d.ts.map +1 -0
- package/lib/mass/core/resolutionOf.js +84 -0
- package/lib/mass/core/resolutionOf.js.map +1 -0
- package/lib/mass/core/scanFilter.d.ts +25 -0
- package/lib/mass/core/scanFilter.d.ts.map +1 -0
- package/lib/mass/core/scanFilter.js +107 -0
- package/lib/mass/core/scanFilter.js.map +1 -0
- package/lib/mass/core/spectrumJcamp.d.ts +47 -0
- package/lib/mass/core/spectrumJcamp.d.ts.map +1 -0
- package/lib/mass/core/spectrumJcamp.js +167 -0
- package/lib/mass/core/spectrumJcamp.js.map +1 -0
- package/lib/mass/core/toMassSpectrum.d.ts +67 -0
- package/lib/mass/core/toMassSpectrum.d.ts.map +1 -0
- package/lib/mass/core/toMassSpectrum.js +78 -0
- package/lib/mass/core/toMassSpectrum.js.map +1 -0
- package/lib/mass/core/traceIcon.d.ts +82 -0
- package/lib/mass/core/traceIcon.d.ts.map +1 -0
- package/lib/mass/core/traceIcon.js +66 -0
- package/lib/mass/core/traceIcon.js.map +1 -0
- package/lib/mass/core/writtenResolution.d.ts +40 -0
- package/lib/mass/core/writtenResolution.d.ts.map +1 -0
- package/lib/mass/core/writtenResolution.js +77 -0
- package/lib/mass/core/writtenResolution.js.map +1 -0
- package/lib/mass/ui/MassAboutDialog.d.ts +16 -0
- package/lib/mass/ui/MassAboutDialog.d.ts.map +1 -0
- package/lib/mass/ui/MassAboutDialog.js +44 -0
- package/lib/mass/ui/MassAboutDialog.js.map +1 -0
- package/lib/mass/ui/MassCanvas.d.ts +46 -0
- package/lib/mass/ui/MassCanvas.d.ts.map +1 -0
- package/lib/mass/ui/MassCanvas.js +84 -0
- package/lib/mass/ui/MassCanvas.js.map +1 -0
- package/lib/mass/ui/MassChart.d.ts +21 -0
- package/lib/mass/ui/MassChart.d.ts.map +1 -0
- package/lib/mass/ui/MassChart.js +139 -0
- package/lib/mass/ui/MassChart.js.map +1 -0
- package/lib/mass/ui/MassCommandProvider.d.ts +15 -0
- package/lib/mass/ui/MassCommandProvider.d.ts.map +1 -0
- package/lib/mass/ui/MassCommandProvider.js +14 -0
- package/lib/mass/ui/MassCommandProvider.js.map +1 -0
- package/lib/mass/ui/MassCommandTooltip.d.ts +16 -0
- package/lib/mass/ui/MassCommandTooltip.d.ts.map +1 -0
- package/lib/mass/ui/MassCommandTooltip.js +22 -0
- package/lib/mass/ui/MassCommandTooltip.js.map +1 -0
- package/lib/mass/ui/MassDocumentationDialog.d.ts +18 -0
- package/lib/mass/ui/MassDocumentationDialog.d.ts.map +1 -0
- package/lib/mass/ui/MassDocumentationDialog.js +70 -0
- package/lib/mass/ui/MassDocumentationDialog.js.map +1 -0
- package/lib/mass/ui/MassEditor.d.ts +78 -0
- package/lib/mass/ui/MassEditor.d.ts.map +1 -0
- package/lib/mass/ui/MassEditor.js +42 -0
- package/lib/mass/ui/MassEditor.js.map +1 -0
- package/lib/mass/ui/MassHeader.d.ts +12 -0
- package/lib/mass/ui/MassHeader.d.ts.map +1 -0
- package/lib/mass/ui/MassHeader.js +20 -0
- package/lib/mass/ui/MassHeader.js.map +1 -0
- package/lib/mass/ui/MassLogo.d.ts +21 -0
- package/lib/mass/ui/MassLogo.d.ts.map +1 -0
- package/lib/mass/ui/MassLogo.js +36 -0
- package/lib/mass/ui/MassLogo.js.map +1 -0
- package/lib/mass/ui/MassPointerTracker.d.ts +44 -0
- package/lib/mass/ui/MassPointerTracker.d.ts.map +1 -0
- package/lib/mass/ui/MassPointerTracker.js +29 -0
- package/lib/mass/ui/MassPointerTracker.js.map +1 -0
- package/lib/mass/ui/MassShell.d.ts +29 -0
- package/lib/mass/ui/MassShell.d.ts.map +1 -0
- package/lib/mass/ui/MassShell.js +133 -0
- package/lib/mass/ui/MassShell.js.map +1 -0
- package/lib/mass/ui/MassSidePanel.d.ts +32 -0
- package/lib/mass/ui/MassSidePanel.d.ts.map +1 -0
- package/lib/mass/ui/MassSidePanel.js +44 -0
- package/lib/mass/ui/MassSidePanel.js.map +1 -0
- package/lib/mass/ui/MassStateProvider.d.ts +19 -0
- package/lib/mass/ui/MassStateProvider.d.ts.map +1 -0
- package/lib/mass/ui/MassStateProvider.js +16 -0
- package/lib/mass/ui/MassStateProvider.js.map +1 -0
- package/lib/mass/ui/MassStatusBar.d.ts +15 -0
- package/lib/mass/ui/MassStatusBar.d.ts.map +1 -0
- package/lib/mass/ui/MassStatusBar.js +50 -0
- package/lib/mass/ui/MassStatusBar.js.map +1 -0
- package/lib/mass/ui/MassToolbar.d.ts +24 -0
- package/lib/mass/ui/MassToolbar.d.ts.map +1 -0
- package/lib/mass/ui/MassToolbar.js +36 -0
- package/lib/mass/ui/MassToolbar.js.map +1 -0
- package/lib/mass/ui/MetadataPanel.d.ts +35 -0
- package/lib/mass/ui/MetadataPanel.d.ts.map +1 -0
- package/lib/mass/ui/MetadataPanel.js +100 -0
- package/lib/mass/ui/MetadataPanel.js.map +1 -0
- package/lib/mass/ui/MzDecimalsMenu.d.ts +28 -0
- package/lib/mass/ui/MzDecimalsMenu.d.ts.map +1 -0
- package/lib/mass/ui/MzDecimalsMenu.js +40 -0
- package/lib/mass/ui/MzDecimalsMenu.js.map +1 -0
- package/lib/mass/ui/PeakLabels.d.ts +93 -0
- package/lib/mass/ui/PeakLabels.d.ts.map +1 -0
- package/lib/mass/ui/PeakLabels.js +91 -0
- package/lib/mass/ui/PeakLabels.js.map +1 -0
- package/lib/mass/ui/PeakTable.d.ts +34 -0
- package/lib/mass/ui/PeakTable.d.ts.map +1 -0
- package/lib/mass/ui/PeakTable.js +49 -0
- package/lib/mass/ui/PeakTable.js.map +1 -0
- package/lib/mass/ui/PeaksPanel.d.ts +31 -0
- package/lib/mass/ui/PeaksPanel.d.ts.map +1 -0
- package/lib/mass/ui/PeaksPanel.js +53 -0
- package/lib/mass/ui/PeaksPanel.js.map +1 -0
- package/lib/mass/ui/SpectraPanel.d.ts +17 -0
- package/lib/mass/ui/SpectraPanel.d.ts.map +1 -0
- package/lib/mass/ui/SpectraPanel.js +76 -0
- package/lib/mass/ui/SpectraPanel.js.map +1 -0
- package/lib/mass/ui/SpectrumRow.d.ts +26 -0
- package/lib/mass/ui/SpectrumRow.d.ts.map +1 -0
- package/lib/mass/ui/SpectrumRow.js +141 -0
- package/lib/mass/ui/SpectrumRow.js.map +1 -0
- package/lib/mass/ui/SpectrumTrace.d.ts +46 -0
- package/lib/mass/ui/SpectrumTrace.d.ts.map +1 -0
- package/lib/mass/ui/SpectrumTrace.js +68 -0
- package/lib/mass/ui/SpectrumTrace.js.map +1 -0
- package/lib/mass/ui/index.d.ts +69 -0
- package/lib/mass/ui/index.d.ts.map +1 -0
- package/lib/mass/ui/index.js +42 -0
- package/lib/mass/ui/index.js.map +1 -0
- package/lib/mass/ui/massActions.d.ts +52 -0
- package/lib/mass/ui/massActions.d.ts.map +1 -0
- package/lib/mass/ui/massActions.js +62 -0
- package/lib/mass/ui/massActions.js.map +1 -0
- package/lib/mass/ui/massChartProps.d.ts +128 -0
- package/lib/mass/ui/massChartProps.d.ts.map +1 -0
- package/lib/mass/ui/massChartProps.js +14 -0
- package/lib/mass/ui/massChartProps.js.map +1 -0
- package/lib/mass/ui/massCommandContext.d.ts +36 -0
- package/lib/mass/ui/massCommandContext.d.ts.map +1 -0
- package/lib/mass/ui/massCommandContext.js +45 -0
- package/lib/mass/ui/massCommandContext.js.map +1 -0
- package/lib/mass/ui/massHostPanels.d.ts +48 -0
- package/lib/mass/ui/massHostPanels.d.ts.map +1 -0
- package/lib/mass/ui/massHostPanels.js +41 -0
- package/lib/mass/ui/massHostPanels.js.map +1 -0
- package/lib/mass/ui/massStateContext.d.ts +26 -0
- package/lib/mass/ui/massStateContext.d.ts.map +1 -0
- package/lib/mass/ui/massStateContext.js +37 -0
- package/lib/mass/ui/massStateContext.js.map +1 -0
- package/lib/mass/ui/useIntensityZoom.d.ts +20 -0
- package/lib/mass/ui/useIntensityZoom.d.ts.map +1 -0
- package/lib/mass/ui/useIntensityZoom.js +42 -0
- package/lib/mass/ui/useIntensityZoom.js.map +1 -0
- package/lib/mass/ui/useMassEditor.d.ts +52 -0
- package/lib/mass/ui/useMassEditor.d.ts.map +1 -0
- package/lib/mass/ui/useMassEditor.js +93 -0
- package/lib/mass/ui/useMassEditor.js.map +1 -0
- package/lib/mass/ui/useMassFiles.d.ts +22 -0
- package/lib/mass/ui/useMassFiles.d.ts.map +1 -0
- package/lib/mass/ui/useMassFiles.js +71 -0
- package/lib/mass/ui/useMassFiles.js.map +1 -0
- package/lib/mass/ui/useMassHandle.d.ts +15 -0
- package/lib/mass/ui/useMassHandle.d.ts.map +1 -0
- package/lib/mass/ui/useMassHandle.js +35 -0
- package/lib/mass/ui/useMassHandle.js.map +1 -0
- package/lib/mass/ui/useMassPointer.d.ts +70 -0
- package/lib/mass/ui/useMassPointer.d.ts.map +1 -0
- package/lib/mass/ui/useMassPointer.js +57 -0
- package/lib/mass/ui/useMassPointer.js.map +1 -0
- package/lib/mass/ui/useMassShortcuts.d.ts +21 -0
- package/lib/mass/ui/useMassShortcuts.d.ts.map +1 -0
- package/lib/mass/ui/useMassShortcuts.js +66 -0
- package/lib/mass/ui/useMassShortcuts.js.map +1 -0
- package/lib/mass/ui/useMassSide.d.ts +27 -0
- package/lib/mass/ui/useMassSide.d.ts.map +1 -0
- package/lib/mass/ui/useMassSide.js +45 -0
- package/lib/mass/ui/useMassSide.js.map +1 -0
- package/lib/mass/ui/useMassZoom.d.ts +92 -0
- package/lib/mass/ui/useMassZoom.d.ts.map +1 -0
- package/lib/mass/ui/useMassZoom.js +65 -0
- package/lib/mass/ui/useMassZoom.js.map +1 -0
- package/lib/mass.d.ts +16 -0
- package/lib/mass.d.ts.map +1 -0
- package/lib/mass.js +16 -0
- package/lib/mass.js.map +1 -0
- package/lib/panel/ui/PanelRail.d.ts.map +1 -1
- package/lib/panel/ui/PanelRail.js +6 -1
- package/lib/panel/ui/PanelRail.js.map +1 -1
- package/lib/slides/ui/slideSanitizeSchema.d.ts +3 -2
- package/lib/slides/ui/slideSanitizeSchema.d.ts.map +1 -1
- package/lib/slides/ui/slideSanitizeSchema.js +82 -2
- package/lib/slides/ui/slideSanitizeSchema.js.map +1 -1
- package/package.json +6 -1
- package/src/about/core/providers.ts +7 -0
- package/src/about/ui/AboutProvidedBy.tsx +49 -0
- package/src/chart/ui/useChartPointer.ts +18 -4
- package/src/credits/core/credits.ts +53 -0
- package/src/download/core/drawingMarkup.ts +18 -1
- package/src/download/core/figurePng.ts +21 -8
- package/src/download/core/figureSvg.ts +5 -2
- package/src/download/core/figureTarget.ts +28 -3
- package/src/download/core/svgBounds.ts +21 -0
- package/src/download/core/svgToPng.ts +3 -4
- package/src/format/core/relativeTime.ts +29 -7
- package/src/host/core/connectHost.ts +77 -120
- package/src/host/core/hostOutputs.ts +197 -0
- package/src/host/core/index.ts +13 -7
- package/src/host/core/irKinds.ts +92 -0
- package/src/host/core/kinds.ts +16 -6
- package/src/host/core/protocol.ts +50 -8
- package/src/host/core/selectInputs.ts +145 -0
- package/src/host/testing/sciPeaks.ts +140 -0
- package/src/host/testing/standInHost.ts +30 -5
- package/src/host/ui/useHostConnection.ts +17 -8
- package/src/host-testing.ts +4 -0
- package/src/ir/core/handPicking.ts +154 -0
- package/src/ir/core/index.ts +14 -0
- package/src/ir/core/irBandState.ts +155 -0
- package/src/ir/core/irCommands.ts +7 -0
- package/src/ir/core/irPeaks.ts +79 -0
- package/src/ir/core/irReducer.ts +27 -34
- package/src/ir/core/irSpectrum.ts +16 -0
- package/src/ir/core/irState.ts +15 -8
- package/src/ir/core/pickBands.ts +46 -39
- package/src/ir/core/ramanBands.ts +2 -2
- package/src/ir/core/spectrumBands.ts +113 -0
- package/src/ir/ui/BandRow.tsx +20 -2
- package/src/ir/ui/BandsPanel.tsx +46 -88
- package/src/ir/ui/BandsToolbar.tsx +152 -0
- package/src/ir/ui/IrCanvas.tsx +22 -11
- package/src/ir/ui/IrChart.tsx +10 -1
- package/src/ir/ui/IrDocumentationDialog.tsx +7 -0
- package/src/ir/ui/IrEditor.tsx +4 -2
- package/src/ir/ui/IrShell.tsx +5 -0
- package/src/ir/ui/IrStatusBar.tsx +4 -1
- package/src/ir/ui/IrToolbar.tsx +14 -5
- package/src/ir/ui/VibrationalEditor.tsx +2 -1
- package/src/ir/ui/irActions.ts +11 -0
- package/src/ir/ui/irChartProps.ts +4 -1
- package/src/ir/ui/useIrEditor.ts +21 -21
- package/src/locales/de.json +63 -0
- package/src/locales/en.json +63 -0
- package/src/locales/es.json +63 -0
- package/src/locales/fr.json +63 -0
- package/src/locales/it.json +63 -0
- package/src/mass/core/analyseSpectrum.ts +191 -0
- package/src/mass/core/ascendingTrace.ts +62 -0
- package/src/mass/core/centroidPeaks.ts +114 -0
- package/src/mass/core/detectMassFormat.ts +113 -0
- package/src/mass/core/downloadSpectra.ts +52 -0
- package/src/mass/core/fromJcamp.ts +151 -0
- package/src/mass/core/fromText.ts +58 -0
- package/src/mass/core/index.ts +194 -0
- package/src/mass/core/jcampTechnique.ts +87 -0
- package/src/mass/core/labelStackBox.ts +75 -0
- package/src/mass/core/labelledPeaks.ts +135 -0
- package/src/mass/core/loadMassSpectra.ts +86 -0
- package/src/mass/core/loadedMassSpectrum.ts +43 -0
- package/src/mass/core/massCommands.ts +156 -0
- package/src/mass/core/massDomain.ts +229 -0
- package/src/mass/core/massEditorApi.ts +68 -0
- package/src/mass/core/massFormat.ts +187 -0
- package/src/mass/core/massMeta.ts +239 -0
- package/src/mass/core/massReducer.ts +232 -0
- package/src/mass/core/massResolution.ts +169 -0
- package/src/mass/core/massSidePanels.ts +27 -0
- package/src/mass/core/massSpectrum.ts +220 -0
- package/src/mass/core/massState.ts +206 -0
- package/src/mass/core/massStateEdits.ts +104 -0
- package/src/mass/core/massSummary.ts +213 -0
- package/src/mass/core/mzDecimalsSetting.ts +52 -0
- package/src/mass/core/nearestPeak.ts +130 -0
- package/src/mass/core/peakLabelLines.ts +112 -0
- package/src/mass/core/peakLabelPlan.ts +246 -0
- package/src/mass/core/peakTable.ts +82 -0
- package/src/mass/core/resolutionOf.ts +100 -0
- package/src/mass/core/scanFilter.ts +119 -0
- package/src/mass/core/spectrumJcamp.ts +186 -0
- package/src/mass/core/toMassSpectrum.ts +126 -0
- package/src/mass/core/traceIcon.ts +105 -0
- package/src/mass/core/writtenResolution.ts +81 -0
- package/src/mass/ui/MassAboutDialog.tsx +89 -0
- package/src/mass/ui/MassCanvas.tsx +170 -0
- package/src/mass/ui/MassChart.tsx +266 -0
- package/src/mass/ui/MassCommandProvider.tsx +34 -0
- package/src/mass/ui/MassCommandTooltip.tsx +36 -0
- package/src/mass/ui/MassDocumentationDialog.tsx +136 -0
- package/src/mass/ui/MassEditor.tsx +130 -0
- package/src/mass/ui/MassHeader.tsx +38 -0
- package/src/mass/ui/MassLogo.tsx +84 -0
- package/src/mass/ui/MassPointerTracker.tsx +72 -0
- package/src/mass/ui/MassShell.tsx +237 -0
- package/src/mass/ui/MassSidePanel.tsx +107 -0
- package/src/mass/ui/MassStateProvider.tsx +32 -0
- package/src/mass/ui/MassStatusBar.tsx +108 -0
- package/src/mass/ui/MassToolbar.tsx +120 -0
- package/src/mass/ui/MetadataPanel.tsx +201 -0
- package/src/mass/ui/MzDecimalsMenu.tsx +86 -0
- package/src/mass/ui/PeakLabels.tsx +242 -0
- package/src/mass/ui/PeakTable.tsx +199 -0
- package/src/mass/ui/PeaksPanel.tsx +182 -0
- package/src/mass/ui/SpectraPanel.tsx +153 -0
- package/src/mass/ui/SpectrumRow.tsx +246 -0
- package/src/mass/ui/SpectrumTrace.tsx +119 -0
- package/src/mass/ui/index.ts +69 -0
- package/src/mass/ui/massActions.ts +109 -0
- package/src/mass/ui/massChartProps.ts +130 -0
- package/src/mass/ui/massCommandContext.tsx +65 -0
- package/src/mass/ui/massHostPanels.ts +71 -0
- package/src/mass/ui/massStateContext.ts +48 -0
- package/src/mass/ui/useIntensityZoom.ts +55 -0
- package/src/mass/ui/useMassEditor.ts +156 -0
- package/src/mass/ui/useMassFiles.ts +91 -0
- package/src/mass/ui/useMassHandle.ts +58 -0
- package/src/mass/ui/useMassPointer.ts +120 -0
- package/src/mass/ui/useMassShortcuts.ts +85 -0
- package/src/mass/ui/useMassSide.ts +63 -0
- package/src/mass/ui/useMassZoom.ts +157 -0
- package/src/mass.ts +16 -0
- package/src/panel/ui/PanelRail.tsx +5 -1
- package/src/slides/ui/slideSanitizeSchema.ts +86 -2
- package/styles/chrome.css +7 -0
- package/styles/slides.css +47 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a mass spectrum is, and everything true of one that draws nothing.
|
|
3
|
+
*
|
|
4
|
+
* Reading a JCAMP-DX or a two-column text file, picking the peaks of a profile,
|
|
5
|
+
* deciding whether the spectrum is high resolution, choosing which peaks are
|
|
6
|
+
* worth a label, writing the spectra back out as JCAMP — none of it needs
|
|
7
|
+
* React, so a script that reads a directory of spectra loads none.
|
|
8
|
+
*
|
|
9
|
+
* Nothing here knows what a glycan, a peptide or a polymer is, and nothing
|
|
10
|
+
* should: a mass spectrum answers for whatever was put in the source.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export type {
|
|
14
|
+
AnalyseSpectrumOptions,
|
|
15
|
+
AnalysedSpectrum,
|
|
16
|
+
} from './analyseSpectrum.ts';
|
|
17
|
+
export { analyseSpectrum } from './analyseSpectrum.ts';
|
|
18
|
+
export { ascendingTrace } from './ascendingTrace.ts';
|
|
19
|
+
export type {
|
|
20
|
+
MassPeakObject,
|
|
21
|
+
SelectCentroidPeaksOptions,
|
|
22
|
+
} from './centroidPeaks.ts';
|
|
23
|
+
export { centroidPeakObjects, selectCentroidPeaks } from './centroidPeaks.ts';
|
|
24
|
+
export type { DetectedMassFormat } from './detectMassFormat.ts';
|
|
25
|
+
export { detectMassFormat } from './detectMassFormat.ts';
|
|
26
|
+
export {
|
|
27
|
+
downloadMassSpectra,
|
|
28
|
+
downloadMassSpectrum,
|
|
29
|
+
} from './downloadSpectra.ts';
|
|
30
|
+
export type { MassJcampReadOptions, MassJcampReadResult } from './fromJcamp.ts';
|
|
31
|
+
export type { MassTextReadOptions } from './fromText.ts';
|
|
32
|
+
export type { JcampBlockHeader } from './jcampTechnique.ts';
|
|
33
|
+
export { otherTechnique } from './jcampTechnique.ts';
|
|
34
|
+
export type { HoveredPeak, StackBox } from './labelStackBox.ts';
|
|
35
|
+
export { labelStackBox } from './labelStackBox.ts';
|
|
36
|
+
export type {
|
|
37
|
+
LabelledPeak,
|
|
38
|
+
SelectLabelledPeaksOptions,
|
|
39
|
+
} from './labelledPeaks.ts';
|
|
40
|
+
export {
|
|
41
|
+
LABEL_SLOTS,
|
|
42
|
+
LABEL_THRESHOLD,
|
|
43
|
+
selectLabelledPeaks,
|
|
44
|
+
} from './labelledPeaks.ts';
|
|
45
|
+
export type {
|
|
46
|
+
LoadMassSpectraOptions,
|
|
47
|
+
LoadMassSpectraResult,
|
|
48
|
+
} from './loadMassSpectra.ts';
|
|
49
|
+
export { DEFAULT_MAX_SPECTRA, loadMassSpectra } from './loadMassSpectra.ts';
|
|
50
|
+
export type { LoadedMassSpectrum } from './loadedMassSpectrum.ts';
|
|
51
|
+
export type {
|
|
52
|
+
MassCommand,
|
|
53
|
+
MassCommandHandlers,
|
|
54
|
+
MassCommandId,
|
|
55
|
+
MassGesture,
|
|
56
|
+
MassShortcut,
|
|
57
|
+
RunMassCommand,
|
|
58
|
+
} from './massCommands.ts';
|
|
59
|
+
export { massCommandLabel, massCommands } from './massCommands.ts';
|
|
60
|
+
export type { MzFrameOptions } from './massDomain.ts';
|
|
61
|
+
export {
|
|
62
|
+
MZ_FRAME_HALF_WIDTH,
|
|
63
|
+
X_DOMAIN_PADDING,
|
|
64
|
+
Y_DOMAIN_HEADROOM,
|
|
65
|
+
basePeakOf,
|
|
66
|
+
fittedTo,
|
|
67
|
+
fullDomain,
|
|
68
|
+
mzFrame,
|
|
69
|
+
} from './massDomain.ts';
|
|
70
|
+
export type {
|
|
71
|
+
MassEditorHandle,
|
|
72
|
+
MassPlotClick,
|
|
73
|
+
ZoomToMzOptions,
|
|
74
|
+
} from './massEditorApi.ts';
|
|
75
|
+
export {
|
|
76
|
+
INTENSITY_DECIMALS,
|
|
77
|
+
formatIntensity,
|
|
78
|
+
formatMz,
|
|
79
|
+
formatMzRange,
|
|
80
|
+
massFormatLabel,
|
|
81
|
+
resolutionBasisLabel,
|
|
82
|
+
resolutionLabel,
|
|
83
|
+
resolvingPowerLabel,
|
|
84
|
+
} from './massFormat.ts';
|
|
85
|
+
export type { MassMetaRecord, MassMetaSource } from './massMeta.ts';
|
|
86
|
+
export { buildMassMeta, metaRecord, recordText } from './massMeta.ts';
|
|
87
|
+
export type { MassAction, SpectrumVisibility } from './massReducer.ts';
|
|
88
|
+
export { massReducer } from './massReducer.ts';
|
|
89
|
+
export type {
|
|
90
|
+
MassResolution,
|
|
91
|
+
MassResolutionBasis,
|
|
92
|
+
MassResolutionKind,
|
|
93
|
+
WidthPeak,
|
|
94
|
+
} from './massResolution.ts';
|
|
95
|
+
export {
|
|
96
|
+
HIGH_RESOLVING_POWER,
|
|
97
|
+
MEASURED_PEAKS,
|
|
98
|
+
MZ_DECIMALS,
|
|
99
|
+
measuredResolution,
|
|
100
|
+
statedResolution,
|
|
101
|
+
} from './massResolution.ts';
|
|
102
|
+
export type { MassPanelId, MassSidePanelId } from './massSidePanels.ts';
|
|
103
|
+
export { massSidePanels } from './massSidePanels.ts';
|
|
104
|
+
export type {
|
|
105
|
+
MassDomain,
|
|
106
|
+
MassFormat,
|
|
107
|
+
MassMeta,
|
|
108
|
+
MassMetaField,
|
|
109
|
+
MassOrigin,
|
|
110
|
+
MassPeaks,
|
|
111
|
+
MassSpectrum,
|
|
112
|
+
MassTrace,
|
|
113
|
+
} from './massSpectrum.ts';
|
|
114
|
+
export { isSpectrumDrawn } from './massSpectrum.ts';
|
|
115
|
+
export type {
|
|
116
|
+
CreateMassStateOptions,
|
|
117
|
+
MassData,
|
|
118
|
+
MassSettings,
|
|
119
|
+
MassState,
|
|
120
|
+
MassTool,
|
|
121
|
+
MassView,
|
|
122
|
+
PartialMassState,
|
|
123
|
+
} from './massState.ts';
|
|
124
|
+
export {
|
|
125
|
+
DEFAULT_LABEL_LIMIT,
|
|
126
|
+
DEFAULT_SETTINGS,
|
|
127
|
+
DEFAULT_SIDE_PANEL,
|
|
128
|
+
DEFAULT_SIDE_PANELS,
|
|
129
|
+
MAXIMUM_LABEL_LIMIT,
|
|
130
|
+
createMassState,
|
|
131
|
+
isMassWindow,
|
|
132
|
+
mergeMassSettings,
|
|
133
|
+
} from './massState.ts';
|
|
134
|
+
export type { SpectrumSubtitleOptions } from './massSummary.ts';
|
|
135
|
+
export {
|
|
136
|
+
spectrumFileFields,
|
|
137
|
+
spectrumMetaRows,
|
|
138
|
+
spectrumResolutionRows,
|
|
139
|
+
spectrumSubtitle,
|
|
140
|
+
} from './massSummary.ts';
|
|
141
|
+
export type { MzDecimalsSetting } from './mzDecimalsSetting.ts';
|
|
142
|
+
export {
|
|
143
|
+
MAXIMUM_MZ_DECIMALS,
|
|
144
|
+
mzDecimalsFor,
|
|
145
|
+
readMzDecimalsSetting,
|
|
146
|
+
} from './mzDecimalsSetting.ts';
|
|
147
|
+
export type { NearestPeak } from './nearestPeak.ts';
|
|
148
|
+
export {
|
|
149
|
+
PEAK_HIT_RADIUS,
|
|
150
|
+
nearestPeakMz,
|
|
151
|
+
peakAtMz,
|
|
152
|
+
sameNearestPeak,
|
|
153
|
+
} from './nearestPeak.ts';
|
|
154
|
+
export type {
|
|
155
|
+
PeakLabelLine,
|
|
156
|
+
PeakLabelLineKind,
|
|
157
|
+
PeakLabelLinesOptions,
|
|
158
|
+
} from './peakLabelLines.ts';
|
|
159
|
+
export { peakKey, peakLabelLines } from './peakLabelLines.ts';
|
|
160
|
+
export type { PeakLabelPlan, PlanPeakLabelsOptions } from './peakLabelPlan.ts';
|
|
161
|
+
export { LABEL_SPACING, planPeakLabels } from './peakLabelPlan.ts';
|
|
162
|
+
export type { PeakTableOptions } from './peakTable.ts';
|
|
163
|
+
export {
|
|
164
|
+
PEAK_TABLE_LIMIT,
|
|
165
|
+
PEAK_TABLE_THRESHOLD,
|
|
166
|
+
peakTableRows,
|
|
167
|
+
peakTableToTsv,
|
|
168
|
+
} from './peakTable.ts';
|
|
169
|
+
export type { DecideResolutionOptions } from './resolutionOf.ts';
|
|
170
|
+
export {
|
|
171
|
+
decideResolution,
|
|
172
|
+
mzDecimalsOf,
|
|
173
|
+
resolutionOf,
|
|
174
|
+
} from './resolutionOf.ts';
|
|
175
|
+
export { parseScanFilter } from './scanFilter.ts';
|
|
176
|
+
export type {
|
|
177
|
+
MassTraceKind,
|
|
178
|
+
TraceIconClick,
|
|
179
|
+
TraceIconState,
|
|
180
|
+
} from './traceIcon.ts';
|
|
181
|
+
export { nextTraceIconClick, traceIconState } from './traceIcon.ts';
|
|
182
|
+
export {
|
|
183
|
+
JCAMP_EXTENSION,
|
|
184
|
+
JCAMP_MIME_TYPE,
|
|
185
|
+
massSpectraToJcamp,
|
|
186
|
+
massSpectrumToJcamp,
|
|
187
|
+
} from './spectrumJcamp.ts';
|
|
188
|
+
export type { ToMassSpectrumOptions } from './toMassSpectrum.ts';
|
|
189
|
+
export { toMassSpectra, toMassSpectrum } from './toMassSpectrum.ts';
|
|
190
|
+
export {
|
|
191
|
+
MAXIMUM_WRITTEN_DECIMALS,
|
|
192
|
+
writtenDecimals,
|
|
193
|
+
writtenResolution,
|
|
194
|
+
} from './writtenResolution.ts';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which blocks of a JCAMP a mass viewer has any business reading.
|
|
3
|
+
*
|
|
4
|
+
* JCAMP-DX is a container for whatever an instrument wanted to export, and the
|
|
5
|
+
* file says nothing about which viewer opened it: a file of five infrared
|
|
6
|
+
* spectra, one of UV/VIS ones and a gas-chromatography export writing a whole
|
|
7
|
+
* chromatogram under `##XUNITS= TIME` are all valid JCAMPs. Read as mass
|
|
8
|
+
* spectra they draw a wavenumber, a wavelength or a minute on an m/z axis, and
|
|
9
|
+
* every mass read off them afterwards is a mass of something never measured.
|
|
10
|
+
*
|
|
11
|
+
* So the technique the file states is believed, and only a block that states
|
|
12
|
+
* another one is refused. A block that states none is kept: plenty of
|
|
13
|
+
* instruments write no `##DATA TYPE` at all, and the file was handed to a mass
|
|
14
|
+
* viewer, so mass spectrometry is the right assumption where the file is silent.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { recordText } from './massMeta.ts';
|
|
18
|
+
|
|
19
|
+
/** What `jcampconverter` says about one block, as far as this is concerned. */
|
|
20
|
+
export interface JcampBlockHeader {
|
|
21
|
+
/**
|
|
22
|
+
* The `##DATA TYPE=` record.
|
|
23
|
+
* @default undefined
|
|
24
|
+
*/
|
|
25
|
+
dataType?: string;
|
|
26
|
+
/** The standard records, where `##XUNITS=` is. */
|
|
27
|
+
info: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* What a block says it is, when what it says is not mass spectrometry.
|
|
32
|
+
*
|
|
33
|
+
* Both halves of the answer are read: the technique names it, and the axis unit
|
|
34
|
+
* is what a chemist looking at a refusal can check against the file in front of
|
|
35
|
+
* them — `INFRARED SPECTRUM in 1/CM` is a sentence they can act on where
|
|
36
|
+
* `unsupported data type` is not.
|
|
37
|
+
* @param entry - The block, as `jcampconverter` read it.
|
|
38
|
+
* @returns The phrase naming it, or `null` when the block may be read as a mass
|
|
39
|
+
* spectrum.
|
|
40
|
+
*/
|
|
41
|
+
export function otherTechnique(entry: JcampBlockHeader): string | null {
|
|
42
|
+
const dataType = (entry.dataType ?? '').toUpperCase();
|
|
43
|
+
const units = recordText(entry.info.XUNITS).toUpperCase();
|
|
44
|
+
|
|
45
|
+
if (MASS_SPECTROMETRY.test(dataType)) return null;
|
|
46
|
+
if (OTHER_TECHNIQUE.test(dataType)) {
|
|
47
|
+
return units === '' ? dataType : `${dataType} in ${units}`;
|
|
48
|
+
}
|
|
49
|
+
// A block naming no technique is still refused when it names an axis no mass
|
|
50
|
+
// spectrum has: `##XUNITS= 1/CM` is a wavenumber whoever wrote the file was
|
|
51
|
+
// measuring, whatever the header left out.
|
|
52
|
+
if (OTHER_AXIS.test(units)) {
|
|
53
|
+
return dataType === '' ? `an axis in ${units}` : `${dataType} in ${units}`;
|
|
54
|
+
}
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The techniques that are a mass spectrum however the file spells them.
|
|
60
|
+
*
|
|
61
|
+
* Read before the refusals below, so that `GC-MS` and `LC-MS` — both of which
|
|
62
|
+
* name a separation this reader would otherwise refuse — are kept: what came
|
|
63
|
+
* off the column is still measured by mass.
|
|
64
|
+
*/
|
|
65
|
+
const MASS_SPECTROMETRY = /\bMASS\b|\bMS\b/;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The techniques that are certainly not a mass spectrum.
|
|
69
|
+
*
|
|
70
|
+
* Named rather than matching `MASS SPECTRUM` positively, so that a file typed
|
|
71
|
+
* `CONTINUOUS MASS SPECTRUM`, `GC-MS` or nothing at all is read without this
|
|
72
|
+
* list having to anticipate every spelling an exporter might choose.
|
|
73
|
+
*/
|
|
74
|
+
const OTHER_TECHNIQUE =
|
|
75
|
+
/\b(?:RAMAN|NMR|INFRARED|FTIR|IR|UV|VIS|VISIBLE|FLUORESCENCE|XRD|EPR|ESR|CHROMATOGRAM|CHROMATOGRAPH)\b/;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The axis units that are certainly not an m/z.
|
|
79
|
+
*
|
|
80
|
+
* A wavenumber, a wavelength, a frequency, a chemical shift and a retention
|
|
81
|
+
* time each name an axis some other instrument sweeps; `ARBITRARY`, `M/Z`,
|
|
82
|
+
* `MASS UNITS` and `DALTONS` are all left out, since a mass spectrum is written
|
|
83
|
+
* with every one of them. The unit is looked for as a word inside the record,
|
|
84
|
+
* because a file that states no technique spells it as `Wavenumber (1/cm)`.
|
|
85
|
+
*/
|
|
86
|
+
const OTHER_AXIS =
|
|
87
|
+
/\b(?:1\/CM|CM-1|WAVENUMBERS?|NM|NANOMETERS?|MICROMETERS?|MICRONS?|HZ|PPM|SECONDS?|MINUTES?|TIME)\b/;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The room a stack of labels over a peak takes, and the peak a pointer resting
|
|
3
|
+
* on it reports.
|
|
4
|
+
*
|
|
5
|
+
* The numbers of a stack take no pointer event of their own: the room they
|
|
6
|
+
* occupy does, as one rectangle per stack, so a stack can be interrogated —
|
|
7
|
+
* resting on it opens whatever a host shows about that peak — without the
|
|
8
|
+
* glyphs becoming a control or stopping the crosshair underneath.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { PEAK_LABEL } from '../../chart/core/chartTheme.ts';
|
|
12
|
+
|
|
13
|
+
/** A rectangle in the pixels of the SVG. */
|
|
14
|
+
export interface StackBox {
|
|
15
|
+
/** Its left edge. */
|
|
16
|
+
x: number;
|
|
17
|
+
/** Its top edge. */
|
|
18
|
+
y: number;
|
|
19
|
+
/** How wide it is. */
|
|
20
|
+
width: number;
|
|
21
|
+
/** How tall. */
|
|
22
|
+
height: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** The peak the pointer is resting on, as the labels report it. */
|
|
26
|
+
export interface HoveredPeak {
|
|
27
|
+
/** `${spectrumId}:${index}`, which is how anything said about it is found. */
|
|
28
|
+
key: string;
|
|
29
|
+
/** The m/z measured for it. */
|
|
30
|
+
mz: number;
|
|
31
|
+
/** Its intensity, in the units its spectrum was drawn in. */
|
|
32
|
+
intensity: number;
|
|
33
|
+
/** The charge established for it, `0` when none was. */
|
|
34
|
+
charge: number;
|
|
35
|
+
/** Where a card about it is anchored, in pixels across the SVG. */
|
|
36
|
+
x: number;
|
|
37
|
+
/** The edge of the label stack it hangs off, in pixels down the SVG. */
|
|
38
|
+
y: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The room a stack of labels takes, which is what answers the pointer.
|
|
43
|
+
*
|
|
44
|
+
* A baseline is where the glyphs of a line *sit*, so the box starts a line
|
|
45
|
+
* height above the topmost one and stops just under the lowest. How wide it is
|
|
46
|
+
* cannot be measured from here — an SVG knows nothing of the host's font until
|
|
47
|
+
* it is on screen — so it is the width the theme says a label claims, which is
|
|
48
|
+
* the same number the stacks are spaced by.
|
|
49
|
+
* @param x - Where the stack is centred, in pixels.
|
|
50
|
+
* @param baselines - Where each of its lines is written, in any order.
|
|
51
|
+
* @returns The box, of no size at all when the stack has no lines.
|
|
52
|
+
*/
|
|
53
|
+
export function labelStackBox(
|
|
54
|
+
x: number,
|
|
55
|
+
baselines: readonly number[] | Float64Array,
|
|
56
|
+
): StackBox {
|
|
57
|
+
const { lineHeight, hoverHalfWidth } = PEAK_LABEL;
|
|
58
|
+
let highest = Number.POSITIVE_INFINITY;
|
|
59
|
+
let lowest = Number.NEGATIVE_INFINITY;
|
|
60
|
+
for (const baseline of baselines) {
|
|
61
|
+
if (baseline < highest) highest = baseline;
|
|
62
|
+
if (baseline > lowest) lowest = baseline;
|
|
63
|
+
}
|
|
64
|
+
if (!Number.isFinite(highest)) return { x, y: 0, width: 0, height: 0 };
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
x: x - hoverHalfWidth,
|
|
68
|
+
y: highest - lineHeight,
|
|
69
|
+
width: hoverHalfWidth * 2,
|
|
70
|
+
height: lowest - highest + lineHeight + DESCENDER,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** How far a glyph reaches below its baseline, near enough for a hit area. */
|
|
75
|
+
const DESCENDER = 3;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which peaks of a spectrum are worth writing a label beside.
|
|
3
|
+
*
|
|
4
|
+
* A centroid holds tens of thousands of peaks and a chart has room for a dozen
|
|
5
|
+
* labels, so something has to choose — and the choice is `ms-spectrum`'s slot
|
|
6
|
+
* mechanism rather than anything invented here. The window is cut into ten
|
|
7
|
+
* slots, the tallest peak of each is taken, and a peak falling in a slot that is
|
|
8
|
+
* already spoken for comes back marked `close`. **Dropping the marked ones is
|
|
9
|
+
* the whole of the selection**; what then still collides on a narrow chart is
|
|
10
|
+
* settled by `planPeakLabels`, which gives the room to the taller peak.
|
|
11
|
+
*
|
|
12
|
+
* The slots are cut from the *window* and not from the spectrum, which is what
|
|
13
|
+
* makes the choice follow the zoom: a survey scan has room to name its base peak
|
|
14
|
+
* and a handful of others, and the same spectrum zoomed onto one isotopologue
|
|
15
|
+
* cluster has room to name every line of it.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
19
|
+
import { getBestPeaks } from 'ms-spectrum';
|
|
20
|
+
|
|
21
|
+
import type { MassPeakObject } from './centroidPeaks.ts';
|
|
22
|
+
import { centroidPeakObjects } from './centroidPeaks.ts';
|
|
23
|
+
import type { MassSpectrum } from './massSpectrum.ts';
|
|
24
|
+
import { DEFAULT_LABEL_LIMIT } from './massState.ts';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* How many slots the window is cut into.
|
|
28
|
+
*
|
|
29
|
+
* Ten is `ms-spectrum`'s own default and is kept rather than exposed: it is the
|
|
30
|
+
* number of labels a chart of any usual width can carry across it without one
|
|
31
|
+
* sitting on the next.
|
|
32
|
+
*/
|
|
33
|
+
export const LABEL_SLOTS = 10;
|
|
34
|
+
|
|
35
|
+
/** How faint a peak may be, against the tallest one in the window, and still be labelled. */
|
|
36
|
+
export const LABEL_THRESHOLD = 0.01;
|
|
37
|
+
|
|
38
|
+
/** One peak that has earned a label, and where it sits in its centroid. */
|
|
39
|
+
export interface LabelledPeak extends MassPeakObject {
|
|
40
|
+
/** Its index in the centroid, which is how anything else about it is found. */
|
|
41
|
+
index: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The window the labels are chosen for, and how many there is room for. */
|
|
45
|
+
export interface SelectLabelledPeaksOptions {
|
|
46
|
+
/**
|
|
47
|
+
* Lowest m/z on screen.
|
|
48
|
+
* @default the m/z of the first peak
|
|
49
|
+
*/
|
|
50
|
+
from?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Highest m/z on screen.
|
|
53
|
+
* @default the m/z of the last peak
|
|
54
|
+
*/
|
|
55
|
+
to?: number;
|
|
56
|
+
/**
|
|
57
|
+
* The tallest intensity the window shows. A peak above it has its tip off the
|
|
58
|
+
* top of the plot, so a label placed there would name a stick whose height
|
|
59
|
+
* cannot be read anyway — and leaving it out is also what puts the threshold
|
|
60
|
+
* back on the tallest peak that *is* on screen, which is the whole point of
|
|
61
|
+
* zooming into a baseline.
|
|
62
|
+
* @default Number.POSITIVE_INFINITY
|
|
63
|
+
*/
|
|
64
|
+
maxValue?: number;
|
|
65
|
+
/**
|
|
66
|
+
* How many peaks are labelled at most, the most intense first.
|
|
67
|
+
* @default DEFAULT_LABEL_LIMIT
|
|
68
|
+
*/
|
|
69
|
+
limit?: number;
|
|
70
|
+
/**
|
|
71
|
+
* How faint a peak may be against the tallest one in the window.
|
|
72
|
+
* @default LABEL_THRESHOLD
|
|
73
|
+
*/
|
|
74
|
+
threshold?: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The peaks of a window that have earned a label.
|
|
79
|
+
*
|
|
80
|
+
* The peak objects are read off the centroid's cache rather than rebuilt, so a
|
|
81
|
+
* zoom costs the selection alone and not a fresh object per peak of the
|
|
82
|
+
* spectrum. What comes back is a copy each time — `getBestPeaks` clones what it
|
|
83
|
+
* keeps, since it writes its `close` verdict onto the peak — so nothing here can
|
|
84
|
+
* scribble on the cache every other reader shares.
|
|
85
|
+
* @param spectrum - The spectrum whose peaks are being labelled.
|
|
86
|
+
* @param options - The window, and how many labels there is room for.
|
|
87
|
+
* @returns The chosen peaks, in increasing m/z, with the crowded ones dropped.
|
|
88
|
+
*/
|
|
89
|
+
export function selectLabelledPeaks(
|
|
90
|
+
spectrum: MassSpectrum,
|
|
91
|
+
options: SelectLabelledPeaksOptions = {},
|
|
92
|
+
): LabelledPeak[] {
|
|
93
|
+
const {
|
|
94
|
+
from,
|
|
95
|
+
to,
|
|
96
|
+
maxValue,
|
|
97
|
+
limit = DEFAULT_LABEL_LIMIT,
|
|
98
|
+
threshold = LABEL_THRESHOLD,
|
|
99
|
+
} = options;
|
|
100
|
+
|
|
101
|
+
const { centroid } = spectrum;
|
|
102
|
+
const peaks = centroidPeakObjects(centroid);
|
|
103
|
+
// `getBestPeaks` reads the window it was given no bounds for off the first and
|
|
104
|
+
// last peak, which it cannot do when there are none.
|
|
105
|
+
if (peaks.length === 0 || limit <= 0) return [];
|
|
106
|
+
|
|
107
|
+
const best = getBestPeaks(peaks, {
|
|
108
|
+
from,
|
|
109
|
+
to,
|
|
110
|
+
maxValue,
|
|
111
|
+
limit,
|
|
112
|
+
threshold,
|
|
113
|
+
numberSlots: LABEL_SLOTS,
|
|
114
|
+
}) as SlottedPeak[];
|
|
115
|
+
|
|
116
|
+
const labelled: LabelledPeak[] = [];
|
|
117
|
+
for (const peak of best) {
|
|
118
|
+
// A peak the slots called close stands within a slot of one already
|
|
119
|
+
// labelled, so labelling it too writes one label over the other.
|
|
120
|
+
if (peak.close) continue;
|
|
121
|
+
labelled.push({
|
|
122
|
+
x: peak.x,
|
|
123
|
+
y: peak.y,
|
|
124
|
+
charge: peak.charge,
|
|
125
|
+
index: xFindClosestIndex(centroid.x, peak.x),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return labelled;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** A peak as the slots hand it back: itself, and whether it is crowded. */
|
|
132
|
+
interface SlottedPeak extends MassPeakObject {
|
|
133
|
+
/** Whether another kept peak stands within one slot of it. */
|
|
134
|
+
close: boolean;
|
|
135
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One entry point for whatever was dropped, opened or pasted.
|
|
3
|
+
*
|
|
4
|
+
* The format is decided from the bytes and the right reader is called, so a
|
|
5
|
+
* caller hands over a file and gets spectra back without knowing what it turned
|
|
6
|
+
* out to be. Each reader is imported only once the bytes turn out to need it, so
|
|
7
|
+
* a page that never opens a JCAMP never downloads its converter.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { describeSource } from '../../error/core/index.ts';
|
|
11
|
+
|
|
12
|
+
import { detectMassFormat } from './detectMassFormat.ts';
|
|
13
|
+
import type { LoadedMassSpectrum } from './loadedMassSpectrum.ts';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* How many spectra one file is read for at most.
|
|
17
|
+
*
|
|
18
|
+
* A JCAMP of a GC/MS run writes a page per scan, thousands of them, and a list
|
|
19
|
+
* of thousands of rows is a list nobody can find anything in. A hundred keeps
|
|
20
|
+
* every file somebody exported deliberately and stops a whole run at its start,
|
|
21
|
+
* where saying so is better than hanging the page.
|
|
22
|
+
*/
|
|
23
|
+
export const DEFAULT_MAX_SPECTRA = 100;
|
|
24
|
+
|
|
25
|
+
/** How a file is read. */
|
|
26
|
+
export interface LoadMassSpectraOptions {
|
|
27
|
+
/**
|
|
28
|
+
* The file's name, which decides the reader when the content is silent and is
|
|
29
|
+
* carried onto every spectrum read out of it.
|
|
30
|
+
* @default undefined
|
|
31
|
+
*/
|
|
32
|
+
fileName?: string;
|
|
33
|
+
/**
|
|
34
|
+
* At most how many spectra are read out of the file.
|
|
35
|
+
* @default DEFAULT_MAX_SPECTRA
|
|
36
|
+
*/
|
|
37
|
+
maxSpectra?: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** What a file turned out to hold. */
|
|
41
|
+
export interface LoadMassSpectraResult {
|
|
42
|
+
/** The spectra it held, in the order the file wrote them. */
|
|
43
|
+
spectra: LoadedMassSpectrum[];
|
|
44
|
+
/** What it turned out to be. */
|
|
45
|
+
format: 'jcamp' | 'text';
|
|
46
|
+
/**
|
|
47
|
+
* How many spectra `maxSpectra` left unread, `0` when none. Reported rather
|
|
48
|
+
* than passed over in silence: a run truncated without a word looks exactly
|
|
49
|
+
* like a run that only held a hundred scans.
|
|
50
|
+
*/
|
|
51
|
+
dropped: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Read every mass spectrum a file holds.
|
|
56
|
+
* @param data - The file, as bytes, or the pasted text.
|
|
57
|
+
* @param options - The file's name, and how many spectra to read at most.
|
|
58
|
+
* @returns The spectra, the format they were read from and how many were left
|
|
59
|
+
* unread.
|
|
60
|
+
* @throws {Error} When nothing in the file names a format this can read, or when
|
|
61
|
+
* the reader for that format gave up on it — always with a sentence naming the
|
|
62
|
+
* file.
|
|
63
|
+
*/
|
|
64
|
+
export async function loadMassSpectra(
|
|
65
|
+
data: Uint8Array | ArrayBuffer | string,
|
|
66
|
+
options: LoadMassSpectraOptions = {},
|
|
67
|
+
): Promise<LoadMassSpectraResult> {
|
|
68
|
+
const { fileName, maxSpectra = DEFAULT_MAX_SPECTRA } = options;
|
|
69
|
+
const content = data instanceof ArrayBuffer ? new Uint8Array(data) : data;
|
|
70
|
+
const format = detectMassFormat(content, fileName);
|
|
71
|
+
const named = fileName === undefined ? {} : { fileName };
|
|
72
|
+
|
|
73
|
+
if (format === 'jcamp') {
|
|
74
|
+
const { fromJcamp } = await import('./fromJcamp.ts');
|
|
75
|
+
return { ...fromJcamp(content, { ...named, maxSpectra }), format };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (format === 'text') {
|
|
79
|
+
const { fromText } = await import('./fromText.ts');
|
|
80
|
+
return { spectra: fromText(content, named), format, dropped: 0 };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
throw new Error(
|
|
84
|
+
`${describeSource(fileName)} is not a spectrum this viewer can read — JCAMP-DX files (.jdx, .dx) and two columns of m/z and intensity (.txt, .csv, .xy) are understood.`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a reader hands back, before the peaks are picked.
|
|
3
|
+
*
|
|
4
|
+
* A JCAMP holds a title and twenty instrument records, a pasted peak table two
|
|
5
|
+
* columns and nothing else — and both end up here, so `toMassSpectrum` has one
|
|
6
|
+
* shape to turn into a `MassSpectrum`. A reader does not pick peaks, choose a
|
|
7
|
+
* colour or mint an identity, because those are decisions about the session
|
|
8
|
+
* rather than about the file.
|
|
9
|
+
*
|
|
10
|
+
* One spectrum is one acquisition. A file holding twelve gives twelve and never
|
|
11
|
+
* a merged one — an averaged spectrum is something the chemist asks for, not
|
|
12
|
+
* something a reader quietly does on the way in.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { MassMeta, MassOrigin, MassTrace } from './massSpectrum.ts';
|
|
16
|
+
|
|
17
|
+
/** One acquisition, as the file gave it up. */
|
|
18
|
+
export interface LoadedMassSpectrum {
|
|
19
|
+
/**
|
|
20
|
+
* The points, m/z ascending, the intensities as the file wrote them — counts
|
|
21
|
+
* on one instrument and relative abundance on the next. They are put on one
|
|
22
|
+
* scale when the peaks are picked.
|
|
23
|
+
*/
|
|
24
|
+
trace: MassTrace;
|
|
25
|
+
/** What the file said about the acquisition, `null` when it said nothing. */
|
|
26
|
+
meta: MassMeta | null;
|
|
27
|
+
/** Where it came from. */
|
|
28
|
+
origin: MassOrigin;
|
|
29
|
+
/**
|
|
30
|
+
* What the file calls it, absent when the file names nothing, so the caller
|
|
31
|
+
* can fall back to the file name without having to recognise a placeholder
|
|
32
|
+
* it invented itself.
|
|
33
|
+
* @default undefined
|
|
34
|
+
*/
|
|
35
|
+
name?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the file said outright that this is a continuous profile rather
|
|
38
|
+
* than a peak table, absent when it did not — which is what the spacing of
|
|
39
|
+
* the points is then asked.
|
|
40
|
+
* @default undefined
|
|
41
|
+
*/
|
|
42
|
+
continuous?: boolean;
|
|
43
|
+
}
|