> = useMemo(
+ () => [
+ {
+ Header: '#',
+ style: { width: '25px', ...styles.column },
+ accessor: (_, index) => index + 1,
+ },
+ {
+ Header: 'Nucleus',
+ style: { padding: 0, ...styles.column },
+ Cell: ({ row }) => {
+ return (
+
+ );
+ },
+ },
+ {
+ Header: 'δ (ppm)',
+ style: { padding: 0, ...styles.column },
+ Cell: ({ row }) => {
+ return (
+
+ );
+ },
+ },
+ {
+ Header: 'Coupling (Hz)',
+ style: { padding: 0, ...styles.column },
+ Cell: ({ row }) => {
+ return (
+
+ );
+ },
+ },
+ {
+ Header: 'Axis from',
+ style: { padding: 0, ...styles.column },
+ Cell: ({ row }) => {
+ return (
+
+ );
+ },
+ },
+ {
+ Header: 'Axis to',
+ style: { padding: 0, ...styles.column },
+ Cell: ({ row }) => {
+ return (
+
+ );
+ },
+ },
+
+ {
+ Header: '',
+ style: { width: '70px', ...styles.column },
+ id: 'add-button',
+ Cell: ({ data, row }) => {
+ return (
+
+ addHandler(data, row.index + 1)}
+ >
+
+
+ deleteHandler(data, row.index)}
+ >
+
+
+
+ );
+ },
+ },
+ ],
+ [addHandler, deleteHandler],
+ );
+
+ return (
+
+ {
+ return (
+ addHandler(fields, 0)}
+ />
+ );
+ }}
+ >
+
+
+
+ );
+}
+
+function FieldsBlockHeader({ onAdd, text }) {
+ return (
+
+
{text}
+
+
+ Add nuclei preferences
+
+
+ );
+}
+
+export default NucleiTabContent;
diff --git a/src/component/modal/setting/settingsValidation.ts b/src/component/modal/setting/settingsValidation.ts
index 3ccfe8d45..c1387a50f 100644
--- a/src/component/modal/setting/settingsValidation.ts
+++ b/src/component/modal/setting/settingsValidation.ts
@@ -1,71 +1,51 @@
-import { Workspace } from 'nmr-load-save';
-import {
- array,
- lazy,
- object,
- string,
- ValidationError,
- type ObjectShape,
- number,
-} from 'yup';
+import { array, object, string, ValidationError, number } from 'yup';
-const formattingElementValidation = (obj: Workspace): ObjectShape => {
- return Object.fromEntries(
- Object.keys(obj.formatting.nuclei).map((key) => [
- key,
- object().shape({
- name: string().trim().required('Nucleus is a required field'),
- ppm: string().trim().required('PPM format is a required field'),
- hz: string().trim().required('Hz format is a required field'),
- }),
- ]),
- );
-};
-
-const formattingValidation = (obj: Workspace) =>
- object().shape({
- nuclei: object()
- .shape(formattingElementValidation(obj))
- .test(
- 'Unique',
- 'Nuclei need te be unique',
- function check(nuclei: Record) {
- const nucleusFrequencies: Record<
- string,
- { value: number; fields: string[] }
- > = {};
- for (const key of Object.keys(nuclei)) {
- const _key = nuclei[key].name?.toLowerCase() || '';
- if (_key) {
- if (nucleusFrequencies[_key]) {
- ++nucleusFrequencies[_key].value;
- nucleusFrequencies[_key].fields.push(key);
- } else {
- nucleusFrequencies[_key] = { value: 1, fields: [key] };
- }
- }
- }
+const nucleiValidation = array()
+ .of(
+ object().shape({
+ nucleus: string().trim().required('Nucleus is a required field'),
+ ppmFormat: string().trim().required('PPM format is a required field'),
+ hzFormat: string().trim().required('Hz format is a required field'),
+ }),
+ )
+ .test('Unique', 'Nuclei need te be unique', function check(nuclei) {
+ if (!nuclei) return true;
- const errors: ValidationError[] = [];
- for (const key in nucleusFrequencies) {
- const { value, fields } = nucleusFrequencies[key];
- if (value > 1) {
- for (const field of fields) {
- errors.push(
- new ValidationError(
- `${key} nucleus must te be unique`,
- nuclei[key].name,
- // eslint-disable-next-line no-invalid-this
- `${this.path}.${field}.name`,
- ),
- );
- }
- }
- }
+ const nucleusFrequencies: Record<
+ string,
+ { value: number; fieldsIndexes: number[] }
+ > = {};
+ let index = 0;
+ for (const nucleiPreferences of nuclei) {
+ const key = nucleiPreferences.nucleus?.toLowerCase() || '';
+ if (key) {
+ if (nucleusFrequencies[key]) {
+ ++nucleusFrequencies[key].value;
+ nucleusFrequencies[key].fieldsIndexes.push(index);
+ } else {
+ nucleusFrequencies[key] = { value: 1, fieldsIndexes: [index] };
+ }
+ }
+ index++;
+ }
- return new ValidationError(errors);
- },
- ),
+ const errors: ValidationError[] = [];
+ for (const key in nucleusFrequencies) {
+ const { value, fieldsIndexes } = nucleusFrequencies[key];
+ if (value > 1) {
+ for (const index of fieldsIndexes) {
+ errors.push(
+ new ValidationError(
+ `${key} nucleus must te be unique`,
+ nuclei[index].nucleus,
+ // eslint-disable-next-line no-invalid-this
+ `${this.path}.${index}.name`,
+ ),
+ );
+ }
+ }
+ }
+ return new ValidationError(errors);
});
const databasesValidation = object().shape({
@@ -103,12 +83,10 @@ const generalValidation = object({
dimmedSpectraOpacity: number().required(),
});
-export const validation: any = lazy((obj: Workspace) =>
- object().shape({
- formatting: formattingValidation(obj),
- databases: databasesValidation,
- infoBlock: infoBlockValidation,
- general: generalValidation,
- spectraColors: spectraColorsSchemaValidation,
- }),
-);
+export const validation: any = object().shape({
+ nuclei: nucleiValidation,
+ databases: databasesValidation,
+ infoBlock: infoBlockValidation,
+ general: generalValidation,
+ spectraColors: spectraColorsSchemaValidation,
+});
diff --git a/src/component/panels/SpectraPanel/SpectraPreferences.tsx b/src/component/panels/SpectraPanel/SpectraPreferences.tsx
index b4634b0db..37dcf7181 100644
--- a/src/component/panels/SpectraPanel/SpectraPreferences.tsx
+++ b/src/component/panels/SpectraPanel/SpectraPreferences.tsx
@@ -1,4 +1,3 @@
-import styled from '@emotion/styled';
import { Formik, FormikProps } from 'formik';
import { PanelsPreferences, Workspace } from 'nmr-load-save';
import {
@@ -14,10 +13,7 @@ import * as Yup from 'yup';
import { useChartData } from '../../context/ChartContext';
import { usePreferences } from '../../context/PreferencesContext';
import { GroupPane, GroupPaneStyle } from '../../elements/GroupPane';
-import { InputStyle } from '../../elements/Input';
-import Label from '../../elements/Label';
import { Scroller } from '../../elements/Scroller';
-import FormikInput from '../../elements/formik/FormikInput';
import useNucleus from '../../hooks/useNucleus';
import { usePanelPreferencesByNuclei } from '../../hooks/usePanelPreferences';
import { convertPathArrayToString } from '../../utility/convertPathArrayToString';
@@ -39,10 +35,6 @@ const groupPaneStyle: GroupPaneStyle = {
},
};
-const inputStyle: InputStyle = {
- input: { padding: '5px' },
-};
-
function validationColumns(obj) {
const validationObject = {};
for (const key of Object.keys(obj.nuclei)) {
@@ -67,7 +59,7 @@ function validationColumns(obj) {
}
const spectraPreferencesValidation: any = Yup.lazy(
- (obj: Workspace['formatting']['panels']['spectra']) =>
+ (obj: Workspace['panels']['spectra']) =>
Yup.object().shape({
nuclei: Yup.object().shape(validationColumns(obj)),
}),
@@ -191,7 +183,6 @@ function SpectraPreferences(props, ref: any) {
datalist={datalist}
/>
-
))}
@@ -201,62 +192,4 @@ function SpectraPreferences(props, ref: any) {
);
}
-interface AxisPreferencesProps {
- nucleus: string;
-}
-
-const Container = styled.div`
- display: flex;
-`;
-
-function AxisPreferences(props: AxisPreferencesProps) {
- const { nucleus } = props;
-
- if (nucleus.split(',').length === 1) {
- return (
-
-
-
- );
- }
-
- return (
- <>
-
-
-
-
-
-
- >
- );
-}
-
-interface AxisFieldsProps extends AxisPreferencesProps {
- axis: 'x' | 'y';
-}
-
-function AxisFields(props: AxisFieldsProps) {
- const { nucleus, axis } = props;
-
- return (
-
-
-
-
- );
-}
-
export default memo(forwardRef(SpectraPreferences));
diff --git a/src/component/reducer/actions/DomainActions.ts b/src/component/reducer/actions/DomainActions.ts
index a0053c55a..2847505c3 100644
--- a/src/component/reducer/actions/DomainActions.ts
+++ b/src/component/reducer/actions/DomainActions.ts
@@ -1,7 +1,7 @@
import type { NmrData2DFt, NmrData2DFid } from 'cheminfo-types';
import { extent } from 'd3';
import { Draft } from 'immer';
-import { Spectrum1D, Spectrum2D, XYAxisDomain } from 'nmr-load-save';
+import { Spectrum1D, Spectrum2D, NucleiPreferences } from 'nmr-load-save';
import { get1DDataXY } from '../../../data/data1d/Spectrum1D/get1DDataXY';
import { isSpectrum2D } from '../../../data/data2d/Spectrum2D';
@@ -14,7 +14,7 @@ import { ActionType } from '../types/ActionType';
type SetAxisDomainAction = ActionType<
'SET_AXIS_DOMAIN',
- { axisDomain?: XYAxisDomain }
+ { nucleiPreferences: NucleiPreferences[] }
>;
type SetXDomainAction = ActionType<
'SET_X_DOMAIN',
@@ -278,11 +278,33 @@ function handleSetYDomain(draft: Draft, action: SetYDomainAction) {
}
//action
function handleSetAxisDomain(draft: Draft, action: SetAxisDomainAction) {
- const { axisDomain: { x, y } = {} } = action.payload;
+ const { nucleiPreferences } = action.payload;
const {
originDomain: { xDomain, yDomain },
displayerMode,
+ view: {
+ spectra: { activeTab },
+ },
} = draft;
+
+ const axisDomain: {
+ x?: { from?: number; to?: number };
+ y?: { from?: number; to?: number };
+ } = {};
+
+ const [xNucleus, yNucleus] = activeTab?.split(',') || [];
+
+ for (const nuclei of nucleiPreferences) {
+ const { nucleus, axisFrom, axisTo } = nuclei;
+ if (nucleus?.toLowerCase() === xNucleus?.toLowerCase()) {
+ axisDomain.x = { from: axisFrom, to: axisTo };
+ }
+ if (nucleus?.toLowerCase() === yNucleus?.toLowerCase()) {
+ axisDomain.y = { from: axisFrom, to: axisTo };
+ }
+ }
+
+ const { x, y } = axisDomain;
const x1 = x?.from ?? xDomain[0];
const x2 = x?.to ?? xDomain[1];
const y1 = y?.from ?? yDomain[0];
diff --git a/src/component/reducer/preferences/actions/analyzeSpectra.ts b/src/component/reducer/preferences/actions/analyzeSpectra.ts
index 761d47258..7a8e5048b 100644
--- a/src/component/reducer/preferences/actions/analyzeSpectra.ts
+++ b/src/component/reducer/preferences/actions/analyzeSpectra.ts
@@ -17,7 +17,7 @@ export function analyzeSpectra(
action: AnalyzeSpectraAction,
) {
const currentWorkspacePreferences = getActiveWorkspace(draft);
- const panels = currentWorkspacePreferences.formatting.panels;
+ const panels = currentWorkspacePreferences.panels;
const { start, end, nucleus, columnKey } = action.payload;
if (!panels.multipleSpectraAnalysis) {
@@ -41,7 +41,7 @@ export function changeAnalysisColumnValueKey(
) {
const { columnKey, valueKey, nucleus } = action.payload;
const currentWorkspacePreferences = getActiveWorkspace(draft);
- const panels = currentWorkspacePreferences.formatting.panels;
+ const panels = currentWorkspacePreferences.panels;
MultipleAnalysis.changeColumnValueKey(
panels.multipleSpectraAnalysis as any,
@@ -56,7 +56,7 @@ export function deleteAnalysisColumn(
) {
const { columnKey, nucleus } = action.payload;
const currentWorkspacePreferences = getActiveWorkspace(draft);
- const panels = currentWorkspacePreferences.formatting.panels;
+ const panels = currentWorkspacePreferences.panels;
MultipleAnalysis.deleteSpectraAnalysis(
panels.multipleSpectraAnalysis as any,
columnKey,
@@ -72,7 +72,7 @@ export function setSpectraAnalysisPanelsPreferences(
const currentWorkspacePreferences = getActiveWorkspace(draft);
const { nucleus, data } = action.payload;
- const panels = currentWorkspacePreferences.formatting.panels;
+ const panels = currentWorkspacePreferences.panels;
if (!panels?.multipleSpectraAnalysis) {
panels.multipleSpectraAnalysis =
diff --git a/src/component/reducer/preferences/actions/matrixGeneration.ts b/src/component/reducer/preferences/actions/matrixGeneration.ts
index f42dbcacf..4ffddf7fa 100644
--- a/src/component/reducer/preferences/actions/matrixGeneration.ts
+++ b/src/component/reducer/preferences/actions/matrixGeneration.ts
@@ -14,7 +14,7 @@ function addExclusionZone(
) {
const { zone, range, nucleus } = action.payload;
const currentWorkspacePreferences = getActiveWorkspace(draft);
- const panels = currentWorkspacePreferences.formatting.panels;
+ const panels = currentWorkspacePreferences.panels;
const exclusionZone = {
id: v4(),
@@ -42,7 +42,7 @@ function addExclusionZone(
function deleteExclusionZone(draft: Draft, action) {
const { zone, nucleus } = action.payload;
const currentWorkspacePreferences = getActiveWorkspace(draft);
- const panels = currentWorkspacePreferences.formatting.panels;
+ const panels = currentWorkspacePreferences.panels;
if (panels.matrixGeneration?.[nucleus]) {
const options: MatrixOptions = panels.matrixGeneration[nucleus];
@@ -55,7 +55,7 @@ function deleteExclusionZone(draft: Draft, action) {
function setMatrixGenerationOptions(draft: Draft, action) {
const { options, nucleus } = action.payload;
const currentWorkspacePreferences = getActiveWorkspace(draft);
- const panels = currentWorkspacePreferences.formatting.panels;
+ const panels = currentWorkspacePreferences.panels;
panels.matrixGeneration = { ...panels.matrixGeneration, [nucleus]: options };
}
diff --git a/src/component/reducer/preferences/actions/setPanelsPreferences.ts b/src/component/reducer/preferences/actions/setPanelsPreferences.ts
index cf905853e..972218831 100644
--- a/src/component/reducer/preferences/actions/setPanelsPreferences.ts
+++ b/src/component/reducer/preferences/actions/setPanelsPreferences.ts
@@ -8,7 +8,7 @@ export function setPanelsPreferences(draft: Draft, action) {
const currentWorkspacePreferences = getActiveWorkspace(draft);
const { key, value } = action.payload;
- const panels = currentWorkspacePreferences.formatting.panels;
+ const panels = currentWorkspacePreferences.panels;
if (value?.nuclei) {
const { nuclei, ...commonPreferences } = value;
diff --git a/src/component/reducer/preferences/actions/setPreferences.ts b/src/component/reducer/preferences/actions/setPreferences.ts
index 241e7df4b..5b2cc75fe 100644
--- a/src/component/reducer/preferences/actions/setPreferences.ts
+++ b/src/component/reducer/preferences/actions/setPreferences.ts
@@ -4,19 +4,17 @@ import cloneDeep from 'lodash/cloneDeep';
import { getLocalStorage, storeData } from '../../../utility/LocalStorage';
import { PreferencesState } from '../preferencesReducer';
import { getActiveWorkspace } from '../utilities/getActiveWorkspace';
-import { mapNucleiFormatting } from '../utilities/mapNucleiFormatting';
export function setPreferences(draft: Draft, action) {
const localData = getLocalStorage('nmr-general-settings');
const currentWorkspacePreferences = getActiveWorkspace(draft);
if (action.payload) {
- const { formatting, ...restPreferences } = action.payload;
+ const preferences = action.payload;
draft.workspaces[draft.workspace.current] = {
...currentWorkspacePreferences,
- ...restPreferences,
- formatting: mapNucleiFormatting(formatting),
+ ...preferences,
};
}
diff --git a/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts b/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts
index 8f2da95a9..858f160f4 100644
--- a/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts
+++ b/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts
@@ -1,7 +1,7 @@
import {
MultipleSpectraAnalysisPreferences,
PanelsPreferences,
- SpectraNucleusPreferences,
+ SpectraPreferences,
} from 'nmr-load-save';
import { is2DNucleus } from '../../utility/nucleusToString';
@@ -13,8 +13,7 @@ function getPreferences(data: T, nucleus?: string) {
const getSpectraDefaultValues = (
nucleus?: string,
): PanelsPreferences['spectra'] => {
- const preferences: SpectraNucleusPreferences = {
- axisDomain: {},
+ const preferences: SpectraPreferences = {
columns: [
{
name: 'visible',
diff --git a/src/component/reducer/preferences/utilities/mapNucleiFormatting.ts b/src/component/reducer/preferences/utilities/mapNucleiFormatting.ts
deleted file mode 100644
index 3e582a7db..000000000
--- a/src/component/reducer/preferences/utilities/mapNucleiFormatting.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Formatting } from 'nmr-load-save';
-
-export function mapNucleiFormatting(formatting: Formatting): Formatting {
- const { nuclei, ...res } = formatting;
-
- return {
- nuclei: Object.fromEntries(
- Object.keys(nuclei).map((key) => [
- nuclei[key].name.trim().toLowerCase(),
- nuclei[key],
- ]),
- ),
- ...res,
- };
-}
diff --git a/src/component/utility/PreferencesHelper.ts b/src/component/utility/PreferencesHelper.ts
index adc6be82c..9a661aa6b 100644
--- a/src/component/utility/PreferencesHelper.ts
+++ b/src/component/utility/PreferencesHelper.ts
@@ -3,8 +3,8 @@ import { getLocalStorage, getValue } from './LocalStorage';
function GetPreference(preferences, key) {
const localData = getLocalStorage('nmr-general-settings');
const val =
- getValue(preferences, `formatting.panels.[${key}]`) ||
- getValue(localData, `formatting.panels.[${key}]`);
+ getValue(preferences, `panels.[${key}]`) ||
+ getValue(localData, `panels.[${key}]`);
return val;
}
diff --git a/src/component/workspaces/exercise.ts b/src/component/workspaces/exercise.ts
index 53838b5ad..70c4827c3 100644
--- a/src/component/workspaces/exercise.ts
+++ b/src/component/workspaces/exercise.ts
@@ -38,33 +38,31 @@ export const exercise: InnerWorkspace = {
popupLoggingLevel: 'error',
invert: false,
},
- formatting: {
- nuclei: {},
- panels: {
- integrals: {
- nuclei: {
- '1H': {
- showSerialNumber: true,
- relative: { show: true, format: '0.00' },
- absolute: { show: false, format: '0.00' },
- from: { show: true, format: '0.00' },
- to: { show: true, format: '0.00' },
- color: 'black',
- strokeWidth: 1,
- showKind: false,
- showDeleteAction: true,
- },
- '13C': {
- showSerialNumber: true,
- relative: { show: true, format: '0.00' },
- absolute: { show: false, format: '0.00' },
- from: { show: true, format: '0.00' },
- to: { show: true, format: '0.00' },
- color: 'black',
- strokeWidth: 1,
- showKind: false,
- showDeleteAction: true,
- },
+ nuclei: [],
+ panels: {
+ integrals: {
+ nuclei: {
+ '1H': {
+ showSerialNumber: true,
+ relative: { show: true, format: '0.00' },
+ absolute: { show: false, format: '0.00' },
+ from: { show: true, format: '0.00' },
+ to: { show: true, format: '0.00' },
+ color: 'black',
+ strokeWidth: 1,
+ showKind: false,
+ showDeleteAction: true,
+ },
+ '13C': {
+ showSerialNumber: true,
+ relative: { show: true, format: '0.00' },
+ absolute: { show: false, format: '0.00' },
+ from: { show: true, format: '0.00' },
+ to: { show: true, format: '0.00' },
+ color: 'black',
+ strokeWidth: 1,
+ showKind: false,
+ showDeleteAction: true,
},
},
},
diff --git a/src/component/workspaces/prediction.ts b/src/component/workspaces/prediction.ts
index e2545b12e..939ce4942 100644
--- a/src/component/workspaces/prediction.ts
+++ b/src/component/workspaces/prediction.ts
@@ -48,179 +48,177 @@ export const prediction: InnerWorkspace = {
fftDimension2: true,
},
},
- formatting: {
- nuclei: {},
- panels: {
- spectra: {
- nuclei: {
- '1H,1H': {
- columns: [
- {
- name: 'visible',
- label: '',
- description: 'Show/Hide Spectrum',
- visible: true,
- },
- {
- label: 'Spectrum Name',
- jpath: ['info', 'name'],
- visible: true,
- },
- {
- label: 'Frequency',
- description: 'frequency',
- jpath: ['info', 'baseFrequency'],
- visible: true,
- },
- {
- label: 'Solvent',
- jpath: ['info', 'solvent'],
- visible: false,
- },
- {
- jpath: ['info', 'pulseSequence'],
- label: 'Pulse',
- visible: true,
- },
- {
- jpath: ['info', 'experiment'],
- label: 'Experiment',
- visible: true,
- },
- {
- name: 'color',
- label: '',
- description: 'Spectrum Color',
- visible: true,
- },
- ],
- },
- '1H,13C': {
- columns: [
- {
- name: 'visible',
- label: '',
- description: 'Show/Hide Spectrum',
- visible: true,
- },
- {
- label: 'Spectrum Name',
- jpath: ['info', 'name'],
- visible: true,
- },
- {
- label: 'Frequency',
- description: 'frequency',
- jpath: ['info', 'baseFrequency'],
- visible: true,
- },
- {
- label: 'Solvent',
- jpath: ['info', 'solvent'],
- visible: false,
- },
- {
- jpath: ['info', 'pulseSequence'],
- label: 'Pulse',
- visible: true,
- },
- {
- jpath: ['info', 'experiment'],
- label: 'Experiment',
- visible: true,
- },
- {
- name: 'color',
- label: '',
- description: 'Spectrum Color',
- visible: true,
- },
- ],
- },
- '1H': {
- columns: [
- {
- name: 'visible',
- label: '',
- description: 'Show/Hide Spectrum',
- visible: true,
- },
- {
- label: 'Spectrum Name',
- jpath: ['info', 'name'],
- visible: true,
- },
- {
- label: 'Frequency',
- description: 'frequency',
- jpath: ['info', 'baseFrequency'],
- visible: true,
- },
- {
- label: 'Solvent',
- jpath: ['info', 'solvent'],
- visible: false,
- },
- {
- jpath: ['info', 'pulseSequence'],
- label: 'Pulse',
- visible: true,
- },
- {
- jpath: ['info', 'experiment'],
- label: 'Experiment',
- visible: true,
- },
- {
- name: 'color',
- label: '',
- description: 'Spectrum Color',
- visible: true,
- },
- ],
- },
- '13C': {
- columns: [
- {
- name: 'visible',
- label: '',
- description: 'Show/Hide Spectrum',
- visible: true,
- },
- {
- label: 'Spectrum Name',
- jpath: ['info', 'name'],
- visible: true,
- },
- {
- label: 'Frequency',
- description: 'frequency',
- jpath: ['info', 'baseFrequency'],
- visible: true,
- },
- {
- label: 'Solvent',
- jpath: ['info', 'solvent'],
- visible: false,
- },
- {
- jpath: ['info', 'pulseSequence'],
- label: 'Pulse',
- visible: true,
- },
- {
- jpath: ['info', 'experiment'],
- label: 'Experiment',
- visible: true,
- },
- {
- name: 'color',
- label: '',
- description: 'Spectrum Color',
- visible: true,
- },
- ],
- },
+ nuclei: [],
+ panels: {
+ spectra: {
+ nuclei: {
+ '1H,1H': {
+ columns: [
+ {
+ name: 'visible',
+ label: '',
+ description: 'Show/Hide Spectrum',
+ visible: true,
+ },
+ {
+ label: 'Spectrum Name',
+ jpath: ['info', 'name'],
+ visible: true,
+ },
+ {
+ label: 'Frequency',
+ description: 'frequency',
+ jpath: ['info', 'baseFrequency'],
+ visible: true,
+ },
+ {
+ label: 'Solvent',
+ jpath: ['info', 'solvent'],
+ visible: false,
+ },
+ {
+ jpath: ['info', 'pulseSequence'],
+ label: 'Pulse',
+ visible: true,
+ },
+ {
+ jpath: ['info', 'experiment'],
+ label: 'Experiment',
+ visible: true,
+ },
+ {
+ name: 'color',
+ label: '',
+ description: 'Spectrum Color',
+ visible: true,
+ },
+ ],
+ },
+ '1H,13C': {
+ columns: [
+ {
+ name: 'visible',
+ label: '',
+ description: 'Show/Hide Spectrum',
+ visible: true,
+ },
+ {
+ label: 'Spectrum Name',
+ jpath: ['info', 'name'],
+ visible: true,
+ },
+ {
+ label: 'Frequency',
+ description: 'frequency',
+ jpath: ['info', 'baseFrequency'],
+ visible: true,
+ },
+ {
+ label: 'Solvent',
+ jpath: ['info', 'solvent'],
+ visible: false,
+ },
+ {
+ jpath: ['info', 'pulseSequence'],
+ label: 'Pulse',
+ visible: true,
+ },
+ {
+ jpath: ['info', 'experiment'],
+ label: 'Experiment',
+ visible: true,
+ },
+ {
+ name: 'color',
+ label: '',
+ description: 'Spectrum Color',
+ visible: true,
+ },
+ ],
+ },
+ '1H': {
+ columns: [
+ {
+ name: 'visible',
+ label: '',
+ description: 'Show/Hide Spectrum',
+ visible: true,
+ },
+ {
+ label: 'Spectrum Name',
+ jpath: ['info', 'name'],
+ visible: true,
+ },
+ {
+ label: 'Frequency',
+ description: 'frequency',
+ jpath: ['info', 'baseFrequency'],
+ visible: true,
+ },
+ {
+ label: 'Solvent',
+ jpath: ['info', 'solvent'],
+ visible: false,
+ },
+ {
+ jpath: ['info', 'pulseSequence'],
+ label: 'Pulse',
+ visible: true,
+ },
+ {
+ jpath: ['info', 'experiment'],
+ label: 'Experiment',
+ visible: true,
+ },
+ {
+ name: 'color',
+ label: '',
+ description: 'Spectrum Color',
+ visible: true,
+ },
+ ],
+ },
+ '13C': {
+ columns: [
+ {
+ name: 'visible',
+ label: '',
+ description: 'Show/Hide Spectrum',
+ visible: true,
+ },
+ {
+ label: 'Spectrum Name',
+ jpath: ['info', 'name'],
+ visible: true,
+ },
+ {
+ label: 'Frequency',
+ description: 'frequency',
+ jpath: ['info', 'baseFrequency'],
+ visible: true,
+ },
+ {
+ label: 'Solvent',
+ jpath: ['info', 'solvent'],
+ visible: false,
+ },
+ {
+ jpath: ['info', 'pulseSequence'],
+ label: 'Pulse',
+ visible: true,
+ },
+ {
+ jpath: ['info', 'experiment'],
+ label: 'Experiment',
+ visible: true,
+ },
+ {
+ name: 'color',
+ label: '',
+ description: 'Spectrum Color',
+ visible: true,
+ },
+ ],
},
},
},
diff --git a/src/component/workspaces/simulation.ts b/src/component/workspaces/simulation.ts
index 1c594a805..9bea3f354 100644
--- a/src/component/workspaces/simulation.ts
+++ b/src/component/workspaces/simulation.ts
@@ -31,43 +31,41 @@ export const simulation: InnerWorkspace = {
zoom: true,
},
},
- formatting: {
- nuclei: {},
- panels: {
- spectra: {
- nuclei: {
- '1H': {
- columns: [
- {
- name: 'visible',
- label: '',
- description: 'Show/Hide Spectrum',
- visible: true,
- },
- {
- label: 'Spectrum Name',
- jpath: ['info', 'name'],
- visible: true,
- },
- {
- label: 'Frequency',
- description: 'frequency',
- jpath: ['info', 'originFrequency'],
- visible: true,
- },
- {
- jpath: ['info', 'nucleus'],
- label: 'Experiment',
- visible: true,
- },
- {
- name: 'color',
- label: '',
- description: 'Spectrum Color',
- visible: true,
- },
- ],
- },
+ nuclei: [],
+ panels: {
+ spectra: {
+ nuclei: {
+ '1H': {
+ columns: [
+ {
+ name: 'visible',
+ label: '',
+ description: 'Show/Hide Spectrum',
+ visible: true,
+ },
+ {
+ label: 'Spectrum Name',
+ jpath: ['info', 'name'],
+ visible: true,
+ },
+ {
+ label: 'Frequency',
+ description: 'frequency',
+ jpath: ['info', 'originFrequency'],
+ visible: true,
+ },
+ {
+ jpath: ['info', 'nucleus'],
+ label: 'Experiment',
+ visible: true,
+ },
+ {
+ name: 'color',
+ label: '',
+ description: 'Spectrum Color',
+ visible: true,
+ },
+ ],
},
},
},
diff --git a/src/component/workspaces/workspaceDefaultProperties.ts b/src/component/workspaces/workspaceDefaultProperties.ts
index 97b6d0ee6..522dff7c8 100644
--- a/src/component/workspaces/workspaceDefaultProperties.ts
+++ b/src/component/workspaces/workspaceDefaultProperties.ts
@@ -66,17 +66,16 @@ export const workspaceDefaultProperties: Required = {
popupLoggingLevel: 'error',
invert: false,
},
- formatting: {
- nuclei: {
- '1h': { name: '1H', ppm: '0.00', hz: '0.00' },
- '13c': { name: '13C', ppm: '0.00', hz: '0.00' },
- '15n': { name: '15N', ppm: '0.00', hz: '0.00' },
- '19f': { name: '19F', ppm: '0.00', hz: '0.00' },
- '29si': { name: '29Si', ppm: '0.00', hz: '0.00' },
- '31p': { name: '31P', ppm: '0.00', hz: '0.00' },
- },
- panels: {},
- },
+ nuclei: [
+ { nucleus: '1H', ppmFormat: '0.00', hzFormat: '0.00' },
+ { nucleus: '13C', ppmFormat: '0.00', hzFormat: '0.00' },
+ { nucleus: '15N', ppmFormat: '0.00', hzFormat: '0.00' },
+ { nucleus: '19F', ppmFormat: '0.00', hzFormat: '0.00' },
+ { nucleus: '29Si', ppmFormat: '0.00', hzFormat: '0.00' },
+ { nucleus: '31P', ppmFormat: '0.00', hzFormat: '0.00' },
+ ],
+ panels: {},
+
databases: {
defaultDatabase: '',
data: [
diff --git a/src/demo/views/BenchtopNMRWorkspace.tsx b/src/demo/views/BenchtopNMRWorkspace.tsx
index 0c9b8050c..08e70387d 100644
--- a/src/demo/views/BenchtopNMRWorkspace.tsx
+++ b/src/demo/views/BenchtopNMRWorkspace.tsx
@@ -108,41 +108,39 @@ const customWorkspaces: CustomWorkspaces = {
popupLoggingLevel: 'error',
invert: false,
},
- formatting: {
- nuclei: {
- '1h': {
- name: '1H',
- ppm: '0.00',
- hz: '0.00',
- },
- '13c': {
- name: '13C',
- ppm: '0.00',
- hz: '0.00',
- },
- '15n': {
- name: '15N',
- ppm: '0.00',
- hz: '0.00',
- },
- '19f': {
- name: '19F',
- ppm: '0.00',
- hz: '0.00',
- },
- '29si': {
- name: '29Si',
- ppm: '0.00',
- hz: '0.00',
- },
- '31p': {
- name: '31P',
- ppm: '0.00',
- hz: '0.00',
- },
+ nuclei: [
+ {
+ nucleus: '1H',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
},
- panels: {},
- },
+ {
+ nucleus: '13C',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
+ },
+ {
+ nucleus: '15N',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
+ },
+ {
+ nucleus: '19F',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
+ },
+ {
+ nucleus: '29Si',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
+ },
+ {
+ nucleus: '31P',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
+ },
+ ],
+ panels: {},
databases: {
defaultDatabase: '',
data: [
@@ -307,7 +305,6 @@ const customWorkspaces: CustomWorkspaces = {
version: 2,
label: 'Simple NMR analysis',
visible: true,
- source: 'predefined',
},
};
diff --git a/src/demo/views/CustomWorkspace.tsx b/src/demo/views/CustomWorkspace.tsx
index 30edb0bc9..511077ee2 100644
--- a/src/demo/views/CustomWorkspace.tsx
+++ b/src/demo/views/CustomWorkspace.tsx
@@ -55,18 +55,18 @@ const customWorkspaces: CustomWorkspaces = {
verticalSplitterCloseThreshold: 600,
spectraRendering: 'auto',
loggingLevel: 'info',
+ invert: false,
+ popupLoggingLevel: 'info',
},
- formatting: {
- nuclei: {
- '1h': { name: '1H', ppm: '0.00', hz: '0.00' },
- '13c': { name: '13C', ppm: '0.00', hz: '0.00' },
- '15n': { name: '15N', ppm: '0.00', hz: '0.00' },
- '19f': { name: '19F', ppm: '0.00', hz: '0.00' },
- '29si': { name: '29Si', ppm: '0.00', hz: '0.00' },
- '31p': { name: '31P', ppm: '0.00', hz: '0.00' },
- },
- panels: {},
- },
+ nuclei: [
+ { nucleus: '1H', ppmFormat: '0.00', hzFormat: '0.00' },
+ { nucleus: '13C', ppmFormat: '0.00', hzFormat: '0.00' },
+ { nucleus: '15N', ppmFormat: '0.00', hzFormat: '0.00' },
+ { nucleus: '19F', ppmFormat: '0.00', hzFormat: '0.00' },
+ { nucleus: '29Si', ppmFormat: '0.00', hzFormat: '0.00' },
+ { nucleus: '31P', ppmFormat: '0.00', hzFormat: '0.00' },
+ ],
+ panels: {},
databases: {
defaultDatabase: '',
data: [
@@ -117,50 +117,53 @@ const customWorkspaces: CustomWorkspaces = {
],
},
onLoadProcessing: {
- '1H': [
- {
- name: 'digitalFilter',
- label: 'Digital Filter',
- value: {},
- flag: true,
- },
- { name: 'apodization', label: 'Apodization', value: {}, flag: false },
- { name: 'zeroFilling', label: 'Zero Filling', value: {}, flag: true },
- {
- name: 'fft',
- label: 'Fast fourier transform',
- value: {},
- flag: true,
- },
- {
- name: 'phaseCorrection',
- label: 'Phase correction',
- value: {},
- flag: true,
- },
- ],
- '13C': [
- {
- name: 'digitalFilter',
- label: 'Digital Filter',
- value: {},
- flag: true,
- },
- { name: 'apodization', label: 'Apodization', value: {}, flag: true },
- { name: 'zeroFilling', label: 'Zero Filling', value: {}, flag: true },
- {
- name: 'fft',
- label: 'Fast fourier transform',
- value: {},
- flag: true,
- },
- {
- name: 'phaseCorrection',
- label: 'Phase correction',
- value: {},
- flag: true,
- },
- ],
+ autoProcessing: true,
+ filters: {
+ '1H': [
+ {
+ name: 'digitalFilter',
+ label: 'Digital Filter',
+ value: {},
+ flag: true,
+ },
+ { name: 'apodization', label: 'Apodization', value: {}, flag: false },
+ { name: 'zeroFilling', label: 'Zero Filling', value: {}, flag: true },
+ {
+ name: 'fft',
+ label: 'Fast fourier transform',
+ value: {},
+ flag: true,
+ },
+ {
+ name: 'phaseCorrection',
+ label: 'Phase correction',
+ value: {},
+ flag: true,
+ },
+ ],
+ '13C': [
+ {
+ name: 'digitalFilter',
+ label: 'Digital Filter',
+ value: {},
+ flag: true,
+ },
+ { name: 'apodization', label: 'Apodization', value: {}, flag: true },
+ { name: 'zeroFilling', label: 'Zero Filling', value: {}, flag: true },
+ {
+ name: 'fft',
+ label: 'Fast fourier transform',
+ value: {},
+ flag: true,
+ },
+ {
+ name: 'phaseCorrection',
+ label: 'Phase correction',
+ value: {},
+ flag: true,
+ },
+ ],
+ },
},
label: 'Metabolomics',
version: 1,
diff --git a/src/demo/views/SnapshotView.tsx b/src/demo/views/SnapshotView.tsx
index 310fee18c..2584c3cb5 100644
--- a/src/demo/views/SnapshotView.tsx
+++ b/src/demo/views/SnapshotView.tsx
@@ -95,275 +95,268 @@ const customWorkspaces: CustomWorkspaces = {
verticalSplitterCloseThreshold: 600,
spectraRendering: 'auto',
loggingLevel: 'info',
+ invert: false,
+ popupLoggingLevel: 'info',
},
- formatting: {
- nuclei: {
- '1h': {
- name: '1H',
- ppm: '0.00',
- hz: '0.00',
- },
- '13c': {
- name: '13C',
- ppm: '0.00',
- hz: '0.00',
- },
- '15n': {
- name: '15N',
- ppm: '0.00',
- hz: '0.00',
- },
- '19f': {
- name: '19F',
- ppm: '0.00',
- hz: '0.00',
- },
- '29si': {
- name: '29Si',
- ppm: '0.00',
- hz: '0.00',
- },
- '31p': {
- name: '31P',
- ppm: '0.00',
- hz: '0.00',
- },
+ nuclei: [
+ {
+ nucleus: '1H',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
},
- panels: {
- spectra: {
- nuclei: {
- '1H': {
- columns: [
- {
- name: 'visible',
- label: '',
- description: 'Show/Hide Spectrum',
- visible: true,
- },
- {
- name: 'name',
- label: 'Spectrum Name',
- description: 'Spectrum Name',
- jpath: ['info', 'name'],
- visible: true,
- },
- {
- name: 'solvent',
- label: 'Solvent',
- description: 'Solvent',
- jpath: ['info', 'solvent'],
- visible: false,
- },
- {
- jpath: ['info', 'pulseSequence'],
- label: 'Pulse',
- visible: false,
- },
- {
- jpath: ['info', 'experiment'],
- label: 'Experiment',
- visible: true,
- },
- {
- name: 'color',
- label: '',
- description: 'Spectrum Color',
- visible: true,
- },
- ],
- },
- '1H,1H': {
- columns: [
- {
- name: 'visible',
- label: '',
- description: 'Show/Hide Spectrum',
- visible: true,
- },
- {
- name: 'name',
- label: 'Spectrum Name',
- description: 'Spectrum Name',
- jpath: ['info', 'name'],
- visible: true,
- },
- {
- name: 'solvent',
- label: 'Solvent',
- description: 'Solvent',
- jpath: ['info', 'solvent'],
- visible: false,
- },
- {
- jpath: ['info', 'pulseSequence'],
- label: 'Pulse',
- visible: false,
- },
- {
- jpath: ['info', 'experiment'],
- label: 'Experiment',
- visible: true,
- },
- {
- name: 'color',
- label: '',
- description: 'Spectrum Color',
- visible: true,
- },
- ],
- },
- '1H,13C': {
- columns: [
- {
- name: 'visible',
- label: '',
- description: 'Show/Hide Spectrum',
- visible: true,
- },
- {
- name: 'name',
- label: 'Spectrum Name',
- description: 'Spectrum Name',
- jpath: ['info', 'name'],
- visible: true,
- },
- {
- name: 'solvent',
- label: 'Solvent',
- description: 'Solvent',
- jpath: ['info', 'solvent'],
- visible: false,
- },
- {
- jpath: ['info', 'pulseSequence'],
- label: 'Pulse',
- visible: false,
- },
- {
- jpath: ['info', 'experiment'],
- label: 'Experiment',
- visible: true,
- },
- {
- name: 'color',
- label: '',
- description: 'Spectrum Color',
- visible: true,
- },
- ],
- },
- '13C': {
- columns: [
- {
- name: 'visible',
- label: '',
- description: 'Show/Hide Spectrum',
- visible: true,
- },
- {
- name: 'name',
- label: 'Spectrum Name',
- description: 'Spectrum Name',
- jpath: ['info', 'name'],
- visible: true,
- },
- {
- name: 'solvent',
- label: 'Solvent',
- description: 'Solvent',
- jpath: ['info', 'solvent'],
- visible: false,
- },
- {
- jpath: ['info', 'pulseSequence'],
- label: 'Pulse',
- visible: false,
- },
- {
- jpath: ['info', 'experiment'],
- label: 'Experiment',
- visible: true,
- },
- {
- name: 'color',
- label: '',
- description: 'Spectrum Color',
- visible: true,
- },
- ],
- },
+ {
+ nucleus: '13C',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
+ },
+ {
+ nucleus: '15N',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
+ },
+ {
+ nucleus: '19F',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
+ },
+ {
+ nucleus: '29Si',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
+ },
+ {
+ nucleus: '31P',
+ ppmFormat: '0.00',
+ hzFormat: '0.00',
+ },
+ ],
+ panels: {
+ spectra: {
+ nuclei: {
+ '1H': {
+ columns: [
+ {
+ name: 'visible',
+ label: '',
+ description: 'Show/Hide Spectrum',
+ visible: true,
+ },
+ {
+ label: 'Spectrum Name',
+ description: 'Spectrum Name',
+ jpath: ['info', 'name'],
+ visible: true,
+ },
+ {
+ label: 'Solvent',
+ description: 'Solvent',
+ jpath: ['info', 'solvent'],
+ visible: false,
+ },
+ {
+ jpath: ['info', 'pulseSequence'],
+ label: 'Pulse',
+ visible: false,
+ },
+ {
+ jpath: ['info', 'experiment'],
+ label: 'Experiment',
+ visible: true,
+ },
+ {
+ name: 'color',
+ label: '',
+ description: 'Spectrum Color',
+ visible: true,
+ },
+ ],
},
- },
- ranges: {
- nuclei: {
- '1H': {
- from: {
- show: false,
- format: '0.00',
+ '1H,1H': {
+ columns: [
+ {
+ name: 'visible',
+ label: '',
+ description: 'Show/Hide Spectrum',
+ visible: true,
},
- to: {
- show: false,
- format: '0.00',
+ {
+ label: 'Spectrum Name',
+ description: 'Spectrum Name',
+ jpath: ['info', 'name'],
+ visible: true,
},
- absolute: {
- show: false,
- format: '0.00',
+ {
+ label: 'Solvent',
+ description: 'Solvent',
+ jpath: ['info', 'solvent'],
+ visible: false,
},
- relative: {
- show: true,
- format: '0.00',
+ {
+ jpath: ['info', 'pulseSequence'],
+ label: 'Pulse',
+ visible: false,
},
- deltaPPM: {
- show: true,
- format: '0.00',
+ {
+ jpath: ['info', 'experiment'],
+ label: 'Experiment',
+ visible: true,
},
- deltaHz: {
- show: false,
- format: '0.00',
+ {
+ name: 'color',
+ label: '',
+ description: 'Spectrum Color',
+ visible: true,
},
- coupling: {
- show: false,
- format: '0.00',
+ ],
+ },
+ '1H,13C': {
+ columns: [
+ {
+ name: 'visible',
+ label: '',
+ description: 'Show/Hide Spectrum',
+ visible: true,
},
- jGraphTolerance: 0.2,
- showKind: false,
- },
- '13C': {
- from: {
- show: false,
- format: '0.00',
+ {
+ label: 'Spectrum Name',
+ description: 'Spectrum Name',
+ jpath: ['info', 'name'],
+ visible: true,
+ },
+ {
+ label: 'Solvent',
+ description: 'Solvent',
+ jpath: ['info', 'solvent'],
+ visible: false,
},
- to: {
- show: false,
- format: '0.00',
+ {
+ jpath: ['info', 'pulseSequence'],
+ label: 'Pulse',
+ visible: false,
},
- absolute: {
- show: false,
- format: '0.00',
+ {
+ jpath: ['info', 'experiment'],
+ label: 'Experiment',
+ visible: true,
},
- relative: {
- show: true,
- format: '0.00',
+ {
+ name: 'color',
+ label: '',
+ description: 'Spectrum Color',
+ visible: true,
},
- deltaPPM: {
- show: true,
- format: '0.00',
+ ],
+ },
+ '13C': {
+ columns: [
+ {
+ name: 'visible',
+ label: '',
+ description: 'Show/Hide Spectrum',
+ visible: true,
+ },
+ {
+ label: 'Spectrum Name',
+ description: 'Spectrum Name',
+ jpath: ['info', 'name'],
+ visible: true,
+ },
+ {
+ label: 'Solvent',
+ description: 'Solvent',
+ jpath: ['info', 'solvent'],
+ visible: false,
},
- deltaHz: {
- show: false,
- format: '0.00',
+ {
+ jpath: ['info', 'pulseSequence'],
+ label: 'Pulse',
+ visible: false,
},
- coupling: {
- show: true,
- format: '0.00',
+ {
+ jpath: ['info', 'experiment'],
+ label: 'Experiment',
+ visible: true,
},
- jGraphTolerance: 2,
- showKind: true,
+ {
+ name: 'color',
+ label: '',
+ description: 'Spectrum Color',
+ visible: true,
+ },
+ ],
+ },
+ },
+ },
+ ranges: {
+ nuclei: {
+ '1H': {
+ from: {
+ show: false,
+ format: '0.00',
+ },
+ to: {
+ show: false,
+ format: '0.00',
+ },
+ absolute: {
+ show: false,
+ format: '0.00',
+ },
+ relative: {
+ show: true,
+ format: '0.00',
},
+ deltaPPM: {
+ show: true,
+ format: '0.00',
+ },
+ deltaHz: {
+ show: false,
+ format: '0.00',
+ },
+ coupling: {
+ show: false,
+ format: '0.00',
+ },
+ jGraphTolerance: 0.2,
+ showKind: false,
+ },
+ '13C': {
+ from: {
+ show: false,
+ format: '0.00',
+ },
+ to: {
+ show: false,
+ format: '0.00',
+ },
+ absolute: {
+ show: false,
+ format: '0.00',
+ },
+ relative: {
+ show: true,
+ format: '0.00',
+ },
+ deltaPPM: {
+ show: true,
+ format: '0.00',
+ },
+ deltaHz: {
+ show: false,
+ format: '0.00',
+ },
+ coupling: {
+ show: true,
+ format: '0.00',
+ },
+ jGraphTolerance: 2,
+ showKind: true,
},
},
},
},
+
databases: {
defaultDatabase: '',
data: [
@@ -412,70 +405,73 @@ const customWorkspaces: CustomWorkspaces = {
],
},
onLoadProcessing: {
- '1H': [
- {
- name: 'digitalFilter',
- label: 'Digital Filter',
- value: {},
- flag: true,
- },
- {
- name: 'apodization',
- label: 'Apodization',
- value: {},
- flag: false,
- },
- {
- name: 'zeroFilling',
- label: 'Zero Filling',
- value: {},
- flag: true,
- },
- {
- name: 'fft',
- label: 'Fast fourier transform',
- value: {},
- flag: true,
- },
- {
- name: 'phaseCorrection',
- label: 'Phase correction',
- value: {},
- flag: true,
- },
- ],
- '13C': [
- {
- name: 'digitalFilter',
- label: 'Digital Filter',
- value: {},
- flag: true,
- },
- {
- name: 'apodization',
- label: 'Apodization',
- value: {},
- flag: true,
- },
- {
- name: 'zeroFilling',
- label: 'Zero Filling',
- value: {},
- flag: true,
- },
- {
- name: 'fft',
- label: 'Fast fourier transform',
- value: {},
- flag: true,
- },
- {
- name: 'phaseCorrection',
- label: 'Phase correction',
- value: {},
- flag: true,
- },
- ],
+ autoProcessing: true,
+ filters: {
+ '1H': [
+ {
+ name: 'digitalFilter',
+ label: 'Digital Filter',
+ value: {},
+ flag: true,
+ },
+ {
+ name: 'apodization',
+ label: 'Apodization',
+ value: {},
+ flag: false,
+ },
+ {
+ name: 'zeroFilling',
+ label: 'Zero Filling',
+ value: {},
+ flag: true,
+ },
+ {
+ name: 'fft',
+ label: 'Fast fourier transform',
+ value: {},
+ flag: true,
+ },
+ {
+ name: 'phaseCorrection',
+ label: 'Phase correction',
+ value: {},
+ flag: true,
+ },
+ ],
+ '13C': [
+ {
+ name: 'digitalFilter',
+ label: 'Digital Filter',
+ value: {},
+ flag: true,
+ },
+ {
+ name: 'apodization',
+ label: 'Apodization',
+ value: {},
+ flag: true,
+ },
+ {
+ name: 'zeroFilling',
+ label: 'Zero Filling',
+ value: {},
+ flag: true,
+ },
+ {
+ name: 'fft',
+ label: 'Fast fourier transform',
+ value: {},
+ flag: true,
+ },
+ {
+ name: 'phaseCorrection',
+ label: 'Phase correction',
+ value: {},
+ flag: true,
+ },
+ ],
+ },
},
label: 'Snapshots',
version: 1,
diff --git a/src/demo/views/Teaching.tsx b/src/demo/views/Teaching.tsx
index 8c08bc192..5679075d6 100644
--- a/src/demo/views/Teaching.tsx
+++ b/src/demo/views/Teaching.tsx
@@ -82,12 +82,14 @@ export default function Teaching(props) {