From 6fe6fc8f301815319f12654c177fcfbe4a6ea4cd Mon Sep 17 00:00:00 2001 From: hamed musallam Date: Fri, 29 Sep 2023 18:34:23 +0200 Subject: [PATCH 1/2] feat: spectra multiple analysis chart --- .../MultipleSpectraAnalysisPanel.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.tsx b/src/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.tsx index 19acf92e8..ac0c523d2 100644 --- a/src/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.tsx +++ b/src/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.tsx @@ -26,6 +26,7 @@ import DefaultPanelHeader from '../header/DefaultPanelHeader'; import PreferencesHeader from '../header/PreferencesHeader'; import AlignSpectra from './AlignSpectra'; +import AnalysisChart from './AnalysisChart'; import MultipleSpectraAnalysisTable from './MultipleSpectraAnalysisTable'; import MultipleSpectraAnalysisPreferences from './preferences'; @@ -168,11 +169,16 @@ function MultipleSpectraAnalysisPanelInner({ onClose={() => setCalibration(false)} /> ) : ( - +
+ {showAnalysisChart && ( + + )} + +
)} Date: Thu, 26 Oct 2023 15:07:45 +0200 Subject: [PATCH 2/2] refactor: spectra analysis components paths --- src/component/panels/Panels.tsx | 2 +- .../AlignSpectra.tsx | 0 .../AnalysisChart.tsx | 0 .../MultipleSpectraAnalysisPanel.tsx | 0 .../MultipleSpectraAnalysisTable.tsx | 0 .../base/AnalysisCell.tsx | 0 .../base/AnalysisColumnHeader.tsx | 0 .../preferences/AnalysisTablePreferences.tsx | 0 .../preferences/LegendsPreferences.tsx | 0 .../preferences/MultipleAnalysisCodeEditor.tsx | 0 .../preferences/index.tsx | 0 src/data/data1d/Spectrum1D/initiateDatum1D.ts | 6 +++--- src/data/data2d/Spectrum2D/initiateDatum2D.ts | 3 ++- 13 files changed, 6 insertions(+), 5 deletions(-) rename src/component/panels/{MultipleSpectraAnalysisPanel => multipleAnalysisPanel}/AlignSpectra.tsx (100%) rename src/component/panels/{MultipleSpectraAnalysisPanel => multipleAnalysisPanel}/AnalysisChart.tsx (100%) rename src/component/panels/{MultipleSpectraAnalysisPanel => multipleAnalysisPanel}/MultipleSpectraAnalysisPanel.tsx (100%) rename src/component/panels/{MultipleSpectraAnalysisPanel => multipleAnalysisPanel}/MultipleSpectraAnalysisTable.tsx (100%) rename src/component/panels/{MultipleSpectraAnalysisPanel => multipleAnalysisPanel}/base/AnalysisCell.tsx (100%) rename src/component/panels/{MultipleSpectraAnalysisPanel => multipleAnalysisPanel}/base/AnalysisColumnHeader.tsx (100%) rename src/component/panels/{MultipleSpectraAnalysisPanel => multipleAnalysisPanel}/preferences/AnalysisTablePreferences.tsx (100%) rename src/component/panels/{MultipleSpectraAnalysisPanel => multipleAnalysisPanel}/preferences/LegendsPreferences.tsx (100%) rename src/component/panels/{MultipleSpectraAnalysisPanel => multipleAnalysisPanel}/preferences/MultipleAnalysisCodeEditor.tsx (100%) rename src/component/panels/{MultipleSpectraAnalysisPanel => multipleAnalysisPanel}/preferences/index.tsx (100%) diff --git a/src/component/panels/Panels.tsx b/src/component/panels/Panels.tsx index 3aa0708f3..145ce8adb 100644 --- a/src/component/panels/Panels.tsx +++ b/src/component/panels/Panels.tsx @@ -13,7 +13,6 @@ import InformationPanel from './InformationPanel'; import IntegralPanel from './IntegralsPanel/IntegralPanel'; import MatrixGenerationPanel from './MatrixGenerationPanel/MatrixGenerationPanel'; import MoleculePanel from './MoleculesPanel/MoleculePanel'; -import MultipleSpectraAnalysisPanel from './MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel'; import PeaksPanel from './PeaksPanel/PeaksPanel'; import RangesPanel from './RangesPanel/RangesPanel'; import SpectrumListPanel from './SpectrumsPanel/SpectrumListPanel'; @@ -21,6 +20,7 @@ import SummaryPanel from './SummaryPanel/SummaryPanel'; import ZonesPanel from './ZonesPanel/ZonesPanel'; import DatabasePanel from './databasePanel/DatabasePanel'; import FilterPanel from './filtersPanel/FilterPanel'; +import MultipleSpectraAnalysisPanel from './multipleAnalysisPanel/MultipleSpectraAnalysisPanel'; import PredictionPane from './predictionPanel/PredictionPanel'; import SpectrumSimulation from './spectrumSimulation/SpectrumSimulation'; diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/AlignSpectra.tsx b/src/component/panels/multipleAnalysisPanel/AlignSpectra.tsx similarity index 100% rename from src/component/panels/MultipleSpectraAnalysisPanel/AlignSpectra.tsx rename to src/component/panels/multipleAnalysisPanel/AlignSpectra.tsx diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/AnalysisChart.tsx b/src/component/panels/multipleAnalysisPanel/AnalysisChart.tsx similarity index 100% rename from src/component/panels/MultipleSpectraAnalysisPanel/AnalysisChart.tsx rename to src/component/panels/multipleAnalysisPanel/AnalysisChart.tsx diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.tsx b/src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.tsx similarity index 100% rename from src/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.tsx rename to src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.tsx diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.tsx b/src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.tsx similarity index 100% rename from src/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.tsx rename to src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.tsx diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisCell.tsx b/src/component/panels/multipleAnalysisPanel/base/AnalysisCell.tsx similarity index 100% rename from src/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisCell.tsx rename to src/component/panels/multipleAnalysisPanel/base/AnalysisCell.tsx diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.tsx b/src/component/panels/multipleAnalysisPanel/base/AnalysisColumnHeader.tsx similarity index 100% rename from src/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.tsx rename to src/component/panels/multipleAnalysisPanel/base/AnalysisColumnHeader.tsx diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.tsx b/src/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.tsx similarity index 100% rename from src/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.tsx rename to src/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.tsx diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.tsx b/src/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.tsx similarity index 100% rename from src/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.tsx rename to src/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.tsx diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.tsx b/src/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.tsx similarity index 100% rename from src/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.tsx rename to src/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.tsx diff --git a/src/component/panels/MultipleSpectraAnalysisPanel/preferences/index.tsx b/src/component/panels/multipleAnalysisPanel/preferences/index.tsx similarity index 100% rename from src/component/panels/MultipleSpectraAnalysisPanel/preferences/index.tsx rename to src/component/panels/multipleAnalysisPanel/preferences/index.tsx diff --git a/src/data/data1d/Spectrum1D/initiateDatum1D.ts b/src/data/data1d/Spectrum1D/initiateDatum1D.ts index 033612975..d2a838bb4 100644 --- a/src/data/data1d/Spectrum1D/initiateDatum1D.ts +++ b/src/data/data1d/Spectrum1D/initiateDatum1D.ts @@ -3,15 +3,15 @@ import { Spectrum1D } from 'nmr-load-save'; import { BaseFilter, FiltersManager, Filters } from 'nmr-processing'; import { UsedColors } from '../../../types/UsedColors'; +import { initiateFilters } from '../../initiateFilters'; +import { StateMoleculeExtended } from '../../molecules/Molecule'; +import { initSumOptions } from './SumManager'; import { convertDataToFloat64Array } from './convertDataToFloat64Array'; import { get1DColor } from './get1DColor'; import { initiateIntegrals } from './integrals/initiateIntegrals'; import { initiatePeaks } from './peaks/initiatePeaks'; import { initiateRanges } from './ranges/initiateRanges'; -import { initSumOptions } from './SumManager'; -import { StateMoleculeExtended } from '../../molecules/Molecule'; -import { initiateFilters } from '../../initiateFilters'; export interface InitiateDatum1DOptions { usedColors?: UsedColors; diff --git a/src/data/data2d/Spectrum2D/initiateDatum2D.ts b/src/data/data2d/Spectrum2D/initiateDatum2D.ts index 6ec535c92..9e7ab6b4e 100644 --- a/src/data/data2d/Spectrum2D/initiateDatum2D.ts +++ b/src/data/data2d/Spectrum2D/initiateDatum2D.ts @@ -2,10 +2,11 @@ import { v4 } from '@lukeed/uuid'; import { Spectrum2D } from 'nmr-load-save'; import { FiltersManager } from 'nmr-processing'; +import { initiateFilters } from '../../initiateFilters'; + import { DEFAULT_CONTOURS_OPTIONS } from './contours'; import { get2DColor } from './get2DColor'; import { initiateZones } from './zones/initiateZones'; -import { initiateFilters } from '../../initiateFilters'; const defaultMinMax = { z: [], minX: 0, minY: 0, maxX: 0, maxY: 0 };