Skip to content

Plot datasets against their HDF5 dimension scales - #2035

Open
NAThompson wants to merge 1 commit into
silx-kit:mainfrom
NAThompson:feat/hdf5-dimension-scales
Open

Plot datasets against their HDF5 dimension scales#2035
NAThompson wants to merge 1 commit into
silx-kit:mainfrom
NAThompson:feat/hdf5-dimension-scales

Conversation

@NAThompson

@NAThompson NAThompson commented Aug 14, 2026

Copy link
Copy Markdown

H5Web derives plot axes from NeXus metadata only, so a file that labels its
axes the native HDF5 way -- make_scale plus attach_scale -- is plotted
against the sample index. A non-uniform abscissa can't be recovered from
indices, so such plots are wrong in shape, not merely unlabelled; today the
only workaround is to duplicate the data into hand-written NXdata groups.

Scales are resolved behind a new optional getDimensionScales on
DataProviderApi, implemented here for h5wasm, which can lean on libhdf5 to
dereference DIMENSION_LIST. Providers that leave it undefined keep plotting
against indices, as does any dimension whose scale is missing, non-numeric or
the wrong length -- the spec leaves that mismatch to the application.

Towards #1313.

@NAThompson
NAThompson force-pushed the feat/hdf5-dimension-scales branch 2 times, most recently from 786f60f to b85f997 Compare August 20, 2026 15:54
@NAThompson

Copy link
Copy Markdown
Author

@axelboc : Force pushed a fix to green up the CI-you'll need to re-approve the run.

I believe the e2e might have been victim to drift without my work breaking it?

H5Web derives plot axes from NeXus metadata only, so a file that labels its
axes the native HDF5 way -- `make_scale` plus `attach_scale` -- is plotted
against the sample index. A non-uniform abscissa can't be recovered from
indices, so such plots are wrong in shape, not merely unlabelled; today the
only workaround is to duplicate the data into hand-written `NXdata` groups.

Scales are resolved behind a new optional `getDimensionScales` on
`DataProviderApi`, implemented here for h5wasm, which can lean on libhdf5 to
dereference `DIMENSION_LIST`. Providers that leave it undefined keep plotting
against indices, as does any dimension whose scale is missing, non-numeric or
the wrong length -- the spec leaves that mismatch to the application.

Towards silx-kit#1313.
@NAThompson
NAThompson force-pushed the feat/hdf5-dimension-scales branch from b85f997 to 061975d Compare September 10, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant