-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support visualizing enum datasets and signals #1688
Conversation
packages/app/src/providers/h5grove/__snapshots__/h5grove-api.test.ts.snap
Show resolved
Hide resolved
packages/app/src/providers/h5grove/__snapshots__/h5grove-api.test.ts.snap
Show resolved
Hide resolved
/approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
But I wonder: you assume that enums always have numeric underlying values. Is that always the case ? Can HDF5 enum have string values ?
Apparently it is always integers: https://docs.hdfgroup.org/hdf5/v1_12/group___e_n_u_m.html ? |
Yeah I remember seeing that it's typically uint8 but allowed to be signed or unsigned int. No floats, strings, etc. |
A bunch of commits to make enum datasets first-class citizens and fix #1498.
I've made separate commits, but the gist is that I now treat enum datasets as "numeric-like", just like I did witth booleans. All providers already return numeric values anyway, so it was relatively easy.
In addition to supporting enum datasets in Line/Heatmap, and enum signals/auxiliaries in NX Line/Heatmap, I also add enum support to the Matrix and Scalar vis. In these two visualizations, I even display the enum key rather than the numeric value.