From 1421f83964819f05fd1728ba8738eddcd1f9b323 Mon Sep 17 00:00:00 2001 From: Cammille Carinan Date: Tue, 28 Jul 2026 06:07:09 +0200 Subject: [PATCH 1/6] test(api): pass the value to to_dataarray, not the fixture --- api/tests/test_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tests/test_data.py b/api/tests/test_data.py index a8bbd740..5c829dd7 100644 --- a/api/tests/test_data.py +++ b/api/tests/test_data.py @@ -170,7 +170,7 @@ def test_to_dataarray_2d_dataarray_with_coords(): @pytest.mark.parametrize("data", scalars + datasets) def test_to_data_array_unsupported(data): with pytest.raises(ValueError, match=NOT_SUPPORTED_MESSAGE): - to_dataarray(data) + to_dataarray(data.value) # ----------------------------------------------------------------------------- From 2cc420f80a79acd402a10aade9f7e04683e0401f Mon Sep 17 00:00:00 2001 From: Cammille Carinan Date: Tue, 28 Jul 2026 06:13:25 +0200 Subject: [PATCH 2/6] chore: bump the ruff pre-commit pin to match the project --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8d5861e9..d92f83c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: # ruff walks up from each file to find api/ruff.toml automatically - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.13 + rev: v0.15.8 hooks: - id: ruff-check files: ^api/ From 95480ff334509ef46244c22a5f4bdb01bd5d6f51 Mon Sep 17 00:00:00 2001 From: Cammille Carinan Date: Tue, 28 Jul 2026 06:13:51 +0200 Subject: [PATCH 3/6] refactor(dtype): name a picture image and split array into 1d and 2d --- api/src/damnit_api/graphql/directives.py | 5 ++-- api/src/damnit_api/runs/preview.py | 13 ++++----- api/src/damnit_api/runs/serialization.py | 4 ++- api/src/damnit_api/shared/const.py | 7 ++--- api/src/damnit_api/utils.py | 2 +- api/tests/graphql/test_models.py | 8 ++--- api/tests/graphql/test_queries.py | 2 +- api/tests/refactor/snapshots/schema.graphql | 6 ++-- api/tests/test_data.py | 29 +++++++++---------- .../public/examples/xpcs/data/1/n_pulses.json | 2 +- .../public/examples/xpcs/data/1/sample_x.json | 2 +- .../public/examples/xpcs/data/1/sample_y.json | 2 +- .../xpcs/data/1/total_transmission.json | 2 +- .../examples/xpcs/data/1/xgm_intensity.json | 2 +- .../examples/xpcs/data/1/xpcs_g2_plot.json | 2 +- .../data/1/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/1/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/1/xpcs_saxs_plot.json | 2 +- .../examples/xpcs/data/10/n_pulses.json | 2 +- .../examples/xpcs/data/10/sample_x.json | 2 +- .../examples/xpcs/data/10/sample_y.json | 2 +- .../xpcs/data/10/total_transmission.json | 2 +- .../examples/xpcs/data/10/xgm_intensity.json | 2 +- .../examples/xpcs/data/10/xpcs_g2_plot.json | 2 +- .../data/10/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/10/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/10/xpcs_saxs_plot.json | 2 +- .../examples/xpcs/data/11/n_pulses.json | 2 +- .../examples/xpcs/data/11/sample_x.json | 2 +- .../examples/xpcs/data/11/sample_y.json | 2 +- .../xpcs/data/11/total_transmission.json | 2 +- .../examples/xpcs/data/11/xgm_intensity.json | 2 +- .../examples/xpcs/data/11/xpcs_g2_plot.json | 2 +- .../data/11/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/11/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/11/xpcs_saxs_plot.json | 2 +- .../examples/xpcs/data/12/n_pulses.json | 2 +- .../examples/xpcs/data/12/sample_x.json | 2 +- .../examples/xpcs/data/12/sample_y.json | 2 +- .../xpcs/data/12/total_transmission.json | 2 +- .../examples/xpcs/data/12/xgm_intensity.json | 2 +- .../examples/xpcs/data/12/xpcs_g2_plot.json | 2 +- .../data/12/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/12/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/12/xpcs_saxs_plot.json | 2 +- .../examples/xpcs/data/13/n_pulses.json | 2 +- .../examples/xpcs/data/13/sample_x.json | 2 +- .../examples/xpcs/data/13/sample_y.json | 2 +- .../xpcs/data/13/total_transmission.json | 2 +- .../examples/xpcs/data/13/xgm_intensity.json | 2 +- .../examples/xpcs/data/13/xpcs_g2_plot.json | 2 +- .../data/13/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/13/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/13/xpcs_saxs_plot.json | 2 +- .../public/examples/xpcs/data/2/n_pulses.json | 2 +- .../public/examples/xpcs/data/2/sample_x.json | 2 +- .../public/examples/xpcs/data/2/sample_y.json | 2 +- .../xpcs/data/2/total_transmission.json | 2 +- .../examples/xpcs/data/2/xgm_intensity.json | 2 +- .../examples/xpcs/data/2/xpcs_g2_plot.json | 2 +- .../data/2/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/2/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/2/xpcs_saxs_plot.json | 2 +- .../public/examples/xpcs/data/3/n_pulses.json | 2 +- .../public/examples/xpcs/data/3/sample_x.json | 2 +- .../public/examples/xpcs/data/3/sample_y.json | 2 +- .../xpcs/data/3/total_transmission.json | 2 +- .../examples/xpcs/data/3/xgm_intensity.json | 2 +- .../examples/xpcs/data/3/xpcs_g2_plot.json | 2 +- .../data/3/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/3/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/3/xpcs_saxs_plot.json | 2 +- .../public/examples/xpcs/data/4/n_pulses.json | 2 +- .../public/examples/xpcs/data/4/sample_x.json | 2 +- .../public/examples/xpcs/data/4/sample_y.json | 2 +- .../xpcs/data/4/total_transmission.json | 2 +- .../examples/xpcs/data/4/xgm_intensity.json | 2 +- .../examples/xpcs/data/4/xpcs_g2_plot.json | 2 +- .../data/4/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/4/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/4/xpcs_saxs_plot.json | 2 +- .../public/examples/xpcs/data/5/n_pulses.json | 2 +- .../public/examples/xpcs/data/5/sample_x.json | 2 +- .../public/examples/xpcs/data/5/sample_y.json | 2 +- .../xpcs/data/5/total_transmission.json | 2 +- .../examples/xpcs/data/5/xgm_intensity.json | 2 +- .../examples/xpcs/data/5/xpcs_g2_plot.json | 2 +- .../data/5/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/5/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/5/xpcs_saxs_plot.json | 2 +- .../public/examples/xpcs/data/6/n_pulses.json | 2 +- .../public/examples/xpcs/data/6/sample_x.json | 2 +- .../public/examples/xpcs/data/6/sample_y.json | 2 +- .../xpcs/data/6/total_transmission.json | 2 +- .../examples/xpcs/data/6/xgm_intensity.json | 2 +- .../examples/xpcs/data/6/xpcs_g2_plot.json | 2 +- .../data/6/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/6/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/6/xpcs_saxs_plot.json | 2 +- .../public/examples/xpcs/data/7/n_pulses.json | 2 +- .../public/examples/xpcs/data/7/sample_x.json | 2 +- .../public/examples/xpcs/data/7/sample_y.json | 2 +- .../xpcs/data/7/total_transmission.json | 2 +- .../examples/xpcs/data/7/xgm_intensity.json | 2 +- .../examples/xpcs/data/7/xpcs_g2_plot.json | 2 +- .../data/7/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/7/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/7/xpcs_saxs_plot.json | 2 +- .../public/examples/xpcs/data/8/n_pulses.json | 2 +- .../public/examples/xpcs/data/8/sample_x.json | 2 +- .../public/examples/xpcs/data/8/sample_y.json | 2 +- .../xpcs/data/8/total_transmission.json | 2 +- .../examples/xpcs/data/8/xgm_intensity.json | 2 +- .../examples/xpcs/data/8/xpcs_g2_plot.json | 2 +- .../data/8/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/8/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/8/xpcs_saxs_plot.json | 2 +- .../public/examples/xpcs/data/9/n_pulses.json | 2 +- .../public/examples/xpcs/data/9/sample_x.json | 2 +- .../public/examples/xpcs/data/9/sample_y.json | 2 +- .../xpcs/data/9/total_transmission.json | 2 +- .../examples/xpcs/data/9/xgm_intensity.json | 2 +- .../examples/xpcs/data/9/xpcs_g2_plot.json | 2 +- .../data/9/xpcs_intensity_outliers_plot.json | 2 +- .../xpcs/data/9/xpcs_q_rings_plot.json | 2 +- .../examples/xpcs/data/9/xpcs_saxs_plot.json | 2 +- .../e2e/tests/app/plots/preview-plot.spec.ts | 4 +-- frontend/packages/shared/src/constants.ts | 2 +- frontend/packages/ui/src/constants.ts | 2 +- .../ui/src/features/plots/plots.types.ts | 12 ++++---- .../features/plots/preview-plot.transforms.ts | 10 +++---- .../packages/ui/src/features/table/cells.ts | 2 +- .../data/table/table-data.transforms.test.ts | 2 +- .../plots/use-preview-plot-data.test.tsx | 2 +- .../ui/tests/features/table/cells.test.ts | 2 +- .../features/table/use-table-runs.test.tsx | 4 +-- .../ui/tests/graphql/type-policies.test.ts | 6 ++-- 137 files changed, 177 insertions(+), 181 deletions(-) diff --git a/api/src/damnit_api/graphql/directives.py b/api/src/damnit_api/graphql/directives.py index f38ac3f8..ce93420d 100644 --- a/api/src/damnit_api/graphql/directives.py +++ b/api/src/damnit_api/graphql/directives.py @@ -4,10 +4,11 @@ from ..runs.types import Cell, DamnitRun from ..shared.const import DamnitType +# The summary dtypes worth a second round trip. ARRAY_2D is missing on purpose: +# DamnitRun.get_dtype cannot reach it, so only a preview ever carries one. HEAVY_DATA = ( DamnitType.IMAGE, - DamnitType.RGBA, - DamnitType.ARRAY, + DamnitType.ARRAY_1D, ) diff --git a/api/src/damnit_api/runs/preview.py b/api/src/damnit_api/runs/preview.py index 71041e33..5d684188 100644 --- a/api/src/damnit_api/runs/preview.py +++ b/api/src/damnit_api/runs/preview.py @@ -45,16 +45,15 @@ def get_preview_data(proposal, run, variable): attrs = None match dtype: - case DamnitType.ARRAY | DamnitType.IMAGE: + case DamnitType.ARRAY_1D | DamnitType.ARRAY_2D: data = get_array(data) - case DamnitType.RGBA: + case DamnitType.IMAGE: attrs = { "shape": list( data.shape[:2] # FIX: # pyright: ignore[reportAttributeAccessIssue] ) } data = get_png(data) - dtype = DamnitType.PNG return standardize(data, name=variable, dtype=dtype.value, attrs=attrs) @@ -81,7 +80,7 @@ def get_array(data): def get_damnit_type(data, *, type_hint=None): # noqa: C901 match type_hint: case DataType.Image: - return DamnitType.RGBA + return DamnitType.IMAGE case DataType.Timestamp: return DamnitType.TIMESTAMP case None: @@ -94,7 +93,7 @@ def get_damnit_type(data, *, type_hint=None): # noqa: C901 return DamnitType.NUMBER raise ValueError(NOT_SUPPORTED_MESSAGE) if data.ndim == 3 and data.shape[-1] in (3, 4): - return DamnitType.RGBA + return DamnitType.IMAGE case DataType.Dataset | DataType.PlotlyFigure: raise ValueError(NOT_SUPPORTED_MESSAGE) @@ -103,9 +102,9 @@ def get_damnit_type(data, *, type_hint=None): # noqa: C901 match data.ndim: case 1: - return DamnitType.ARRAY + return DamnitType.ARRAY_1D case 2: - return DamnitType.IMAGE + return DamnitType.ARRAY_2D case _: raise ValueError(NOT_SUPPORTED_MESSAGE) diff --git a/api/src/damnit_api/runs/serialization.py b/api/src/damnit_api/runs/serialization.py index 60149487..84208a41 100644 --- a/api/src/damnit_api/runs/serialization.py +++ b/api/src/damnit_api/runs/serialization.py @@ -101,7 +101,9 @@ def serialize(value, *, dtype=DamnitType.STRING): # noqa: C901 value = to_complex_string(blob2complex(value)) dtype = DamnitType.STRING - case DamnitType.ARRAY: + case DamnitType.ARRAY_1D: + # The 1-D is what the client receives, not what is stored: a + # trendline summary is a 2xN blob of x and y rows. if isinstance(value, bytes): arr = blob2numpy(value) diff --git a/api/src/damnit_api/shared/const.py b/api/src/damnit_api/shared/const.py index efbf0b27..275bff25 100644 --- a/api/src/damnit_api/shared/const.py +++ b/api/src/damnit_api/shared/const.py @@ -13,10 +13,7 @@ class DamnitType(Enum): TIMESTAMP = "timestamp" COMPLEX = "complex" - ARRAY = "array" + ARRAY_1D = "array1d" + ARRAY_2D = "array2d" IMAGE = "image" NUMPY = "numpy" - RGBA = "rgba" - - PNG = "png" - DATASET = "dataset" diff --git a/api/src/damnit_api/utils.py b/api/src/damnit_api/utils.py index ce0e2b55..a32a2e6d 100644 --- a/api/src/damnit_api/utils.py +++ b/api/src/damnit_api/utils.py @@ -22,7 +22,7 @@ SUMMARY_TYPES = { "complex": DamnitType.COMPLEX, "numpy": DamnitType.NUMPY, - "trendline": DamnitType.ARRAY, + "trendline": DamnitType.ARRAY_1D, } diff --git a/api/tests/graphql/test_models.py b/api/tests/graphql/test_models.py index ec815536..c90b7f76 100644 --- a/api/tests/graphql/test_models.py +++ b/api/tests/graphql/test_models.py @@ -122,14 +122,14 @@ def test_serialize_numpy(): def test_serialize_array_unsupported_shape(): blob = to_npy_bytes(np.array([1, 2, 3], dtype=np.float64)) - _, dtype = serialize(blob, dtype=DamnitType.ARRAY) + _, dtype = serialize(blob, dtype=DamnitType.ARRAY_1D) assert dtype == DamnitType.STRING -def test_serialize_array_valid(): +def test_serialize_reduces_a_2xn_trendline_to_one_series(): arr = np.array([[1, 2, 3, 4], [10, 20, 30, 40]], dtype=np.float64) - value, dtype = serialize(to_npy_bytes(arr), dtype=DamnitType.ARRAY) - assert dtype == DamnitType.ARRAY + value, dtype = serialize(to_npy_bytes(arr), dtype=DamnitType.ARRAY_1D) + assert dtype == DamnitType.ARRAY_1D assert isinstance(value, np.ndarray) diff --git a/api/tests/graphql/test_queries.py b/api/tests/graphql/test_queries.py index 33900b47..a003b0c3 100644 --- a/api/tests/graphql/test_queries.py +++ b/api/tests/graphql/test_queries.py @@ -105,7 +105,7 @@ async def test_lightweight_directive_blanks_heavy_values( cells = {c["name"]: c["summary"] for c in result.data["runs"][0]["cells"]} # The heavy value is held back, but its dtype still describes the cell. assert cells["spectrum"]["value"] is None - assert cells["spectrum"]["dtype"] == "array" + assert cells["spectrum"]["dtype"] == "array1d" # A scalar is left untouched. assert cells["n_trains"]["value"] == 3641 diff --git a/api/tests/refactor/snapshots/schema.graphql b/api/tests/refactor/snapshots/schema.graphql index 41501c3d..9abbb66d 100644 --- a/api/tests/refactor/snapshots/schema.graphql +++ b/api/tests/refactor/snapshots/schema.graphql @@ -34,12 +34,10 @@ enum DamnitType { boolean timestamp complex - array + array1d + array2d image numpy - rgba - png - dataset } input DatabaseInput { diff --git a/api/tests/test_data.py b/api/tests/test_data.py index 5c829dd7..372e982e 100644 --- a/api/tests/test_data.py +++ b/api/tests/test_data.py @@ -22,7 +22,7 @@ @dataclass class ExtractedData: value: object - dtype: DamnitType + dtype: DamnitType | None = None type_hint: DataType | None = None @@ -35,17 +35,17 @@ class ExtractedData: ExtractedData( value=np.random.randint(0, 256, (2, 3, 4), dtype=np.uint8), type_hint=DataType.Image, - dtype=DamnitType.RGBA, + dtype=DamnitType.IMAGE, ), ] ndarrays = [ ExtractedData( value=np.random.rand(10), - dtype=DamnitType.ARRAY, + dtype=DamnitType.ARRAY_1D, ), ExtractedData( value=np.random.rand(4, 3), - dtype=DamnitType.IMAGE, + dtype=DamnitType.ARRAY_2D, ), ] dataarrays = [ @@ -66,7 +66,6 @@ class ExtractedData: coords={"x": np.arange(10)}, ), type_hint=DataType.Dataset, - dtype=DamnitType.DATASET, ), ] @@ -178,8 +177,8 @@ def test_to_data_array_unsupported(data): def test_standardize_dataarray(): - name = "some_image" - dtype = DamnitType.IMAGE + name = "some_array" + dtype = DamnitType.ARRAY_2D data = xr.DataArray( data=np.random.rand(4, 3), name=name, @@ -206,9 +205,9 @@ def test_standardize_dataarray(): # assert actual == expected -def test_standardize_png(): - name = "some_png" - dtype = DamnitType.PNG +def test_standardize_image(): + name = "some_image" + dtype = DamnitType.IMAGE data = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAABQUlEQVR4nAE2Acn+ARvURClMomT2KO" # noqa: E501 assert standardize(data, name=name, dtype=dtype.value) == { @@ -239,7 +238,7 @@ def mock_damnit_class(mocker, *, data, type_hint): def test_get_preview_data_ndarray(mocker): name = "some_array" - dtype = DamnitType.ARRAY + dtype = DamnitType.ARRAY_1D data = np.random.rand(4) mock_damnit_class(mocker, data=data, type_hint=None) @@ -257,7 +256,7 @@ def test_get_preview_data_ndarray(mocker): def test_get_preview_data_dataarray(mocker): name = "some_array" - dtype = DamnitType.ARRAY + dtype = DamnitType.ARRAY_1D data = xr.DataArray( np.random.rand(4), dims=["trains"], @@ -276,9 +275,9 @@ def test_get_preview_data_dataarray(mocker): assert_coords(actual["coords"], data.coords) -def test_get_preview_data_png(mocker): - name = "some_png" - dtype = DamnitType.PNG # because we convert RGBA array to PNG string +def test_get_preview_data_image(mocker): + name = "some_image" + dtype = DamnitType.IMAGE # a colour array is rendered to a PNG string data = np.random.randint(0, 256, (2, 3, 4), dtype=np.uint8) mock_damnit_class(mocker, data=data, type_hint=DataType.Image) diff --git a/frontend/apps/demo/public/examples/xpcs/data/1/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/1/n_pulses.json index d0139cdd..93cad700 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/1/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/1/n_pulses.json @@ -5372,5 +5372,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/1/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/1/sample_x.json index 3853a283..40afaf6c 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/1/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/1/sample_x.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/1/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/1/sample_y.json index d5100fe5..4cbb5b98 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/1/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/1/sample_y.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/1/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/1/total_transmission.json index 10f8d307..d8f7cb66 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/1/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/1/total_transmission.json @@ -5372,5 +5372,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/1/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/1/xgm_intensity.json index b7742f7e..7e896ec6 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/1/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/1/xgm_intensity.json @@ -594,5 +594,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_g2_plot.json index 910c30be..52d8fd9c 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_intensity_outliers_plot.json index c2fb6f3b..d383f28a 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_q_rings_plot.json index 87db6609..4a87cf70 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_saxs_plot.json index db20f240..cdd29d0e 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/1/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/10/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/10/n_pulses.json index 210c874e..f33d86d3 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/10/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/10/n_pulses.json @@ -5214,5 +5214,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/10/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/10/sample_x.json index 8d8e3e2a..0aa2d20c 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/10/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/10/sample_x.json @@ -5370,5 +5370,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/10/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/10/sample_y.json index 568a2d18..bdef1cd8 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/10/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/10/sample_y.json @@ -5370,5 +5370,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/10/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/10/total_transmission.json index 9c68d726..c9973ab9 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/10/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/10/total_transmission.json @@ -5214,5 +5214,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/10/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/10/xgm_intensity.json index 1dc0b881..a04b30b8 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/10/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/10/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_g2_plot.json index e5ab5329..cb30247b 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_intensity_outliers_plot.json index a2e3bc31..728efd4a 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_q_rings_plot.json index d336b175..5868fb05 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_saxs_plot.json index 86b53285..c7dffafb 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/10/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/11/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/11/n_pulses.json index 63c9aafc..3116824e 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/11/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/11/n_pulses.json @@ -5214,5 +5214,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/11/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/11/sample_x.json index bd29fd86..bfc46194 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/11/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/11/sample_x.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/11/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/11/sample_y.json index d6b8e659..31b25cf6 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/11/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/11/sample_y.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/11/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/11/total_transmission.json index bbcb9671..592245a0 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/11/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/11/total_transmission.json @@ -5214,5 +5214,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/11/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/11/xgm_intensity.json index d07ad7a7..325e96b0 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/11/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/11/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_g2_plot.json index 78139b63..52af946e 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_intensity_outliers_plot.json index 3d0abdea..8f88ebc0 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_q_rings_plot.json index 431a7136..c67d39fd 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_saxs_plot.json index 8724c244..9cf83c6a 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/11/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/12/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/12/n_pulses.json index 8c4b967b..a08e2646 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/12/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/12/n_pulses.json @@ -5214,5 +5214,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/12/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/12/sample_x.json index ceaec7a9..07d3afad 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/12/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/12/sample_x.json @@ -5368,5 +5368,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/12/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/12/sample_y.json index 964608be..dc9729dd 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/12/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/12/sample_y.json @@ -5368,5 +5368,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/12/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/12/total_transmission.json index 09f0b73d..e5a8297f 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/12/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/12/total_transmission.json @@ -5214,5 +5214,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/12/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/12/xgm_intensity.json index fc3b3dff..ea4264a0 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/12/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/12/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_g2_plot.json index a5bcee62..b7e9eeae 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_intensity_outliers_plot.json index d71e8985..8f63a1e0 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_q_rings_plot.json index e4ca8438..2dd0d30b 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_saxs_plot.json index 262ec20e..62826951 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/12/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/13/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/13/n_pulses.json index 24b34fde..37bd35c4 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/13/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/13/n_pulses.json @@ -5214,5 +5214,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/13/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/13/sample_x.json index e8f6a0ca..488dc101 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/13/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/13/sample_x.json @@ -5374,5 +5374,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/13/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/13/sample_y.json index 8e0327b5..bb4c7a3d 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/13/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/13/sample_y.json @@ -5374,5 +5374,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/13/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/13/total_transmission.json index 5d0681ad..312cfb23 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/13/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/13/total_transmission.json @@ -5214,5 +5214,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/13/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/13/xgm_intensity.json index 7ebf5875..2bf346e8 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/13/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/13/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_g2_plot.json index 7ccc369e..80be6928 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_intensity_outliers_plot.json index 02ed3ccf..d2923102 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_q_rings_plot.json index fc800c62..0a6804b0 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_saxs_plot.json index 8ba52d48..62c7c5f9 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/13/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/2/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/2/n_pulses.json index 451269d9..1f9c2ade 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/2/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/2/n_pulses.json @@ -5372,5 +5372,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/2/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/2/sample_x.json index d73e64a4..72c9f8fa 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/2/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/2/sample_x.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/2/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/2/sample_y.json index c8a385f9..4f1c80af 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/2/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/2/sample_y.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/2/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/2/total_transmission.json index ba000eae..89d8e72e 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/2/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/2/total_transmission.json @@ -5372,5 +5372,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/2/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/2/xgm_intensity.json index 08b56f3a..d95bffc8 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/2/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/2/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_g2_plot.json index f4510643..1b636fbd 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_intensity_outliers_plot.json index d679f29a..4e807769 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_q_rings_plot.json index c8edd602..414c25d5 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_saxs_plot.json index 92cfcfc6..d117189d 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/2/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/3/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/3/n_pulses.json index bcb0dc5a..90f7268b 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/3/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/3/n_pulses.json @@ -5388,5 +5388,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/3/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/3/sample_x.json index f5910b09..818aed34 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/3/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/3/sample_x.json @@ -5388,5 +5388,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/3/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/3/sample_y.json index b71fc3df..ad0df69b 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/3/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/3/sample_y.json @@ -5388,5 +5388,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/3/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/3/total_transmission.json index 5035389e..5225d3d1 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/3/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/3/total_transmission.json @@ -5388,5 +5388,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/3/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/3/xgm_intensity.json index 79845705..a1babd3f 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/3/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/3/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_g2_plot.json index edcaf557..d018fd75 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_intensity_outliers_plot.json index 9393cce1..6f8210f5 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_q_rings_plot.json index 93933983..8ae5bc60 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_saxs_plot.json index f0496610..f298cd76 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/3/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/4/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/4/n_pulses.json index 207aa668..61125cf3 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/4/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/4/n_pulses.json @@ -5214,5 +5214,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/4/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/4/sample_x.json index 7ffa4b8b..00c4a373 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/4/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/4/sample_x.json @@ -5370,5 +5370,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/4/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/4/sample_y.json index 68951b4a..0edd41c0 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/4/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/4/sample_y.json @@ -5370,5 +5370,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/4/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/4/total_transmission.json index f35ecbaa..c6ff304c 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/4/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/4/total_transmission.json @@ -5214,5 +5214,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/4/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/4/xgm_intensity.json index c986c1ec..8d65cb39 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/4/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/4/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_g2_plot.json index d6a6b8b2..fe6e7cbd 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_intensity_outliers_plot.json index 03279f66..28e0d26e 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_q_rings_plot.json index 398c2932..d426887f 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_saxs_plot.json index 97189a8a..3b2291e8 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/4/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/5/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/5/n_pulses.json index b7da7e83..5bb9a8f1 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/5/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/5/n_pulses.json @@ -5214,5 +5214,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/5/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/5/sample_x.json index 4b00de74..0b7274ab 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/5/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/5/sample_x.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/5/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/5/sample_y.json index 6c1be4a4..38b6368c 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/5/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/5/sample_y.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/5/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/5/total_transmission.json index 9ce58cfd..c0bf2a44 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/5/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/5/total_transmission.json @@ -5214,5 +5214,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/5/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/5/xgm_intensity.json index b36be201..4923eb65 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/5/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/5/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_g2_plot.json index 1dc9edeb..905daca5 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_intensity_outliers_plot.json index 164faa5e..8c171fb3 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_q_rings_plot.json index bcf8157e..ebf7796c 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_saxs_plot.json index d16d5322..cd96a13c 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/5/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/6/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/6/n_pulses.json index 8a228280..485f0a79 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/6/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/6/n_pulses.json @@ -5214,5 +5214,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/6/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/6/sample_x.json index 65cb2e2b..eb80efc8 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/6/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/6/sample_x.json @@ -5374,5 +5374,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/6/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/6/sample_y.json index 0277d299..6f052991 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/6/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/6/sample_y.json @@ -5374,5 +5374,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/6/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/6/total_transmission.json index 77ba7e10..b11bce24 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/6/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/6/total_transmission.json @@ -5214,5 +5214,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/6/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/6/xgm_intensity.json index 530a38a5..b07aa2c5 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/6/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/6/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_g2_plot.json index bb1bbf98..cae25ec2 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_intensity_outliers_plot.json index d96dd775..e95ab63f 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_q_rings_plot.json index 454de29c..cde4db24 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_saxs_plot.json index 31de3d79..a6c92658 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/6/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/7/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/7/n_pulses.json index e10ef0ee..be6ca7e2 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/7/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/7/n_pulses.json @@ -5214,5 +5214,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/7/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/7/sample_x.json index b44bb554..f405dfc7 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/7/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/7/sample_x.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/7/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/7/sample_y.json index 858fe6ca..7b862372 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/7/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/7/sample_y.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/7/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/7/total_transmission.json index 54d6ca76..39a3330d 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/7/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/7/total_transmission.json @@ -5214,5 +5214,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/7/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/7/xgm_intensity.json index d07a5a9d..6bf6f867 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/7/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/7/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_g2_plot.json index 6affa209..03041a17 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_intensity_outliers_plot.json index 727d39fa..fe502f93 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_q_rings_plot.json index 61ec17c9..50e01e5e 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_saxs_plot.json index 478109b1..8122f697 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/7/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/8/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/8/n_pulses.json index 3ca4312a..a634edff 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/8/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/8/n_pulses.json @@ -5214,5 +5214,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/8/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/8/sample_x.json index a7d997ef..8909c017 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/8/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/8/sample_x.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/8/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/8/sample_y.json index a16e3321..9e1a213e 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/8/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/8/sample_y.json @@ -5372,5 +5372,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/8/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/8/total_transmission.json index cae4f375..9e5bccaa 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/8/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/8/total_transmission.json @@ -5214,5 +5214,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/8/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/8/xgm_intensity.json index 27ece834..f9a037e0 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/8/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/8/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_g2_plot.json index 007e1e5a..241ea7f8 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_intensity_outliers_plot.json index 72163da9..87ef5b56 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_q_rings_plot.json index 7d3dfba6..d72abfa7 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_saxs_plot.json index 18b6c8c8..4d3f34bd 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/8/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/9/n_pulses.json b/frontend/apps/demo/public/examples/xpcs/data/9/n_pulses.json index e0fd27fa..5dd9acd7 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/9/n_pulses.json +++ b/frontend/apps/demo/public/examples/xpcs/data/9/n_pulses.json @@ -5214,5 +5214,5 @@ ] }, "name": "pulses", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/9/sample_x.json b/frontend/apps/demo/public/examples/xpcs/data/9/sample_x.json index b056f5ed..ebefc791 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/9/sample_x.json +++ b/frontend/apps/demo/public/examples/xpcs/data/9/sample_x.json @@ -5374,5 +5374,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERX.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/9/sample_y.json b/frontend/apps/demo/public/examples/xpcs/data/9/sample_y.json index 389d70f9..cc6a8e6b 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/9/sample_y.json +++ b/frontend/apps/demo/public/examples/xpcs/data/9/sample_y.json @@ -5374,5 +5374,5 @@ ] }, "name": "MID_SAE_FSSS_MOTOR_SCANNERY.actualPosition", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/9/total_transmission.json b/frontend/apps/demo/public/examples/xpcs/data/9/total_transmission.json index d87629f7..53dfcaac 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/9/total_transmission.json +++ b/frontend/apps/demo/public/examples/xpcs/data/9/total_transmission.json @@ -5214,5 +5214,5 @@ ] }, "name": "total_transmission", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/9/xgm_intensity.json b/frontend/apps/demo/public/examples/xpcs/data/9/xgm_intensity.json index d4288612..2fa52680 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/9/xgm_intensity.json +++ b/frontend/apps/demo/public/examples/xpcs/data/9/xgm_intensity.json @@ -574,5 +574,5 @@ ] }, "name": "SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD", - "dtype": "array" + "dtype": "array1d" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_g2_plot.json b/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_g2_plot.json index 31f3897d..be95fc93 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_g2_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_g2_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_g2_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_intensity_outliers_plot.json b/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_intensity_outliers_plot.json index baa5c260..e07b16f0 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_intensity_outliers_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_intensity_outliers_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_intensity_outliers_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_q_rings_plot.json b/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_q_rings_plot.json index 536bbcbb..e7557249 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_q_rings_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_q_rings_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_q_rings_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_saxs_plot.json b/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_saxs_plot.json index 8a451fd7..caed0ae9 100644 --- a/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_saxs_plot.json +++ b/frontend/apps/demo/public/examples/xpcs/data/9/xpcs_saxs_plot.json @@ -7,5 +7,5 @@ ] }, "name": "xpcs_saxs_plot", - "dtype": "png" + "dtype": "image" } \ No newline at end of file diff --git a/frontend/e2e/tests/app/plots/preview-plot.spec.ts b/frontend/e2e/tests/app/plots/preview-plot.spec.ts index 9e841cb9..b9e8e4d0 100644 --- a/frontend/e2e/tests/app/plots/preview-plot.spec.ts +++ b/frontend/e2e/tests/app/plots/preview-plot.spec.ts @@ -15,7 +15,7 @@ test.use({ viewport: PLOT_VIEWPORT }) // the scalar shown in the table cell. One per render branch: const SCATTER_VAR = 'xgm_intensity' // 1-D array -> Plotly scatter const SCALAR_VAR = 'n_trains' // scalar number -> "unable to display" notice -const IMAGE_VAR = 'xpcs_g2_plot' // png -> plain +const IMAGE_VAR = 'xpcs_g2_plot' // image -> plain test('right-clicking a cell and choosing "Plot: preview" plots its preview data', async ({ page, @@ -65,7 +65,7 @@ test('right-clicking a scalar cell shows the unable-to-display notice', async ({ await expect(page.getByText(/scalar/)).toContainText(String(scalarValue)) }) -test('right-clicking a png cell renders the image instead of a figure', async ({ +test('right-clicking an image cell renders the picture instead of a figure', async ({ page, example, }) => { diff --git a/frontend/packages/shared/src/constants.ts b/frontend/packages/shared/src/constants.ts index 43a68351..11813dd5 100644 --- a/frontend/packages/shared/src/constants.ts +++ b/frontend/packages/shared/src/constants.ts @@ -2,4 +2,4 @@ // first pass (mirrors the API's HEAVY_DATA). A null value with one of these is // a blank still being fetched; a null with any other dtype is a genuinely empty // cell. Shared so the client and the mock server track the API in lockstep. -export const HEAVY_DTYPES = new Set(['image', 'rgba', 'array']) +export const HEAVY_DTYPES = new Set(['image', 'array1d']) diff --git a/frontend/packages/ui/src/constants.ts b/frontend/packages/ui/src/constants.ts index 8071b3ba..fe975167 100644 --- a/frontend/packages/ui/src/constants.ts +++ b/frontend/packages/ui/src/constants.ts @@ -37,7 +37,7 @@ export const VARIABLES = { } export const DTYPES = { image: 'image', - array: 'array', + array1d: 'array1d', string: 'string', number: 'number', timestamp: 'timestamp', diff --git a/frontend/packages/ui/src/features/plots/plots.types.ts b/frontend/packages/ui/src/features/plots/plots.types.ts index 1bc00509..4a20dbb5 100644 --- a/frontend/packages/ui/src/features/plots/plots.types.ts +++ b/frontend/packages/ui/src/features/plots/plots.types.ts @@ -50,18 +50,18 @@ type PreviewBase = { attrs?: PreviewAttrs } -// An array or a 2D image: the backend sends these as a serialized DataArray, so -// they carry the dimensions and coordinates to plot the values against. +// A 1D or 2D numeric array: the backend sends these as a serialized DataArray, +// so they carry the dimensions and coordinates to plot the values against. type PreviewArray = PreviewBase & { - dtype: 'array' | 'image' + dtype: 'array1d' | 'array2d' dims: string[] coords: { [dim: string]: number[] } } -// A single value with nothing to plot it against. An RGBA image arrives already -// encoded as a png, and the rest are scalars; none of them has dimensions. +// A single value with nothing to plot it against. A picture arrives already +// rendered to a base64 png, and the rest are scalars; none has dimensions. type PreviewScalar = PreviewBase & { - dtype: 'png' | 'number' | 'string' | 'boolean' | 'timestamp' | 'none' + dtype: 'image' | 'number' | 'string' | 'boolean' | 'timestamp' | 'none' } // What extracted_data returns for one run and variable: the values, plus the diff --git a/frontend/packages/ui/src/features/plots/preview-plot.transforms.ts b/frontend/packages/ui/src/features/plots/preview-plot.transforms.ts index 432c0b04..a35c10a0 100644 --- a/frontend/packages/ui/src/features/plots/preview-plot.transforms.ts +++ b/frontend/packages/ui/src/features/plots/preview-plot.transforms.ts @@ -8,14 +8,14 @@ export function toPlotTrace( { run }: { run: string } ): PlotTrace { switch (value.dtype) { - case 'array': { + case 'array1d': { const dim = value.dims[0] return { x: { name: dim, value: value.coords[dim] }, y: { name: `Run ${run}`, value: value.data as number[] }, } } - case 'image': { + case 'array2d': { const [y, x] = value.dims.map((axis) => ({ name: axis, value: value.coords[axis], @@ -35,15 +35,15 @@ export function toPlotMeta(value: PreviewValue): PlotMeta { const meta: PlotMeta = { type: 'unsupported' } switch (value.dtype) { - case 'array': + case 'array1d': meta.x = { name: value.dims[0] } meta.y = { name: value.name } meta.type = 'scatter' break - case 'image': + case 'array2d': meta.type = 'heatmap' break - case 'png': + case 'image': meta.type = 'image' break case 'number': diff --git a/frontend/packages/ui/src/features/table/cells.ts b/frontend/packages/ui/src/features/table/cells.ts index 007c5057..b1caa04a 100644 --- a/frontend/packages/ui/src/features/table/cells.ts +++ b/frontend/packages/ui/src/features/table/cells.ts @@ -280,7 +280,7 @@ const gridCellFactory: Partial> = { [DTYPES.image]: imageCell, [DTYPES.string]: textCell, [DTYPES.number]: numberCell, - [DTYPES.array]: arrayCell, + [DTYPES.array1d]: arrayCell, [DTYPES.timestamp]: dateCell, } diff --git a/frontend/packages/ui/tests/data/table/table-data.transforms.test.ts b/frontend/packages/ui/tests/data/table/table-data.transforms.test.ts index 54989b93..76b011ab 100644 --- a/frontend/packages/ui/tests/data/table/table-data.transforms.test.ts +++ b/frontend/packages/ui/tests/data/table/table-data.transforms.test.ts @@ -107,7 +107,7 @@ test('runKey pairs proposal and run into a lookup key', () => { // A heavy value the @lightweight directive held back: the server sends the cell // with its summary value nulled out. const blanked = (name: string, error: CellError | null = null) => - cell({ name, value: null, dtype: 'array', error }) + cell({ name, value: null, dtype: 'array1d', error }) describe('heavyCellNames', () => { test('names the blanked cells worth a second fetch', () => { diff --git a/frontend/packages/ui/tests/features/plots/use-preview-plot-data.test.tsx b/frontend/packages/ui/tests/features/plots/use-preview-plot-data.test.tsx index a166ab66..487bfa56 100644 --- a/frontend/packages/ui/tests/features/plots/use-preview-plot-data.test.tsx +++ b/frontend/packages/ui/tests/features/plots/use-preview-plot-data.test.tsx @@ -16,7 +16,7 @@ const VARIABLE = 'spectrum' const spectrumFor = (run: number) => ({ data: [run, run + 1], name: VARIABLE, - dtype: 'array', + dtype: 'array1d', dims: ['pulse'], coords: { pulse: [0, 1] }, attrs: {}, diff --git a/frontend/packages/ui/tests/features/table/cells.test.ts b/frontend/packages/ui/tests/features/table/cells.test.ts index 96cfb684..b5a4a3db 100644 --- a/frontend/packages/ui/tests/features/table/cells.test.ts +++ b/frontend/packages/ui/tests/features/table/cells.test.ts @@ -22,7 +22,7 @@ describe('getCell', () => { getCell({ value: undefined, dtype: DTYPES.image, options: {} }).kind ).toBe(GridCellKind.Loading) expect( - getCell({ value: undefined, dtype: DTYPES.array, options: {} }).kind + getCell({ value: undefined, dtype: DTYPES.array1d, options: {} }).kind ).toBe(GridCellKind.Loading) }) diff --git a/frontend/packages/ui/tests/features/table/use-table-runs.test.tsx b/frontend/packages/ui/tests/features/table/use-table-runs.test.tsx index 2b239fbd..72310050 100644 --- a/frontend/packages/ui/tests/features/table/use-table-runs.test.tsx +++ b/frontend/packages/ui/tests/features/table/use-table-runs.test.tsx @@ -44,7 +44,7 @@ const runFor = (run: number) => ({ run, name: 'spectrum', value: null, - dtype: 'array', + dtype: 'array1d', }), ], }) @@ -179,7 +179,7 @@ test('does not flash a run filled by a cache write', async () => { run: 1, name: 'spectrum', value: [1, 2, 3], - dtype: 'array', + dtype: 'array1d', }), ], }, diff --git a/frontend/packages/ui/tests/graphql/type-policies.test.ts b/frontend/packages/ui/tests/graphql/type-policies.test.ts index 08d0bf8d..faeee64b 100644 --- a/frontend/packages/ui/tests/graphql/type-policies.test.ts +++ b/frontend/packages/ui/tests/graphql/type-policies.test.ts @@ -90,8 +90,8 @@ const dtypeOf = ( name: string ) => summaryOf(runs, identity, name)?.dtype -const blanked = cell({ name: 'spectrum', value: null, dtype: 'array' }) -const filled = cell({ name: 'spectrum', value: [1, 2, 3], dtype: 'array' }) +const blanked = cell({ name: 'spectrum', value: null, dtype: 'array1d' }) +const filled = cell({ name: 'spectrum', value: [1, 2, 3], dtype: 'array1d' }) test('the lightweight, deferred, and pushed cell sets share one run', () => { // The lightweight pass lands the run with its heavy value blanked. @@ -183,7 +183,7 @@ test('an error alone cannot clear a value under a heavy dtype', () => { cell({ name: 'spectrum', value: null, - dtype: 'array', + dtype: 'array1d', error: { cls: 'ValueError', message: 'boom' }, }), ]), From 93516b7bc02b8cb58d7b3ac60f4e7184d0e63c54 Mon Sep 17 00:00:00 2001 From: Cammille Carinan Date: Tue, 28 Jul 2026 06:15:01 +0200 Subject: [PATCH 4/6] refactor(frontend/plots): derive the preview dtypes from one shared list --- frontend/packages/shared/src/constants.ts | 17 +++++++++++++++++ .../ui/src/features/plots/plots.types.ts | 16 +++++++++++----- .../features/plots/preview-plot.transforms.ts | 18 +++++++++++++++++- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/frontend/packages/shared/src/constants.ts b/frontend/packages/shared/src/constants.ts index 11813dd5..d75fb02e 100644 --- a/frontend/packages/shared/src/constants.ts +++ b/frontend/packages/shared/src/constants.ts @@ -3,3 +3,20 @@ // a blank still being fetched; a null with any other dtype is a genuinely empty // cell. Shared so the client and the mock server track the API in lockstep. export const HEAVY_DTYPES = new Set(['image', 'array1d']) + +// The preview dtypes the plots feature can render; only an array carries dims +// and coords. Named like the summary dtypes above but a different payload. +export const PREVIEW_ARRAY_DTYPES = ['array1d', 'array2d'] as const +export const PREVIEW_SCALAR_DTYPES = [ + 'image', + 'number', + 'string', + 'boolean', + 'timestamp', + 'none', +] as const + +export const PREVIEW_DTYPES = new Set([ + ...PREVIEW_ARRAY_DTYPES, + ...PREVIEW_SCALAR_DTYPES, +]) diff --git a/frontend/packages/ui/src/features/plots/plots.types.ts b/frontend/packages/ui/src/features/plots/plots.types.ts index 4a20dbb5..8d4f4878 100644 --- a/frontend/packages/ui/src/features/plots/plots.types.ts +++ b/frontend/packages/ui/src/features/plots/plots.types.ts @@ -1,3 +1,8 @@ +import type { + PREVIEW_ARRAY_DTYPES, + PREVIEW_SCALAR_DTYPES, +} from '@damnit-frontend/shared/constants' + type TraceChannel = { value: T name: string @@ -24,7 +29,7 @@ export type PlotMeta = { data?: TraceMeta // Optional: General - shape?: [number, number] + shape?: number[] // Optional: 2D images colormap_range?: [number, number] @@ -38,8 +43,9 @@ export type PlotData = { // What the backend attaches to one run's value. Both named attributes describe // that run alone: `shape` is its own array's, and `colormap_range` its own // 1-99% quantiles. The rest is whatever the context file left on the array. +// `shape` has one entry for a 1-D array and two for anything else. type PreviewAttrs = { - shape?: [number, number] + shape?: number[] colormap_range?: [number, number] [attr: string]: unknown } @@ -53,15 +59,15 @@ type PreviewBase = { // A 1D or 2D numeric array: the backend sends these as a serialized DataArray, // so they carry the dimensions and coordinates to plot the values against. type PreviewArray = PreviewBase & { - dtype: 'array1d' | 'array2d' + dtype: (typeof PREVIEW_ARRAY_DTYPES)[number] dims: string[] coords: { [dim: string]: number[] } } // A single value with nothing to plot it against. A picture arrives already // rendered to a base64 png, and the rest are scalars; none has dimensions. -type PreviewScalar = PreviewBase & { - dtype: 'image' | 'number' | 'string' | 'boolean' | 'timestamp' | 'none' +export type PreviewScalar = PreviewBase & { + dtype: (typeof PREVIEW_SCALAR_DTYPES)[number] } // What extracted_data returns for one run and variable: the values, plus the diff --git a/frontend/packages/ui/src/features/plots/preview-plot.transforms.ts b/frontend/packages/ui/src/features/plots/preview-plot.transforms.ts index a35c10a0..6defb34b 100644 --- a/frontend/packages/ui/src/features/plots/preview-plot.transforms.ts +++ b/frontend/packages/ui/src/features/plots/preview-plot.transforms.ts @@ -1,4 +1,9 @@ -import { type PlotMeta, type PlotTrace, type PreviewValue } from './plots.types' +import { + type PlotMeta, + type PlotTrace, + type PreviewScalar, + type PreviewValue, +} from './plots.types' // extracted_data is a JSON scalar, so `value.data` arrives as unknown and its // shape is only knowable from `dtype`. Each branch narrows it to what Plot @@ -27,6 +32,9 @@ export function toPlotTrace( } } default: + // Everything left plots as a bare value. A new array dtype has to be + // given its own branch above before it builds. + value satisfies PreviewScalar return { data: { name: `Run ${run}`, value: value.data } } } } @@ -52,6 +60,14 @@ export function toPlotMeta(value: PreviewValue): PlotMeta { case 'timestamp': meta.type = 'scalar' break + case 'none': + // A run the variable has no value for, or one the backend could not type. + // There is nothing to draw either way. + break + default: + // A new dtype has to be drawn here before it builds. An unknown one at + // runtime means a mismatched API, and stays unsupported. + value satisfies never } // Only the attributes the plot declares. `attrs` also carries whatever the From 167dcfa8102ff06469c85b490f83860d1a7a1b94 Mon Sep 17 00:00:00 2001 From: Cammille Carinan Date: Tue, 28 Jul 2026 06:15:23 +0200 Subject: [PATCH 5/6] test(frontend/plots): cover the preview plot transforms --- .../plots/preview-plot.transforms.test.ts | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 frontend/packages/ui/tests/features/plots/preview-plot.transforms.test.ts diff --git a/frontend/packages/ui/tests/features/plots/preview-plot.transforms.test.ts b/frontend/packages/ui/tests/features/plots/preview-plot.transforms.test.ts new file mode 100644 index 00000000..7c4461b8 --- /dev/null +++ b/frontend/packages/ui/tests/features/plots/preview-plot.transforms.test.ts @@ -0,0 +1,96 @@ +import { expect, test } from 'vitest' + +import { + toPlotMeta, + toPlotTrace, +} from '#src/features/plots/preview-plot.transforms' +import { type PreviewValue } from '#src/features/plots/plots.types' + +// The backend names a 2-D array's dims [y, x], so these coords are far enough +// apart to tell a swapped axis from a correct one. +const twoDimensional: PreviewValue = { + dtype: 'array2d', + name: 'scan', + data: [ + [1, 2], + [3, 4], + ], + dims: ['y', 'x'], + coords: { y: [10, 11], x: [20, 21] }, +} + +// Mirrors data/1/xgm_intensity.json: the backend keeps the DataArray's own +// source name and only falls back to the variable name when it has none. +const oneDimensional: PreviewValue = { + dtype: 'array1d', + name: 'SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD', + data: [1, 2, 3], + dims: ['pulseIndex'], + coords: { pulseIndex: [0, 1, 2] }, + attrs: { shape: [3] }, +} + +test('a 2-D preview keeps only the shape and colormap range from attrs', () => { + // `attrs` also carries whatever the context file left on the array. Spreading + // it whole put one run's own metadata on a plot that draws every run. + const meta = toPlotMeta({ + ...twoDimensional, + attrs: { shape: [2, 2], colormap_range: [0, 4], sample_id: 'run-7-only' }, + }) + + expect(meta).toEqual({ + type: 'heatmap', + shape: [2, 2], + colormap_range: [0, 4], + }) +}) + +test('a 1-D preview names its x axis from the dim and its y from the source', () => { + expect(toPlotMeta(oneDimensional)).toEqual({ + type: 'scatter', + shape: [3], + x: { name: 'pulseIndex' }, + y: { name: 'SA2_XTD1_XGM_XGM_DOOCS:output.data.intensityTD' }, + }) +}) + +test('an image preview keeps the shape the picture is drawn at', () => { + // Every dtype passes `shape` through; the image is the only one drawn at it. + const meta = toPlotMeta({ + dtype: 'image', + name: 'xpcs_saxs_plot', + data: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjq', + attrs: { shape: [480, 640] }, + }) + + expect(meta).toEqual({ type: 'image', shape: [480, 640] }) +}) + +test('a preview with no value has nothing to draw', () => { + // `none` covers both a variable this run has no value for and one the backend + // could not type. Neither can be plotted, so the type is left as it started. + expect(toPlotMeta({ dtype: 'none', name: 'flag', data: null }).type).toBe( + 'unsupported' + ) +}) + +test('a 2-D preview maps the first dim to y and the second to x', () => { + const trace = toPlotTrace(twoDimensional, { run: '7' }) + + expect(trace.x).toEqual({ name: 'x', value: [20, 21] }) + expect(trace.y).toEqual({ name: 'y', value: [10, 11] }) + expect(trace.z).toEqual({ + name: 'Run 7', + value: [ + [1, 2], + [3, 4], + ], + }) +}) + +test('a 1-D preview plots its own dim against the run values', () => { + const trace = toPlotTrace(oneDimensional, { run: '7' }) + + expect(trace.x).toEqual({ name: 'pulseIndex', value: [0, 1, 2] }) + expect(trace.y).toEqual({ name: 'Run 7', value: [1, 2, 3] }) +}) From fc330dd9d9b80f9fcd5fb0b633322e99aeb9dfab Mon Sep 17 00:00:00 2001 From: Cammille Carinan Date: Tue, 28 Jul 2026 06:15:33 +0200 Subject: [PATCH 6/6] test(frontend/e2e): check every preview fixture at load --- frontend/e2e/examples/xpcs/index.ts | 53 ++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/frontend/e2e/examples/xpcs/index.ts b/frontend/e2e/examples/xpcs/index.ts index abc71221..0043b6c4 100644 --- a/frontend/e2e/examples/xpcs/index.ts +++ b/frontend/e2e/examples/xpcs/index.ts @@ -1,7 +1,8 @@ -import { readFileSync } from 'node:fs' +import { readFileSync, readdirSync } from 'node:fs' import { dirname, join } from 'node:path' import { fileURLToPath } from 'node:url' +import { PREVIEW_DTYPES } from '@damnit-frontend/shared/constants' import type { RunData, Runs, @@ -51,6 +52,56 @@ function readJson(dir: string, name: string): T { const runs = readJson(base, 'runs.json') +// How many dimensions each preview dtype carries. A dtype that is absent here +// is a scalar, which carries none. +const DIMS_BY_DTYPE: Record = { array1d: 1, array2d: 2 } + +function checkPreviewPayload(name: string, payload: ExtractedData): void { + if (!PREVIEW_DTYPES.has(payload.dtype)) { + throw new Error( + `'${name}' has an unknown preview dtype '${payload.dtype}'; ` + + 'update the fixture or the demo data' + ) + } + + // A dtype that keeps its name but changes meaning passes the check above, + // so check the payload too: array2d has two dims, array1d one, scalar none. + const expected = DIMS_BY_DTYPE[payload.dtype] ?? 0 + const dims = Array.isArray(payload.dims) ? payload.dims.length : 0 + if (dims !== expected) { + throw new Error( + `'${name}' is '${payload.dtype}' and should carry ${expected} dims, not ${dims}` + ) + } + + // A picture arrives already rendered to a base64 png, never as an array. + if (payload.dtype === 'image' && typeof payload.data !== 'string') { + throw new Error(`'${name}' is an image but its data is not a base64 string`) + } + + // One level of nesting per dimension. An empty array has no depth to read. + if (Array.isArray(payload.data) && payload.data.length > 0) { + const nested = Array.isArray(payload.data[0]) + const shouldNest = expected > 1 + if (nested !== shouldNest) { + throw new Error( + `'${name}' is '${payload.dtype}' but its data is ${nested ? 'nested' : 'flat'}` + ) + } + } +} + +// Every payload is checked at load. The demo serves these same files, so a +// vocabulary change that leaves one behind fails here, not in the shipped demo. +for (const run of readdirSync(join(base, 'data'))) { + for (const file of readdirSync(join(base, 'data', run))) { + checkPreviewPayload( + `${run}/${file}`, + readJson(join(base, 'data', run), file) + ) + } +} + export const XPCS = { meta: runs.meta, data: runs.data,