h5web: a web-based viewer of HDF5 files

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

A few words about ESRF

International synchrotron (driven by 13 member states and 9 associate states)

Zdora M.-C. et al. (2020) highlighted in ESRF's Spotlight on Science 18/09/2020

Provides X-rays for many scientific applications

  • Cultural heritage
  • Biology
  • Nanotechnologies
  • ...

HDF5 is now the standard format for data acquired at ESRF

The HDF5 files follow NeXus specifications, a standard for HDF5 file structure at neutron/X-ray facilities.

Screenshot of Silx view showing detector data
Example of NeXus hierarchy Example of NeXus hierarchy

Switching to HDF5/NeXus can be difficult for users

(while practical for many other reasons...)

  • It can be hard to retrieve/browse data as NeXus adds several levels of hierarchy.
  • Data analysis/acquisition tools need to be adapted to this new format.

→ Need for a software (GUI) to easily visualise and browse HDF5 file contents

The software should allow

  • Browsing the hierarchy of a HDF5 file
  • Inspecting the HDF5 entities (links, attributes...)
  • Displaying the HDF5 datasets

It should also be

  • Flexible to be deployed in other applications
  • Performant with fast visualisations

Presenting h5web

React logo

A web application written in React, a component-based front-end framework

Development started in February 2020 in the PaNOSC project

Requests HDF5 metadata/data to a server-side provider (such as HSDS)

Demo: https://h5web.panosc.eu/

Take-home from the demo

  • Browsing and inspecting
  • Displaying n-dimensional datasets with Lines and Heatmaps (WebGL-based visualisations with React-three-fiber and visx)
  • Basic tools for UI: pan/zoom, colormap changes, scale type selection...
  • Visualisation components available as npm packages

Next steps

Using the WebGL-based visualisation components outside the app:

Other web apps at ESRF, in a JupyterLab extension

NeXus support: default plots, axis labels

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