nmrium 0.50.1 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/Chart1D.js +1 -1
- package/lib/component/1d/LinesSeries.js +2 -2
- package/lib/component/1d/Viewer1D.js +6 -11
- package/lib/component/1d/database/DatabaseSpectrum.js +3 -3
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js +6 -2
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +8 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/PhaseTraceWithMouse.js +2 -21
- package/lib/component/2d/1d-tracer/phase-correction-traces/PhaseTraces.js +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectraPhaseTraces.d.ts +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectraPhaseTraces.js +6 -17
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.d.ts +6 -10
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js +62 -13
- package/lib/component/2d/1d-tracer/phase-correction-traces/useActivePhaseTraces.d.ts +1 -0
- package/lib/component/2d/1d-tracer/phase-correction-traces/useActivePhaseTraces.js +2 -1
- package/lib/component/2d/Viewer2D.js +16 -15
- package/lib/component/2d/ft/Contours.js +6 -3
- package/lib/component/2d/utilities/scale.d.ts +2 -1
- package/lib/component/2d/utilities/scale.js +12 -2
- package/lib/component/EventsTrackers/BrushTracker.d.ts +5 -3
- package/lib/component/EventsTrackers/BrushTracker.js +2 -2
- package/lib/component/EventsTrackers/KeysListenerTracker.d.ts +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +32 -18
- package/lib/component/context/DispatchContext.d.ts +1 -1
- package/lib/component/context/ToasterContext.d.ts +13 -0
- package/lib/component/context/ToasterContext.js +34 -0
- package/lib/component/elements/Label.js +1 -1
- package/lib/component/elements/Select.js +2 -2
- package/lib/component/elements/ToolbarPopoverItem.js +1 -1
- package/lib/component/header/ApodizationOptionsPanel.js +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js +7 -4
- package/lib/component/header/BaseLineCorrectionPanel.js +2 -2
- package/lib/component/header/Header.d.ts +1 -11
- package/lib/component/header/Header.js +5 -6
- package/lib/component/header/PhaseCorrectionPanel.js +24 -33
- package/lib/component/header/PhaseCorrectionTwoDimensionsPanel.d.ts +1 -1
- package/lib/component/header/PhaseCorrectionTwoDimensionsPanel.js +96 -42
- package/lib/component/header/RangesPickingOptionPanel.js +7 -4
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/header/Zones2DOptionPanel.js +6 -2
- package/lib/component/hooks/useDialogToggle.d.ts +5 -0
- package/lib/component/hooks/useDialogToggle.js +16 -0
- package/lib/component/hooks/useExport.d.ts +9 -1
- package/lib/component/hooks/useExport.js +34 -36
- package/lib/component/hooks/useSaveSettings.js +6 -3
- package/lib/component/hooks/useToolsFunctions.d.ts +1 -1
- package/lib/component/hooks/useToolsFunctions.js +9 -7
- package/lib/component/loader/DropZone.js +14 -14
- package/lib/component/main/InnerNMRium.js +5 -9
- package/lib/component/main/InnerNMRiumContents.d.ts +0 -2
- package/lib/component/main/InnerNMRiumContents.js +5 -3
- package/lib/component/main/NMRium.js +2 -2
- package/lib/component/modal/AboutPredictionModal.js +1 -1
- package/lib/component/modal/AboutSpectrumSimulationModal.js +1 -1
- package/lib/component/modal/EditPeakShapeModal.js +1 -1
- package/lib/component/modal/ExportAsJcampModal.js +15 -15
- package/lib/component/modal/ImportPublicationStringModal.js +5 -3
- package/lib/component/modal/LoadJCAMPModal.js +7 -5
- package/lib/component/modal/LogsHistoryModal.js +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +1 -1
- package/lib/component/modal/PredictSpectraModal.js +11 -9
- package/lib/component/modal/SaveAsModal.d.ts +3 -4
- package/lib/component/modal/SaveAsModal.js +27 -27
- package/lib/component/modal/editRange/EditRangeModal.js +2 -2
- package/lib/component/modal/editRange/forms/components/DeltaInput.d.ts +2 -3
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +2 -3
- package/lib/component/modal/editRange/forms/components/InfoBlock.d.ts +1 -0
- package/lib/component/modal/editRange/forms/components/{SignalFormInfo.js → InfoBlock.js} +2 -2
- package/lib/component/modal/editRange/forms/components/NewSignalTab.d.ts +5 -0
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js +85 -0
- package/lib/component/modal/editRange/forms/components/SignalTab.d.ts +7 -0
- package/lib/component/modal/editRange/forms/components/SignalTab.js +24 -0
- package/lib/component/modal/editRange/forms/components/SignalsContent.d.ts +8 -0
- package/lib/component/modal/editRange/forms/components/SignalsContent.js +57 -0
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.d.ts +5 -0
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js +133 -0
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.d.ts +5 -0
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js +141 -0
- package/lib/component/modal/editZone/EditPathLengthFormik.js +2 -2
- package/lib/component/modal/editZone/EditZoneModal.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.d.ts +7 -4
- package/lib/component/modal/metaImportation/MetaImportationModal.js +23 -13
- package/lib/component/modal/metaImportation/utils/mapColumnToSelectItems.js +1 -1
- package/lib/component/modal/setting/GeneralSettings.js +9 -6
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js +1 -1
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -4
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +13 -7
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +6 -4
- package/lib/component/panels/Panels.js +5 -5
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +6 -3
- package/lib/component/panels/RangesPanel/RangesHeader.js +3 -3
- package/lib/component/panels/RangesPanel/RangesPanel.js +5 -5
- package/lib/component/panels/RangesPanel/RangesPreferences.js +1 -1
- package/lib/component/panels/SpectraPanel/SpectraPanelHeader.d.ts +5 -0
- package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPanelHeader.js +11 -11
- package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraTable.js +12 -6
- package/lib/component/panels/SpectraPanel/SpectraTabs.d.ts +1 -0
- package/lib/component/panels/{SpectrumsPanel/SpectrumsTabs.js → SpectraPanel/SpectraTabs.js} +6 -6
- package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectrumListPanel.js +2 -2
- package/lib/component/panels/databasePanel/DatabasePanel.js +37 -19
- package/lib/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib/component/panels/databasePanel/DatabaseSearchOptions.js +1 -1
- package/lib/component/panels/filtersPanel/FilterPanel.js +5 -3
- package/lib/component/panels/filtersPanel/FiltersTable.js +27 -23
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +7 -5
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js +2 -2
- package/lib/component/panels/multipleAnalysisPanel/AnalysisChart.js +5 -5
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js +6 -6
- package/lib/component/panels/multipleAnalysisPanel/preferences/index.js +5 -3
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +2 -2
- package/lib/component/panels/predictionPanel/PredictionPanel.js +7 -5
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +2 -1
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationPreferences.js +1 -1
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +1 -1
- package/lib/component/reducer/IgnoreActions.js +1 -1
- package/lib/component/reducer/Reducer.d.ts +3 -2
- package/lib/component/reducer/Reducer.js +40 -32
- package/lib/component/reducer/actions/DomainActions.js +3 -3
- package/lib/component/reducer/actions/FiltersActions.d.ts +11 -4
- package/lib/component/reducer/actions/FiltersActions.js +243 -91
- package/lib/component/reducer/actions/IntegralsActions.js +2 -2
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +0 -1
- package/lib/component/reducer/actions/PreferencesActions.js +2 -2
- package/lib/component/reducer/actions/RangesActions.js +16 -6
- package/lib/component/reducer/actions/ToolsActions.d.ts +6 -6
- package/lib/component/reducer/actions/ToolsActions.js +83 -22
- package/lib/component/reducer/actions/ZonesActions.d.ts +2 -0
- package/lib/component/reducer/actions/ZonesActions.js +5 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +4 -3
- package/lib/component/reducer/helper/Zoom1DManager.js +4 -4
- package/lib/component/reducer/helper/ZoomHistoryManager.js +1 -5
- package/lib/component/reducer/helper/findStrongestPeak.d.ts +6 -0
- package/lib/component/reducer/helper/findStrongestPeak.js +13 -0
- package/lib/component/reducer/helper/getTwoDimensionPhaseCorrectionOptions.d.ts +2 -1
- package/lib/component/reducer/helper/getTwoDimensionPhaseCorrectionOptions.js +7 -1
- package/lib/component/toolbar/ToolBar.js +32 -27
- package/lib/component/toolbar/toolbarMenu.js +4 -4
- package/lib/component/utility/Events.d.ts +11 -0
- package/lib/component/utility/Events.js +22 -0
- package/lib/constants.js +5 -5
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +0 -33
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +5 -15
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +6 -4
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts +6 -4
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +13 -3
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.js +6 -0
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.d.ts +13 -3
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js +78 -18
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +2 -2
- package/lib/data/data1d/spectrumSimulation.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +3 -3
- package/lib/data/data2d/Spectrum2D/getMissingProjection.js +2 -2
- package/lib/data/data2d/Spectrum2D/getSlice.js +4 -4
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +1 -0
- package/lib/data/getDefaultMatrixFilters.js +2 -2
- package/lib/data/matrixGeneration.js +1 -1
- package/lib/data/utilities/calculateSanPlot.d.ts +1 -6
- package/lib/versionInfo.js +1 -1
- package/package.json +32 -30
- package/lib/component/elements/popup/Alert/AlertBlock.d.ts +0 -8
- package/lib/component/elements/popup/Alert/AlertBlock.js +0 -30
- package/lib/component/elements/popup/Alert/Context.d.ts +0 -27
- package/lib/component/elements/popup/Alert/Context.js +0 -10
- package/lib/component/elements/popup/Alert/ProgressIndicator.d.ts +0 -1
- package/lib/component/elements/popup/Alert/ProgressIndicator.js +0 -33
- package/lib/component/elements/popup/Alert/Provider.d.ts +0 -19
- package/lib/component/elements/popup/Alert/Provider.js +0 -127
- package/lib/component/elements/popup/Alert/index.d.ts +0 -3
- package/lib/component/elements/popup/Alert/index.js +0 -3
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +0 -10
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +0 -81
- package/lib/component/modal/editRange/forms/components/CouplingsTable.d.ts +0 -13
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +0 -63
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.d.ts +0 -1
- package/lib/component/modal/editRange/forms/components/SignalFormTab.d.ts +0 -8
- package/lib/component/modal/editRange/forms/components/SignalFormTab.js +0 -18
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +0 -10
- package/lib/component/modal/editRange/forms/components/SignalsForm.js +0 -114
- package/lib/component/modal/metaImportation/index.d.ts +0 -2
- package/lib/component/modal/metaImportation/index.js +0 -17
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.d.ts +0 -5
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.d.ts +0 -1
- package/lib/component/reducer/helper/getStrongestPeak.d.ts +0 -7
- package/lib/component/reducer/helper/getStrongestPeak.js +0 -15
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPreferences.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPreferences.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraTable.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectrumListPanel.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ColorIndicator.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ColorIndicator.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/RenderAsHTML.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/RenderAsHTML.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ShowHideSpectrumButton.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ShowHideSpectrumButton.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectraColumnsManager.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectraColumnsManager.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectrumName.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectrumName.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/PlotChart.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/PlotChart.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DHistogram.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DHistogram.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DSetting.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DSetting.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DHistogram.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DHistogram.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DSetting.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DSetting.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/SpectrumSetting.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/SpectrumSetting.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/processSnapPlot.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/processSnapPlot.js +0 -0
- /package/lib/component/reducer/actions/{SpectrumsActions.d.ts → SpectraActions.d.ts} +0 -0
- /package/lib/component/reducer/actions/{SpectrumsActions.js → SpectraActions.js} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NmrData1D } from 'cheminfo-types';
|
|
2
1
|
import { WebSource as Source } from 'filelist-utils';
|
|
3
2
|
import { CorrelationData } from 'nmr-correlation';
|
|
4
3
|
import { Spectrum, ViewState } from 'nmr-load-save';
|
|
@@ -25,7 +24,6 @@ export type SpectraDirection = 'RTL' | 'LTR';
|
|
|
25
24
|
export type TraceDirection = 'vertical' | 'horizontal';
|
|
26
25
|
export interface SpectrumTrace {
|
|
27
26
|
id: string;
|
|
28
|
-
data: NmrData1D;
|
|
29
27
|
x: number;
|
|
30
28
|
y: number;
|
|
31
29
|
}
|
|
@@ -39,7 +37,9 @@ export interface PhaseCorrectionTraceData {
|
|
|
39
37
|
export interface TwoDimensionPhaseCorrection {
|
|
40
38
|
traces: Record<TraceDirection, PhaseCorrectionTraceData>;
|
|
41
39
|
activeTraceDirection: TraceDirection;
|
|
40
|
+
addTracesToBothDirections: boolean;
|
|
42
41
|
}
|
|
42
|
+
export declare const getDefaultTwoDimensionsPhaseCorrectionTraceOptions: () => TwoDimensionPhaseCorrection['traces'];
|
|
43
43
|
export declare function getDefaultViewState(): ViewState;
|
|
44
44
|
export declare const getInitialState: () => State;
|
|
45
45
|
export declare const initialState: State;
|
|
@@ -206,6 +206,7 @@ export interface State {
|
|
|
206
206
|
*/
|
|
207
207
|
twoDimensionPhaseCorrection: TwoDimensionPhaseCorrection;
|
|
208
208
|
zonesNoiseFactor: number;
|
|
209
|
+
zonesMinMaxRatio: number;
|
|
209
210
|
/**
|
|
210
211
|
* The current active Filter
|
|
211
212
|
* @default null
|
|
@@ -14,10 +14,27 @@ import * as MoleculeActions from './actions/MoleculeActions';
|
|
|
14
14
|
import * as PeaksActions from './actions/PeaksActions';
|
|
15
15
|
import * as PreferencesActions from './actions/PreferencesActions';
|
|
16
16
|
import * as RangesActions from './actions/RangesActions';
|
|
17
|
+
import * as SpectraActions from './actions/SpectraActions';
|
|
17
18
|
import * as SpectraAnalysisActions from './actions/SpectraAnalysisAction';
|
|
18
|
-
import * as SpectrumsActions from './actions/SpectrumsActions';
|
|
19
19
|
import * as ToolsActions from './actions/ToolsActions';
|
|
20
20
|
import * as ZonesActions from './actions/ZonesActions';
|
|
21
|
+
export const getDefaultTwoDimensionsPhaseCorrectionTraceOptions = () => {
|
|
22
|
+
const directions = [
|
|
23
|
+
'horizontal',
|
|
24
|
+
'vertical',
|
|
25
|
+
];
|
|
26
|
+
const result = {};
|
|
27
|
+
for (const direction of directions) {
|
|
28
|
+
result[direction] = {
|
|
29
|
+
ph0: 0,
|
|
30
|
+
ph1: 0,
|
|
31
|
+
pivot: null,
|
|
32
|
+
spectra: [],
|
|
33
|
+
scaleRatio: 1,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
21
38
|
export function getDefaultViewState() {
|
|
22
39
|
return {
|
|
23
40
|
molecules: {},
|
|
@@ -93,25 +110,12 @@ export const getInitialState = () => ({
|
|
|
93
110
|
apodizationOptions: {},
|
|
94
111
|
twoDimensionPhaseCorrection: {
|
|
95
112
|
activeTraceDirection: 'horizontal',
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
ph0: 0,
|
|
99
|
-
ph1: 0,
|
|
100
|
-
pivot: null,
|
|
101
|
-
spectra: [],
|
|
102
|
-
scaleRatio: 1,
|
|
103
|
-
},
|
|
104
|
-
vertical: {
|
|
105
|
-
ph0: 0,
|
|
106
|
-
ph1: 0,
|
|
107
|
-
pivot: null,
|
|
108
|
-
spectra: [],
|
|
109
|
-
scaleRatio: 1,
|
|
110
|
-
},
|
|
111
|
-
},
|
|
113
|
+
addTracesToBothDirections: true,
|
|
114
|
+
traces: getDefaultTwoDimensionsPhaseCorrectionTraceOptions(),
|
|
112
115
|
},
|
|
113
116
|
pivot: { value: 0, index: 0 },
|
|
114
117
|
zonesNoiseFactor: 1,
|
|
118
|
+
zonesMinMaxRatio: 0.03,
|
|
115
119
|
activeFilterID: null,
|
|
116
120
|
predictionIndex: 0,
|
|
117
121
|
},
|
|
@@ -230,6 +234,8 @@ function innerSpectrumReducer(draft, action) {
|
|
|
230
234
|
return FiltersActions.handleAddPhaseCorrectionTrace(draft, action);
|
|
231
235
|
case 'CHANGE_PHASE_CORRECTION_DIRECTION':
|
|
232
236
|
return FiltersActions.handleChangePhaseCorrectionDirection(draft, action);
|
|
237
|
+
case 'TOGGLE_ADD_PHASE_CORRECTION_TRACE_TO_BOTH_DIRECTIONS':
|
|
238
|
+
return FiltersActions.handleToggleAddTracesToBothDirections(draft);
|
|
233
239
|
case 'DELETE_PHASE_CORRECTION_TRACE':
|
|
234
240
|
return FiltersActions.handleDeletePhaseCorrectionTrace(draft, action);
|
|
235
241
|
case 'SET_ONE_DIMENSION_PIVOT_POINT':
|
|
@@ -238,32 +244,34 @@ function innerSpectrumReducer(draft, action) {
|
|
|
238
244
|
return FiltersActions.handleSetTwoDimensionPhaseCorrectionPivotPoint(draft, action);
|
|
239
245
|
case 'CALCULATE_TOW_DIMENSIONS_MANUAL_PHASE_CORRECTION_FILTER':
|
|
240
246
|
return FiltersActions.handleCalculateManualTwoDimensionPhaseCorrection(draft, action);
|
|
247
|
+
case 'APPLY_MANUAL_PHASE_CORRECTION_TOW_DIMENSION_FILTER':
|
|
248
|
+
return FiltersActions.handleApplyManualTowDimensionsPhaseCorrectionFilter(draft);
|
|
241
249
|
case 'CHANGE_SPECTRUM_VISIBILITY':
|
|
242
|
-
return
|
|
250
|
+
return SpectraActions.handleChangeSpectrumVisibilityById(draft, action);
|
|
243
251
|
case 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS':
|
|
244
|
-
return
|
|
252
|
+
return SpectraActions.handleChangeSpectraVisibilityByNucleus(draft, action);
|
|
245
253
|
case 'CHANGE_ACTIVE_SPECTRUM':
|
|
246
|
-
return
|
|
254
|
+
return SpectraActions.handleChangeActiveSpectrum(draft, action);
|
|
247
255
|
case 'CHANGE_SPECTRUM_SETTING':
|
|
248
|
-
return
|
|
256
|
+
return SpectraActions.handleChangeSpectrumSetting(draft, action);
|
|
249
257
|
case 'ALIGN_SPECTRA':
|
|
250
|
-
return
|
|
258
|
+
return SpectraActions.handleAlignSpectraHandler(draft, action);
|
|
251
259
|
case 'DELETE_SPECTRA':
|
|
252
|
-
return
|
|
260
|
+
return SpectraActions.handleDeleteSpectra(draft, action);
|
|
253
261
|
case 'ADD_MISSING_PROJECTION':
|
|
254
|
-
return
|
|
262
|
+
return SpectraActions.handleAddMissingProjectionHandler(draft, action);
|
|
255
263
|
case 'GENERATE_SPECTRUM_FROM_PUBLICATION_STRING':
|
|
256
|
-
return
|
|
264
|
+
return SpectraActions.handleGenerateSpectrumFromPublicationStringHandler(draft, action);
|
|
257
265
|
case 'IMPORT_SPECTRA_META_INFO':
|
|
258
|
-
return
|
|
266
|
+
return SpectraActions.handleImportSpectraMetaInfo(draft, action);
|
|
259
267
|
case 'TOGGLE_SPECTRA_LEGEND':
|
|
260
|
-
return
|
|
268
|
+
return SpectraActions.handleToggleSpectraLegend(draft);
|
|
261
269
|
case 'RECOLOR_SPECTRA_COLOR':
|
|
262
|
-
return
|
|
270
|
+
return SpectraActions.handleRecolorSpectraBasedOnDistinctValue(draft, action);
|
|
263
271
|
case 'ORDER_SPECTRA':
|
|
264
|
-
return
|
|
272
|
+
return SpectraActions.handleOrderSpectra(draft, action);
|
|
265
273
|
case 'SIMULATE_SPECTRUM':
|
|
266
|
-
return
|
|
274
|
+
return SpectraActions.handleSimulateSpectrum(draft, action);
|
|
267
275
|
case 'SET_SELECTED_TOOL':
|
|
268
276
|
return ToolsActions.setSelectedTool(draft, action);
|
|
269
277
|
case 'RESET_SELECTED_TOOL':
|
|
@@ -282,8 +290,8 @@ function innerSpectrumReducer(draft, action) {
|
|
|
282
290
|
return ToolsActions.handleChangeSpectrumDisplayMode(draft);
|
|
283
291
|
case 'BRUSH_END':
|
|
284
292
|
return ToolsActions.handleBrushEnd(draft, action);
|
|
285
|
-
case '
|
|
286
|
-
return ToolsActions.
|
|
293
|
+
case 'SET_SPECTRA_VERTICAL_ALIGN':
|
|
294
|
+
return ToolsActions.setSpectraVerticalAlign(draft);
|
|
287
295
|
case 'SET_ACTIVE_TAB':
|
|
288
296
|
return ToolsActions.handelSetActiveTab(draft, action);
|
|
289
297
|
case 'ADD_BASE_LINE_ZONE':
|
|
@@ -87,15 +87,15 @@ function get2DDomain(state) {
|
|
|
87
87
|
reportError(error);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
const
|
|
90
|
+
const spectraIDs = new Set();
|
|
91
91
|
for (const n of nucleus) {
|
|
92
92
|
const spectra = activeSpectra[n];
|
|
93
93
|
if (spectra?.length === 1) {
|
|
94
|
-
|
|
94
|
+
spectraIDs.add(spectra[0].id);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
const filteredData = data
|
|
98
|
-
.filter((d) =>
|
|
98
|
+
.filter((d) => spectraIDs.has(d.id) && d.info.dimension === 1)
|
|
99
99
|
.map((datum) => {
|
|
100
100
|
return datum;
|
|
101
101
|
});
|
|
@@ -26,10 +26,15 @@ type ZeroFillingFilterLiveAction = ActionType<'CALCULATE_ZERO_FILLING_FILTER', {
|
|
|
26
26
|
};
|
|
27
27
|
livePreview: boolean;
|
|
28
28
|
}>;
|
|
29
|
-
type ManualPhaseCorrectionFilterAction = ActionType<'APPLY_MANUAL_PHASE_CORRECTION_FILTER' | 'CALCULATE_MANUAL_PHASE_CORRECTION_FILTER'
|
|
29
|
+
type ManualPhaseCorrectionFilterAction = ActionType<'APPLY_MANUAL_PHASE_CORRECTION_FILTER' | 'CALCULATE_MANUAL_PHASE_CORRECTION_FILTER', {
|
|
30
30
|
ph0: number;
|
|
31
31
|
ph1: number;
|
|
32
32
|
}>;
|
|
33
|
+
type ManualTwoDimensionsPhaseCorrectionFilterAction = ActionType<'CALCULATE_TOW_DIMENSIONS_MANUAL_PHASE_CORRECTION_FILTER', {
|
|
34
|
+
ph0: number;
|
|
35
|
+
ph1: number;
|
|
36
|
+
applyOn2D?: boolean;
|
|
37
|
+
}>;
|
|
33
38
|
type BaselineCorrectionFilterOptions = Omit<BaselineCorrectionOptions, 'zones'>;
|
|
34
39
|
interface BaselineCorrectionFilterProps {
|
|
35
40
|
options: BaselineCorrectionFilterOptions;
|
|
@@ -81,7 +86,7 @@ type SetTwoDimensionPhaseCorrectionPivotPoint = ActionType<'SET_TWO_DIMENSION_PI
|
|
|
81
86
|
x: number;
|
|
82
87
|
y: number;
|
|
83
88
|
}>;
|
|
84
|
-
export type FiltersActions = ShiftSpectrumAlongXAxisAction | ApodizationFilterAction | ApodizationFilterLiveAction | ZeroFillingFilterAction | ZeroFillingFilterLiveAction | ManualPhaseCorrectionFilterAction | BaselineCorrectionFilterAction | BaselineCorrectionFilterLiveAction | EnableFilterAction | DeleteFilterAction | DeleteSpectraFilterAction | SetFilterSnapshotAction | AddExclusionZoneAction | DeleteExclusionZoneAction | ApplySignalProcessingAction | AddPhaseCorrectionTraceAction | ChangePhaseCorrectionDirectionAction | DeletePhaseCorrectionTrace | SetOneDimensionPhaseCorrectionPivotPoint | SetTwoDimensionPhaseCorrectionPivotPoint | ActionType<'APPLY_FFT_FILTER' | 'APPLY_FFT_DIMENSION_1_FILTER' | 'APPLY_FFT_DIMENSION_2_FILTER' | 'APPLY_AUTO_PHASE_CORRECTION_FILTER' | 'APPLY_ABSOLUTE_FILTER'>;
|
|
89
|
+
export type FiltersActions = ShiftSpectrumAlongXAxisAction | ApodizationFilterAction | ApodizationFilterLiveAction | ZeroFillingFilterAction | ZeroFillingFilterLiveAction | ManualPhaseCorrectionFilterAction | BaselineCorrectionFilterAction | BaselineCorrectionFilterLiveAction | EnableFilterAction | DeleteFilterAction | DeleteSpectraFilterAction | SetFilterSnapshotAction | AddExclusionZoneAction | DeleteExclusionZoneAction | ApplySignalProcessingAction | AddPhaseCorrectionTraceAction | ChangePhaseCorrectionDirectionAction | DeletePhaseCorrectionTrace | SetOneDimensionPhaseCorrectionPivotPoint | SetTwoDimensionPhaseCorrectionPivotPoint | ManualTwoDimensionsPhaseCorrectionFilterAction | ActionType<'APPLY_FFT_FILTER' | 'APPLY_FFT_DIMENSION_1_FILTER' | 'APPLY_FFT_DIMENSION_2_FILTER' | 'APPLY_AUTO_PHASE_CORRECTION_FILTER' | 'APPLY_ABSOLUTE_FILTER' | 'APPLY_MANUAL_PHASE_CORRECTION_TOW_DIMENSION_FILTER' | 'TOGGLE_ADD_PHASE_CORRECTION_TRACE_TO_BOTH_DIRECTIONS'>;
|
|
85
90
|
export interface RollbackSpectrumByFilterOptions {
|
|
86
91
|
applyFilter?: boolean;
|
|
87
92
|
reset?: boolean;
|
|
@@ -106,6 +111,7 @@ declare function handleApplyFFtDimension1Filter(draft: Draft<State>): void;
|
|
|
106
111
|
declare function handleApplyFFtDimension2Filter(draft: Draft<State>): void;
|
|
107
112
|
declare function handleApplyManualPhaseCorrectionFilter(draft: Draft<State>, action: ManualPhaseCorrectionFilterAction): void;
|
|
108
113
|
declare function handleAddPhaseCorrectionTrace(draft: Draft<State>, action: AddPhaseCorrectionTraceAction): void;
|
|
114
|
+
declare function handleToggleAddTracesToBothDirections(draft: Draft<State>): void;
|
|
109
115
|
declare function handleChangePhaseCorrectionDirection(draft: Draft<State>, action: ChangePhaseCorrectionDirectionAction): void;
|
|
110
116
|
declare function handleDeletePhaseCorrectionTrace(draft: Draft<State>, action: DeletePhaseCorrectionTrace): void;
|
|
111
117
|
declare function handleCalculateManualPhaseCorrection(draft: Draft<State>, action: ManualPhaseCorrectionFilterAction): void;
|
|
@@ -123,5 +129,6 @@ declare function handleAddExclusionZone(draft: Draft<State>, action: AddExclusio
|
|
|
123
129
|
declare function handleDeleteExclusionZone(draft: Draft<State>, action: DeleteExclusionZoneAction): void;
|
|
124
130
|
declare function handleSetOneDimensionPhaseCorrectionPivotPoint(draft: Draft<State>, action: SetOneDimensionPhaseCorrectionPivotPoint): void;
|
|
125
131
|
declare function handleSetTwoDimensionPhaseCorrectionPivotPoint(draft: Draft<State>, action: SetTwoDimensionPhaseCorrectionPivotPoint): void;
|
|
126
|
-
declare function handleCalculateManualTwoDimensionPhaseCorrection(draft: Draft<State>, action:
|
|
127
|
-
|
|
132
|
+
declare function handleCalculateManualTwoDimensionPhaseCorrection(draft: Draft<State>, action: ManualTwoDimensionsPhaseCorrectionFilterAction): void;
|
|
133
|
+
declare function handleApplyManualTowDimensionsPhaseCorrectionFilter(draft: Draft<State>): void;
|
|
134
|
+
export { handleShiftSpectrumAlongXAxis, handleApplyZeroFillingFilter, handleApplyApodizationFilter, handleApplyFFTFilter, handleApplyFFtDimension1Filter, handleApplyFFtDimension2Filter, handleApplyManualPhaseCorrectionFilter, handleApplyManualTowDimensionsPhaseCorrectionFilter, handleApplyAutoPhaseCorrectionFilter, handleApplyAbsoluteFilter, handleCalculateManualPhaseCorrection, calculateBaseLineCorrection, handleCalculateBaseLineCorrection, handleCalculateApodizationFilter, handleCalculateZeroFillingFilter, handleEnableFilter, handleDeleteFilter, handleDeleteSpectraFilter, handleBaseLineCorrectionFilter, handleSetFilterSnapshotHandler, handleAddExclusionZone, handleDeleteExclusionZone, handleSignalProcessingFilter, rollbackSpectrum, rollbackSpectrumByFilter, handleAddPhaseCorrectionTrace, handleChangePhaseCorrectionDirection, handleDeletePhaseCorrectionTrace, handleSetOneDimensionPhaseCorrectionPivotPoint, handleSetTwoDimensionPhaseCorrectionPivotPoint, handleCalculateManualTwoDimensionPhaseCorrection, handleToggleAddTracesToBothDirections, };
|