Explore and visualize HDF5 in JupyterLab with jupyterlab-h5web

Loïc Huder

European Synchrotron Radiation Facility, Grenoble, France

Picture of Grenoble with ESRF
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 823852

Why a web-based HDF5 viewer ?

Browsing HDF5/NeXus files is hard.
→ Need for HDF interactive viewers
Remote access is a much-needed feature.
→ Web is inherentely remote

This prompted the development of the web-viewer H5Web presented at HUG2020:

Continuation of the work:

jupyterlab-h5web

Bringing h5web browsing and visualisations in JupyterLab

Demo available on Binder

Demo highlights

  • Browsing and inspecting
  • Displaying n-dimensional datasets with Lines and Heatmaps (WebGL-based visualisations with react-three-fiber and visx)
  • Visualisation controls: color map, limits, axis scales, etc.
  • NEW: Support for NeXus: default plot, signal interpretation, custom axes, etc.
  • NEW: Support for complex datasets and RGB images

Serving HDF5 contents (I)

Whatever the provider, the same issues were encountered:

  • Encoding (e.g. JSON serialization of NaN and Infinity)
  • Dealing with compressed datasets (e.g. bitshuffle+lz4)
  • Resolving external links and virtual datasets

Serving HDF5 contents (II)

To solve these issues, we are developing h5grove, a Python package with the following features:

  • Core utilities to design backends e.g. JSON/binary encoders
  • Compatible with any web server solution (example apps in Tornado and Flask)
  • Based on h5py for link resolution
  • Support for dataset decompression with hdf5plugin

Used in jupyterlab-h5web version 0.0.8

Conclusion

Thank you !

PaNOSC logo

This project is funded by PaNOSC

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 823852