diff --git a/package-lock.json b/package-lock.json index 18d39a83d..debaaf1b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,6 @@ "immer": "^10.0.3", "jszip": "^3.10.1", "lodash": "^4.17.21", - "ml-airpls": "^1.0.2", "ml-array-max": "^1.2.4", "ml-array-mean": "^1.1.6", "ml-array-median": "^1.1.6", @@ -14080,4 +14079,4 @@ } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index e437e76d2..706ead25b 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,6 @@ "immer": "^10.0.3", "jszip": "^3.10.1", "lodash": "^4.17.21", - "ml-airpls": "^1.0.2", "ml-array-max": "^1.2.4", "ml-array-mean": "^1.1.6", "ml-array-median": "^1.1.6", diff --git a/public/data/oxfordInstruments/oxfordCosy.json b/public/data/oxfordInstruments/oxfordCosy.json index 17a2a12bd..8abeff2af 100644 --- a/public/data/oxfordInstruments/oxfordCosy.json +++ b/public/data/oxfordInstruments/oxfordCosy.json @@ -17,13 +17,19 @@ }, "filters": [ { + "id": "a10b030f-a565-42a4-84b1-b9e9087a3ec9", "name": "blpDimension1", "label": "Backward-LP Dimension 1", - "value": {}, - "flag": true, - "isDeleteAllow": true + "value": { + "nbCoefficients": 15, + "nbPoints": -2, + "nbInputs": 1024 + }, + "isDeleteAllow": true, + "flag": true }, { + "id": "0b030fa5-6552-4484-b1b9-e9087a3ec927", "name": "apodizationDimension1", "label": "Apodization on Dimension 1", "value": { @@ -39,34 +45,43 @@ } } ] - }, - "apply": true + } }, - "flag": true, - "isDeleteAllow": true + "isDeleteAllow": true, + "flag": true }, { - "name": "fftDimension1", - "label": "FFT Dimension 1", + "id": "030fa565-52a4-44b1-b9e9-087a3ec92779", + "name": "zeroFillingDimension1", + "label": "Zero filling on Dimension 1", "value": { - "phaseCorrection": { - "mode": "mc" - }, - "zeroFilling": { - "nbPoints": 2048 - } + "nbPoints": 2048 }, - "flag": true, - "isDeleteAllow": true + "isDeleteAllow": true, + "flag": true }, { - "name": "flpDimension2", - "label": "Forward-LP Dimension 2", + "id": "0fa56552-a484-41b9-a908-7a3ec9277962", + "name": "fftDimension1", + "label": "FFT Dimension 1", "value": {}, - "flag": true, - "isDeleteAllow": true + "isDeleteAllow": true, + "flag": true + }, + { + "id": "a56552a4-84b1-49e9-887a-3ec927796285", + "name": "flpDimension2", + "label": "Fordward-LP Dimension 2", + "value": { + "nbCoefficients": 15, + "nbPoints": 0, + "nbInputs": 113 + }, + "isDeleteAllow": true, + "flag": true }, { + "id": "6552a484-b1b9-4908-ba3e-c9277962857d", "name": "apodizationDimension2", "label": "Apodization on Dimension 2", "value": { @@ -82,30 +97,54 @@ } } ] - }, - "apply": true + } }, - "flag": true, - "isDeleteAllow": true + "isDeleteAllow": true, + "flag": true + }, + { + "id": "52a484b1-b9e9-487a-bec9-277962857d88", + "name": "zeroFillingDimension2", + "label": "Zero filling on Dimension 2", + "value": { + "nbPoints": 2048 + }, + "isDeleteAllow": true, + "flag": true }, { + "id": "84b1b9e9-087a-4ec9-a779-62857d888202", "name": "fftDimension2", "label": "FFT Dimension 2", + "value": {}, + "isDeleteAllow": true, + "flag": true + }, + { + "id": "a484b1b9-e908-4a3e-8927-7962857d8882", + "name": "symmetrizeCosyLike", + "label": "symmetrize COSY-like", + "value": {}, + "isDeleteAllow": true, + "flag": true + }, + { + "name": "shift2DX", + "label": "Shift 2D X", "value": { - "phaseCorrection": { - "mode": "mc" - }, - "zeroFilling": { - "nbPoints": 2048 - } + "shift": 0.07471201832594754 }, + "id": "c788ea09-165e-49ba-afba-1e2e362f7eb5", "flag": true, "isDeleteAllow": true }, { - "name": "symmetrizeCosyLike", - "label": "symmetrize COSY-like", - "value": {}, + "name": "shift2DY", + "label": "Shift 2D Y", + "value": { + "shift": 0.06849902778751127 + }, + "id": "09165ee9-ba6f-4a1e-ae36-2f7eb5385f7f", "flag": true, "isDeleteAllow": true } @@ -158,11 +197,22 @@ "name": "phaseCorrection", "label": "Phase correction", "value": { - "ph0": -126, + "ph0": -128.9, "ph1": 0, "absolute": false }, "flag": true, + "isDeleteAllow": true, + "id": "6ae7ba0d-db09-486c-9cbf-2ac7e57dbc3d" + }, + { + "name": "shiftX", + "label": "Shift X", + "value": { + "shift": -0.10005791743496187 + }, + "id": "f86c9cbf-2ac7-457d-bc3d-9465b326c07b", + "flag": true, "isDeleteAllow": true } ] diff --git a/public/data/oxfordInstruments/oxfordInstruments.json b/public/data/oxfordInstruments/oxfordInstruments.json index 901f9c8a9..11494f800 100644 --- a/public/data/oxfordInstruments/oxfordInstruments.json +++ b/public/data/oxfordInstruments/oxfordInstruments.json @@ -66,11 +66,22 @@ "name": "phaseCorrection", "label": "Phase correction", "value": { - "ph0": -126, + "ph0": -128.9, "ph1": 0, "absolute": false }, "flag": true, + "isDeleteAllow": true, + "id": "6ae7ba0d-db09-486c-9cbf-2ac7e57dbc3d" + }, + { + "name": "shiftX", + "label": "Shift X", + "value": { + "shift": -0.10005791743496187 + }, + "id": "f86c9cbf-2ac7-457d-bc3d-9465b326c07b", + "flag": true, "isDeleteAllow": true } ] diff --git a/src/component/2d/ft/Contours.tsx b/src/component/2d/ft/Contours.tsx index 78217dff4..a72a99c10 100644 --- a/src/component/2d/ft/Contours.tsx +++ b/src/component/2d/ft/Contours.tsx @@ -3,7 +3,6 @@ import get from 'lodash/get'; import { Spectrum2D } from 'nmr-load-save'; import { memo, useMemo, useRef } from 'react'; -import { getShift } from '../../../data/data2d/Spectrum2D'; import { drawContours, getDefaultContoursLevel, @@ -36,7 +35,6 @@ function usePath( ) { const scaleX = useScale2DX(); const scaleY = useScale2DY(); - const shift = getShift(spectrum); const pathBuilder = new PathBuilder(); for (const element of contours) { @@ -44,14 +42,8 @@ function usePath( const lines = element.lines; if (lines.length < 1e6) { for (let i = 0; i < lines.length; i += 4) { - pathBuilder.moveTo( - scaleX(lines[i] + shift.x), - scaleY(lines[i + 1] + shift.y), - ); - pathBuilder.lineTo( - scaleX(lines[i + 2] + shift.x), - scaleY(lines[i + 3] + shift.y), - ); + pathBuilder.moveTo(scaleX(lines[i]), scaleY(lines[i + 1])); + pathBuilder.lineTo(scaleX(lines[i + 2]), scaleY(lines[i + 3])); } } }